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
erichmenge/signed_form
https://github.com/erichmenge/signed_form
spec/hmac_spec.rb
Ruby
mit
217
master
801
require 'spec_helper' describe SignedForm::HMAC do it 'should raise if no key is given' do expect { SignedForm::HMAC.new }.to raise_error(SignedForm::Errors::NoSecretKey) end describe 'create' do let(:hmac) { SignedForm::HMAC.new(secret_key: "superdupersecret") } it 'should create a hex signature' ...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
Rakefile
Ruby
mit
217
master
1,376
#!/usr/bin/env rake begin require 'bundler/setup' rescue LoadError puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end # bunlder tasks Bundler::GemHelper.install_tasks # dummy app tasks require 'rake' load File.expand_path('spec/dummy/Rakefile') ENV["RAILS_ENV"] = "test" # spec task...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
Gemfile
Ruby
mit
217
master
407
source 'https://rubygems.org' gem 'rails', '~> 4.2.5' gem 'liquid-rails', '~> 0.1.3' gem 'rake', '~> 10.4.2' gem 'thin', '~> 1.6.3' gem 'jquery-rails', '~> 4.0.3' gem 'sqlite3', '~> 1.3.10' gem 'quiet_assets' gem 'pry', '~> 0.10.1' gem 'haml-rails', '~> 0.9.0' gem 'rspec-rails', ...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
themes_on_rails.gemspec
Ruby
mit
217
master
976
$:.push File.expand_path("../lib", __FILE__) # Maintain your gem's version: require "themes_on_rails/version" # Describe your gem and declare its dependencies: Gem::Specification.new do |s| s.name = "themes_on_rails" s.version = ThemesOnRails::VERSION s.authors = ["Chamnap Chhorn"] s.email ...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
Guardfile
Ruby
mit
217
master
1,696
# A sample Guardfile # More info at https://github.com/guard/guard#readme # Note: The cmd option is now required due to the increasing number of ways # rspec may be run, below are examples of the most common uses. # * bundler: 'bundle exec rspec' # * bundler binstubs: 'bin/rspec' # * spring: 'bin/rsspec' (Thi...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
spec/spec_helper.rb
Ruby
mit
217
master
656
if ENV['COVERAGE'] || ENV['CI'] require 'coveralls' require 'simplecov' SimpleCov.add_filter 'spec' SimpleCov.add_filter 'gemfiles' Coveralls.wear! end # Configure Rails Environment ENV["RAILS_ENV"] = "test" require File.expand_path("../dummy/config/environment.rb", __FILE__) require "themes_on_rails" requ...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
spec/dummy/config/application.rb
Ruby
mit
217
master
887
require File.expand_path('../boot', __FILE__) require 'rails/all' Bundler.require(*Rails.groups) require "themes_on_rails" module Dummy class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in c...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
spec/dummy/config/routes.rb
Ruby
mit
217
master
1,667
Dummy::Application.routes.draw do resources :posts do get :get_theme, on: :collection end # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". # You can have the root of your site routed with "root" # root 'welcome#ind...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
spec/dummy/config/initializers/secret_token.rb
Ruby
mit
217
master
659
# Be sure to restart your server when you modify this file. # Your secret key is used for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to diction...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
spec/dummy/config/environments/test.rb
Ruby
mit
217
master
1,558
Dummy::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # 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 sui...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
spec/dummy/spec/spec_helper.rb
Ruby
mit
217
master
1,756
# This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'rspec/autorun' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirect...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
spec/dummy/spec/controllers/posts_controller_spec.rb
Ruby
mit
217
master
1,875
require "spec_helper" describe PostsController do render_views context "theme :theme_b" do it "renders with provided theme :theme_b" do get :index, theme: "theme_b" expect(response.body).to match(/<h1>Listing posts: theme_b<\/h1>/) end it "renders with layout :theme_b" do get :inde...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
spec/dummy/app/controllers/posts_controller.rb
Ruby
mit
217
master
1,409
class PostsController < ApplicationController theme :theme_resolver, except: [:new] if Rails::VERSION::MAJOR == 4 before_action :set_post, only: [:show, :edit, :update, :destroy] else before_filter :set_post, only: [:show, :edit, :update, :destroy] end # GET /posts def index @posts = Post.all ...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
spec/dummy/app/controllers/application_controller.rb
Ruby
mit
217
master
280
class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception def default_url_options { theme: params[:theme] }.merge(super) end end
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
spec/dummy/db/schema.rb
Ruby
mit
217
master
960
# encoding: UTF-8 # 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. # # Note that this schema.rb definition is the authoritative sou...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
spec/generators/themes_on_rails/theme_generator_spec.rb
Ruby
mit
217
master
2,889
require 'spec_helper' # Generators are not automatically loaded by Rails require 'generators/themes_on_rails/theme_generator' describe ThemesOnRails::Generators::ThemeGenerator do # Tell the generator where to put its output (what it thinks of as Rails.root) destination File.expand_path("../../../../../spec/dummy...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
spec/lib/action_controller_spec.rb
Ruby
mit
217
master
1,391
require "spec_helper" describe ThemesOnRails::ActionController do let(:controller) { controller_class.new } let(:controller_class) { Class.new } it "initializes with theme as string" do action_controller = ThemesOnRails::ActionController.new(controller, "theme_a") expect(action_controller.theme...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
spec/lib/controller_additions_spec.rb
Ruby
mit
217
master
690
require 'spec_helper' describe ThemesOnRails::ControllerAdditions do let(:controller_class) { Class.new } let(:controller) { controller_class.new } before do controller_class.send(:include, ThemesOnRails::ControllerAdditions) end it "invokes #apply_theme without options" do expect(ThemesOnRai...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
spec/lib/engine_spec.rb
Ruby
mit
217
master
1,096
require 'spec_helper' describe ThemesOnRails::Engine do context 'assets.paths' do it 'includes `theme_a`: images, javascripts, stylesheets' do expect(Rails.application.config.assets.paths.to_s).to match(/theme_a\/assets\/images/) expect(Rails.application.config.assets.paths.to_s).to match(/theme_a\/a...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
lib/themes_on_rails.rb
Ruby
mit
217
master
409
require 'themes_on_rails/version' require 'themes_on_rails/engine' require 'active_support/concern' module ThemesOnRails autoload :ActionController, 'themes_on_rails/action_controller' autoload :ControllerAdditions, 'themes_on_rails/controller_additions' def self.all Dir.glob("app/themes/*").select { |fn...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
lib/themes_on_rails/action_controller.rb
Ruby
mit
217
master
2,171
module ThemesOnRails class ActionController attr_reader :theme_name class << self def apply_theme(controller_class, theme, options={}) filter_method = before_filter_method(options) options = options.slice(:only, :except) # set layout controller_class.class_eval do...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
lib/themes_on_rails/engine.rb
Ruby
mit
217
master
1,189
require 'rails/generators' module ThemesOnRails class Engine < ::Rails::Engine initializer 'themes_on_rails.action_controller' do |app| ActiveSupport.on_load :action_controller do include ThemesOnRails::ControllerAdditions end end initializer 'themes_on_rails.load_locales' do |app| ...
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
lib/themes_on_rails/controller_additions.rb
Ruby
mit
217
master
311
module ThemesOnRails module ControllerAdditions extend ActiveSupport::Concern module ClassMethods def theme(theme, options={}) @_theme = theme @_theme_options = options ThemesOnRails::ActionController.apply_theme(self, theme, options) end end end end
github
chamnap/themes_on_rails
https://github.com/chamnap/themes_on_rails
lib/generators/themes_on_rails/theme_generator.rb
Ruby
mit
217
master
1,959
module ThemesOnRails module Generators class ThemeGenerator < Rails::Generators::Base source_root File.expand_path("../templates", __FILE__) argument :theme_name, type: :string desc "Creates a new theme" def create_theme_directory empty_directory theme_views_layout ...
github
aderyabin/localer
https://github.com/aderyabin/localer
localer.gemspec
Ruby
mit
216
master
1,273
lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "localer/version" Gem::Specification.new do |spec| spec.name = "localer" spec.version = Localer::VERSION spec.authors = ["Andrey Deryabin"] spec.email = ["deriabin@gmail.com"]...
github
aderyabin/localer
https://github.com/aderyabin/localer
Rakefile
Ruby
mit
216
master
325
require "bundler/gem_tasks" require "rubocop/rake_task" require 'cucumber/rake/task' RuboCop::RakeTask.new Cucumber::Rake::Task.new(:features) do |t| t.cucumber_opts = "features --format pretty" end task :default do if ENV["RUBOCOP"] Rake::Task["rubocop"].invoke else Rake::Task["features"].invoke end...
github
aderyabin/localer
https://github.com/aderyabin/localer
Appraisals
Ruby
mit
216
master
254
appraise 'rails50' do gem 'rails', '~> 5.0' end appraise 'rails51' do gem 'rails', '~> 5.1' end appraise 'rails52' do gem 'rails', '~> 5.2' end appraise 'rails60' do gem 'rails', '~> 6.0' end appraise 'rails61' do gem 'rails', '~> 6.1' end
github
aderyabin/localer
https://github.com/aderyabin/localer
spec/spec_helper.rb
Ruby
mit
216
master
272
# frozen_string_literal: true require "bundler/setup" require "localer" RSpec.configure do |config| # Disable RSpec exposing methods globally on `Module` and `main` config.disable_monkey_patching! config.expect_with :rspec do |c| c.syntax = :expect end end
github
aderyabin/localer
https://github.com/aderyabin/localer
spec/dummy_app/config/locales/en.rails.rb
Ruby
mit
216
master
780
# frozen_string_literal: true { en: { number: { nth: { ordinals: lambda do |_key, options| number = options[:number] case number when 1 then "st" when 2 then "nd" when 3 then "rd" when 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 then "th" e...
github
aderyabin/localer
https://github.com/aderyabin/localer
spec/dummy_app/config/locales/us.rails.rb
Ruby
mit
216
master
780
# frozen_string_literal: true { us: { number: { nth: { ordinals: lambda do |_key, options| number = options[:number] case number when 1 then "st" when 2 then "nd" when 3 then "rd" when 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 then "th" e...
github
aderyabin/localer
https://github.com/aderyabin/localer
lib/localer.rb
Ruby
mit
216
master
575
# frozen_string_literal: true require "dry-initializer" require_relative "localer/version" require_relative "localer/rails" require_relative "localer/config" require_relative "localer/data" module Localer # :nodoc: using Localer::Ext::Hash # using Localer::Ext::String class << self def data @data ||=...
github
aderyabin/localer
https://github.com/aderyabin/localer
lib/localer/config.rb
Ruby
mit
216
master
1,255
# frozen_string_literal: true require 'yaml' require_relative '../localer/ext/hash' require_relative 'config/locale' module Localer # :nodoc: using Localer::Ext::Hash # Loads and parse Localer config file `.localer.yml` class Config extend Dry::Initializer APP_PATH = Dir.pwd CONFIG_FILENAME = ".lo...
github
aderyabin/localer
https://github.com/aderyabin/localer
lib/localer/data.rb
Ruby
mit
216
master
824
# frozen_string_literal: true require_relative "data/service" require_relative "data/checker" require_relative "data/processor" require_relative "data/missing_translations" module Localer # Stores translations and provides # check methods class Data extend Dry::Initializer param :source, default: -> { {...
github
aderyabin/localer
https://github.com/aderyabin/localer
lib/localer/rake_task.rb
Ruby
mit
216
master
626
# frozen_string_literal: true require 'rake' require 'rake/tasklib' require 'localer' module Localer # Defines a Rake task for running Localer. # The simplest use of it goes something like: # # Localer::Rakeask.new # This will define a task named <tt>localer</tt> described as 'Run Localer'. class RakeTa...
github
aderyabin/localer
https://github.com/aderyabin/localer
lib/localer/rails.rb
Ruby
mit
216
master
422
# frozen_string_literal: true module Localer module Rails # :nodoc: class << self def connect! require File.expand_path("config/environment", Localer.config.app_path) true rescue LoadError false end def translations return {} unless connect! I18n....
github
aderyabin/localer
https://github.com/aderyabin/localer
lib/localer/data/processor.rb
Ruby
mit
216
master
1,461
# frozen_string_literal: true require_relative '../ext/string' module Localer # :nodoc: using Localer::Ext::String class Data # Parse translations into hash: # key: translation key # value: hash of locale values class Processor < Service param :translations param :config, default: -> {...
github
aderyabin/localer
https://github.com/aderyabin/localer
lib/localer/data/checker.rb
Ruby
mit
216
master
357
# frozen_string_literal: true module Localer class Data # Check missing translations # Returns true if no missing translations found, otherwise false class Checker < Service param :data def call data.each do |_locale, _key, value| return false if value.nil? end ...
github
aderyabin/localer
https://github.com/aderyabin/localer
lib/localer/data/missing_translations.rb
Ruby
mit
216
master
367
# frozen_string_literal: true module Localer class Data # A service that returns array of missing translations class MissingTranslations < Service param :data def call missing = [] data.each do |locale, key, value| missing.push("#{locale}#{key}") if value.nil? e...
github
aderyabin/localer
https://github.com/aderyabin/localer
lib/localer/data/service.rb
Ruby
mit
216
master
383
# frozen_string_literal: true require 'dry-initializer' module Localer class Data # Core service object class Service extend Dry::Initializer # use `param` and `option` for dependencies class << self # Instantiates and calls the service at once def call(*args, &block) n...
github
aderyabin/localer
https://github.com/aderyabin/localer
lib/localer/config/locale.rb
Ruby
mit
216
master
244
# frozen_string_literal: true module Localer class Config # Provide config for locale class Locale extend Dry::Initializer option :exclude, default: -> { [] } option :enabled, default: -> { true } end end end
github
aderyabin/localer
https://github.com/aderyabin/localer
lib/localer/ext/string.rb
Ruby
mit
216
master
2,315
# frozen_string_literal: true module Localer module Ext # Extend Hash through refinements # taken from https://github.com/seamusabshere/to_regexp module String INLINE_OPTIONS = /[imxnesu]*/ REGEXP_DELIMITERS = { '%r{' => '}', '/' => '/' }.freeze refine ::String do...
github
aderyabin/localer
https://github.com/aderyabin/localer
lib/localer/ext/hash.rb
Ruby
mit
216
master
2,355
# frozen_string_literal: true module Localer module Ext # Extend Hash through refinements module Hash refine ::Hash do # From ActiveSupport http://api.rubyonrails.org/classes/Hash.html#metho def deep_merge!(other_hash) other_hash.each_pair do |current_key, other_value| ...
github
aderyabin/localer
https://github.com/aderyabin/localer
features/step_definitions/additional_cli_steps.rb
Ruby
mit
216
master
2,021
# frozen_string_literal: true Given /^a "(.*)" locale file with:$/ do |locale, file_content| write_file("#{LOCALE_DIR}/#{locale}.yml", file_content) end Given /^a config file with:$/ do |file_content| write_file(CONFIG_PATH, file_content) end Given /^a real locales$/ do # rubocop:disable Metrics/BlockLength st...
github
aderyabin/localer
https://github.com/aderyabin/localer
features/support/env.rb
Ruby
mit
216
master
365
# frozen_string_literal: true require 'aruba/cucumber' DUMMY_APP_DIR = "../../spec/dummy_app" LOCALE_DIR = "#{DUMMY_APP_DIR}/config/locales" CONFIG_PATH = "#{DUMMY_APP_DIR}/.localer.yml" After do |_| %w[ru en us].each do |locale| path = "#{LOCALE_DIR}/#{locale}.yml" remove(path) if exist?(path) end re...
github
heroku/platform-api
https://github.com/heroku/platform-api
Rakefile
Ruby
mit
216
main
981
require 'bundler/gem_tasks' require 'yard' desc 'Generate API documentation' YARD::Rake::YardocTask.new desc 'Download the latest schema and build a new client' task :build do sh 'curl -o schema.json -H "Accept: application/vnd.heroku+json; version=3" https://api.heroku.com/schema' sh 'bundle exec heroics-generat...
github
heroku/platform-api
https://github.com/heroku/platform-api
platform-api.gemspec
Ruby
mit
216
main
1,260
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'platform-api/version' Gem::Specification.new do |spec| spec.name = 'platform-api' spec.version = PlatformAPI::VERSION spec.authors = ['jkakar'] spec.email =...
github
heroku/platform-api
https://github.com/heroku/platform-api
lib/platform-api.rb
Ruby
mit
216
main
504
require 'heroics' require 'moneta' require 'platform-api/version' # Ruby HTTP client for the Heroku API. module PlatformAPI def self.rate_throttle=(rate_throttle) @rate_throttle = rate_throttle Heroics.default_configuration do |config| config.rate_throttle = @rate_throttle end end # Get access...
github
heroku/platform-api
https://github.com/heroku/platform-api
config/client-config.rb
Ruby
mit
216
main
933
# frozen_string_literal: true require 'heroics' require 'rate_throttle_client' require_relative '../lib/platform-api.rb' Heroics.default_configuration do |config| config.base_url = 'https://api.heroku.com' config.module_name = 'PlatformAPI' config.schema_filepath = File.join(File.expand_path('../..', __FILE__),...
github
heroku/platform-api
https://github.com/heroku/platform-api
spec/spec_helper.rb
Ruby
mit
216
main
787
require "bundler/setup" require 'pry' require 'webmock/rspec' require 'platform-api' require 'netrc' require 'hatchet' include WebMock::API WebMock.allow_net_connect! RSpec.configure do |config| config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true...
github
heroku/platform-api
https://github.com/heroku/platform-api
spec/acceptance/config_spec.rb
Ruby
mit
216
main
1,739
require 'platform-api' describe 'Platform API config' do include PlatformAPI::SpecHelperMethods describe 'rate limiting' do before(:each) do WebMock.enable! rate_throttle = PlatformAPI.rate_throttle @original_rate_throttle = rate_throttle.dup # No junk in test dots rate_throttl...
github
heroku/platform-api
https://github.com/heroku/platform-api
spec/acceptance/build_client_spec.rb
Ruby
mit
216
main
622
describe 'Generating a client' do it "works" do base_dir = Pathname.new(__dir__).join("../..") Dir.mktmpdir do |tmpdir| FileUtils.copy_entry(base_dir, tmpdir) Dir.chdir(tmpdir) do schema_mtime = File.mtime("schema.json") client_rb_mtime = File.mtime("lib/platform-api/client.rb") ...
github
heroku/platform-api
https://github.com/heroku/platform-api
spec/acceptance/generated_client_spec.rb
Ruby
mit
216
main
1,463
describe 'The generated platform api client' do include PlatformAPI::SpecHelperMethods before(:all) do @app_name = ENV["TEST_APP_NAME"] || hatchet_app.name end after(:all) do hatchet_app.teardown! end def app_name @app_name end it "can get account info" do expect(client.account.info)...
github
heroku/platform-api
https://github.com/heroku/platform-api
spec/support/helper_methods.rb
Ruby
mit
216
main
908
module PlatformAPI::SpecHelperMethods def hatchet_app config = { "FOO" => "bar" } @hatchet_app ||= begin app = Hatchet::Runner.new("default_ruby", buildpacks: ["heroku/ruby"], config: config) app.in_directory do app.setup! app.push_with_retry! end app.api_rate_limit.cal...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
infinity_test.gemspec
Ruby
mit
216
main
2,063
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'infinity_test/core/version' Gem::Specification.new do |spec| spec.name = 'infinity_test' spec.version = InfinityTest::Core::VERSION spec.authors = ["Tomas D'Stefano"] ...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/spec_helper.rb
Ruby
mit
216
main
1,091
if ENV['COVERAGE'] require 'simplecov' SimpleCov.start do add_filter 'spec' add_filter 'shared_example' end end require 'infinity_test' require 'ostruct' require 'bundler/setup' Bundler.require RSpec.configure do |config| config.include InfinityTest::Strategy::SharedExample config.include InfinityTe...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/core/command_builder_spec.rb
Ruby
mit
216
main
1,146
require 'spec_helper' module InfinityTest module Core describe CommandBuilder do describe "#add" do it "adds the argument in the command" do expect(subject.ruby.option(:S).add(:rspec).add(:spec)).to eq 'ruby -S rspec spec' end end describe "#option" do it "put...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/core/load_configuration_spec.rb
Ruby
mit
216
main
1,312
require "spec_helper" module InfinityTest describe LoadConfiguration do describe "#load!" do it "loads global file and project file" do expect(subject).to receive(:load_global_file!).and_return(true) expect(subject).to receive(:load_project_file!).and_return(true) subject.load! ...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/core/continuous_test_server_spec.rb
Ruby
mit
216
main
4,068
require 'spec_helper' module InfinityTest module Core describe ContinuousTestServer do let(:base) { Core::Base } let(:continuous_test_server) { ContinuousTestServer.new(base) } describe '#start!' do it 'runs strategy and starts observer' do expect(continuous_test_server).to r...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/core/callback_spec.rb
Ruby
mit
216
main
2,725
require 'spec_helper' module InfinityTest module Core describe Callback do describe '#initialize' do it 'creates a before callback with default scope' do callback = Callback.new(:before) { 'test' } expect(callback.type).to eq :before expect(callback.scope).to eq :all ...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/core/options_spec.rb
Ruby
mit
216
main
5,156
require "spec_helper" module InfinityTest describe Options do describe "#parse!" do describe "#strategy" do it "parses the --ruby options with rvm" do expect(parse('--ruby', 'rvm').strategy).to be :rvm end it "parses the --ruby options with rbenv" do expect(pars...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/core/configuration_merge_spec.rb
Ruby
mit
216
main
3,965
require 'spec_helper' module InfinityTest module Core describe ConfigurationMerge do let(:base) do OpenStruct.new( :bundler => true, :verbose => true, :strategy => :auto_discover, :observer => :watchr, :rubies => [], :specific_options => '...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/core/notifier_spec.rb
Ruby
mit
216
main
4,862
require 'spec_helper' module InfinityTest module Core describe Notifier do let(:test_framework) { double } subject(:notifier) { Notifier.new(test_framework: test_framework, library: :auto_discover) } describe '#image' do before do expect(Core::Base).to receive(:mode).and_ret...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/core/changed_file_spec.rb
Ruby
mit
216
main
509
require 'spec_helper' module InfinityTest describe ChangedFile do let(:match_data) { /(.)(.)(\d+)(\d)/.match("THX1138.") } let(:changed_file) { ChangedFile.new(match_data) } describe '#name' do subject { changed_file.name } it { should eq 'HX1138' } end describe '#path' do su...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/core/auto_discover_spec.rb
Ruby
mit
216
main
7,062
require 'spec_helper' module InfinityTest describe AutoDiscover do let(:base) { BaseFixture.new } let(:auto_discover) { AutoDiscover.new(base) } describe '#discover_libraries' do it 'discovers strategy, framework and test framework' do expect(auto_discover).to receive(:discover_strategy) ...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/core/runner_spec.rb
Ruby
mit
216
main
592
require 'spec_helper' module InfinityTest describe Runner do let(:runner) { Runner.new('--ruby', 'rvm') } describe '#start' do it 'load configuration, merge with command line, find user libraries and start continuous server' do expect_any_instance_of(Core::LoadConfiguration).to receive(:load!)...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/core/base_spec.rb
Ruby
mit
216
main
6,751
require "spec_helper" module InfinityTest describe Base do describe ".setup" do it "yields self" do Base.setup do |config| expect(config).to be InfinityTest::Base end end end describe ".using_bundler?" do it "returns the same bundler accessor" do expec...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/test_framework/test_unit_spec.rb
Ruby
mit
216
main
5,632
require 'spec_helper' module InfinityTest module TestFramework describe TestUnit do it_should_behave_like 'a infinity test test framework' describe "#test_dir" do it "returns test as test dir" do expect(subject.test_dir).to eq 'test' end it "can be set to a custom ...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/test_framework/ex_unit_spec.rb
Ruby
mit
216
main
4,334
require 'spec_helper' module InfinityTest module TestFramework describe ExUnit do it_should_behave_like 'a infinity test test framework' describe "#test_dir" do it "returns test as test dir" do expect(subject.test_dir).to eq 'test' end end describe '#test_files...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/test_framework/pytest_spec.rb
Ruby
mit
216
main
5,246
require 'spec_helper' module InfinityTest module TestFramework describe Pytest do it_should_behave_like 'a infinity test test framework' describe "#test_dir" do context "when tests directory exists" do before do allow(File).to receive(:exist?).with('tests').and_return(t...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/test_framework/rspec_spec.rb
Ruby
mit
216
main
3,254
require 'spec_helper' module InfinityTest module TestFramework describe Rspec do it_should_behave_like 'a infinity test test framework' describe "#test_dir" do it "returns spec as test dir" do expect(subject.test_dir).to eq 'spec' end end describe '#test_files'...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/test_framework/cargo_test_spec.rb
Ruby
mit
216
main
3,993
require 'spec_helper' module InfinityTest module TestFramework describe CargoTest do it_should_behave_like 'a infinity test test framework' describe "#test_dir" do it "returns tests as test dir" do expect(subject.test_dir).to eq 'tests' end end describe '#test_...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/framework/rubygems_spec.rb
Ruby
mit
216
main
1,215
require 'spec_helper' module InfinityTest module Framework describe Rubygems do let(:observer) { double('Observer') } let(:test_framework) { double('TestFramework') } let(:continuous_test_server) { double('ContinuousTestServer', observer: observer, test_framework: test_framework) } subjec...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/framework/fast_api_spec.rb
Ruby
mit
216
main
3,763
require 'spec_helper' module InfinityTest module Framework describe FastApi do let(:observer) { double('Observer') } let(:test_framework) { double('TestFramework', test_dir: 'tests', test_helper_file: 'tests/conftest.py') } let(:continuous_test_server) { double('ContinuousTestServer', observer:...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/framework/padrino_spec.rb
Ruby
mit
216
main
2,688
require 'spec_helper' module InfinityTest module Framework describe Padrino do let(:observer) { double('Observer') } let(:test_framework) { double('TestFramework', test_dir: 'spec') } let(:continuous_test_server) { double('ContinuousTestServer', observer: observer, test_framework: test_framewor...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/framework/phoenix_spec.rb
Ruby
mit
216
main
3,421
require 'spec_helper' module InfinityTest module Framework describe Phoenix do let(:observer) { double('Observer') } let(:test_framework) { double('TestFramework', test_dir: 'test', test_helper_file: 'test/test_helper.exs') } let(:continuous_test_server) { double('ContinuousTestServer', observe...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/framework/rust_cargo_spec.rb
Ruby
mit
216
main
3,631
require 'spec_helper' module InfinityTest module Framework describe RustCargo do let(:observer) { double('Observer') } let(:test_framework) { double('TestFramework', test_dir: 'tests', test_helper_file: 'Cargo.toml') } let(:continuous_test_server) { double('ContinuousTestServer', observer: obse...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/framework/rails_spec.rb
Ruby
mit
216
main
2,708
require 'spec_helper' module InfinityTest module Framework describe Rails do let(:observer) { double('Observer') } let(:test_framework) { double('TestFramework', test_dir: 'spec') } let(:continuous_test_server) { double('ContinuousTestServer', observer: observer, test_framework: test_framework)...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/framework/base_spec.rb
Ruby
mit
216
main
2,077
require 'spec_helper' module InfinityTest module Framework describe Base do subject(:base) { Base.new(continuous_test_server) } let(:continuous_test_server) { double(extension: :rb) } describe '#run_all' do it 'call run strategy to continuous test server' do expect(continuous...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/framework/elixir_mix_spec.rb
Ruby
mit
216
main
1,682
require 'spec_helper' module InfinityTest module Framework describe ElixirMix do let(:observer) { double('Observer') } let(:test_framework) { double('TestFramework', test_dir: 'test', test_helper_file: 'test/test_helper.exs') } let(:continuous_test_server) { double('ContinuousTestServer', obser...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/framework/python_package_spec.rb
Ruby
mit
216
main
3,979
require 'spec_helper' module InfinityTest module Framework describe PythonPackage do let(:observer) { double('Observer') } let(:test_framework) { double('TestFramework', test_dir: 'tests', test_helper_file: 'tests/conftest.py') } let(:continuous_test_server) { double('ContinuousTestServer', obs...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/framework/django_spec.rb
Ruby
mit
216
main
3,757
require 'spec_helper' module InfinityTest module Framework describe Django do let(:observer) { double('Observer') } let(:test_framework) { double('TestFramework', test_dir: 'tests', test_helper_file: 'tests/conftest.py') } let(:continuous_test_server) { double('ContinuousTestServer', observer: ...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/framework/rocket_spec.rb
Ruby
mit
216
main
2,853
require 'spec_helper' module InfinityTest module Framework describe Rocket do let(:observer) { double('Observer') } let(:test_framework) { double('TestFramework', test_dir: 'tests', test_helper_file: 'Cargo.toml') } let(:continuous_test_server) { double('ContinuousTestServer', observer: observe...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/strategy/ruby_default_spec.rb
Ruby
mit
216
main
1,507
require "spec_helper" module InfinityTest module Strategy describe RubyDefault do let(:base) { BaseFixture.new } let(:continuous_test_server) { Core::ContinuousTestServer.new(base) } subject { RubyDefault.new(continuous_test_server) } it_should_behave_like 'a infinity test strategy' ...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/strategy/elixir_default_spec.rb
Ruby
mit
216
main
1,281
require "spec_helper" module InfinityTest module Strategy describe ElixirDefault do let(:base) { BaseFixture.new } let(:continuous_test_server) { Core::ContinuousTestServer.new(base) } subject { ElixirDefault.new(continuous_test_server) } it_should_behave_like 'a infinity test strategy' ...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/strategy/python_default_spec.rb
Ruby
mit
216
main
1,883
require "spec_helper" module InfinityTest module Strategy describe PythonDefault do let(:base) { BaseFixture.new } let(:continuous_test_server) { Core::ContinuousTestServer.new(base) } subject { PythonDefault.new(continuous_test_server) } it_should_behave_like 'a infinity test strategy' ...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/strategy/rust_default_spec.rb
Ruby
mit
216
main
1,590
require "spec_helper" module InfinityTest module Strategy describe RustDefault do let(:base) { BaseFixture.new } let(:continuous_test_server) { Core::ContinuousTestServer.new(base) } subject { RustDefault.new(continuous_test_server) } it_should_behave_like 'a infinity test strategy' ...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/strategy/rvm_spec.rb
Ruby
mit
216
main
2,971
require "spec_helper" module InfinityTest module Strategy describe Rvm do let(:base) { BaseFixture.new(test_framework: :rspec) } let(:continuous_test_server) { Core::ContinuousTestServer.new(base) } subject { Rvm.new(continuous_test_server) } it_should_behave_like 'a infinity test strate...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/strategy/rbenv_spec.rb
Ruby
mit
216
main
2,263
require "spec_helper" module InfinityTest module Strategy describe Rbenv do let(:base) { BaseFixture.new(test_framework: :rspec) } let(:continuous_test_server) { Core::ContinuousTestServer.new(base) } subject { Rbenv.new(continuous_test_server) } it_should_behave_like 'a infinity test st...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/observer/filewatcher_spec.rb
Ruby
mit
216
main
1,472
require 'spec_helper' module InfinityTest module Observer describe Filewatcher do let(:continuous_server) { double } subject { Filewatcher.new(continuous_server) } it_should_behave_like 'an infinity test observer' describe "#patterns" do it "starts as an empty hash" do ...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/observer/base_spec.rb
Ruby
mit
216
main
2,504
require 'spec_helper' module InfinityTest module Observer describe Base do let(:continuous_server) { double } subject { Base.new(continuous_server) } describe "#initialize" do it "sets the continuous_test_server" do expect(subject.continuous_test_server).to eq(continuous_serv...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
spec/infinity_test/observer/listen_spec.rb
Ruby
mit
216
main
1,388
require 'spec_helper' module InfinityTest module Observer describe Listen do let(:continuous_server) { double } subject { Listen.new(continuous_server) } it_should_behave_like 'an infinity test observer' describe "#patterns" do it "starts as an empty hash" do expect(su...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
lib/infinity_test.rb
Ruby
mit
216
main
2,929
require 'optparse' require 'active_support' require 'active_support/core_ext' require 'active_support/deprecation' require 'hike' require 'notifiers' module InfinityTest module Core autoload :AutoDiscover, 'infinity_test/core/auto_discover' autoload :Base, 'infinity_test/core/base' autoload :Callback, 'i...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
lib/infinity_test/test_framework/shared_example.rb
Ruby
mit
216
main
1,586
module InfinityTest module TestFramework module SharedExample # Shared Examples to use in the RSpec specs when you want create your own infinity test wrapper test framework # # ==== Examples # # RSpec.configure do |config| # config.include InfinityTest::TestFramework::Sha...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
lib/infinity_test/test_framework/cargo_test.rb
Ruby
mit
216
main
941
module InfinityTest module TestFramework class CargoTest < Base def binary 'cargo' end def test_helper_file 'Cargo.toml' end def test_dir @test_dir ||= 'tests' end def test_dir=(dir) @test_dir = dir end def test_files ...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
lib/infinity_test/test_framework/base.rb
Ruby
mit
216
main
1,588
module InfinityTest module TestFramework class Base attr_writer :test_files attr_reader :test_message def test_helper_file raise NotImplementedError, "not implemented in #{self}" end def test_dir raise NotImplementedError, "not implemented in #{self}" end ...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
lib/infinity_test/test_framework/test_unit.rb
Ruby
mit
216
main
1,175
module InfinityTest module TestFramework class TestUnit < Base def test_dir @test_dir ||= 'test' end def test_dir=(dir) @test_dir = dir end def test_helper_file File.join(test_dir, 'test_helper.rb') end def test_files @test_files || test...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
lib/infinity_test/test_framework/ex_unit.rb
Ruby
mit
216
main
998
module InfinityTest module TestFramework class ExUnit < Base def binary 'mix' end def test_helper_file File.join(test_dir, 'test_helper.exs') end def test_dir @test_dir ||= 'test' end def test_dir=(dir) @test_dir = dir end d...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
lib/infinity_test/test_framework/rspec.rb
Ruby
mit
216
main
861
module InfinityTest module TestFramework class Rspec < Base def binary 'rspec' end def test_helper_file File.join(test_dir, 'spec_helper.rb') end def test_dir @test_dir ||= 'spec' end def test_dir=(dir) @test_dir = dir end d...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
lib/infinity_test/test_framework/pytest.rb
Ruby
mit
216
main
1,371
module InfinityTest module TestFramework class Pytest < Base def binary 'pytest' end def test_helper_file File.join(test_dir, 'conftest.py') end def test_dir @test_dir ||= detect_test_dir end def test_dir=(dir) @test_dir = dir end ...
github
tomas-stefano/infinity_test
https://github.com/tomas-stefano/infinity_test
lib/infinity_test/strategy/rbenv.rb
Ruby
mit
216
main
1,084
module InfinityTest module Strategy class Rbenv < Base attr_reader :continuous_test_server delegate :binary, :test_files, to: :continuous_test_server # Build and run commands for each ruby version specified. # Uses rbenv's RBENV_VERSION environment variable to run tests in different Ruby ...