repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
deb-s3/deb-s3
https://github.com/deb-s3/deb-s3/blob/80f9fba8950992b1d05887ed28df272d7e4b4efa/spec/deb/s3/package_spec.rb
spec/deb/s3/package_spec.rb
# -*- encoding : utf-8 -*- require File.expand_path('../../../spec_helper', __FILE__) require 'deb/s3/package' EXPECTED_DESCRIPTION = "A platform for community discussion. Free, open, simple.\nThe description can have a continuation line.\n\nAnd blank lines.\n\nIf it wants to." describe Deb::S3::Package do describe...
ruby
MIT
80f9fba8950992b1d05887ed28df272d7e4b4efa
2026-01-04T17:43:13.152566Z
false
deb-s3/deb-s3
https://github.com/deb-s3/deb-s3/blob/80f9fba8950992b1d05887ed28df272d7e4b4efa/spec/deb/s3/manifest_spec.rb
spec/deb/s3/manifest_spec.rb
# -*- encoding : utf-8 -*- require File.expand_path('../../../spec_helper', __FILE__) require 'deb/s3/manifest' describe Deb::S3::Manifest do before do @manifest = Deb::S3::Manifest.new end describe "#add" do it "removes packages which have the same full version" do epoch = Time.now.to_i exi...
ruby
MIT
80f9fba8950992b1d05887ed28df272d7e4b4efa
2026-01-04T17:43:13.152566Z
false
deb-s3/deb-s3
https://github.com/deb-s3/deb-s3/blob/80f9fba8950992b1d05887ed28df272d7e4b4efa/lib/deb/s3.rb
lib/deb/s3.rb
# -*- encoding : utf-8 -*- module Deb module S3 VERSION = "25.3.0" end end
ruby
MIT
80f9fba8950992b1d05887ed28df272d7e4b4efa
2026-01-04T17:43:13.152566Z
false
deb-s3/deb-s3
https://github.com/deb-s3/deb-s3/blob/80f9fba8950992b1d05887ed28df272d7e4b4efa/lib/deb/s3/manifest.rb
lib/deb/s3/manifest.rb
# -*- encoding : utf-8 -*- require "tempfile" require "zlib" require 'deb/s3/utils' require 'deb/s3/package' class Deb::S3::Manifest include Deb::S3::Utils attr_accessor :codename attr_accessor :component attr_accessor :cache_control attr_accessor :architecture attr_accessor :fail_if_exists attr_accesso...
ruby
MIT
80f9fba8950992b1d05887ed28df272d7e4b4efa
2026-01-04T17:43:13.152566Z
false
deb-s3/deb-s3
https://github.com/deb-s3/deb-s3/blob/80f9fba8950992b1d05887ed28df272d7e4b4efa/lib/deb/s3/release.rb
lib/deb/s3/release.rb
# -*- encoding : utf-8 -*- require "tempfile" class Deb::S3::Release include Deb::S3::Utils attr_accessor :codename attr_accessor :origin attr_accessor :suite attr_accessor :architectures attr_accessor :components attr_accessor :cache_control attr_accessor :files attr_accessor :policy def initia...
ruby
MIT
80f9fba8950992b1d05887ed28df272d7e4b4efa
2026-01-04T17:43:13.152566Z
false
deb-s3/deb-s3
https://github.com/deb-s3/deb-s3/blob/80f9fba8950992b1d05887ed28df272d7e4b4efa/lib/deb/s3/package.rb
lib/deb/s3/package.rb
# -*- encoding : utf-8 -*- require "digest/sha1" require "digest/sha2" require "digest/md5" require "open3" require "socket" require "tmpdir" require "uri" require 'deb/s3/utils' class Deb::S3::Package include Deb::S3::Utils attr_accessor :name attr_accessor :version attr_accessor :epoch attr_accessor :ite...
ruby
MIT
80f9fba8950992b1d05887ed28df272d7e4b4efa
2026-01-04T17:43:13.152566Z
false
deb-s3/deb-s3
https://github.com/deb-s3/deb-s3/blob/80f9fba8950992b1d05887ed28df272d7e4b4efa/lib/deb/s3/utils.rb
lib/deb/s3/utils.rb
# -*- encoding : utf-8 -*- require "digest/md5" require "erb" module Deb::S3::Utils module_function def s3; @s3 end def s3= v; @s3 = v end def bucket; @bucket end def bucket= v; @bucket = v end def access_policy; @access_policy end def access_policy= v; @access_policy = v end def signing_key; @signing_...
ruby
MIT
80f9fba8950992b1d05887ed28df272d7e4b4efa
2026-01-04T17:43:13.152566Z
false
deb-s3/deb-s3
https://github.com/deb-s3/deb-s3/blob/80f9fba8950992b1d05887ed28df272d7e4b4efa/lib/deb/s3/cli.rb
lib/deb/s3/cli.rb
# -*- encoding : utf-8 -*- require "aws-sdk-s3" require "thor" # Hack: aws requires this! require "json" require "deb/s3" require "deb/s3/utils" require "deb/s3/manifest" require "deb/s3/package" require "deb/s3/release" require "deb/s3/lock" class Deb::S3::CLI < Thor class_option :bucket, :type => :string, ...
ruby
MIT
80f9fba8950992b1d05887ed28df272d7e4b4efa
2026-01-04T17:43:13.152566Z
false
deb-s3/deb-s3
https://github.com/deb-s3/deb-s3/blob/80f9fba8950992b1d05887ed28df272d7e4b4efa/lib/deb/s3/lock.rb
lib/deb/s3/lock.rb
# -*- encoding : utf-8 -*- require "base64" require "digest/md5" require "etc" require "socket" require "tempfile" class Deb::S3::Lock attr_reader :user attr_reader :host def initialize(user, host) @user = user @host = host end class << self # # 2-phase mutual lock mechanism based on `s3:Co...
ruby
MIT
80f9fba8950992b1d05887ed28df272d7e4b4efa
2026-01-04T17:43:13.152566Z
false
gabrielg/periscope_api
https://github.com/gabrielg/periscope_api/blob/7f341673b937d5e9a6885b99eb2995b06a205df9/lib/periscope_api.rb
lib/periscope_api.rb
require "faraday" require "faraday_middleware" begin require "pry" rescue LoadError end if ENV['DEBUG_HTTP'] require "httplog" HttpLog.options[:log_headers] = true end class PeriscopeAPI PERISCOPE_UA = "Periscope/2699 (iPhone; iOS 8.1.2; Scale/2.00)" PERISCOPE_BUNDLE_ID = "com.bountylabs.periscope" ...
ruby
MIT
7f341673b937d5e9a6885b99eb2995b06a205df9
2026-01-04T17:43:14.689795Z
false
gabrielg/periscope_api
https://github.com/gabrielg/periscope_api/blob/7f341673b937d5e9a6885b99eb2995b06a205df9/lib/periscope_api/version.rb
lib/periscope_api/version.rb
module PeriscopeApi VERSION = "0.0.1" end
ruby
MIT
7f341673b937d5e9a6885b99eb2995b06a205df9
2026-01-04T17:43:14.689795Z
false
gabrielg/periscope_api
https://github.com/gabrielg/periscope_api/blob/7f341673b937d5e9a6885b99eb2995b06a205df9/lib/periscope_api/broadcast.rb
lib/periscope_api/broadcast.rb
require "pubnub" class PeriscopeAPI::Broadcast attr_reader :attrs def initialize(client, attrs) @client = client @attrs = attrs end def share_url return nil unless published? @share_url ||= begin response = @client.post('/api/v2/getBroadcastShareURL', {broadcast_id: broadcast_id}) ...
ruby
MIT
7f341673b937d5e9a6885b99eb2995b06a205df9
2026-01-04T17:43:14.689795Z
false
gabrielg/periscope_api
https://github.com/gabrielg/periscope_api/blob/7f341673b937d5e9a6885b99eb2995b06a205df9/lib/periscope_api/twitter_xauth.rb
lib/periscope_api/twitter_xauth.rb
require "oauth" # The OAuth gem modifies the headers to add the gem version and this can't be # disabled, so here's a nugget of grossness. OAuth::Client::Helper.class_eval do def amend_user_agent_header(headers) return headers end end class PeriscopeAPI::TwitterXAuth PERISCOPE_TWITTER_UA = "Periscope/269...
ruby
MIT
7f341673b937d5e9a6885b99eb2995b06a205df9
2026-01-04T17:43:14.689795Z
false
capistrano/passenger
https://github.com/capistrano/passenger/blob/1b3af33a14b984de9e4d914836916f4cccab434d/lib/capistrano-passenger.rb
lib/capistrano-passenger.rb
ruby
MIT
1b3af33a14b984de9e4d914836916f4cccab434d
2026-01-04T17:43:18.694956Z
false
capistrano/passenger
https://github.com/capistrano/passenger/blob/1b3af33a14b984de9e4d914836916f4cccab434d/lib/capistrano/passenger.rb
lib/capistrano/passenger.rb
load File.expand_path('../tasks/deploy_passenger.cap', __FILE__)
ruby
MIT
1b3af33a14b984de9e4d914836916f4cccab434d
2026-01-04T17:43:18.694956Z
false
capistrano/passenger
https://github.com/capistrano/passenger/blob/1b3af33a14b984de9e4d914836916f4cccab434d/lib/capistrano/passenger/version.rb
lib/capistrano/passenger/version.rb
module Capistrano module Passenger VERSION = "0.2.1" end end
ruby
MIT
1b3af33a14b984de9e4d914836916f4cccab434d
2026-01-04T17:43:18.694956Z
false
capistrano/passenger
https://github.com/capistrano/passenger/blob/1b3af33a14b984de9e4d914836916f4cccab434d/lib/capistrano/passenger/no_hook.rb
lib/capistrano/passenger/no_hook.rb
load File.expand_path('../../tasks/passenger.cap', __FILE__)
ruby
MIT
1b3af33a14b984de9e4d914836916f4cccab434d
2026-01-04T17:43:18.694956Z
false
logstash-plugins/logstash-input-kafka
https://github.com/logstash-plugins/logstash-input-kafka/blob/80ad0d8bb26e9b371f113e90dd56e3ee2a0e742e/spec/integration/inputs/kafka_spec.rb
spec/integration/inputs/kafka_spec.rb
# encoding: utf-8 require "logstash/devutils/rspec/spec_helper" require "logstash/inputs/kafka" require "digest" require "rspec/wait" # Please run kafka_test_setup.sh prior to executing this integration test. describe "inputs/kafka", :integration => true do # Group ids to make sure that the consumers get all the log...
ruby
Apache-2.0
80ad0d8bb26e9b371f113e90dd56e3ee2a0e742e
2026-01-04T17:43:21.816209Z
false
logstash-plugins/logstash-input-kafka
https://github.com/logstash-plugins/logstash-input-kafka/blob/80ad0d8bb26e9b371f113e90dd56e3ee2a0e742e/spec/unit/inputs/kafka_spec.rb
spec/unit/inputs/kafka_spec.rb
# encoding: utf-8 require "logstash/devutils/rspec/spec_helper" require "logstash/inputs/kafka" require "concurrent" class MockConsumer def initialize @wake = Concurrent::AtomicBoolean.new(false) end def subscribe(topics) end def poll(ms) if @wake.value raise org.apache.kafka.common.errors....
ruby
Apache-2.0
80ad0d8bb26e9b371f113e90dd56e3ee2a0e742e
2026-01-04T17:43:21.816209Z
false
logstash-plugins/logstash-input-kafka
https://github.com/logstash-plugins/logstash-input-kafka/blob/80ad0d8bb26e9b371f113e90dd56e3ee2a0e742e/lib/logstash-input-kafka_jars.rb
lib/logstash-input-kafka_jars.rb
# AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT. require 'jar_dependencies' require_jar('org.apache.kafka', 'kafka-clients', '2.1.0') require_jar('com.github.luben', 'zstd-jni', '1.3.7-3') require_jar('org.slf4j', 'slf4j-api', '1.7.25') require_jar('org.lz4', 'lz4-java', '1.5.0') require_jar('org.xerial.snappy', 'sn...
ruby
Apache-2.0
80ad0d8bb26e9b371f113e90dd56e3ee2a0e742e
2026-01-04T17:43:21.816209Z
false
logstash-plugins/logstash-input-kafka
https://github.com/logstash-plugins/logstash-input-kafka/blob/80ad0d8bb26e9b371f113e90dd56e3ee2a0e742e/lib/logstash/inputs/kafka.rb
lib/logstash/inputs/kafka.rb
require 'logstash/namespace' require 'logstash/inputs/base' require 'stud/interval' require 'java' require 'logstash-input-kafka_jars.rb' # This input will read events from a Kafka topic. It uses the 0.10 version of # the consumer API provided by Kafka to read messages from the broker. # # Here's a compatibility matri...
ruby
Apache-2.0
80ad0d8bb26e9b371f113e90dd56e3ee2a0e742e
2026-01-04T17:43:21.816209Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/gem.deps.rb
gem.deps.rb
source 'https://rubygems.org/' gem 'loggability', '~> 0.18' gem 'pg', '~> 1.4' gem 'sequel', '~> 5.64' gem 'sqlite3', '~> 1.5' group :development do gem 'rake-deveiate', '~> 0.22' gem 'rdoc-generator-sixfish', '~> 0.3' end
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/experiments/unhandled_pointer_types.rb
experiments/unhandled_pointer_types.rb
# -*- ruby -*- # # Trying to find a minimal testcase for reproducing the error that happens with # the new '~i' and '@i' synset pointer types. # # Time-stamp: <12-Nov-2005 13:11:04 ged> # BEGIN { base = File::dirname( File::dirname(File::expand_path(__FILE__)) ) $LOAD_PATH.unshift "#{base}/lib" require "#{base}/ut...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/spec/helpers.rb
spec/helpers.rb
# -*- ruby -*- # SimpleCov test coverage reporting; enable this using the :coverage rake task if ENV['COVERAGE'] require 'simplecov' SimpleCov.start do add_filter 'spec/' enable_coverage :branch end end $LOAD_PATH.unshift( 'wordnet-defaultdb/lib' ) require 'rspec' require 'loggability/spechelpers' require 'w...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/spec/wordnet_spec.rb
spec/wordnet_spec.rb
#!/usr/bin/env rspec require_relative 'helpers' require 'rspec' require 'wordnet/lexicon' ##################################################################### ### C O N T E X T S ##################################################################### describe WordNet do it "returns a version string if asked" do ...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/spec/wordnet/synset_spec.rb
spec/wordnet/synset_spec.rb
#!/usr/bin/env rspec require_relative '../helpers' require 'rspec' ##################################################################### ### C O N T E X T S ##################################################################### describe 'WordNet::Synset', :requires_database do before( :all ) do @lexicon = WordNe...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/spec/wordnet/semanticlink_spec.rb
spec/wordnet/semanticlink_spec.rb
#!/usr/bin/env rspec require_relative '../helpers' require 'rspec' require 'wordnet' ##################################################################### ### C O N T E X T S ##################################################################### describe 'WordNet::SemanticLink', :requires_database do let( :describ...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/spec/wordnet/model_spec.rb
spec/wordnet/model_spec.rb
#!/usr/bin/env rspec require_relative '../helpers' require 'rspec' require 'sequel' require 'wordnet' require 'wordnet/model' ##################################################################### ### C O N T E X T S ##################################################################### DB = Sequel.connect( 'mock://...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/spec/wordnet/lexicon_spec.rb
spec/wordnet/lexicon_spec.rb
#!/usr/bin/env rspec require_relative '../helpers' require 'rspec' require 'wordnet/lexicon' ##################################################################### ### C O N T E X T S ##################################################################### describe WordNet::Lexicon do let( :devdb ) do Pathname( 'wo...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/spec/wordnet/sense_spec.rb
spec/wordnet/sense_spec.rb
#!/usr/bin/env rspec -cfd require_relative '../helpers' require 'wordnet' describe 'WordNet::Sense', :requires_database do before( :all ) do @lexicon = WordNet::Lexicon.new( $dburi ) end let( :described_class ) { WordNet::Sense } let( :sense ) do WordNet::Word[ 79712 ].senses.first end it "has a dat...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/spec/wordnet/word_spec.rb
spec/wordnet/word_spec.rb
#!/usr/bin/env rspec require_relative '../helpers' require 'rspec' require 'wordnet' ##################################################################### ### C O N T E X T S ##################################################################### describe 'WordNet::Word', :requires_database do let( :described_class...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/examples/gcs.rb
examples/gcs.rb
#!/usr/bin/env ruby # # Find least general hypernymial synsets between all noun senses of two words. # $LOAD_PATH.unshift "lib" require 'wordnet' require 'loggability' raise RuntimeError, "You must specify two words." if ARGV.length != 2 lex = WordNet::Lexicon.new word1_syns = lex.lookup_synsets( ARGV[0], :noun )...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/examples/hypernym_tree.rb
examples/hypernym_tree.rb
#!/usr/bin/env ruby # # Find all the hypernyms of all senses of a given noun and display them in a # heirarchy # $LOAD_PATH.unshift "lib" require 'wordnet' raise RuntimeError, "No word specified." if ARGV.empty? # Create the lexicon lex = WordNet::Lexicon.new # Look up the synsets for the specified word origins = ...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/lib/wordnet.rb
lib/wordnet.rb
#!/usr/bin/env ruby require 'loggability' require 'sequel' # This is a Ruby interface to the WordNet® lexical database. It uses the SqlUNet # project's databases instead of reading from the canonical flatfiles for speed, # easy modification, and correlation with other linguistic lexicons. module WordNet extend Logga...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/lib/wordnet/lexicon.rb
lib/wordnet/lexicon.rb
# -*- ruby -*- require 'pathname' require 'loggability' require 'rubygems' require 'wordnet' unless defined?( WordNet ) require 'wordnet/constants' require 'wordnet/model' # Try to load the default database gem, ignoring it if it's not installed. begin require 'wordnet-defaultdb' rescue LoadError # No-op end # W...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/lib/wordnet/semanticlink.rb
lib/wordnet/semanticlink.rb
# -*- ruby -*- require 'wordnet' unless defined?( WordNet ) require 'wordnet/constants' require 'wordnet/model' # WordNet semantic link (pointer) model class class WordNet::SemanticLink < WordNet::Model( :semlinks ) include WordNet::Constants set_primary_key [:synset1id, :synset2id, :linkid] ## # :method: link...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/lib/wordnet/sumoterm.rb
lib/wordnet/sumoterm.rb
# -*- ruby -*- require 'wordnet' unless defined?( WordNet ) require 'wordnet/model' require 'wordnet/constants' # Experimental support for the WordNet mapping for the {Suggested Upper Merged # Ontology}[http://www.ontologyportal.org/] (SUMO). # It's still a work in progress. class WordNet::SumoTerm < WordNet::Model(...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/lib/wordnet/word.rb
lib/wordnet/word.rb
# -*- ruby -*- require 'wordnet' unless defined?( WordNet ) require 'wordnet/model' # WordNet word model class class WordNet::Word < WordNet::Model( :words ) include WordNet::Constants # Table "public.words" # Column | Type | Modifiers # --------+-----------------------+----...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/lib/wordnet/constants.rb
lib/wordnet/constants.rb
# -*- ruby -*- require 'wordnet' unless defined?( WordNet ) # This is a module containing constants used in the WordNet interface for # Ruby. They are contained in a module to facilitate their easy inclusion in # other namespaces. All constants in this module are also contained in the # WordNet namespace itself. modu...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/lib/wordnet/morph.rb
lib/wordnet/morph.rb
# -*- ruby -*- require 'wordnet' unless defined?( WordNet ) require 'wordnet/model' # WordNet morph model class class WordNet::Morph < WordNet::Model( :morphs ) include WordNet::Constants # Table "public.morphs" # Column | Type | Modifiers # ---------+----------------------...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/lib/wordnet/sense.rb
lib/wordnet/sense.rb
# -*- ruby -*- require 'wordnet' unless defined?( WordNet ) require 'wordnet/model' # WordNet sense model class class WordNet::Sense < WordNet::Model( :senses ) include WordNet::Constants set_primary_key :senseid # Table "wn.senses" # Column | Type | Collatio...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/lib/wordnet/lexicallink.rb
lib/wordnet/lexicallink.rb
# -*- ruby -*- require 'wordnet' unless defined?( WordNet ) require 'wordnet/synset' unless defined?( WordNet::Synset ) require 'wordnet/model' # WordNet lexical link (pointer) model class class WordNet::LexicalLink < WordNet::Model( :lexlinks ) include WordNet::Constants set_primary_key [:word1id, :synset1id, :wo...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/lib/wordnet/synset.rb
lib/wordnet/synset.rb
# -*- ruby -*- require 'wordnet' unless defined?( WordNet ) require 'wordnet/constants' require 'wordnet/model' # WordNet synonym-set object class # # Instances of this class encapsulate the data for a synonym set ('synset') in a # WordNet lexical database. A synonym set is a set of words that are # interchangeable ...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/lib/wordnet/model.rb
lib/wordnet/model.rb
# -*- ruby -*- require 'loggability' require 'sequel' require 'wordnet' unless defined?( WordNet ) module WordNet Model = Class.new( Sequel::Model ) Model.def_Model( WordNet ) Model.require_valid_table = false # The base WordNet database-backed domain class. It's a subclass of Sequel::Model, so # you'll fi...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/wordnet-defaultdb/spec/spec_helper.rb
wordnet-defaultdb/spec/spec_helper.rb
#!/usr/bin/env rspec BEGIN { require 'pathname' $LOAD_PATH << Pathname( __FILE__ ).dirname.parent + 'lib' } require 'rspec' require 'wordnet/defaultdb' RSpec.configure do |config| config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end config....
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/wordnet-defaultdb/spec/wordnet/defaultdb_spec.rb
wordnet-defaultdb/spec/wordnet/defaultdb_spec.rb
#!/usr/bin/env rspec -cfd require_relative '../spec_helper' require 'rspec' require 'wordnet' require 'wordnet/defaultdb' RSpec.describe WordNet::DefaultDB do it "knows what the URL of its database is" do expect( described_class.uri ).to start_with( 'sqlite:' ).and( end_with('wordnet31.sqlite') ) end it "r...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/wordnet-defaultdb/lib/wordnet-defaultdb.rb
wordnet-defaultdb/lib/wordnet-defaultdb.rb
# -*- ruby -*- require 'wordnet/defaultdb'
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
ged/ruby-wordnet
https://github.com/ged/ruby-wordnet/blob/88039334e95a5e241c5c9c4a9174f2d915fa7501/wordnet-defaultdb/lib/wordnet/defaultdb.rb
wordnet-defaultdb/lib/wordnet/defaultdb.rb
# -*- ruby -*- require 'wordnet' require 'pathname' # This gem is a container for the default database files required for the # 'wordnet' gem. It's mostly just a wrapper around the Sqlite database from # SQLUNet: # # http://sqlunet.sourceforge.net/ # module WordNet::DefaultDB # Library version constant VERSION = ...
ruby
BSD-3-Clause
88039334e95a5e241c5c9c4a9174f2d915fa7501
2026-01-04T17:43:22.556655Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/spec/spec_helper.rb
spec/spec_helper.rb
require 'rubocop/obsession' require 'rubocop/rspec/support' Dir["#{__dir__}/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| config.expect_with :rspec do |c| c.syntax = :expect end end
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/spec/rubocop/obsession_spec.rb
spec/rubocop/obsession_spec.rb
describe Rubocop::Obsession do it 'has a version number' do expect(Rubocop::Obsession::VERSION).not_to eq nil end end
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/spec/rubocop/cop/obsession/method_order_spec.rb
spec/rubocop/cop/obsession/method_order_spec.rb
describe RuboCop::Cop::Obsession::MethodOrder, :config do context 'when enforced style is drill_down' do let(:cop_config) { { 'EnforcedStyle' => 'drill_down' } } it 'expects private methods to be ordered from top to bottom' do expect_offense(<<~RUBY) class Foo def perform ...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/spec/rubocop/cop/obsession/rails/service_name_spec.rb
spec/rubocop/cop/obsession/rails/service_name_spec.rb
describe RuboCop::Cop::Obsession::Rails::ServiceName, :config do context 'when class name does not start with a verb' do it 'registers an offense' do expect_offense(<<~RUBY) class BlogPostPopularityJob < ApplicationJob ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Service or Job name should s...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/obsession.rb
lib/rubocop/obsession.rb
require 'active_support' require 'active_support/core_ext/object/blank' require 'active_support/core_ext/string/inflections' require 'rubocop' require_relative 'cop/obsession/mixin/helpers' Dir["#{__dir__}/cop/obsession/**/*.rb"].sort.each { |file| require file } require_relative 'obsession/version' require_relative '...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/obsession/version.rb
lib/rubocop/obsession/version.rb
module Rubocop module Obsession VERSION = '0.2.3' end end
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/obsession/plugin.rb
lib/rubocop/obsession/plugin.rb
# frozen_string_literal: true require 'lint_roller' module Rubocop module Obsession # A plugin that integrates Rubocop Obsession with RuboCop's plugin system. class Plugin < LintRoller::Plugin def about LintRoller::About.new( name: 'rubocop-obsession', version: VERSION, ...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/no_break_or_next.rb
lib/rubocop/cop/obsession/no_break_or_next.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession # This cop checks for `next` (and sometimes `break`) in loops. # # - For big loops, `next` or `break` indicates that the loop body has # significant logic, which means it should be moved into its own method, # ...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/method_order.rb
lib/rubocop/cop/obsession/method_order.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession # This cop checks for private/protected methods that are not ordered # correctly. It supports autocorrect. # # Note 1: the order of public methods is not enforced. They can be # defined in any order the develop...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/too_many_paragraphs.rb
lib/rubocop/cop/obsession/too_many_paragraphs.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession # This cop checks for methods with too many paragraphs. # # You should organize your method code into 2 to 3 paragraphs maximum. # The 3 possible paragraphs themes could be: initialization, action, # and result...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/no_paragraphs.rb
lib/rubocop/cop/obsession/no_paragraphs.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession # This cop checks for methods with many instructions but no paragraphs. # # If your method code has many instructions that are not organized into # paragraphs, you should break it up into multiple paragraphs to make ...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/no_todos.rb
lib/rubocop/cop/obsession/no_todos.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession # This cop checks for TODO/FIXME/etc comments. # # Avoid TODO comments, instead create tasks for them in your project # management software, and assign them to the right person. Half of the # TODOs usually neve...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/rspec/describe_public_method.rb
lib/rubocop/cop/obsession/rspec/describe_public_method.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Rspec # This cop checks for `describe` blocks that test private methods. # # If you are doing black box unit testing, it means that you are only # interested in testing external behavior, a.k.a p...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/rspec/empty_line_after_final_let.rb
lib/rubocop/cop/obsession/rspec/empty_line_after_final_let.rb
begin require 'rubocop-rspec' rescue LoadError end if defined?(RuboCop::RSpec) module RuboCop module Cop module Obsession module Rspec # Same as RSpec/EmptyLineAfterFinalLet, but allows `let` to be followed # by `it` with no new line, to allow for this style of spec: ...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/graphql/mutation_name.rb
lib/rubocop/cop/obsession/graphql/mutation_name.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Graphql # This cop checks for mutation names that do not start with a verb. # # Mutation names should start with a verb, because mutations are actions, # and actions are best described with verbs...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/rails/callback_one_method.rb
lib/rubocop/cop/obsession/rails/callback_one_method.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Rails # This cop checks for Rails callbacks with multiple fields. # # One method per callback definition makes the definition extra clear. # # @example # # bad # after...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/rails/safety_assured_comment.rb
lib/rubocop/cop/obsession/rails/safety_assured_comment.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Rails # This cop checks uses of strong_migrations' `safety_assured { ... }` # without a valid reason. # # `safety_assured { ... }` should only be used after *carefully* # following the in...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/rails/no_callback_conditions.rb
lib/rubocop/cop/obsession/rails/no_callback_conditions.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Rails # This cop checks for model callbacks with conditions. # # Model callback with conditions should be avoided because they can # quickly degenerate into multiple conditions that pollute the m...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/rails/fully_defined_json_field.rb
lib/rubocop/cop/obsession/rails/fully_defined_json_field.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Rails # This cop checks for json(b) fields that are not fully defined with # defaults or comments. # # - json(b) fields should have a default value like {} or [] so code can # do my_fie...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/rails/service_name.rb
lib/rubocop/cop/obsession/rails/service_name.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Rails # This cop checks for services and jobs whose name do not start with a verb. # # Services and jobs with only one public method should have a name that # starts with a verb, because these cl...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/rails/validation_method_name.rb
lib/rubocop/cop/obsession/rails/validation_method_name.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Rails # This cop checks for validation methods that do not start with `validate_`. # # @example # # bad # validate :at_least_one_admin # # # good # validat...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/rails/validate_one_field.rb
lib/rubocop/cop/obsession/rails/validate_one_field.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Rails # This cop checks for `validates` callbacks with multiple fields. # # One field per `validates` makes the validation extra clear. # # @example # # bad # validate...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/rails/private_callback.rb
lib/rubocop/cop/obsession/rails/private_callback.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Rails # This cop checks for callbacks methods that are not private. # # Callback methods are usually never called outside of the class, so # there is no reason to declare them in the public secti...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/rails/migration_belongs_to.rb
lib/rubocop/cop/obsession/rails/migration_belongs_to.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Rails # This cop checks for migrations that use `references` instead of `belongs_to`. # # Instead of adding `references` in migrations, use the `belongs_to` # alias. It reads nicer and is more si...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/rails/short_validate.rb
lib/rubocop/cop/obsession/rails/short_validate.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Rails # This cop checks for `validate` declarations that could be shorter. # # @example # # bad # validate :validate_url, on: %i(create update) # # # good # ...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/rails/short_after_commit.rb
lib/rubocop/cop/obsession/rails/short_after_commit.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Rails # This cop checks for `after_commit` declarations that could be shorter. # # @example # # bad # after_commit :send_email, on: :create # # # good # af...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/rails/service_perform_method.rb
lib/rubocop/cop/obsession/rails/service_perform_method.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Rails # This cop checks for services whose single public method is not named # `perform`. # # Services and jobs with only one public method should have their method # named `perform` for ...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
jeromedalbert/rubocop-obsession
https://github.com/jeromedalbert/rubocop-obsession/blob/ebed3e705c99808879093573603c37ca072853f1/lib/rubocop/cop/obsession/mixin/helpers.rb
lib/rubocop/cop/obsession/mixin/helpers.rb
# frozen_string_literal: true module RuboCop module Cop module Obsession module Helpers def rails_callback?(callback) return true if callback == 'validate' callback.match?( / ^(before|after|around) _.* (action|validation|create|up...
ruby
MIT
ebed3e705c99808879093573603c37ca072853f1
2026-01-04T17:43:25.656945Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/play/ssh.rb
play/ssh.rb
#!/usr/bin/env ruby require 'rubygems' require 'net/ssh' require 'net/ssh/shell' require 'vagrant' require 'sahara' require 'fileutils' require 'travis/shell' # Net::SSH::Shell::Process.class_eval do # def on_stdout(ch, data) # # if data.strip =~ /^#{manager.separator} (\\d+)$/ # if data.strip =~ /#{manager...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/play/worker.rb
play/worker.rb
require 'rubygems' require 'travis/worker' require 'spec/support/payloads' ENV['VM'] = 'worker-1' payload = INCOMING_PAYLOADS['build:gem-release'] Travis::Worker.perform(payload)
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/factory_spec.rb
spec/factory_spec.rb
require 'spec_helper' require 'travis/worker/factory' describe Travis::Worker::Factory do include_context "march_hare connection" let(:config) { Hashr.new({ :queue => "builds.php" }) } let(:factory) { Travis::Worker::Factory.new('worker-name', config, connection) } let(:worker) { factory.worker } describ...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/filtered_string_spec.rb
spec/filtered_string_spec.rb
require 'spec_helper' require 'travis/worker/utils/filtered_string' describe Travis::Worker::Utils::FilteredString do it 'displays filtered string by default' do filtered = 'FOO=[secure]' unfiltered = 'FOO=bar' str = Travis::Worker::Utils::FilteredString.new(unfiltered, filtered) expect(str.to_s)....
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/reporter_spec.rb
spec/reporter_spec.rb
require 'spec_helper' require 'travis/worker/reporter' describe Travis::Worker::Reporter do include_context 'march_hare connection' let(:channel) { connection.create_channel } let(:routing_key) { 'reporting.jobs.logs' } let(:queue) { channel.queue(routing_key, :durable => true) } let(:reporting_ex...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/instance_spec.rb
spec/instance_spec.rb
require 'spec_helper' require 'hashr' require 'stringio' require 'march_hare' require 'travis/worker/instance' require 'celluloid/autostart' describe Travis::Worker::Instance do include_context "march_hare connection" let(:vm) { stub('vm', :name => 'vm-name', :shell => nil, :prepare => nil, :sandboxed =...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/application_spec.rb
spec/application_spec.rb
require 'spec_helper' require 'stringio' require 'travis/worker/application' describe Travis::Worker::Application do let(:app) { Travis::Worker::Application.new } let(:workers) { stub('workers', :start => nil, :stop => nil) } let(:heart) { stub('heart', :beat => nil, :stop => nil) } before :each do ...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/pool_spec.rb
spec/pool_spec.rb
require 'spec_helper' require 'stringio' describe Travis::Worker::Pool do include_context "march_hare connection" let(:names) { %w(worker-1 worker-2)} let(:pool) { Travis::Worker::Pool.new(names, Travis::Worker.config, connection) } let(:workers) { names.map { |name| stub(name, :name => name, :boot => ni...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/config_spec.rb
spec/config_spec.rb
require 'spec_helper' describe Travis::Worker::Config do before(:each) do Travis::Worker::Config.send :public, *Travis::Worker::Config.protected_instance_methods Travis::Worker::Config.any_instance.stubs(:read_yml).returns({}) File.stubs(:exists?).returns(true) end let(:config) { Travis::Worker::Con...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/spec_helper.rb
spec/spec_helper.rb
$:.unshift(File.expand_path('../lib', File.dirname(__FILE__))) require 'rubygems' require "bundler/setup" require 'rspec' require 'mocha' require 'hashr' require 'march_hare' require 'webmock/rspec' require 'travis/worker' require 'logger' require 'stringio' require 'travis/support' FIXTURES = {} Dir["#{File.dirna...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/support/actor_mocking.rb
spec/support/actor_mocking.rb
# From https://github.com/celluloid/celluloid/issues/26#issuecomment-4968921 require 'celluloid' RSpec.configuration.before(:each) do class Celluloid::ActorProxy unless @rspec_compatible @rspec_compatible = true if respond_to?(:should_receive) undef_method :should_receive end end ...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/support/hot_bunnies.rb
spec/support/hot_bunnies.rb
shared_context "march_hare connection" do let(:connection) { MarchHare.connect(:hostname => "127.0.0.1") } after(:each) { connection.close } end
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/support/payloads.rb
spec/support/payloads.rb
# TODO should autogenerate these from the app INCOMING_PAYLOADS = { 'config:gem-release' => { 'repository' => { 'slug' => 'svenfuchs/gem-release' }, 'build' => { 'id' => 1, 'commit' => '313f61b', 'branch' => 'master' } }, 'config:test-project-1' => { 'repository' => { ...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/support/observer.rb
spec/support/observer.rb
class TestObserver attr_reader :events [:on_start, :on_update, :on_finish].each do |method| define_method(method) { |*args| (@events ||= []) << args } end end
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/support/mock.rb
spec/support/mock.rb
module Mock class VM attr_reader :name end class Shell attr_reader :on_output def sandboxed yield end def output(data) on_output.call(self, data) if on_output end def on_output=(&block) @on_output = block end def close end end class HttpRequest ...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/factories/templates.rb
spec/factories/templates.rb
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/application/http_heart_spec.rb
spec/application/http_heart_spec.rb
require 'spec_helper' require 'travis/worker/application/http_heart' describe Travis::Worker::Application::HTTPHeart do let(:state) { { state: :up } } let(:heart) { Travis::Worker::Application::HTTPHeart.new('http://example.org', shutdown_block) } let(:shutdown_block) { ->(*) { state[:state] = :down } } it 's...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/application/command_spec.rb
spec/application/command_spec.rb
# describe 'process' do # let(:message) { stub('message', :ack => nil, :properties => stub(:message_id => 1)) } # it 'accepts a :stop command and stops' do # payload = '{ "command": "stop", "workers": ["worker-1", "worker-2"], "force": true }' # manager.expects(:stop).with(:workers => %w(worker-...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/application/commands/dispatcher_spec.rb
spec/application/commands/dispatcher_spec.rb
require 'spec_helper' require 'travis/worker/application/commands/dispatcher' describe Travis::Worker::Application::Commands::Dispatcher do describe 'start' do let(:amqp_connection) { stub('connection', create_channel: amqp_channel) } let(:amqp_channel) { stub('channel', :prefetch= => nil, :queue => amqp_que...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/shell/buffer_spec.rb
spec/shell/buffer_spec.rb
#encoding: UTF-8 require 'spec_helper' require 'travis/worker/utils/buffer' describe Travis::Worker::Utils::Buffer do let(:result) { [] } let(:buffer) { Travis::Worker::Utils::Buffer.new(nil) { |data| result << data } } it 'buffers' do buffer << 'foo' buffer << 'bar' buffer.send(:flush) buffer...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/spec/job/script_spec.rb
spec/job/script_spec.rb
require "spec_helper" require "travis/worker/job/script" describe Travis::Worker::Job::Script do let(:payload) { INCOMING_PAYLOADS["build:test-project-1"] } before do Travis::Worker.config.build.url = "http://example.com" Travis::Worker.config.build.api_token = "foobar" stub_request(:post, "example.c...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/script/test/enqueue.rb
script/test/enqueue.rb
require 'rubygems' require 'march_hare' require 'multi_json' require 'hashr' class QueueTester attr_reader :connection, :channel, :exchange, :reporting_queue def initialize @connection = @channel = @exchange = @reporting_queue = nil end def start connect open_channel connect_to_exchange en...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/script/test/reporter.rb
script/test/reporter.rb
require 'rubygems' require 'march_hare' require 'multi_json' require 'hashr' class Reporter attr_reader :connection, :channel, :exchange, :reporting_queue def initialize @connection = @channel = @exchange = @reporting_queue = nil end def start connect open_channel connect_to_exchange crea...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false
travis-ci/travis-worker
https://github.com/travis-ci/travis-worker/blob/4ca25dda14ee1673262ea0f48a32ea8fdb19bd64/lib/thor/console.rb
lib/thor/console.rb
require 'thor' require 'thor/runner' require 'readline' class Thor class Console class << self def prompt @prompt ||= '>> ' end def prompt=(prompt) @prompt = prompt end end include Readline attr_accessor :namespace def initialize(namespace = '') T...
ruby
MIT
4ca25dda14ee1673262ea0f48a32ea8fdb19bd64
2026-01-04T17:43:19.367934Z
false