source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
cockroachdb/homebrew-tap
https://github.com/cockroachdb/homebrew-tap
release/cockroach-sql-tmpl.rb
Ruby
apache-2.0
19
master
886
# Auto-generated file, DO NOT EDIT # Source: release/cockroach-sql-tmpl.rb class CockroachSql < Formula desc "Distributed SQL database shell" homepage "https://www.cockroachlabs.com" version "{{ .Version }}" on_macos do on_intel do url "{{ .DarwinAMD64URL }}" sha256 "{{ .DarwinAMD64SHA256 }}" ...
github
cockroachdb/homebrew-tap
https://github.com/cockroachdb/homebrew-tap
release/cockroach-tmpl.rb
Ruby
apache-2.0
19
master
6,396
# Auto-generated file, DO NOT EDIT # Source: release/cockroach-tmpl.rb class Cockroach{{ .ClassSuffix }} < Formula desc "Distributed SQL database" homepage "https://www.cockroachlabs.com" version "{{ .Version }}" on_macos do on_intel do url "{{ .DarwinAMD64URL }}" sha256 "{{ .DarwinAMD64SHA256 ...
github
Darep/middleman-kss
https://github.com/Darep/middleman-kss
Gemfile
Ruby
mit
18
master
377
source 'https://rubygems.org' gem 'middleman-core' gem 'redcarpet' # Specify your gem's dependencies in middleman-kss.gemspec gemspec group :development do gem 'rake', '~> 0.9.2' gem 'rdoc', '~> 3.9' gem 'yard', '~> 0.8.0' end group :test do gem 'rake', '~> 0.9.2' gem 'cucumber', '~> 1.2.0' gem 'fivemat...
github
Darep/middleman-kss
https://github.com/Darep/middleman-kss
middleman-kss.gemspec
Ruby
mit
18
master
1,132
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'middleman-kss/version' Gem::Specification.new do |spec| spec.name = 'middleman-kss' spec.version = Middleman::KSS::VERSION spec.platform = Gem::Platform::RUBY spec.aut...
github
Darep/middleman-kss
https://github.com/Darep/middleman-kss
Rakefile
Ruby
mit
18
master
385
require "bundler/gem_tasks" require 'cucumber/rake/task' Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t| exempt_tags = "" exempt_tags << "--tags ~@nojava " if RUBY_PLATFORM == "java" t.cucumber_opts = "--color --tags ~@wip #{exempt_tags} --strict --format #{ENV['CUCUMBER_FORMAT'] || ...
github
Darep/middleman-kss
https://github.com/Darep/middleman-kss
lib/middleman-kss/extension.rb
Ruby
mit
18
master
3,468
require 'kss' begin require 'redcarpet' rescue LoadError end begin require 'kramdown' rescue LoadError end module Middleman module KSS class << self def options @@options end def registered(app, options_hash={}) @@options = options_hash yield @@options if block_g...
github
Darep/middleman-kss
https://github.com/Darep/middleman-kss
features/support/env.rb
Ruby
mit
18
master
220
PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__))) ENV['TEST'] = 'true' require "middleman-core" require "middleman-core/step_definitions" require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-kss')
github
Darep/middleman-kss
https://github.com/Darep/middleman-kss
features/support/steps.rb
Ruby
mit
18
master
223
require "rack/test" Then /^going to "([^\"]*)" should raise an exception with message "(.*)"$/ do |url, message| lambda { @browser.get(URI.escape(url)) }.should raise_exception(Exception, /#{Regexp.escape message}/) end
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-yarn/cobra_commander-yarn.gemspec
Ruby
mit
19
main
1,766
# frozen_string_literal: true require_relative "lib/cobra_commander/yarn/version" Gem::Specification.new do |spec| spec.name = "cobra_commander-yarn" spec.version = CobraCommander::Yarn::VERSION spec.authors = [ "Ben Langfeld", "Garett Arrowood", "Carlos Palhares", ] spec.email = [ "blangfel...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-yarn/spec/spec_helper.rb
Ruby
mit
19
main
446
# frozen_string_literal: true require "cobra_commander/yarn" require_relative "dummy_helper" RSpec.configure do |config| config.include DummyHelper # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = ".rspec_status" # Disable RSpec exposing methods globally ...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-yarn/spec/cobra_commander/yarn/workspace_spec.rb
Ruby
mit
19
main
1,012
# frozen_string_literal: true RSpec.describe CobraCommander::Yarn::Workspace do subject { CobraCommander::Yarn::Workspace.new(dummy_path, {}) } let(:hr_package) do subject.find do |package| package.name.eql?("hr-ui") end end it "can load all the internal packages" do expect(subject.map(&:nam...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-yarn/lib/cobra_commander/yarn.rb
Ruby
mit
19
main
209
# frozen_string_literal: true require "cobra_commander/source" require_relative "yarn/version" require_relative "yarn/workspace" module CobraCommander # CobraCommander Yarn plugin module Yarn end end
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-yarn/lib/cobra_commander/yarn/workspace.rb
Ruby
mit
19
main
963
# frozen_string_literal: true require "json" require "open3" require "pathname" module CobraCommander module Yarn # Yarn workspace components source for an umbrella class Workspace < CobraCommander::Source[:js] def packages workspace_data.map do |name, spec| ::CobraCommander::Package...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/Guardfile
Ruby
mit
19
main
343
# frozen_string_literal: true guard :rspec, cmd: "bundle exec rspec" do require "guard/rspec/dsl" dsl = Guard::RSpec::Dsl.new(self) rspec = dsl.rspec watch(rspec.spec_helper) { rspec.spec_dir } watch(rspec.spec_support) { rspec.spec_dir } watch(rspec.spec_files) ruby = dsl.ruby dsl.watch_spec_files_f...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/cobra_commander.gemspec
Ruby
mit
19
main
2,031
# frozen_string_literal: true require_relative "lib/cobra_commander/version" Gem::Specification.new do |spec| spec.name = "cobra_commander" spec.version = CobraCommander::VERSION spec.authors = [ "Ben Langfeld", "Garett Arrowood", "Carlos Palhares", ] spec.email = [ "blangfeld@powerhrg.com",...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander.rb
Ruby
mit
19
main
703
# frozen_string_literal: true require "bundler" require "cobra_commander/affected" require "cobra_commander/component" require "cobra_commander/executor" require "cobra_commander/git_changed" require "cobra_commander/package" require "cobra_commander/source" require "cobra_commander/umbrella" require "cobra_commander...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/package.rb
Ruby
mit
19
main
450
# frozen_string_literal: true require "forwardable" module CobraCommander # A package within the class Package extend Forwardable attr_reader :source, :path, :name, :dependencies def_delegators :source, :key def initialize(source, path:, dependencies:, name:) @source = source @path ...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/umbrella.rb
Ruby
mit
19
main
2,770
# frozen_string_literal: true require "yaml" module CobraCommander # An umbrella application class Umbrella attr_reader :path, :config def self.load_config(path) return {} unless path.exist? YAML.safe_load(path.read, permitted_classes: [Symbol], aliases: true) end # Umbrella constru...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/cli.rb
Ruby
mit
19
main
4,918
# frozen_string_literal: true require "etc" require "thor" require "fileutils" require "cobra_commander" module CobraCommander # Implements the tool's CLI class CLI < Thor DEFAULT_CONCURRENCY = (Etc.nprocessors / 2.0).ceil require_relative "cli/filters" require_relative "cli/output/ascii_tree" re...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/git_changed.rb
Ruby
mit
19
main
1,137
# frozen_string_literal: true require "open3" module CobraCommander # List of files changed in a git repository in the current branch in relation # to the give base branch # # @private # class GitChanged include Enumerable Error = Class.new(StandardError) InvalidSelectionError = Class.new(Err...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/component.rb
Ruby
mit
19
main
1,271
# frozen_string_literal: true module CobraCommander # Represents a component withing an Umbrella class Component attr_reader :name, :packages def initialize(umbrella, name) @umbrella = umbrella @name = name @dependency_names = [] @packages = [] end def describe "#{na...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/executor.rb
Ruby
mit
19
main
1,993
# frozen_string_literal: true require "pastel" require "tty-command" require "tty-prompt" module CobraCommander # Execute a command on all given packages module Executor autoload :BufferedPrinter, "cobra_commander/executor/buffered_printer" autoload :Command, "cobra_commander/executor/command" autoloa...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/source.rb
Ruby
mit
19
main
697
# frozen_string_literal: true require "cobra_commander/package" require "cobra_commander/registry" module CobraCommander class Source Error = Class.new(StandardError) include Enumerable extend CobraCommander::Registry attr_reader :path, :config def initialize(path, config) @path = Pathn...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/registry.rb
Ruby
mit
19
main
527
# frozen_string_literal: true module CobraCommander module Registry def [](key) Class.new(self) do define_singleton_method(:key) { key } define_method(:key) { key } def self.inherited(base) super superclass.all[key] = base end end end def ...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/affected.rb
Ruby
mit
19
main
708
# frozen_string_literal: true module CobraCommander # Calculates directly & transitively affected components # Takes a list of changes, and resolves all components affected # class Affected include Enumerable def initialize(umbrella, changes) @umbrella = umbrella @changes = changes end...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/executor/package_criteria.rb
Ruby
mit
19
main
504
# frozen_string_literal: true module CobraCommander module Executor module PackageCriteria def match_criteria?(package, criteria) criteria.all? do |criteria_key, criteria_value| criteria_method = "_match_#{criteria_key}?" !respond_to?(criteria_method, true) || send(criteria_meth...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/executor/isolated_pty.rb
Ruby
mit
19
main
595
# frozen_string_literal: true module CobraCommander module Executor # # Executes commands in a clean environment, without the influence # of the current Bundler env vars. # class IsolatedPTY < ::TTY::Command def initialize(**) super(pty: true, **) end def run!(...) ...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/executor/script.rb
Ruby
mit
19
main
906
# frozen_string_literal: true module CobraCommander module Executor # This is a script job. It can target any CobraCommander::Component. # # Script runs the given script once for each Component#root_paths # class Script include ::CobraCommander::Executor::RunScript def initialize(scr...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/executor/command.rb
Ruby
mit
19
main
1,734
# frozen_string_literal: true module CobraCommander module Executor class Command include ::CobraCommander::Executor::PackageCriteria include ::CobraCommander::Executor::RunScript SKIP_UNEXISTING = "Command %s does not exist. Check your cobra.yml for existing commands in %s." SKIP_CRITER...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/executor/output_prompt.rb
Ruby
mit
19
main
1,359
# frozen_string_literal: true module CobraCommander module Executor # Runs an interactive output printer class OutputPrompt def self.run(pool, output = $stdout) new(pool.jobs).run(output) end pastel = Pastel.new ICONS = { nil => pastel.dim("⦻"), success: paste...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/executor/buffered_printer.rb
Ruby
mit
19
main
1,026
# frozen_string_literal: true module CobraCommander module Executor class BufferedPrinter < TTY::Command::Printers::Null TIME_FORMAT = "Finished in %5.3fs" def initialize(*) super @buffers = Hash.new { |h, k| h[k] = StringIO.new } end def write(cmd, message) @bu...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/executor/worker_pool.rb
Ruby
mit
19
main
2,479
# frozen_string_literal: true module CobraCommander module Executor # @private # # This WorkerPooll will queue up jobs, and execute them using # Worker's, each with a thread running our work loop using the # given runner. # # - A *job* is defined by a group of arguments to be passed to th...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/executor/run_script.rb
Ruby
mit
19
main
661
# frozen_string_literal: true module CobraCommander module Executor module RunScript def run_script(tty, script, path) result = tty.run!(script, chdir: path, err: :out) return [:error, result.out] if result.failed? [:success, result.out] end def run_many(collection, &...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/cli/filters.rb
Ruby
mit
19
main
1,850
# frozen_string_literal: true module CobraCommander # @private class CLI private_class_method def self.filter_options(dependents:, dependencies:) method_option :affected, type: :string, desc: "Components affected since given branch [default: main]" method_option :dependencies, type: :boolean, alias...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/cli/output/dot_graph.rb
Ruby
mit
19
main
554
# frozen_string_literal: true module CobraCommander class CLI module Output # Generates graphs of components module DotGraph def self.generate(components, output) output << "digraph G {\n" [*components, *components.flat_map(&:deep_dependencies)].uniq.each do |comp| ...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/cli/output/change.rb
Ruby
mit
19
main
1,399
# frozen_string_literal: true require "cobra_commander/git_changed" require "cobra_commander/affected" module CobraCommander class CLI module Output class Change def initialize(umbrella, branch, changes: nil) @branch = branch @umbrella = umbrella @changes = changes ||...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/lib/cobra_commander/cli/output/ascii_tree.rb
Ruby
mit
19
main
1,382
# frozen_string_literal: true require "stringio" module CobraCommander module CLI::Output # Prints the tree in a nice tree form class AsciiTree SPACE = " " BAR = "│   " TEE = "├── " CORNER = "└── " def initialize(components) @components = components.sort_by(&:name) ...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/spec_helper.rb
Ruby
mit
19
main
1,720
# frozen_string_literal: true require "aruba/rspec" require "pry" require "cobra_commander" require "support/app_helper" require "support/stub_source" RSpec.configure do |config| config.include AppHelper config.expect_with :rspec do |expectations| # This option will default to `true` in RSpec 4. It makes th...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/support/app_helper.rb
Ruby
mit
19
main
751
# frozen_string_literal: true require "yaml" module AppHelper def stub_umbrella(name = nil, unpack: false, memory: false, stub: true) path = if unpack unpacked_path = Pathname.new(Dir.mktmpdir).realpath package = fixture_file_path("#{name}.tgz") system(`tar xfz #{package} ...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/support/stub_source.rb
Ruby
mit
19
main
1,133
# frozen_string_literal: true require "cobra_commander" require "cobra_commander/source" require "yaml" class MemorySource < CobraCommander::Source[:memory] def packages [CobraCommander::Package.new(self, name: "directory", path: path.join("directory"), dependencies: []), ...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/support/cobra_commander-stub.gemspec
Ruby
mit
19
main
345
# frozen_string_literal: true Gem::Specification.new do |spec| spec.name = "cobra_commander-stub" spec.version = "0.1.0" spec.summary = "cobra_commander-stub" spec.authors = ["Carlos Palhares"] spec.license = "MIT" spec.files = ["stub_source.rb"] spec.require_paths = ["./"] spec.metadata["rubygems_mfa...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/cobra_commander/source_spec.rb
Ruby
mit
19
main
1,286
# frozen_string_literal: true require "spec_helper" RSpec.describe CobraCommander::Source do describe ".load(path, config, **selector)" do it "loads the given sources" do memory_source, *others = CobraCommander::Source.load("doesnt_matter", memory: true) expect(others.size).to eql 0 expect(me...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/cobra_commander/executor_spec.rb
Ruby
mit
19
main
1,447
# frozen_string_literal: true require "spec_helper" require "cobra_commander/executor" RSpec.describe CobraCommander::Executor do describe ".execute_and_handle_exit(jobs:, runner:, workers:, printer: :quiet, &name_f)" do it "prints all output as it goes when only one job is given" do runner = ->(tty, *arg...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/cobra_commander/cli_spec.rb
Ruby
mit
19
main
14,326
# frozen_string_literal: true require "spec_helper" RSpec.describe "cobra cli", type: :aruba do let(:last_command_output) do last_command_started.output.strip.split("\n").grep_v(/warning/).join("\n") end describe "cobra exec --no-interactive" do let(:umbrella) { stub_umbrella("app") } it "errors g...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/cobra_commander/git_changed_spec.rb
Ruby
mit
19
main
409
# frozen_string_literal: true require "spec_helper" require "cobra_commander/git_changed" RSpec.describe CobraCommander::GitChanged do let(:umbrella) { stub_umbrella("modified-app", unpack: true) } it "finds all changed files" do changed = CobraCommander::GitChanged.new(umbrella.path, "main") expect(cha...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/cobra_commander/affected_spec.rb
Ruby
mit
19
main
3,851
# frozen_string_literal: true require "spec_helper" require "cobra_commander/affected" RSpec.describe CobraCommander::Affected do let(:umbrella) { stub_umbrella("app") } it "successfully instantiates" do expect(CobraCommander::Affected.new(umbrella, [])).to be_truthy end context "with no changes" do ...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/cobra_commander/umbrella_spec.rb
Ruby
mit
19
main
1,760
# frozen_string_literal: true require "spec_helper" RSpec.describe CobraCommander::Umbrella do let(:umbrella_without_config) { stub_umbrella("modified-app", unpack: true) } subject { stub_umbrella("app", memory: true, stub: true) } describe "configuration" do it "is the config file at the root of umbrella"...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/cobra_commander/registry_spec.rb
Ruby
mit
19
main
843
# frozen_string_literal: true require "spec_helper" class Animal extend ::CobraCommander::Registry end class People extend ::CobraCommander::Registry end class Dog < Animal[:dog] end class Cat < Animal[:cat] end RSpec.describe CobraCommander::Registry do describe "key" do it "carries the key to their in...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/cobra_commander/executor/script_spec.rb
Ruby
mit
19
main
1,220
# frozen_string_literal: true require "spec_helper" require "cobra_commander/executor" RSpec.describe CobraCommander::Executor::Script do let(:finance_component) { stub_umbrella("app", memory: true, stub: true).find("finance") } let(:finance_package) { finance_component.packages.first } let(:pty) { TTY::Command...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/cobra_commander/executor/isolated_pty_spec.rb
Ruby
mit
19
main
512
# frozen_string_literal: true require "spec_helper" require "cobra_commander/executor" RSpec.describe CobraCommander::Executor::IsolatedPTY do it "executes the command in the given bundle context" do Bundler::ORIGINAL_ENV["BUNDLE_GEMFILE"] = "Funny" output = StringIO.new pty = CobraCommander::Executor...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/cobra_commander/executor/buffered_printer_spec.rb
Ruby
mit
19
main
1,310
# frozen_string_literal: true require "spec_helper" require "securerandom" require "cobra_commander/executor" RSpec.describe CobraCommander::Executor::BufferedPrinter do let(:output) { StringIO.new } def new_cmd(cmd, uuid = SecureRandom.uuid) double(to_command: cmd, uuid: uuid) end subject { CobraComman...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/cobra_commander/executor/command_spec.rb
Ruby
mit
19
main
4,317
# frozen_string_literal: true require "spec_helper" require "cobra_commander/executor" RSpec.describe CobraCommander::Executor::Command do let(:finance_component) { stub_umbrella("app", memory: true, stub: true).find("finance") } let(:finance_stub_package) { finance_component.packages.find { |p| p.key == :stub } ...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/cobra_commander/cli/output/dot_graph_spec.rb
Ruby
mit
19
main
531
# frozen_string_literal: true require "spec_helper" require "cobra_commander/cli/output/dot_graph" RSpec.describe CobraCommander::CLI::Output::DotGraph do describe "#generate!" do let(:umbrella) { stub_umbrella("app") } let(:expected_dot) { fixture_file("app.dot") } let(:generated_dot) { StringIO.new } ...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander/spec/cobra_commander/cli/output/change_spec.rb
Ruby
mit
19
main
3,837
# frozen_string_literal: true require "spec_helper" require "cobra_commander/cli/output/change" RSpec.describe CobraCommander::CLI::Output::Change do let(:umbrella) { stub_umbrella("app") } it "successfully instantiates" do expect(CobraCommander::CLI::Output::Change.new(umbrella, "master")).to be_truthy en...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-ruby/cobra_commander-ruby.gemspec
Ruby
mit
19
main
1,900
# frozen_string_literal: true require_relative "lib/cobra_commander/ruby/version" Gem::Specification.new do |spec| spec.name = "cobra_commander-ruby" spec.version = CobraCommander::Ruby::VERSION spec.authors = [ "Ben Langfeld", "Garett Arrowood", "Carlos Palhares", ] spec.email = [ "blangfel...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-ruby/lib/cobra_commander/ruby.rb
Ruby
mit
19
main
206
# frozen_string_literal: true require "cobra_commander/source" require_relative "ruby/bundle" require_relative "ruby/version" module CobraCommander # CobraCommander Ruby plugin module Ruby end end
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-ruby/lib/cobra_commander/ruby/bundle.rb
Ruby
mit
19
main
1,042
# frozen_string_literal: true require "bundler" require "bundler/lockfile_parser" require "pathname" module CobraCommander module Ruby # Calculates ruby bundler dependencies class Bundle < CobraCommander::Source[:ruby] def packages specs.map do |spec| ::CobraCommander::Package.new( ...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-ruby/spec/spec_helper.rb
Ruby
mit
19
main
460
# frozen_string_literal: true require "pry" require "cobra_commander/ruby" require_relative "dummy_helper" RSpec.configure do |config| config.include DummyHelper # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = ".rspec_status" # Disable RSpec exposing met...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-ruby/spec/cobra_commander/ruby/bundle_spec.rb
Ruby
mit
19
main
802
# frozen_string_literal: true RSpec.describe CobraCommander::Ruby::Bundle do subject { CobraCommander::Ruby::Bundle.new(dummy_path, {}) } let(:hr_package) do subject.find do |package| package.name.eql?("hr") end end it "can load all the unique internal packages" do expect(subject.map(&:name)...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-ruby/spec/dummy/Gemfile
Ruby
mit
19
main
200
# frozen_string_literal: true source "https://rubygems.org" path "components" do gem "authn" gem "authz" gem "hr" gem "sales" end gem "finance", path: "components/finance" gem "useragent"
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-ruby/spec/dummy/components/hr/hr.gemspec
Ruby
mit
19
main
473
# frozen_string_literal: true Gem::Specification.new do |spec| spec.name = "hr" spec.version = "0.1.0" spec.summary = "This is an example component for cobra_commander-ruby" spec.authors = ["Carlos Palhares"] spec.license = "MIT" # External dependencies spec.add_dependency "lockbox" # Internal depend...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-ruby/spec/dummy/components/finance/authz.gemspec
Ruby
mit
19
main
361
# frozen_string_literal: true Gem::Specification.new do |spec| spec.name = "finance" spec.version = "0.1.0" spec.summary = "This is an example component for cobra_commander-ruby" spec.authors = ["Carlos Palhares"] spec.license = "MIT" spec.add_dependency "authn" spec.add_dependency "authz" spec.metada...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-ruby/spec/dummy/components/authz/authz.gemspec
Ruby
mit
19
main
329
# frozen_string_literal: true Gem::Specification.new do |spec| spec.name = "authz" spec.version = "0.1.0" spec.summary = "This is an example component for cobra_commander-ruby" spec.authors = ["Carlos Palhares"] spec.license = "MIT" spec.add_dependency "authn" spec.metadata["rubygems_mfa_required"] = "t...
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-ruby/spec/dummy/components/authn/authn.gemspec
Ruby
mit
19
main
298
# frozen_string_literal: true Gem::Specification.new do |spec| spec.name = "authn" spec.version = "0.1.0" spec.summary = "This is an example component for cobra_commander-ruby" spec.authors = ["Carlos Palhares"] spec.license = "MIT" spec.metadata["rubygems_mfa_required"] = "true" end
github
powerhome/cobra_commander
https://github.com/powerhome/cobra_commander
cobra_commander-ruby/spec/dummy/components/sales/sales.gemspec
Ruby
mit
19
main
386
# frozen_string_literal: true Gem::Specification.new do |spec| spec.name = "sales" spec.version = "0.1.0" spec.summary = "This is an example component for cobra_commander-ruby" spec.authors = ["Carlos Palhares"] spec.license = "MIT" spec.add_dependency "authn" spec.add_dependency "authz" spec.add_depe...
github
jesseluo/linkmap_ios
https://github.com/jesseluo/linkmap_ios
linkmap_ios.gemspec
Ruby
mit
19
master
1,627
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'linkmap_ios/version' Gem::Specification.new do |spec| spec.name = "linkmap_ios" spec.version = LinkmapIos::VERSION spec.authors = ["Jesse Luo"] spec.email = [...
github
jesseluo/linkmap_ios
https://github.com/jesseluo/linkmap_ios
spec/linkmap_ios_spec.rb
Ruby
mit
19
master
202
require 'spec_helper' describe LinkmapIos do it 'has a version number' do expect(LinkmapIos::VERSION).not_to be nil end it 'does something useful' do expect(false).to eq(true) end end
github
jesseluo/linkmap_ios
https://github.com/jesseluo/linkmap_ios
lib/linkmap_ios.rb
Ruby
mit
19
master
7,255
require "linkmap_ios/version" require "filesize" require "json" module LinkmapIos Library = Struct.new(:name, :size, :objects, :dead_symbol_size, :pod) class LinkmapParser attr_reader :id_map attr_reader :library_map def initialize(file_path) @file_path = file_path @id_map = {} ...
github
camertron/turbo-sprockets-rails4
https://github.com/camertron/turbo-sprockets-rails4
turbo-sprockets-rails4.gemspec
Ruby
mit
19
master
746
$:.unshift File.join(File.dirname(__FILE__), 'lib') require 'turbo-sprockets/version' Gem::Specification.new do |s| s.name = 'turbo-sprockets-rails4' s.version = ::TurboSprockets::VERSION s.authors = ['Cameron Dutro'] s.email = ['camertron@gmail.com'] s.homepage = 'http://github.com/camertron/turbo-...
github
camertron/turbo-sprockets-rails4
https://github.com/camertron/turbo-sprockets-rails4
Rakefile
Ruby
mit
19
master
444
# encoding: UTF-8 $:.unshift File.join(File.dirname(__FILE__), 'lib') require 'rubygems' unless ENV['NO_RUBYGEMS'] require 'bundler' require 'pry-byebug' require 'rspec/core/rake_task' require 'rubygems/package_task' require 'rails' require 'sprockets/railtie' require 'turbo-sprockets-rails4' Bundler::GemHelper.in...
github
camertron/turbo-sprockets-rails4
https://github.com/camertron/turbo-sprockets-rails4
spec/asset_resolver_spec.rb
Ruby
mit
19
master
5,149
require 'spec_helper' require 'securerandom' describe TurboSprockets::AssetResolver do RSpec::Matchers.define :match_digested do |expected| match do |actual| extname = File.extname(expected) re = /#{expected.chomp(extname)}-[a-f0-9]+#{extname}/ !!(re =~ actual) end end let(:environment...
github
camertron/turbo-sprockets-rails4
https://github.com/camertron/turbo-sprockets-rails4
spec/spec_helper.rb
Ruby
mit
19
master
1,425
# encoding: UTF-8 $:.push(File.dirname(__FILE__)) require 'rspec' require 'pry-byebug' require 'rails' require 'rake' require 'sprockets/railtie' ENV['RAILS_ENV'] ||= 'test' require 'turbo-sprockets-rails4' Dir.chdir('spec') do require File.expand_path('../config/application', __FILE__) TurboSprockets::DummyA...
github
camertron/turbo-sprockets-rails4
https://github.com/camertron/turbo-sprockets-rails4
spec/parallel_preloader_spec.rb
Ruby
mit
19
master
823
require 'spec_helper' describe TurboSprockets::ParallelPreloader do let(:logical_paths) { %w(file1.js file2.js) } def get_cached_asset(path) uri, _ = assets.resolve(path, compat: false) key = Sprockets::UnloadedAsset.new(uri, assets).dependency_history_key assets.cache.get(key) end describe '.pre...
github
camertron/turbo-sprockets-rails4
https://github.com/camertron/turbo-sprockets-rails4
spec/parallel_compiler_spec.rb
Ruby
mit
19
master
1,955
require 'spec_helper' describe TurboSprockets::ParallelCompiler do def precompile! Rake::Task['assets:precompile'].reenable Rake::Task['assets:precompile'].invoke end def with_env(env) # ENV can't be duped, so use select instead to make a copy old_env = ENV.select { true } env.each_pair { |k...
github
camertron/turbo-sprockets-rails4
https://github.com/camertron/turbo-sprockets-rails4
spec/config/application.rb
Ruby
mit
19
master
427
module TurboSprockets class DummyApplication < ::Rails::Application config.eager_load = false config.active_support.deprecation = :stderr config.assets.enabled = true config.assets.compile = true config.assets.allow_debugging = true config.assets.digest = true config.assets.manifest = 'sp...
github
camertron/turbo-sprockets-rails4
https://github.com/camertron/turbo-sprockets-rails4
lib/turbo-sprockets-rails4.rb
Ruby
mit
19
master
1,426
require 'turbo-sprockets/railtie' module TurboSprockets autoload :AssetResolver, 'turbo-sprockets/asset_resolver' autoload :ParallelCompiler, 'turbo-sprockets/parallel_compiler' autoload :ParallelPreloader, 'turbo-sprockets/parallel_preloader' class Config attr_reader :precompiler, :preloader de...
github
camertron/turbo-sprockets-rails4
https://github.com/camertron/turbo-sprockets-rails4
lib/turbo-sprockets/parallel_preloader.rb
Ruby
mit
19
master
2,915
require 'parallel' # The asset preloader is designed to precompute and cache all precompilable # assets in parallel to avoid doing it in serial on the first request. As of # Sprockets 3, all assets on the precompile list (i.e. config.assets.precompile) # are compiled on the first request whether the current page has a...
github
camertron/turbo-sprockets-rails4
https://github.com/camertron/turbo-sprockets-rails4
lib/turbo-sprockets/parallel_compiler.rb
Ruby
mit
19
master
2,566
require 'benchmark' require 'parallel' require 'json' module TurboSprockets class ParallelCompiler attr_reader :manifest def initialize(manifest) @manifest = manifest end def compile(*args) logger.warn "Precompiling with #{worker_count} workers" time = Benchmark.measure do ...
github
camertron/turbo-sprockets-rails4
https://github.com/camertron/turbo-sprockets-rails4
lib/turbo-sprockets/asset_resolver.rb
Ruby
mit
19
master
3,108
module TurboSprockets class AssetResolver class << self # Returns a relative, digested asset path for the given logical path. # # For example: # AssetResolver.resolve('lux/checkmark_2x.png') # => lux/checkmark_2x-7177b0151ec35ffb6d.png # def resolve(logical_path) ...
github
camertron/turbo-sprockets-rails4
https://github.com/camertron/turbo-sprockets-rails4
lib/turbo-sprockets/railtie.rb
Ruby
mit
19
master
1,198
module TurboSprockets class Railtie < ::Rails::Railtie initializer 'turbo-sprockets' do unless Sprockets::Manifest.method_defined?(:compile_with_parallelism) Sprockets::Manifest.class_eval do def compile_with_parallelism(*args) if TurboSprockets.configuration.precompiler.enable...
github
arbox/wlapi
https://github.com/arbox/wlapi
Rakefile
Ruby
mit
19
master
2,997
# -*- mode: ruby; -*- lib_path = File.expand_path(File.join(File.dirname(__FILE__), 'lib')) $LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path) require 'yaml' require 'wlapi/version' require 'time' # Rake provides FileUtils and its own FileUtils extensions require 'rake' require 'rake/clean' CLEAN.incl...
github
arbox/wlapi
https://github.com/arbox/wlapi
wlapi.gemspec
Ruby
mit
19
master
2,162
lib_path = File.expand_path(File.dirname(__FILE__) + '/lib') $LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path) require 'rake' require 'wlapi/version' # Define a constant here to use this spec in the Rakefile. Gem::Specification.new do |s| s.name = 'wlapi' # it is the description for 'gem list -d' ...
github
arbox/wlapi
https://github.com/arbox/wlapi
Gemfile
Ruby
mit
19
master
451
# -*- mode: ruby -*- source 'https://rubygems.org' gemspec gem 'rake', '~> 12.2', '>= 12.2.1', group: [:development, :test] group :development do gem 'flay', '~> 2.6' gem 'travis', '~> 1.8' gem 'pry', '~> 0.10' gem 'rdoc', '~> 4.2' gem 'yard', '~> 0.8' gem 'rubocop', '~> 0.3' gem 'bundler', '~> 1.11' ...
github
arbox/wlapi
https://github.com/arbox/wlapi
test/local_test_interface.rb
Ruby
mit
19
master
2,042
require 'minitest/autorun' require 'test_helper' require 'wlapi' class TestInterface < Minitest::Test include TestHelper ONE_PAR = [:frequencies, :baseform, :domain] TWO_PAR = [:wordforms, :thesaurus, :synonyms, :sentences, :left_nei...
github
arbox/wlapi
https://github.com/arbox/wlapi
test/test_helper.rb
Ruby
mit
19
master
749
require 'vcr' VCR.configure do |c| c.cassette_library_dir = 'test/fixtures/vcr_cassettes' c.hook_into :webmock end module TestHelper def execute(expectation, method, *args) begin result = VCR.use_cassette(method) do @api.send(method, *args) end rescue => error # Servers are unr...
github
arbox/wlapi
https://github.com/arbox/wlapi
test/remote_vcr_test.rb
Ruby
mit
19
master
622
# coding: utf-8 require 'yaml' require 'minitest/autorun' require 'test_helper.rb' require 'vcr' require 'wlapi' class TestApi < Minitest::Test include TestHelper credentials = YAML.load_file('SENSITIVE')['credentials'] USER = credentials['user'] PASS = credentials['pass'] def setup @api = WLAPI::API.n...
github
arbox/wlapi
https://github.com/arbox/wlapi
test/remote_test_functional.rb
Ruby
mit
19
master
4,685
# -*- coding: utf-8 -*- require 'yaml' require 'minitest/autorun' require 'test_helper.rb' require 'wlapi' class TestApi < Minitest::Test include TestHelper credentials = YAML.load_file('SENSITIVE')['credentials'] USER = credentials['user'] PASS = credentials['pass'] def setup @api = WLAPI::API.new(USE...
github
arbox/wlapi
https://github.com/arbox/wlapi
lib/wlapi/error.rb
Ruby
mit
19
master
264
module WLAPI class Error < StandardError; end class ExternalError < Error def initialize(e) msg = "Some external error occured:\n" msg << "#{e.class}: #{e.message}" super(msg) end end class UserError < Error; end end
github
arbox/wlapi
https://github.com/arbox/wlapi
lib/wlapi/api.rb
Ruby
mit
19
master
15,618
# -*- encoding: utf-8 -*- # 2010-2014, Andrei Beliankou # @author Andrei Beliankou # :title: Ruby based API for Wortschatz Leipzig web services # :main: README.rdoc require 'savon' require 'wlapi/error' # REXML is fast enough for our task. # But we consider using Nokogiri since Savon depends on it # and we won't int...
github
jashkenas/quakespotter
https://github.com/jashkenas/quakespotter
quakespotter.rb
Ruby
mit
19
master
4,305
$LOAD_PATH << 'vendor/hpricot/lib' require 'open-uri' require 'vendor/hpricot/lib/hpricot' require 'lib/globe' require 'lib/scraper' require 'lib/quake' require 'lib/overlay' require 'lib/control_strip' require 'lib/status' require 'lib/tweet' require 'lib/map' class WorldWide < Processing::App load_library 'openg...
github
jashkenas/quakespotter
https://github.com/jashkenas/quakespotter
lib/tweet.rb
Ruby
mit
19
master
561
class Tweet include Processing::Proxy TOP = 85 LEFT = 75 TEXT_WIDTH = 390 HEIGHT = 75 MARGIN = 70 def initialize(text, author, image_url) @text, @author, @image_url = text, author, image_url Thread.new { @image = load_image(@image_url) } end def content "...
github
jashkenas/quakespotter
https://github.com/jashkenas/quakespotter
lib/map.rb
Ruby
mit
19
master
510
class Map attr_reader :url, :image, :width, :height def initialize(map_image_url) @url = map_image_url @image = $app.load_image(@url) @width = @image.width @height = @image.height end def scale_factor(max_width, max_height) scale_x = scale_horizontal?(max_width, max_height) ...
github
jashkenas/quakespotter
https://github.com/jashkenas/quakespotter
lib/control_strip.rb
Ruby
mit
19
master
1,522
class ControlStrip include Processing::Proxy WIDTH = 750 HEIGHT = 120 LEFT_EDGE = 398 RED_CROSS_DONATION_URL = 'http://american.redcross.org/site/Donation2' def initialize @background = load_image 'images/control_strip.png' @logo = load_image 'images/logo.png' @buttons = lo...
github
jashkenas/quakespotter
https://github.com/jashkenas/quakespotter
lib/overlay.rb
Ruby
mit
19
master
2,866
class Overlay include Processing::Proxy CLOSE_BUTTON_LEFT = 593 CLOSE_BUTTON_TOP = 133 INNER_WIDTH = 450 INNER_HEIGHT = 320 class << self attr_accessor :image, :close_button_image end attr_reader :visible def initialize @image = (Overlay.image ||= load_image "images/o...
github
jashkenas/quakespotter
https://github.com/jashkenas/quakespotter
lib/status.rb
Ruby
mit
19
master
638
class Status include Processing::Proxy def initialize @statuses = {} end def set(key, text, timeout=false) if timeout @statuses[key] = [text, Time.now + timeout] else @statuses[key] = text end end def remove(key) @statuses.delete(key) end def message # dro...
github
jashkenas/quakespotter
https://github.com/jashkenas/quakespotter
lib/quake.rb
Ruby
mit
19
master
4,863
# Plotting longitude and latitude on a globe: # x = r * cos(lat) * sin(long) # y = r * sin(lat) # z = r * cos(lat) * cos(long) # where r is radius, lat is latitude and long is longitude require 'cgi' class Quake class << self attr_accessor :image end HORIZON_Z = 120 MIN_ANIMATED_SIZE = 7 TIME_FORM...
github
jashkenas/quakespotter
https://github.com/jashkenas/quakespotter
lib/globe.rb
Ruby
mit
19
master
3,336
class Globe include Processing::Proxy include Math attr_reader :diameter def initialize @sphere_detail = 35 @diameter = 600 @vertices = [] @visible_vertices = [] @sphere_x, @sphere_y, @sphere_z = [], [], [] @sin_cos_precision = 0.5 @sin_cos_length = (360.0 / @sin_cos_pr...
github
jashkenas/quakespotter
https://github.com/jashkenas/quakespotter
lib/scraper.rb
Ruby
mit
19
master
3,237
require 'timeout' require 'uri' # Scraper for geo-located .gov sites, getting us our goodies. class Scraper SOURCES = { 'quakes' => 'http://earthquake.usgs.gov/eqcenter/catalogs/7day-M2.5.xml', 'twitter' => 'http://search.twitter.com/search.atom' } MAGNITUDE_FINDER = /\AM (\d+\.\d+)/ TEXT_FIN...
github
jashkenas/quakespotter
https://github.com/jashkenas/quakespotter
Quakespotter.app/lib/ruby-processing.rb
Ruby
mit
19
master
1,452
# Ruby-Processing is for Code Art. # Send suggestions, ideas, and hate-mail to jashkenas [at] gmail.com # Also, send samples and libraries. unless defined? RP5_ROOT $LOAD_PATH << File.expand_path(File.dirname(__FILE__)) RP5_ROOT = File.expand_path(File.dirname(__FILE__) + "/../") end SKETCH_ROOT = Dir.pwd unless ...
github
jashkenas/quakespotter
https://github.com/jashkenas/quakespotter
Quakespotter.app/lib/quake.rb
Ruby
mit
19
master
4,842
# Plotting longitude and latitude on a globe: # x = r * cos(lat) * sin(long) # y = r * sin(lat) # z = r * cos(lat) * cos(long) # where r is radius, lat is latitude and long is longitude require 'cgi' class Quake class << self attr_accessor :image end HORIZON_Z = 120 MIN_ANIMATED_SIZE = 7 TIME_FORM...