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
thoughtbot/kumade
https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/deployment_error.rb
lib/kumade/deployment_error.rb
module Kumade class DeploymentError < StandardError end end
ruby
MIT
271510307b7037695988aa4881c7c17445cc9d1d
2026-01-04T17:45:11.500917Z
false
thoughtbot/kumade
https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/railtie.rb
lib/kumade/railtie.rb
if defined?(Rails::Railtie) module Kumade class Railtie < ::Rails::Railtie rake_tasks do load "kumade/tasks/deploy.rake" end end end end
ruby
MIT
271510307b7037695988aa4881c7c17445cc9d1d
2026-01-04T17:45:11.500917Z
false
thoughtbot/kumade
https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/configuration.rb
lib/kumade/configuration.rb
module Kumade class Configuration attr_writer :pretending, :environment def pretending? @pretending || false end def environment @environment || "staging" end def outputter @outputter ||= Outputter.new end def outputter=(new_outputter) @outputter = new_outpu...
ruby
MIT
271510307b7037695988aa4881c7c17445cc9d1d
2026-01-04T17:45:11.500917Z
false
thoughtbot/kumade
https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/packager_list.rb
lib/kumade/packager_list.rb
module Kumade class PackagerList include Enumerable PACKAGERS = [JammitPackager] def initialize @packagers = build_packagers_list end def each(&block) @packagers.each(&block) end private def build_packagers_list if installed_packagers.any? installed_packa...
ruby
MIT
271510307b7037695988aa4881c7c17445cc9d1d
2026-01-04T17:45:11.500917Z
false
thoughtbot/kumade
https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/heroku.rb
lib/kumade/heroku.rb
require 'cocaine' module Kumade class Heroku DEPLOY_BRANCH = "deploy" attr_reader :git def initialize @git = Git.new @branch = @git.current_branch end def sync git.create(DEPLOY_BRANCH) git.push("#{DEPLOY_BRANCH}:master", Kumade.configuration.environment, true) en...
ruby
MIT
271510307b7037695988aa4881c7c17445cc9d1d
2026-01-04T17:45:11.500917Z
false
thoughtbot/kumade
https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/cli.rb
lib/kumade/cli.rb
require 'optparse' require 'stringio' module Kumade class CLI class << self attr_writer :deployer def deployer @deployer || Kumade::Deployer end end def initialize(args = ARGV, out = StringIO.new) @options = {} parse_arguments!(args) Kumade.configuration...
ruby
MIT
271510307b7037695988aa4881c7c17445cc9d1d
2026-01-04T17:45:11.500917Z
false
thoughtbot/kumade
https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/command_line.rb
lib/kumade/command_line.rb
require 'cocaine' module Kumade class CommandLine def initialize(command_to_run) @command_line = Cocaine::CommandLine.new(command_to_run) end def run_or_error(error_message = nil) run_with_status || Kumade.configuration.outputter.error(error_message) end def run_with_status Ku...
ruby
MIT
271510307b7037695988aa4881c7c17445cc9d1d
2026-01-04T17:45:11.500917Z
false
thoughtbot/kumade
https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/deployer.rb
lib/kumade/deployer.rb
require "rake" require 'cocaine' module Kumade class Deployer attr_reader :git, :heroku, :packager def initialize @git = Git.new @heroku = Heroku.new @branch = @git.current_branch @packager = Packager.new(@git) end def deploy begin ensure_heroku_remote...
ruby
MIT
271510307b7037695988aa4881c7c17445cc9d1d
2026-01-04T17:45:11.500917Z
false
thoughtbot/kumade
https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/rake_task_runner.rb
lib/kumade/rake_task_runner.rb
module Kumade class RakeTaskRunner def initialize(task_name) @task_name = task_name end def invoke return unless task_defined? Kumade.configuration.outputter.success("Running rake task: #{@task_name}") Rake::Task[@task_name].invoke if task_should_be_run? end private ...
ruby
MIT
271510307b7037695988aa4881c7c17445cc9d1d
2026-01-04T17:45:11.500917Z
false
thoughtbot/kumade
https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/outputter.rb
lib/kumade/outputter.rb
module Kumade class Outputter def success(message) STDOUT.puts "==> #{message}" end def info(message) STDOUT.puts "==> #{message}" end def error(message) STDOUT.puts "==> ! #{message}" raise Kumade::DeploymentError, message end def say_command(command) pref...
ruby
MIT
271510307b7037695988aa4881c7c17445cc9d1d
2026-01-04T17:45:11.500917Z
false
thoughtbot/kumade
https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/git.rb
lib/kumade/git.rb
require 'cocaine' module Kumade class Git def heroku_remote? remote_url = `git config --get remote.#{Kumade.configuration.environment}.url`.strip !! remote_url.strip.match(/^git@heroku\..+:(.+)\.git$/) end def self.environments url_remotes = `git remote`.strip.split("\n").map{|remote| [...
ruby
MIT
271510307b7037695988aa4881c7c17445cc9d1d
2026-01-04T17:45:11.500917Z
false
thoughtbot/kumade
https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/packagers/jammit_packager.rb
lib/kumade/packagers/jammit_packager.rb
begin require "jammit" rescue LoadError end module Kumade class JammitPackager def self.assets_path File.join(public_root, Jammit.package_path) end def self.installed? !!defined?(Jammit) end def self.package Jammit.package! end private def self.public_root ...
ruby
MIT
271510307b7037695988aa4881c7c17445cc9d1d
2026-01-04T17:45:11.500917Z
false
thoughtbot/kumade
https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/packagers/noop_packager.rb
lib/kumade/packagers/noop_packager.rb
module Kumade class NoopPackager def self.assets_path "" end def self.package end def self.installed? false end end end
ruby
MIT
271510307b7037695988aa4881c7c17445cc9d1d
2026-01-04T17:45:11.500917Z
false
altmetric/embiggen
https://github.com/altmetric/embiggen/blob/45ef6fb3d0cfb389a5374994e3ec3bd406dc3756/spec/embiggen_spec.rb
spec/embiggen_spec.rb
require 'embiggen' RSpec.describe Embiggen do describe '#URI' do it 'returns an Embiggen::URI' do uri = described_class::URI('http://www.altmetric.com') expect(uri).to be_a(described_class::URI) end it 'accepts an existing Embiggen::URI' do uri = described_class::URI.new('http://www.a...
ruby
MIT
45ef6fb3d0cfb389a5374994e3ec3bd406dc3756
2026-01-04T17:45:12.071471Z
false
altmetric/embiggen
https://github.com/altmetric/embiggen/blob/45ef6fb3d0cfb389a5374994e3ec3bd406dc3756/spec/spec_helper.rb
spec/spec_helper.rb
require 'webmock/rspec' RSpec.configure do |config| config.filter_run :focus config.run_all_when_everything_filtered = true config.disable_monkey_patching! config.warnings = true config.order = :random Kernel.srand config.seed config.default_formatter = 'doc' if config.files_to_run.one? config.expect...
ruby
MIT
45ef6fb3d0cfb389a5374994e3ec3bd406dc3756
2026-01-04T17:45:12.071471Z
false
altmetric/embiggen
https://github.com/altmetric/embiggen/blob/45ef6fb3d0cfb389a5374994e3ec3bd406dc3756/spec/embiggen/shortener_list_spec.rb
spec/embiggen/shortener_list_spec.rb
require 'embiggen/shortener_list' RSpec.describe Embiggen::ShortenerList do describe '#new' do it 'can be given a set' do list = described_class.new(Set['a.com', 'b.com', 'b.com']) expect(list.size).to eq(2) end it 'converts a given enumerable to a set' do list = described_class.new(%...
ruby
MIT
45ef6fb3d0cfb389a5374994e3ec3bd406dc3756
2026-01-04T17:45:12.071471Z
false
altmetric/embiggen
https://github.com/altmetric/embiggen/blob/45ef6fb3d0cfb389a5374994e3ec3bd406dc3756/spec/embiggen/configuration_spec.rb
spec/embiggen/configuration_spec.rb
require 'embiggen' module Embiggen RSpec.describe Configuration do describe '#timeout' do it 'defaults to 1 second' do expect(described_class.timeout).to eq(1) end it 'can be overridden' do described_class.timeout = 10 expect(described_class.timeout).to eq(10) en...
ruby
MIT
45ef6fb3d0cfb389a5374994e3ec3bd406dc3756
2026-01-04T17:45:12.071471Z
false
altmetric/embiggen
https://github.com/altmetric/embiggen/blob/45ef6fb3d0cfb389a5374994e3ec3bd406dc3756/spec/embiggen/uri_spec.rb
spec/embiggen/uri_spec.rb
# encoding: utf-8 require 'embiggen' module Embiggen RSpec.describe URI do describe '#expand' do it 'expands HTTP URIs' do stub_redirect('http://bit.ly/1ciyUPh', 'http://us.macmillan.com/books/9781466879980') uri = described_class.new(URI('http://bit.ly/1ciyUPh')) ...
ruby
MIT
45ef6fb3d0cfb389a5374994e3ec3bd406dc3756
2026-01-04T17:45:12.071471Z
false
altmetric/embiggen
https://github.com/altmetric/embiggen/blob/45ef6fb3d0cfb389a5374994e3ec3bd406dc3756/lib/embiggen.rb
lib/embiggen.rb
require 'embiggen/configuration' require 'embiggen/uri' module Embiggen def URI(uri) # rubocop:disable Naming/MethodName uri.is_a?(URI) ? uri : URI.new(uri) end def configure yield(Configuration) end module_function :URI module_function :configure end
ruby
MIT
45ef6fb3d0cfb389a5374994e3ec3bd406dc3756
2026-01-04T17:45:12.071471Z
false
altmetric/embiggen
https://github.com/altmetric/embiggen/blob/45ef6fb3d0cfb389a5374994e3ec3bd406dc3756/lib/embiggen/shortener_list.rb
lib/embiggen/shortener_list.rb
require 'forwardable' module Embiggen class ShortenerList extend Forwardable include Enumerable attr_reader :domains def initialize(domains) @domains = Set.new(domains.map { |domain| host_pattern(domain) }) end def include?(uri) domains.any? { |domain| uri.host =~ domain } ...
ruby
MIT
45ef6fb3d0cfb389a5374994e3ec3bd406dc3756
2026-01-04T17:45:12.071471Z
false
altmetric/embiggen
https://github.com/altmetric/embiggen/blob/45ef6fb3d0cfb389a5374994e3ec3bd406dc3756/lib/embiggen/http_client.rb
lib/embiggen/http_client.rb
require 'embiggen/error' require 'net/http' module Embiggen class GetWithoutBody < ::Net::HTTPRequest METHOD = 'GET'.freeze REQUEST_HAS_BODY = false RESPONSE_HAS_BODY = false end class HttpClient attr_reader :uri, :http def initialize(uri) @uri = uri @http = ::Net::HTTP.new(uri....
ruby
MIT
45ef6fb3d0cfb389a5374994e3ec3bd406dc3756
2026-01-04T17:45:12.071471Z
false
altmetric/embiggen
https://github.com/altmetric/embiggen/blob/45ef6fb3d0cfb389a5374994e3ec3bd406dc3756/lib/embiggen/uri.rb
lib/embiggen/uri.rb
require 'embiggen/configuration' require 'embiggen/error' require 'embiggen/http_client' require 'addressable/uri' require 'uri' module Embiggen class URI attr_reader :uri, :http_client def initialize(uri) @uri = URI(::Addressable::URI.parse(uri).normalize.to_s) @http_client = HttpClient.new(@ur...
ruby
MIT
45ef6fb3d0cfb389a5374994e3ec3bd406dc3756
2026-01-04T17:45:12.071471Z
false
altmetric/embiggen
https://github.com/altmetric/embiggen/blob/45ef6fb3d0cfb389a5374994e3ec3bd406dc3756/lib/embiggen/configuration.rb
lib/embiggen/configuration.rb
# encoding: utf-8 require 'embiggen/shortener_list' module Embiggen class Configuration class << self attr_writer :timeout, :redirects, :shorteners end def self.timeout @timeout ||= 1 end def self.redirects @redirects ||= 5 end # From http://longurl.org/services d...
ruby
MIT
45ef6fb3d0cfb389a5374994e3ec3bd406dc3756
2026-01-04T17:45:12.071471Z
false
altmetric/embiggen
https://github.com/altmetric/embiggen/blob/45ef6fb3d0cfb389a5374994e3ec3bd406dc3756/lib/embiggen/error.rb
lib/embiggen/error.rb
module Embiggen class Error < ::StandardError attr_reader :uri def initialize(message, uri) super(message) @uri = uri end end class BadShortenedURI < Error; end class NetworkError < Error; end class TooManyRedirects < Error; end end
ruby
MIT
45ef6fb3d0cfb389a5374994e3ec3bd406dc3756
2026-01-04T17:45:12.071471Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/spec/spec_helper.rb
spec/spec_helper.rb
# encoding: utf-8 $LOAD_PATH.unshift(File.expand_path('../lib', __FILE__)) $LOAD_PATH.unshift(File.expand_path('../spec', __FILE__)) require 'coco' require 'uuid' require 'etcd' require 'singleton' module Etcd class Spawner include Singleton def initialize @pids = [] @cert_file = File.expand_...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/spec/etcd/stats_spec.rb
spec/etcd/stats_spec.rb
# Encoding: utf-8 require 'spec_helper' describe Etcd::Stats do let(:client) do etcd_client end let(:leader) do etcd_leader end describe 'of leader' do let(:stats) do client.stats(:leader) end it 'should contain a key for leader' do expect(leader.stats(:leader)).to_not be...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/spec/etcd/client_spec.rb
spec/etcd/client_spec.rb
require 'spec_helper' describe Etcd::Client do let(:client) do etcd_client end it '#version' do #etcd 2.0.0-rc.1 expect(client.version).to match(/^etcd v?\d+\.\d+\.\d+.*$/) end it '#version_prefix' do expect(client.version_prefix).to eq('/v2') end context '#api_execute' do it 'should r...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/spec/etcd/watch_spec.rb
spec/etcd/watch_spec.rb
# Encoding: utf-8 require 'spec_helper' describe 'Etcd watch' do let(:client) do etcd_client end it 'without index, returns the value at a particular index' do key = random_key(4) value1 = uuid.generate value2 = uuid.generate index1 = client.create(key, value: value1).node.modifiedIndex ...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/spec/etcd/basic_auth_client_spec.rb
spec/etcd/basic_auth_client_spec.rb
# Encoding: utf-8 require 'spec_helper' describe 'Etcd basic auth client' do let(:client) do Etcd.client(host: 'localhost') do |config| config.user_name = 'test' config.password = 'pwd' end end it '#user_name' do expect(client.user_name).to eq('test') end it '#password' do expe...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/spec/etcd/keys_spec.rb
spec/etcd/keys_spec.rb
require 'spec_helper' describe Etcd::Keys do shared_examples 'basic key operation' do it '#set/#get' do key = random_key value = uuid.generate client.set(key, value: value) expect(client.get(key).value).to eq(value) end context '#exists?' do it 'should be true for existing ...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/spec/etcd/test_and_set_spec.rb
spec/etcd/test_and_set_spec.rb
# Encoding: utf-8 require 'spec_helper' describe 'Etcd test_and_set' do let(:client) do etcd_client end it 'should pass when prev value is correct' do key = random_key(2) old_value = uuid.generate new_value = uuid.generate resp = client.set(key, value: old_value) expect(resp.node.value)...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/spec/etcd/readme_spec.rb
spec/etcd/readme_spec.rb
# Encoding: utf-8 require 'spec_helper' describe 'Etcd specs for the main etcd README examples' do let(:client) do etcd_client end shared_examples 'response with valid node data' do |action| if action == :delete it 'should not have value' do expect(@response.node.value).to be_nil en...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/spec/etcd/node_spec.rb
spec/etcd/node_spec.rb
require 'spec_helper' describe Etcd::Node do let(:client) do etcd_client end it 'should create a directory with parent key when nested keys are set' do parent = random_key child = random_key value = uuid.generate client.set(parent + child, value: value) expect(client.get(parent + child))...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/lib/etcd.rb
lib/etcd.rb
# Encoding: utf-8 require 'etcd/client' ## # This module provides the Etcd:: name space for the gem and few # factory methods for Etcd domain objects module Etcd ## # Create and return a Etcd::Client object. It takes a hash +opts+ # as an argument which gets passed to the Etcd::Client.new method # directly #...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/lib/etcd/version.rb
lib/etcd/version.rb
# Encoding: utf-8 # Version const module Etcd VERSION = '0.3.0' end
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/lib/etcd/exceptions.rb
lib/etcd/exceptions.rb
# Encoding: utf-8 require 'json' # Provides Etcd namespace module Etcd # Represents all etcd custom errors class Error < StandardError attr_reader :caused_by, :error_code, :index def initialize(opts = {}) super(opts['message']) @caused_by = opts['cause'] @index = opts['index'] @er...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/lib/etcd/log.rb
lib/etcd/log.rb
# Encoding: utf-8 require 'mixlib/log' module Etcd ## # A wrapper class that extends Mixlib::Log class Log extend Mixlib::Log end end
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/lib/etcd/keys.rb
lib/etcd/keys.rb
# Encoding: utf-8 require 'json' require 'etcd/response' require 'etcd/log' module Etcd # Keys module provides the basic key value operations against # etcd /keys namespace module Keys # return etcd endpoint that is reserved for key/value store def key_endpoint version_prefix + '/keys' end ...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/lib/etcd/node.rb
lib/etcd/node.rb
# Encoding: utf-8 module Etcd # This class represents an etcd node class Node include Comparable attr_reader :created_index, :modified_index, :expiration, :ttl, :key, :value, :dir alias_method :createdIndex, :created_index alias_method :modifiedIndex, :modified_index # rubocop:disable MethodL...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/lib/etcd/response.rb
lib/etcd/response.rb
# Encoding: utf-8 require 'etcd/node' require 'json' require 'forwardable' module Etcd # manage http responses class Response extend Forwardable attr_reader :action, :node, :etcd_index, :raft_index, :raft_term def_delegators :@node, :key, :value, :directory?, :children def initialize(opts, head...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/lib/etcd/stats.rb
lib/etcd/stats.rb
# Encoding: utf-8 require 'json' module Etcd # Support stats module Stats def stats_endpoint version_prefix + '/stats' end def stats(type) case type when :leader JSON.parse(api_execute(stats_endpoint + '/leader', :get).body) when :store JSON.parse(api_execute(s...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
ranjib/etcd-ruby
https://github.com/ranjib/etcd-ruby/blob/f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917/lib/etcd/client.rb
lib/etcd/client.rb
# Encoding: utf-8 require 'openssl' require 'net/http' require 'net/https' require 'json' require 'etcd/log' require 'etcd/stats' require 'etcd/keys' require 'etcd/exceptions' module Etcd ## # This is the central ruby class for Etcd. It provides methods for all # etcd api calls. It also provides few additional ...
ruby
MIT
f7153c6a7829b1cd5e5a4470d7ca6f5217c4c917
2026-01-04T17:45:15.670612Z
false
nickryand/vagrant-multi-putty
https://github.com/nickryand/vagrant-multi-putty/blob/4e4e7e7f8449545df687702d671f29caaee39cd2/lib/vagrant-multi-putty.rb
lib/vagrant-multi-putty.rb
require 'vagrant-multi-putty/command' require 'vagrant-multi-putty/config' require 'vagrant-multi-putty/plugin' require 'vagrant-multi-putty/version'
ruby
MIT
4e4e7e7f8449545df687702d671f29caaee39cd2
2026-01-04T17:45:16.965191Z
false
nickryand/vagrant-multi-putty
https://github.com/nickryand/vagrant-multi-putty/blob/4e4e7e7f8449545df687702d671f29caaee39cd2/lib/vagrant-multi-putty/command.rb
lib/vagrant-multi-putty/command.rb
# Pieces of this plugin were taken from the bundled vagrant ssh plugin. require 'rubygems' require 'openssl' require 'optparse' require 'putty/key' using PuTTY::Key module VagrantMultiPutty class Command < Vagrant.plugin(2, :command) def execute # config_global is deprecated from v1.5 if Gem::Versi...
ruby
MIT
4e4e7e7f8449545df687702d671f29caaee39cd2
2026-01-04T17:45:16.965191Z
false
nickryand/vagrant-multi-putty
https://github.com/nickryand/vagrant-multi-putty/blob/4e4e7e7f8449545df687702d671f29caaee39cd2/lib/vagrant-multi-putty/version.rb
lib/vagrant-multi-putty/version.rb
module VagrantMultiPutty VERSION = "1.6.0" end
ruby
MIT
4e4e7e7f8449545df687702d671f29caaee39cd2
2026-01-04T17:45:16.965191Z
false
nickryand/vagrant-multi-putty
https://github.com/nickryand/vagrant-multi-putty/blob/4e4e7e7f8449545df687702d671f29caaee39cd2/lib/vagrant-multi-putty/plugin.rb
lib/vagrant-multi-putty/plugin.rb
require 'vagrant' module VagrantMultiPutty class Plugin < Vagrant.plugin("2") name "vagrant-multi-putty" description <<-DESC Vagrant-multi-putty allows you to ssh into your virtual machines using the putty program (or other compatible ssh clients like kitty). This plugin also supports openi...
ruby
MIT
4e4e7e7f8449545df687702d671f29caaee39cd2
2026-01-04T17:45:16.965191Z
false
nickryand/vagrant-multi-putty
https://github.com/nickryand/vagrant-multi-putty/blob/4e4e7e7f8449545df687702d671f29caaee39cd2/lib/vagrant-multi-putty/config.rb
lib/vagrant-multi-putty/config.rb
module VagrantMultiPutty class PuttyConfig < Vagrant.plugin(2, :config) attr_accessor :username attr_accessor :private_key_path attr_accessor :after_modal_hook attr_accessor :modal attr_accessor :session attr_accessor :ssh_client attr_accessor :ssh_options def after_modal &proc @after_modal_hook = proc e...
ruby
MIT
4e4e7e7f8449545df687702d671f29caaee39cd2
2026-01-04T17:45:16.965191Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/activestorage_aliyun_test.rb
test/activestorage_aliyun_test.rb
# frozen_string_literal: true require "test_helper" module ActiveStorageAliyun class Test < ActiveSupport::TestCase FIXTURE_KEY = SecureRandom.base58(24) FIXTURE_DATA = "\211PNG\r\n\032\n\000\000\000\rIHDR\000\000\000\020\000\000\000\020\001\003\000\000\000%=m\"\000\000\000\006PLTE\000\000\000\377\377\377\2...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/model_test.rb
test/model_test.rb
# frozen_string_literal: true require "test_helper" module ActiveStorageAliyun class ModelTest < ActionDispatch::IntegrationTest test "service_name" do u = User.new(avatar: fixture_file_upload("foo.jpg")) assert_equal "aliyun", u.avatar.blob.service_name u = User.new(files: [fixture_file_uplo...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/test_helper.rb
test/test_helper.rb
# frozen_string_literal: true # Configure Rails Environment ENV["RAILS_ENV"] = "test" require_relative "../test/dummy/config/environment" require "rails" require "minitest/autorun" require "rails/test_help" require "active_support/core_ext/securerandom" require "activestorage-aliyun" ENV["BACKTRACE"] = "1" ENV["RUBY...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/app/jobs/application_job.rb
test/dummy/app/jobs/application_job.rb
class ApplicationJob < ActiveJob::Base end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/app/helpers/users_helper.rb
test/dummy/app/helpers/users_helper.rb
module UsersHelper end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/app/helpers/application_helper.rb
test/dummy/app/helpers/application_helper.rb
module ApplicationHelper end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/app/controllers/users_controller.rb
test/dummy/app/controllers/users_controller.rb
class UsersController < ApplicationController before_action :set_user, only: [:show, :edit, :update, :destroy] # GET /users def index @users = User.all end # GET /users/1 def show end # GET /users/new def new @user = User.new end # GET /users/1/edit def edit end # POST /users ...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/app/controllers/application_controller.rb
test/dummy/app/controllers/application_controller.rb
class ApplicationController < ActionController::Base end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/app/models/application_record.rb
test/dummy/app/models/application_record.rb
class ApplicationRecord < ActiveRecord::Base self.abstract_class = true end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/app/models/user.rb
test/dummy/app/models/user.rb
class User < ApplicationRecord has_one_attached :avatar, service: :aliyun has_many_attached :files, service: :aliyun end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/app/mailers/application_mailer.rb
test/dummy/app/mailers/application_mailer.rb
class ApplicationMailer < ActionMailer::Base default from: "from@example.com" layout "mailer" end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/app/channels/application_cable/channel.rb
test/dummy/app/channels/application_cable/channel.rb
module ApplicationCable class Channel < ActionCable::Channel::Base end end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/app/channels/application_cable/connection.rb
test/dummy/app/channels/application_cable/connection.rb
module ApplicationCable class Connection < ActionCable::Connection::Base end end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/db/schema.rb
test/dummy/db/schema.rb
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # This file is the source Rails uses to define your schema when running `bin/rai...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/db/migrate/20210126105836_add_service_name_to_active_storage_blobs.active_storage.rb
test/dummy/db/migrate/20210126105836_add_service_name_to_active_storage_blobs.active_storage.rb
# This migration comes from active_storage (originally 20190112182829) class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0] def up unless column_exists?(:active_storage_blobs, :service_name) add_column :active_storage_blobs, :service_name, :string if configured_service = ActiveStor...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/db/migrate/20210126105837_create_active_storage_variant_records.active_storage.rb
test/dummy/db/migrate/20210126105837_create_active_storage_variant_records.active_storage.rb
# This migration comes from active_storage (originally 20191206030411) class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0] def change create_table :active_storage_variant_records do |t| t.belongs_to :blob, null: false, index: false t.string :variation_digest, null: false t.in...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/db/migrate/20180201031134_create_users.rb
test/dummy/db/migrate/20180201031134_create_users.rb
class CreateUsers < ActiveRecord::Migration[5.2] def change create_table :users do |t| t.string :name t.timestamps end end end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/db/migrate/20180201031103_create_active_storage_tables.active_storage.rb
test/dummy/db/migrate/20180201031103_create_active_storage_tables.active_storage.rb
# This migration comes from active_storage (originally 20170806125915) class CreateActiveStorageTables < ActiveRecord::Migration[5.2] def change create_table :active_storage_blobs do |t| t.string :key, null: false t.string :filename, null: false t.string :content_type t.text :metadata ...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/application.rb
test/dummy/config/application.rb
require_relative "boot" require "rails/all" Bundler.require(*Rails.groups) require "activestorage-aliyun" module Dummy class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 6.0 # Settings in config/environments/* take pr...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/environment.rb
test/dummy/config/environment.rb
# Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize!
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/puma.rb
test/dummy/config/puma.rb
# Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/routes.rb
test/dummy/config/routes.rb
Rails.application.routes.draw do resources :users root to: "users#index" # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/spring.rb
test/dummy/config/spring.rb
%w[ .ruby-version .rbenv-vars tmp/restart.txt tmp/caching-dev.txt ].each { |path| Spring.watch(path) }
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/boot.rb
test/dummy/config/boot.rb
# Set up gems listed in the Gemfile. ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__) require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) $LOAD_PATH.unshift File.expand_path("../../../lib", __dir__)
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/initializers/content_security_policy.rb
test/dummy/config/initializers/content_security_policy.rb
# Be sure to restart your server when you modify this file. # Define an application-wide content security policy # For further information see the following documentation # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy # Rails.application.config.content_security_policy do |policy| ...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/initializers/filter_parameter_logging.rb
test/dummy/config/initializers/filter_parameter_logging.rb
# Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn ]
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/initializers/application_controller_renderer.rb
test/dummy/config/initializers/application_controller_renderer.rb
# Be sure to restart your server when you modify this file. # ActiveSupport::Reloader.to_prepare do # ApplicationController.renderer.defaults.merge!( # http_host: 'example.org', # https: false # ) # end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/initializers/wrap_parameters.rb
test/dummy/config/initializers/wrap_parameters.rb
# Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters f...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/initializers/inflections.rb
test/dummy/config/initializers/inflections.rb
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflec...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/initializers/cookies_serializer.rb
test/dummy/config/initializers/cookies_serializer.rb
# Be sure to restart your server when you modify this file. # Specify a serializer for the signed and encrypted cookie jars. # Valid options are :json, :marshal, and :hybrid. Rails.application.config.action_dispatch.cookies_serializer = :json
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/initializers/permissions_policy.rb
test/dummy/config/initializers/permissions_policy.rb
# Define an application-wide HTTP permissions policy. For further # information see https://developers.google.com/web/updates/2018/06/feature-policy # # Rails.application.config.permissions_policy do |f| # f.camera :none # f.gyroscope :none # f.microphone :none # f.usb :none # f.fullscreen :s...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/initializers/assets.rb
test/dummy/config/initializers/assets.rb
# Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = "1.0" # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path # Add Yarn node_modules ...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/initializers/backtrace_silencers.rb
test/dummy/config/initializers/backtrace_silencers.rb
# Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } # You can also remove all the silencers if you're trying to debug a ...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/initializers/mime_types.rb
test/dummy/config/initializers/mime_types.rb
# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/initializers/new_framework_defaults_6_1.rb
test/dummy/config/initializers/new_framework_defaults_6_1.rb
# Be sure to restart your server when you modify this file. # # This file contains migration options to ease your Rails 6.1 upgrade. # # Once upgraded flip defaults one by one to migrate to the new default. # # Read the Guide for Upgrading Ruby on Rails for more info on each option. # Support for inversing belongs_to ...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/environments/test.rb
test/dummy/config/environments/test.rb
require "active_support/core_ext/integer/time" # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data the...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/environments/development.rb
test/dummy/config/environments/development.rb
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web serv...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/test/dummy/config/environments/production.rb
test/dummy/config/environments/production.rb
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web serve...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/lib/activestorage-aliyun.rb
lib/activestorage-aliyun.rb
# frozen_string_literal: true # require "active_storage_aliyun/railtie" module ActiveStorageAliyun # Your code goes here... end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/lib/active_storage/service/aliyun_service.rb
lib/active_storage/service/aliyun_service.rb
# frozen_string_literal: true require "aliyun/oss" module ActiveStorage class Service::AliyunService < Service def initialize(**config) Aliyun::Common::Logging.set_log_file("/dev/null") @config = config @public = @config.fetch(:public, false) # Compatible with mode config if @con...
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/lib/active_storage_aliyun/version.rb
lib/active_storage_aliyun/version.rb
# frozen_string_literal: true module ActiveStorageAliyun VERSION = "1.2.0" end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
huacnlee/activestorage-aliyun
https://github.com/huacnlee/activestorage-aliyun/blob/913697c234924765cbd771687e6550f9fab1cfb8/lib/active_storage_aliyun/railtie.rb
lib/active_storage_aliyun/railtie.rb
# frozen_string_literal: true module ActiveStorageAliyun class Railtie < ::Rails::Railtie end end
ruby
MIT
913697c234924765cbd771687e6550f9fab1cfb8
2026-01-04T17:45:18.412428Z
false
ruby-av/paperclip-av-transcoder
https://github.com/ruby-av/paperclip-av-transcoder/blob/76679abf0e4cbcc8ff1f7d879a2f1425e10661b5/spec/schema.rb
spec/schema.rb
ActiveRecord::Schema.define version: 0 do create_table "documents", force: true do |t| t.string :owner t.string :video_file_name t.string :video_content_type t.integer :video_updated_at t.integer :video_file_size t.string :image_file_name t.string :image_content_type t.integer :image_u...
ruby
MIT
76679abf0e4cbcc8ff1f7d879a2f1425e10661b5
2026-01-04T17:45:18.794313Z
false
ruby-av/paperclip-av-transcoder
https://github.com/ruby-av/paperclip-av-transcoder/blob/76679abf0e4cbcc8ff1f7d879a2f1425e10661b5/spec/spec_helper.rb
spec/spec_helper.rb
ENV["RAILS_ENV"] = "test" require 'coveralls' Coveralls.wear! require 'rubygems' require 'rspec' require 'bundler/setup' require 'paperclip' require 'paperclip/railtie' # Prepare activerecord require "active_record" require 'paperclip/av/transcoder' Bundler.require(:default) # Connect to sqlite ActiveRecord::Base.est...
ruby
MIT
76679abf0e4cbcc8ff1f7d879a2f1425e10661b5
2026-01-04T17:45:18.794313Z
false
ruby-av/paperclip-av-transcoder
https://github.com/ruby-av/paperclip-av-transcoder/blob/76679abf0e4cbcc8ff1f7d879a2f1425e10661b5/spec/transcoder/transcoder_spec.rb
spec/transcoder/transcoder_spec.rb
require 'spec_helper' describe Paperclip::Transcoder do let(:supported) { File.new(Dir.pwd + '/spec/support/assets/sample.mp4') } let(:unsupported) { File.new(File.expand_path('spec/support/assets/image.png')) } let(:destination) { Pathname.new("#{Dir.tmpdir}/transcoder/") } describe "supported formats" do ...
ruby
MIT
76679abf0e4cbcc8ff1f7d879a2f1425e10661b5
2026-01-04T17:45:18.794313Z
false
ruby-av/paperclip-av-transcoder
https://github.com/ruby-av/paperclip-av-transcoder/blob/76679abf0e4cbcc8ff1f7d879a2f1425e10661b5/lib/paperclip/paperclip_processors/transcoder.rb
lib/paperclip/paperclip_processors/transcoder.rb
module Paperclip class Transcoder < Processor attr_accessor :geometry, :format, :whiny, :convert_options # Creates a Video object set to work on the +file+ given. It # will attempt to transcode the video into one defined by +target_geometry+ # which is a "WxH"-style string. +format+ should be specifie...
ruby
MIT
76679abf0e4cbcc8ff1f7d879a2f1425e10661b5
2026-01-04T17:45:18.794313Z
false
ruby-av/paperclip-av-transcoder
https://github.com/ruby-av/paperclip-av-transcoder/blob/76679abf0e4cbcc8ff1f7d879a2f1425e10661b5/lib/paperclip/av/transcoder.rb
lib/paperclip/av/transcoder.rb
require "paperclip/av/transcoder/version" require "av" require File.join(File.expand_path(File.dirname(__FILE__)), "../paperclip_processors/transcoder")
ruby
MIT
76679abf0e4cbcc8ff1f7d879a2f1425e10661b5
2026-01-04T17:45:18.794313Z
false
ruby-av/paperclip-av-transcoder
https://github.com/ruby-av/paperclip-av-transcoder/blob/76679abf0e4cbcc8ff1f7d879a2f1425e10661b5/lib/paperclip/av/transcoder/version.rb
lib/paperclip/av/transcoder/version.rb
module Paperclip module Av module Transcoder VERSION = "0.6.4" end end end
ruby
MIT
76679abf0e4cbcc8ff1f7d879a2f1425e10661b5
2026-01-04T17:45:18.794313Z
false
jkeen/tracking_number_data
https://github.com/jkeen/tracking_number_data/blob/802d8a55e506b65bb5c820ed4e6d259a29f3911e/utils/gen_dpd_service_codes.rb
utils/gen_dpd_service_codes.rb
require 'json' path = File.expand_path(File.join(__dir__, 'dpd-service-codes.txt')) file = File.read(path) processed = file.lines.collect do |line| items = line.split(' ') data = {} data[:code] = items.shift data[:service] = items.shift data[:description] = items.shift data end puts JSON.generate(pro...
ruby
MIT
802d8a55e506b65bb5c820ed4e6d259a29f3911e
2026-01-04T17:45:13.109005Z
false
jkeen/tracking_number_data
https://github.com/jkeen/tracking_number_data/blob/802d8a55e506b65bb5c820ed4e6d259a29f3911e/utils/gen_dpd_country_codes.rb
utils/gen_dpd_country_codes.rb
require 'json' path = File.expand_path(File.join(__dir__, 'dpd-country-codes.txt')) file = File.read(path) processed = file.lines.collect do |line| items = line.split(' ') data = {} data[:code] = items.pop data[:country_code] = items.pop data[:country_short_code] = items.pop data[:country] = items.join(...
ruby
MIT
802d8a55e506b65bb5c820ed4e6d259a29f3911e
2026-01-04T17:45:13.109005Z
false
jkeen/tracking_number_data
https://github.com/jkeen/tracking_number_data/blob/802d8a55e506b65bb5c820ed4e6d259a29f3911e/spec/implementation_spec.rb
spec/implementation_spec.rb
# frozen_string_literal: true require 'spec_helper' require 'tracking_number' def load_courier_data TrackingNumber::Loader.load_tracking_number_data(File.expand_path(File.join(__dir__, '../couriers/'))) end load_courier_data.each do |data| klass = data[:class] courier_name = data[:name] cour...
ruby
MIT
802d8a55e506b65bb5c820ed4e6d259a29f3911e
2026-01-04T17:45:13.109005Z
false
jkeen/tracking_number_data
https://github.com/jkeen/tracking_number_data/blob/802d8a55e506b65bb5c820ed4e6d259a29f3911e/spec/format_spec.rb
spec/format_spec.rb
# frozen_string_literal: true require 'spec_helper' require 'active_support' require 'json' require 'active_support/core_ext/hash' require 'active_support/core_ext/string' def courier_files Dir.glob(File.expand_path(File.join(__dir__, '../couriers/*.json'))) end def parsed_json_file(file) JSON.parse(File.read(fi...
ruby
MIT
802d8a55e506b65bb5c820ed4e6d259a29f3911e
2026-01-04T17:45:13.109005Z
false
jkeen/tracking_number_data
https://github.com/jkeen/tracking_number_data/blob/802d8a55e506b65bb5c820ed4e6d259a29f3911e/spec/collision_spec.rb
spec/collision_spec.rb
# frozen_string_literal: true require 'spec_helper' require 'tracking_number' def load_courier_data TrackingNumber::Loader.load_tracking_number_data(File.expand_path(File.join(__dir__, '../couriers/'))) end # Ideally each tracking numbers definition would only return one match, and that's usually the case # when t...
ruby
MIT
802d8a55e506b65bb5c820ed4e6d259a29f3911e
2026-01-04T17:45:13.109005Z
false