source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
shioyama/wharel
https://github.com/shioyama/wharel
spec/wharel_spec.rb
Ruby
mit
98
master
5,101
RSpec.describe Wharel do before(:all) do m = ActiveRecord::Migration.new m.create_table :posts do |t| t.string :title t.text :content t.timestamps end m.create_table :comments do |t| t.text :content t.integer :post_id t.timestamps end end after(:all) do ...
github
shioyama/wharel
https://github.com/shioyama/wharel
spec/spec_helper.rb
Ruby
mit
98
master
732
require "bundler/setup" require "pry-byebug" require "active_record" ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:", encoding: "utf8") ActiveRecord::Migration.verbose = false require "wharel" require 'database_cleaner' DatabaseCleaner.strategy = :transaction RSpec.configure do |con...
github
rgeo/rgeo-activerecord
https://github.com/rgeo/rgeo-activerecord
rgeo-activerecord.gemspec
Ruby
bsd-3-clause
98
main
1,302
require_relative "./lib/rgeo/active_record/version" Gem::Specification.new do |spec| spec.name = "rgeo-activerecord" spec.summary = "An RGeo module providing spatial extensions to ActiveRecord." spec.description = "RGeo is a geospatial data library for Ruby. RGeo::ActiveRecord is an optional RGeo module providin...
github
rgeo/rgeo-activerecord
https://github.com/rgeo/rgeo-activerecord
test/basic_test.rb
Ruby
bsd-3-clause
98
main
6,530
# frozen_string_literal: true require "test_helper" class BasicTest < Minitest::Test def test_version assert RGeo::ActiveRecord::VERSION end if RGeo::Geos.capi_supported? def test_as_json_geos_api setup_wkt assert_equal "POINT (1.0 2.0)", geos_capi_factory.point(1, 2).as_json end end ...
github
rgeo/rgeo-activerecord
https://github.com/rgeo/rgeo-activerecord
test/test_helper.rb
Ruby
bsd-3-clause
98
main
347
# frozen_string_literal: true require "simplecov" SimpleCov.start do add_filter "/test/" end require "minitest/autorun" require "rgeo-activerecord" require "support/fake_record" Arel::Visitors::ToSql.include RGeo::ActiveRecord::SpatialToSql Arel::Table.engine = FakeRecord::Base.new begin require "byebug" rescu...
github
rgeo/rgeo-activerecord
https://github.com/rgeo/rgeo-activerecord
test/spatial_factory_store_test.rb
Ruby
bsd-3-clause
98
main
2,910
# frozen_string_literal: true require "test_helper" class SpatialFactoryStoreTest < Minitest::Test def test_default store.default = nil assert RGeo::Cartesian.preferred_factory === store.default end def test_set_default store.clear default_factory = Object.new store.default = default_factor...
github
rgeo/rgeo-activerecord
https://github.com/rgeo/rgeo-activerecord
test/common_elements_test.rb
Ruby
bsd-3-clause
98
main
1,140
# frozen_string_literal: true require "test_helper" class CommonElementsTest < Minitest::Test class Feature def test 9 end end class Point def test 8 end end def test_geometric_type_from_name assert_equal RGeo::ActiveRecord.geometric_type_from_name(:point), RGeo::Feature::P...
github
rgeo/rgeo-activerecord
https://github.com/rgeo/rgeo-activerecord
test/support/fake_record.rb
Ruby
bsd-3-clause
98
main
2,743
# frozen_string_literal: true # From https://github.com/rails/arel/master/test/support/fake_record.rb module FakeRecord Column = Struct.new(:name, :type) class Connection attr_reader :tables attr_accessor :visitor def initialize(visitor = nil) @tables = %w[users photos developers products] ...
github
rgeo/rgeo-activerecord
https://github.com/rgeo/rgeo-activerecord
lib/rgeo/active_record.rb
Ruby
bsd-3-clause
98
main
379
# frozen_string_literal: true require "rgeo" require "active_record" require_relative "active_record/version" require_relative "active_record/spatial_expressions" require_relative "active_record/spatial_factory_store" require_relative "active_record/arel_spatial_queries" require_relative "active_record/common_adapter...
github
rgeo/rgeo-activerecord
https://github.com/rgeo/rgeo-activerecord
lib/rgeo/active_record/spatial_expressions.rb
Ruby
bsd-3-clause
98
main
6,890
# frozen_string_literal: true module RGeo module ActiveRecord # Returns true if spatial expressions (i.e. the methods in the # SpatialExpressions module) are supported. def self.spatial_expressions_supported? defined?(Arel::Nodes::NamedFunction) end # A set of spatial expression builders. ...
github
rgeo/rgeo-activerecord
https://github.com/rgeo/rgeo-activerecord
lib/rgeo/active_record/spatial_factory_store.rb
Ruby
bsd-3-clause
98
main
2,892
# frozen_string_literal: true module RGeo module ActiveRecord class SpatialFactoryStore include Singleton Entry = Struct.new(:attrs, :factory) attr_accessor :registry def initialize @registry = [] @default = nil end def register(factory, attrs = {}) ...
github
rgeo/rgeo-activerecord
https://github.com/rgeo/rgeo-activerecord
lib/rgeo/active_record/common_adapter_elements.rb
Ruby
bsd-3-clause
98
main
632
# frozen_string_literal: true module RGeo module ActiveRecord # Return a feature type module given a string type. def self.geometric_type_from_name(name) case name.to_s when /^geometrycollection/i then Feature::GeometryCollection when /^geometry/i then Feature::Geometry when /^linestr...
github
rgeo/rgeo-activerecord
https://github.com/rgeo/rgeo-activerecord
lib/rgeo/active_record/geometry_mixin.rb
Ruby
bsd-3-clause
98
main
4,160
# frozen_string_literal: true module RGeo module ActiveRecord # This module is mixed into all geometry objects. It provides an # as_json method so that ActiveRecord knows how to generate JSON # for a geometry-valued field. module GeometryMixin # The default JSON generator Proc. Renders geometr...
github
rgeo/rgeo-activerecord
https://github.com/rgeo/rgeo-activerecord
lib/rgeo/active_record/arel_spatial_queries.rb
Ruby
bsd-3-clause
98
main
4,243
# frozen_string_literal: true module RGeo module ActiveRecord # A set of common Arel visitor hacks for spatial ToSql visitors. # Generally, a spatial ActiveRecord adapter should provide a custom # ToSql Arel visitor that includes and customizes this module. # See the existing spatial adapters (i.e. p...
github
gbuesing/kmeans-clusterer
https://github.com/gbuesing/kmeans-clusterer
kmeans-clusterer.gemspec
Ruby
mit
98
master
499
Gem::Specification.new do |s| s.name = 'kmeans-clusterer' s.version = '0.11.4' s.date = '2015-04-17' s.summary = "k-means clustering" s.description = "k-means clustering. Uses NArray for fast calculations." s.authors = ["Geoff Buesing"] s.email = 'gbuesing@gmail.com' s.fi...
github
gbuesing/kmeans-clusterer
https://github.com/gbuesing/kmeans-clusterer
examples/mnist.rb
Ruby
mit
98
master
3,781
#!/usr/bin/env ruby require 'rubygems' require 'bundler/setup' require_relative '../lib/kmeans-clusterer' require_relative './utils/mnist_loader' require 'narray' require 'optparse' require 'pca' k = 10 train_size = 5000 test_size = 200 runs = 1 # not much seems to be gained by multiple runs for this example skip_plo...
github
gbuesing/kmeans-clusterer
https://github.com/gbuesing/kmeans-clusterer
examples/cities.rb
Ruby
mit
98
master
1,511
#!/usr/bin/env ruby require 'rubygems' require 'bundler/setup' require_relative '../lib/kmeans-clusterer' require 'csv' require 'optparse' k = 10 runs = 10 skip_plot = false OptionParser.new do |opts| opts.on("-kK") {|v| k = v.to_i } opts.on("--skip-plot") {|v| skip_plot = true } end.parse! cities = CSV.foreach...
github
gbuesing/kmeans-clusterer
https://github.com/gbuesing/kmeans-clusterer
examples/pick_k.rb
Ruby
mit
98
master
2,662
#!/usr/bin/env ruby require 'rubygems' require 'bundler/setup' require_relative '../lib/kmeans-clusterer' require 'optparse' skip_plot = false OptionParser.new do |opts| opts.on("--skip-plot") {|v| skip_plot = true } end.parse! # create 4 constellations of data data1 = (NArray.float(2,200).randomn + NArray[3,5])...
github
gbuesing/kmeans-clusterer
https://github.com/gbuesing/kmeans-clusterer
examples/simple.rb
Ruby
mit
98
master
1,846
#!/usr/bin/env ruby require 'rubygems' require 'bundler/setup' require_relative '../lib/kmeans-clusterer' puts "k-means:\n\n" data = [ [3, 3], [-3, 3], [3, -3], [-3, -3], [3, 4], [-3, 4], [3, -4], [-3, -4], [4, 3], [-4, 3], [4, -3], [-4, -3], [4, 4], [-4, 4], [4, -4], [-4, -4], ] kmeans = KMeansClusterer.ru...
github
gbuesing/kmeans-clusterer
https://github.com/gbuesing/kmeans-clusterer
examples/large.rb
Ruby
mit
98
master
934
#!/usr/bin/env ruby require 'bundler/setup' require_relative '../lib/kmeans-clusterer' require 'optparse' k = 10 runs = 10 d = 10 # point dimension n = 1000 # points per cluster o = 10 # cluster offset OptionParser.new do |opts| opts.on("-kK") {|v| k = v.to_i } opts.on("-dD") {|v| d = v.to_i } opts.on("-nN") {...
github
gbuesing/kmeans-clusterer
https://github.com/gbuesing/kmeans-clusterer
examples/headlines.rb
Ruby
mit
98
master
1,880
#!/usr/bin/env ruby require 'rubygems' require 'bundler/setup' require_relative '../lib/kmeans-clusterer' require_relative './utils/bag' require 'optparse' # Data from Qazvinian and radev 2011 http://www-personal.umich.edu/~vahed/data.html datafiles = Dir['examples/data/headlines/*.txt'] basenames = datafiles.map {|f...
github
gbuesing/kmeans-clusterer
https://github.com/gbuesing/kmeans-clusterer
examples/utils/mnist_loader.rb
Ruby
mit
98
master
1,817
require 'zlib' class MnistLoader def self.training_set new 'examples/data/mnist/train-images-idx3-ubyte.gz', 'examples/data/mnist/train-labels-idx1-ubyte.gz' end def self.test_set new 'examples/data/t10k-images-idx3-ubyte.gz', 'examples/data/t10k-labels-idx1-ubyte.gz' end def initialize images_fil...
github
gbuesing/kmeans-clusterer
https://github.com/gbuesing/kmeans-clusterer
examples/utils/bag.rb
Ruby
mit
98
master
3,142
require 'stopwords' require 'fast_stemmer' require 'narray' class BagOfWords attr_reader :term_index, :doc_hashes, :doc_count, :doc_frequency DEFAULT_OPTS = { # tf: :raw, idf: false, stopwords: :en, stem: true, min_term_length: 3 } def initialize opts = {} @opts = DEFAULT_OPTS.merge ...
github
gbuesing/kmeans-clusterer
https://github.com/gbuesing/kmeans-clusterer
lib/kmeans-clusterer.rb
Ruby
mit
98
master
8,453
require 'narray' class KMeansClusterer TYPECODE = { double: NArray::DFLOAT, single: NArray::SFLOAT } module Utils def self.ensure_matrix x, typecode = nil if x.is_a?(NMatrix) x elsif defined?(GSL::Matrix) && x.is_a?(GSL::Matrix) x.to_nm else NMatrix.cast(x, typecode) ...
github
gbuesing/kmeans-clusterer
https://github.com/gbuesing/kmeans-clusterer
test/test_kmeans.rb
Ruby
mit
98
master
2,980
require 'rubygems' require 'bundler/setup' require 'minitest/autorun' require_relative '../lib/kmeans-clusterer' class TestKMeansClusterer < MiniTest::Test def test_clustering data = [ [3, 3], [-3, 3], [3, -3], [-3, -3], [3, 4], [-3, 4], [3, -4], [-3, -4], [4, 3], [-4, 3], [4, -3], [-4, -3], ...
github
nshki/chusaku
https://github.com/nshki/chusaku
chusaku.gemspec
Ruby
mit
98
main
1,706
lib = File.expand_path("lib", __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "chusaku/version" Gem::Specification.new do |spec| spec.name = "chusaku" spec.version = Chusaku::VERSION spec.authors = ["Nishiki Liu"] spec.email = ["hello@nshki.com"] spec.summary = "Annotate your Rails ...
github
nshki/chusaku
https://github.com/nshki/chusaku
test/routes_test.rb
Ruby
mit
98
main
4,491
require_relative "test_helper" describe "Chusaku::Routes" do it "parses routes correctly" do expected = { "api/burritos" => { "create" => [ { verb: "POST", path: "/api/burritos", name: "burritos", defaults: {}, ...
github
nshki/chusaku
https://github.com/nshki/chusaku
test/test_helper.rb
Ruby
mit
98
main
338
$LOAD_PATH.unshift File.expand_path("../lib", __dir__) require_relative "mock/rails" require_relative "mock/file" require "chusaku/cli" require "minitest/autorun" module ChusakuTestPlugin def before_setup super File.reset_mock Rails.set_route_allowlist([]) end end class Minitest::Test include Chus...
github
nshki/chusaku
https://github.com/nshki/chusaku
test/cli_test.rb
Ruby
mit
98
main
3,455
require_relative "test_helper" describe "Chusaku::CLI" do it "implements a help flag" do # -h out, = capture_io do assert_equal(0, Chusaku::CLI.new.call(["-h"])) end assert_match(/Show this help message and quit/, out) # --help out, = capture_io do assert_equal(0, Chusaku::CLI.ne...
github
nshki/chusaku
https://github.com/nshki/chusaku
test/parser_test.rb
Ruby
mit
98
main
3,751
require_relative "test_helper" describe "Chusaku::Parser" do it "parses example file properly" do result = Chusaku::Parser.call \ path: "#{__dir__}/mock/examples/example.rb", actions: %w[foo] assert_equal(4, result[:groups].size) assert_equal \ %i[code comment action code], resul...
github
nshki/chusaku
https://github.com/nshki/chusaku
test/chusaku_test.rb
Ruby
mit
98
main
5,777
require_relative "test_helper" describe "Chusaku" do it "implements a `dry` option" do exit_code = 0 out, _err = capture_io { exit_code = Chusaku.call(dry: true) } assert_equal(0, exit_code) assert_empty(File.written_files) assert_includes(out, "This was a dry run so no files were changed.") ...
github
nshki/chusaku
https://github.com/nshki/chusaku
test/mock/rails.rb
Ruby
mit
98
main
4,266
# This file overrides Rails methods such that we can test without installing # multiple versions of Rails in the test suite. If different versions of Rails # begin treating route generation differently, new overrides should be written # for each version. # # The mocks used should reflect the files located in `test/mock...
github
nshki/chusaku
https://github.com/nshki/chusaku
test/mock/file.rb
Ruby
mit
98
main
660
class File @@written_files = {} # Given a file's content and path, write the content in memory rather than in # the actual file. # # @param content [String] Contents of file # @param path [String] File path # @return [void] def test_write(content, path) @@written_files[path] = content end clas...
github
nshki/chusaku
https://github.com/nshki/chusaku
test/mock/engine.rb
Ruby
mit
98
main
1,227
# This file overrides Rails methods such that we can test without installing # multiple versions of Rails in the test suite. If different versions of Rails # begin treating route generation differently, new overrides should be written # for each version. # # The mocks used should reflect the files located in `test/mock...
github
nshki/chusaku
https://github.com/nshki/chusaku
test/mock/route_helper.rb
Ruby
mit
98
main
1,840
module RouteHelper # Define an allowlist of controller/actions that will be mocked. # # @param route_allowlist [Array<String>] In format "controller#action" # @return [void] def set_route_allowlist(route_allowlist) @@route_allowlist = route_allowlist end # Stored procedure for mocking a new route. ...
github
nshki/chusaku
https://github.com/nshki/chusaku
test/mock/app/controllers/api/tacos_controller.rb
Ruby
mit
98
main
832
module Api class TacosController < ApplicationController def show end # This is an example of generated annotations that come with Rails 6 # scaffolds. These should be replaced by Chusaku annotations. # POST /api/tacos # PATCH/PUT /api/tacos/1 def create end # Update all the taco...
github
nshki/chusaku
https://github.com/nshki/chusaku
test/mock/app/controllers/api/cakes_controller.rb
Ruby
mit
98
main
212
module Api class CakesController < PastriesController # This route's GET action should be named the same as its PUT action, # even though only the PUT action is named. def inherit end end end
github
nshki/chusaku
https://github.com/nshki/chusaku
lib/chusaku.rb
Ruby
mit
98
main
7,064
require "rake" require "chusaku/version" require "chusaku/parser" require "chusaku/routes" # Handles core functionality of annotating projects. module Chusaku DEFAULT_CONTROLLERS_PATTERN = "**/*_controller.rb".freeze DEFAULT_EXCLUSION_PATTERN = "vendor/**/*_controller.rb".freeze class << self # The main met...
github
nshki/chusaku
https://github.com/nshki/chusaku
lib/chusaku/cli.rb
Ruby
mit
98
main
4,000
require "optparse" require "chusaku" module Chusaku # Enables flags for the `chusaku` executable. class CLI attr_reader :options STATUS_SUCCESS = 0 STATUS_ERROR = 1 Finished = Class.new(RuntimeError) NotARailsProject = Class.new(RuntimeError) # Initializes a new instance of `Chusaku::CLI...
github
nshki/chusaku
https://github.com/nshki/chusaku
lib/chusaku/routes.rb
Ruby
mit
98
main
6,804
require "active_support/inflector" module Chusaku # Handles extracting information about the Rails project's routes. class Routes class << self # Primary method to call. # # Example output: # # { # "users" => { # "edit" => [ # { # ...
github
nshki/chusaku
https://github.com/nshki/chusaku
lib/chusaku/parser.rb
Ruby
mit
98
main
2,914
module Chusaku # Handles parsing a file and groups its lines into categories. module Parser # Primary method to call. # # Example output: # # { # content: <Original file content>, # groups: [ # { # type: :code, # body: 'class Foo\n', # ...
github
nshki/chusaku
https://github.com/nshki/chusaku
lib/tasks/chusaku.rake
Ruby
mit
98
main
226
chusaku_lib = File.expand_path(File.dirname(__FILE__, 2)) desc "Add route annotations to your Rails actions" task chusaku: :environment do require "#{chusaku_lib}/chusaku/cli" Chusaku::CLI.new.call(ARGV[2...] || []) end
github
jeremyevans/sequel_postgresql_triggers
https://github.com/jeremyevans/sequel_postgresql_triggers
sequel_postgresql_triggers.gemspec
Ruby
mit
98
master
943
spec = Gem::Specification.new do |s| s.name = "sequel_postgresql_triggers" s.version = "1.6.0" s.author = "Jeremy Evans" s.email = "code@jeremyevans.net" s.platform = Gem::Platform::RUBY s.summary = "Database enforced timestamps, immutable columns, counter/sum caches, and touch propogation" s.files = %w'R...
github
jeremyevans/sequel_postgresql_triggers
https://github.com/jeremyevans/sequel_postgresql_triggers
Rakefile
Ruby
mit
98
master
1,687
require "rake" require "rake/clean" CLEAN.include ["*.gem", "rdoc"] desc "Generate rdoc" task :rdoc do rdoc_dir = "rdoc" rdoc_opts = ["--line-numbers", "--inline-source", '--title', 'Sequel PostgreSQL Triggers: Database enforced timestamps, immutable columns, and counter/sum caches'] begin gem 'hanna' ...
github
jeremyevans/sequel_postgresql_triggers
https://github.com/jeremyevans/sequel_postgresql_triggers
lib/sequel/extensions/pg_triggers.rb
Ruby
mit
98
master
18,147
# The pg_triggers extension adds support to the Database instance for easily # creating triggers and trigger returning functions for common needs. # module Sequel module Postgres PGT_DEFINE = proc do def pgt_counter_cache(main_table, main_table_id_column, counter_column, counted_table, counted_table_id_col...
github
jeremyevans/sequel_postgresql_triggers
https://github.com/jeremyevans/sequel_postgresql_triggers
spec/sequel_postgresql_triggers_spec.rb
Ruby
mit
98
master
33,511
#!/usr/bin/env ruby require 'sequel' if coverage = ENV.delete('COVERAGE') require 'simplecov' SimpleCov.start do enable_coverage :branch command_name coverage add_filter{|f| f.filename.match(%r{\A#{Regexp.escape(File.expand_path(File.dirname(__FILE__)))}/})} add_group('Missing'){|src| src.covered_...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
Gemfile
Ruby
bsd-3-clause
98
master
247
source 'https://rubygems.org' gemspec group :test do gem 'ddtrace', git: 'https://github.com/datadog/dd-trace-rb', tag: 'v1.23.3' gem 'ffi', '1.15.5' gem 'rubocop' gem 'psych', '5.0.1' gem 'rspec' gem 'simplecov' gem 'webmock' end
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
dogapi.gemspec
Ruby
bsd-3-clause
98
master
1,463
# -*- encoding: utf-8 -*- lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'dogapi/version' Gem::Specification.new do |spec| spec.name = 'dogapi' spec.version = Dogapi::VERSION spec.authors = ['Datadog, Inc.'] spec.email = [...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
Rakefile
Ruby
bsd-3-clause
98
master
623
require 'bundler/gem_tasks' require 'rake/testtask' require 'rdoc/task' require 'rspec/core/rake_task' task :default => :spec # Doc stuff RDoc::Task.new do |rd| rd.main = 'README.rdoc' rd.rdoc_files.include('README.rdoc', 'lib/**/*.rb', 'CHANGELOG.md') rd.options << '--line-numbers' << '--inline-source' rd.rd...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi.rb
Ruby
bsd-3-clause
98
master
355
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require 'dogapi/common' require 'dogapi/facade' require 'dogapi/event' require 'dogap...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/capistrano/datadog.rb
Ruby
bsd-3-clause
98
master
4,772
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require 'etc' require 'digest/md5' require 'timeout' require 'dogapi' module Capist...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/capistrano/datadog/v2.rb
Ruby
bsd-3-clause
98
master
2,488
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require 'benchmark' require 'delegate' # Capistrano v2 # Monkeypatch capistrano to ...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/capistrano/datadog/v3.rb
Ruby
bsd-3-clause
98
master
2,428
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require 'benchmark' require 'delegate' require 'sshkit/formatters/pretty' require 'ss...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/version.rb
Ruby
bsd-3-clause
98
master
280
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi VERSION = '1.45.0.dev.1' end
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1.rb
Ruby
bsd-3-clause
98
master
1,018
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require 'dogapi/v1/alert' require 'dogapi/v1/comment' require 'dogapi/v1/dash' requir...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/facade.rb
Ruby
bsd-3-clause
98
master
28,588
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require 'time' require 'dogapi/v1' require 'dogapi/v2' module Dogapi # A simple D...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v2.rb
Ruby
bsd-3-clause
98
master
270
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require 'dogapi/v2/dashboard_list'
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/common.rb
Ruby
bsd-3-clause
98
master
8,068
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require 'cgi' require 'net/https' require 'rbconfig' require 'socket' require 'uri' r...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/event.rb
Ruby
bsd-3-clause
98
master
3,992
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require 'net/http' require 'rubygems' require 'multi_json' module Dogapi # Metad...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/metric.rb
Ruby
bsd-3-clause
98
master
1,186
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require 'net/http' require 'rubygems' require 'multi_json' module Dogapi # <b>DE...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v2/dashboard_list.rb
Ruby
bsd-3-clause
98
master
1,633
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V2 # for namespacing # Dashboard List API class Dashbo...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/aws_logs.rb
Ruby
bsd-3-clause
98
master
4,287
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing # AwsLogsService for user interaction...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/dashboard.rb
Ruby
bsd-3-clause
98
master
5,568
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing # Dashboard API class DashboardSe...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/hosts.rb
Ruby
bsd-3-clause
98
master
619
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing # Hosts API class HostsService < ...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/dashboard_list.rb
Ruby
bsd-3-clause
98
master
2,410
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing # Dashboard List API class Dashbo...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/logs_pipeline.rb
Ruby
bsd-3-clause
98
master
1,389
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing class LogsPipelineService < Dogapi::AP...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/tag.rb
Ruby
bsd-3-clause
98
master
2,350
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing # class TagService < Dogapi::APIS...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/search.rb
Ruby
bsd-3-clause
98
master
861
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing class SearchService < Dogapi::APIServ...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/integration.rb
Ruby
bsd-3-clause
98
master
1,780
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing class IntegrationService < Dogapi::AP...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/alert.rb
Ruby
bsd-3-clause
98
master
1,408
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing class AlertService < Dogapi::APIServi...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/aws_integration.rb
Ruby
bsd-3-clause
98
master
3,828
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing # AwsIntegrationService for user inte...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/event.rb
Ruby
bsd-3-clause
98
master
2,059
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing # Event-specific client affording mor...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/gcp_integration.rb
Ruby
bsd-3-clause
98
master
2,559
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing # GcpIntegrationService for user inte...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/monitor.rb
Ruby
bsd-3-clause
98
master
5,903
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing class MonitorService < Dogapi::APIServ...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/comment.rb
Ruby
bsd-3-clause
98
master
937
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing class CommentService < Dogapi::APISer...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/user.rb
Ruby
bsd-3-clause
98
master
2,031
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing class UserService < Dogapi::APIServic...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/metric.rb
Ruby
bsd-3-clause
98
master
2,608
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing # Event-specific client affording mor...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/service_level_objective.rb
Ruby
bsd-3-clause
98
master
4,203
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing # Implements Service Level Objectives...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/screenboard.rb
Ruby
bsd-3-clause
98
master
1,378
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing class ScreenboardService < Dogapi::AP...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/embed.rb
Ruby
bsd-3-clause
98
master
2,313
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing # ================ # EMBED API...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/metadata.rb
Ruby
bsd-3-clause
98
master
639
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 class MetadataService < Dogapi::APIService API_V...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/usage.rb
Ruby
bsd-3-clause
98
master
3,572
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing class UsageService < Dogapi::APIServi...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/service_check.rb
Ruby
bsd-3-clause
98
master
641
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 class ServiceCheckService < Dogapi::APIService A...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/dash.rb
Ruby
bsd-3-clause
98
master
1,584
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing class DashService < Dogapi::APIServic...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/snapshot.rb
Ruby
bsd-3-clause
98
master
745
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing class SnapshotService < Dogapi::APISe...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/synthetics.rb
Ruby
bsd-3-clause
98
master
3,183
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing # SyntheticsService is the class respo...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
lib/dogapi/v1/azure_integration.rb
Ruby
bsd-3-clause
98
master
2,798
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. module Dogapi class V1 # for namespacing # AzureIntegrationService for user in...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
examples/custom_event.rb
Ruby
bsd-3-clause
98
master
1,184
require 'rubygems' require 'dogapi' # Create a simple client # The host is optional here, it's a shortcut to tie event and metrics to a given host # # You typically want to do: # Dogapi::Client.new(your_actual_api_key_as_a_string, ...) # We are using ENV to let you experiment via an environment variable. dog = Dogap...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
examples/Capfile
Ruby
bsd-3-clause
98
master
391
require 'capistrano/setup' require 'capistrano/datadog' set :datadog_api_key, 'my_api_key' set :stage, :test # set :format, :pretty # set :log_level, :info # set :pty, true server "host0", roles: ["thing"] server "host1", roles: ["other_thing"] desc "Hello world" task :hello do on roles(:all) do |host| info ca...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
examples/custom_metric.rb
Ruby
bsd-3-clause
98
master
1,054
require 'rubygems' require 'dogapi' # Create a simple client # The host is optional here, it's a shortcut to tie event and metrics to a given host # # You typically want to do: # Dogapi::Client.new(your_actual_api_key_as_a_string, ...) # We are using ENV to let you experiment via an environment variable. dog = Dogap...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
spec/spec_helper.rb
Ruby
bsd-3-clause
98
master
6,898
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require 'rspec' require 'simplecov' require 'webmock/rspec' SimpleCov.start do add...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
spec/integration/dashboard_spec.rb
Ruby
bsd-3-clause
98
master
2,351
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require_relative '../spec_helper' describe Dogapi::Client do DASHBOARD_ID = '3er-f...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
spec/integration/snapshot_spec.rb
Ruby
bsd-3-clause
98
master
1,011
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require_relative '../spec_helper' describe Dogapi::Client do SNAP_QUERY = 'system....
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
spec/integration/dash_spec.rb
Ruby
bsd-3-clause
98
master
1,813
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require_relative '../spec_helper' describe Dogapi::Client do DASH_ID = 424_242 T...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
spec/integration/common_spec.rb
Ruby
bsd-3-clause
98
master
1,232
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require_relative '../spec_helper' describe Dogapi::APIService do describe '#connec...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
spec/integration/usage_spec.rb
Ruby
bsd-3-clause
98
master
1,608
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require_relative '../spec_helper' describe Dogapi::Client do USAGE_PARAMS = { ...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
spec/integration/monitor_spec.rb
Ruby
bsd-3-clause
98
master
5,474
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require_relative '../spec_helper' describe Dogapi::Client do MONITOR_ID = 42 MON...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
spec/integration/user_spec.rb
Ruby
bsd-3-clause
98
master
1,547
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require_relative '../spec_helper' describe Dogapi::Client do USER_HANDLE = 'test@e...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
spec/integration/screenboard_spec.rb
Ruby
bsd-3-clause
98
master
1,962
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require_relative '../spec_helper' describe Dogapi::Client do BOARD_ID = 4_242_424_...
github
DataDog/dogapi-rb
https://github.com/DataDog/dogapi-rb
spec/integration/alert_spec.rb
Ruby
bsd-3-clause
98
master
1,574
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2011-Present Datadog, Inc. require_relative '../spec_helper' describe Dogapi::Client do ALERT_ID = 42 QUERY...