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
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/sr.rb
rails/pluralization/sr.rb
require 'rails_i18n/common_pluralizations/one_few_other' ::RailsI18n::Pluralization::OneFewOther.with_locale(:sr)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/sc.rb
rails/pluralization/sc.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:sc)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/ta.rb
rails/pluralization/ta.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:ta)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/vi.rb
rails/pluralization/vi.rb
require 'rails_i18n/common_pluralizations/other' ::RailsI18n::Pluralization::Other.with_locale(:vi)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/es-VE.rb
rails/pluralization/es-VE.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:'es-VE')
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/wo.rb
rails/pluralization/wo.rb
require 'rails_i18n/common_pluralizations/other' ::RailsI18n::Pluralization::Other.with_locale(:wo)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/tl.rb
rails/pluralization/tl.rb
require 'rails_i18n/common_pluralizations/one_with_zero_other' ::RailsI18n::Pluralization::OneWithZeroOther.with_locale(:tl)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/hi.rb
rails/pluralization/hi.rb
require 'rails_i18n/common_pluralizations/one_with_zero_other' ::RailsI18n::Pluralization::OneWithZeroOther.with_locale(:hi)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/pa.rb
rails/pluralization/pa.rb
require 'rails_i18n/common_pluralizations/one_with_zero_other' ::RailsI18n::Pluralization::OneWithZeroOther.with_locale(:pa)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/mk.rb
rails/pluralization/mk.rb
require 'rails_i18n/pluralization' { :mk => { :'i18n' => { :plural => { :keys => [:one, :other], :rule => ::RailsI18n::Pluralization::Macedonian.rule }}}}
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/ml.rb
rails/pluralization/ml.rb
require 'rails_i18n/common_pluralizations/one_with_zero_other' ::RailsI18n::Pluralization::OneWithZeroOther.with_locale(:ml)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/eu.rb
rails/pluralization/eu.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:eu)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/st.rb
rails/pluralization/st.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:st)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/ko.rb
rails/pluralization/ko.rb
require 'rails_i18n/common_pluralizations/other' ::RailsI18n::Pluralization::Other.with_locale(:ko)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/bn.rb
rails/pluralization/bn.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:bn)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/nn.rb
rails/pluralization/nn.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:nn)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/is.rb
rails/pluralization/is.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:is)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/be.rb
rails/pluralization/be.rb
require 'rails_i18n/common_pluralizations/east_slavic' ::RailsI18n::Pluralization::EastSlavic.with_locale(:be)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/es-PA.rb
rails/pluralization/es-PA.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:'es-PA')
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/sl.rb
rails/pluralization/sl.rb
require 'rails_i18n/pluralization' { :sl => { :'i18n' => { :plural => { :keys => [:one, :two, :few, :other], :rule => ::RailsI18n::Pluralization::Slovenian.rule }}}}
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/sw.rb
rails/pluralization/sw.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:sw)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/ar.rb
rails/pluralization/ar.rb
require 'rails_i18n/pluralization' { :ar => { :'i18n' => { :plural => { :keys => [:zero, :one, :two, :few, :many, :other], :rule => ::RailsI18n::Pluralization::Arabic.rule }}}}
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/pl.rb
rails/pluralization/pl.rb
require 'rails_i18n/pluralization' { :pl => { :'i18n' => { :plural => { :keys => [:one, :few, :many, :other], :rule => ::RailsI18n::Pluralization::Polish.rule }}}}
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/en-IE.rb
rails/pluralization/en-IE.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:'en-IE')
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/fy.rb
rails/pluralization/fy.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:fy)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/gl.rb
rails/pluralization/gl.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:gl)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/de-CH.rb
rails/pluralization/de-CH.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:'de-CH')
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/en-CA.rb
rails/pluralization/en-CA.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:'en-CA')
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/km.rb
rails/pluralization/km.rb
require 'rails_i18n/common_pluralizations/other' ::RailsI18n::Pluralization::Other.with_locale(:km)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/es-AR.rb
rails/pluralization/es-AR.rb
require 'rails_i18n/common_pluralizations/one_other' ::RailsI18n::Pluralization::OneOther.with_locale(:'es-AR')
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/ja.rb
rails/pluralization/ja.rb
require 'rails_i18n/common_pluralizations/other' ::RailsI18n::Pluralization::Other.with_locale(:ja)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/rails/pluralization/fr.rb
rails/pluralization/fr.rb
require 'rails_i18n/common_pluralizations/one_upto_two_other' ::RailsI18n::Pluralization::OneUptoTwoOther.with_locale(:fr)
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/spec_helper.rb
spec/spec_helper.rb
ENV["RAILS_ENV"] = "test" require 'i18n-spec' require 'active_support/core_ext/kernel/reporting' require 'socket' require 'unit/matchers/have_missing_particular_pluralization_keys_matcher' require 'unit/matchers/have_keys_for_restrict_dependent_destroy_matcher' I18n.enforce_available_locales = false RSpec.configure ...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/support/ruby_content.rb
spec/support/ruby_content.rb
require "json" module RailsI18n module Spec module RubyContent def content @content ||= eval(File.read(@filepath), TOPLEVEL_BINDING, @filepath) end end end end
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/support/transliteration_file.rb
spec/support/transliteration_file.rb
require 'support/traverse_path' require 'support/ruby_content' require 'yaml' module RailsI18n module Spec class TransliterationFile include TraversePath def self.make(filepath) raise "Transliteration file doesn't exist!" unless filepath case File.extname(filepath) when '.r...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/support/pluralization_file.rb
spec/support/pluralization_file.rb
require 'support/traverse_path' require 'support/ruby_content' module RailsI18n module Spec class PluralizationFile include TraversePath include RubyContent def initialize(filepath) @filepath = filepath end end end end
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/support/traverse_path.rb
spec/support/traverse_path.rb
module RailsI18n module Spec module TraversePath # @return [Object, nil] Nil if path can't be traversed with the given key # sequence, unless return Object at last key (it also can be nil) def traverse_path(*keys) keys.inject(content) do |memo, key| return nil if memo[key].nil?...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/ordinals_spec.rb
spec/unit/ordinals_spec.rb
require 'spec_helper' require 'rails_i18n' describe 'Ordinals for' do # Mock Rails app in order to trigger the Railtie let(:app) { double :app, config: config } let(:config) { double :config, eager_load_namespaces: [], i18n: I18n, rails_i18n: RailsI18n } let(:period_locales) { %w[be bs cs da de de-AT de-CH de-...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/translation_spec.rb
spec/unit/translation_spec.rb
# coding: utf-8 require 'spec_helper' Dir.glob('rails/locale/*.yml') do |locale_file| next if locale_file == 'rails/locale/es-419.yml' describe "a rails-i18n #{locale_file} locale file" do subject { locale_file } it { should be_parseable } # it { should have_valid_pluralization_keys } it { should ...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/transliteration_spec.rb
spec/unit/transliteration_spec.rb
# encoding: utf-8 require 'spec_helper' require 'support/transliteration_file' require 'unit/transliteration/ordinary' require 'unit/transliteration/ukrainian' describe "Transliteration rule for" do transliterations_dir = File.join('rails', 'transliteration') let(:file) do |example| filename = Dir[File.join...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/pluralization_spec.rb
spec/unit/pluralization_spec.rb
# Implementation of http://unicode.org/cldr/trac/browser/trunk/common/supplemental/plurals.xml # with additional specs for I18n pluralization data format. # # Locales that behave like English are omitted, because I18n applies English plural rule # to all locales without own plural rule. require 'spec_helper' require '...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/transliteration/ordinary.rb
spec/unit/transliteration/ordinary.rb
shared_examples 'an ordinary transliteration rule' do it 'returns a hash' do file.content.should be_a Hash end it 'has one top level namespace' do file.content.keys.size.should == 1 end it 'has its locale tag as a top level namespace' do |example| file.content.keys.first.should == example.metada...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/transliteration/ukrainian.rb
spec/unit/transliteration/ukrainian.rb
# encoding: utf-8 # Below is an implementation of the official transliteration rules # http://zakon2.rada.gov.ua/laws/show/55-2010-%D0%BF shared_examples "Ukrainian transliteration" do it "properly transliterates 'ь'" do t("Ь").should == '' t("ь").should == '' end it "properly transliterates 'Аa'" do ...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/pluralization/one_few_other.rb
spec/unit/pluralization/one_few_other.rb
shared_examples 'one-few-other forms language' do [1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, 0.1, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1_000.1].each do |count| it "detects that #{count.inspect} in category 'one'" do rule.call(count).should == :one end end [2, 3, 4, 22, 23, 24, 32, 33,...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/pluralization/east_slavic.rb
spec/unit/pluralization/east_slavic.rb
shared_examples 'East Slavic' do it 'has "one", "few", "many" and "other" plural keys' do plural_keys.size.should == 4 plural_keys.should include(:one, :few, :many, :other) end [1, 21, 51, 71, 101, 1_031].each do |count| it "detects that #{count.inspect} in category 'one'" do rule.call(count).s...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/pluralization/other.rb
spec/unit/pluralization/other.rb
shared_examples 'other form language' do it 'has "other" plural keys' do plural_keys.should == [:other] end [0, 1, 1.2, 2, 5, 11, 21, 22, 27, 99, 1_000, nil, "abc"].each do |count| it "detects that #{count.inspect} in category 'other'" do rule.call(count).should == :other end end end
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/pluralization/romanian.rb
spec/unit/pluralization/romanian.rb
shared_examples 'Romanian language' do it 'has "one", "few", and "other" plural keys' do plural_keys.size.should == 3 plural_keys.should include(:one, :few, :other) end it "detects that 1 in category 'one'" do rule.call(1).should == :one end [0, 2, 3, 5, 8, 9, 10, 11, 15, 19, 101, 106, 112, 117,...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/pluralization/ordinary.rb
spec/unit/pluralization/ordinary.rb
shared_examples 'an ordinary pluralization rule' do it 'returns a hash' do |example| file.content.should be_a Hash end it 'has one top level namespace' do |example| file.content.keys.size.should == 1 end it 'has its locale tag as a top level namespace' do |example| file.content.keys.first.should...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/pluralization/one_upto_two_other.rb
spec/unit/pluralization/one_upto_two_other.rb
shared_examples 'one(upto 2)-other forms language' do it 'has "one" and "other" plural keys' do plural_keys.size.should == 2 plural_keys.should include(:one, :other) end [0, 0.5, 1, 1.2, 1.8].each do |count| it "detects that #{count.inspect} in category 'one'" do rule.call(count).should == :one...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/pluralization/one_with_zero_other.rb
spec/unit/pluralization/one_with_zero_other.rb
shared_examples 'one(with zero)-other forms language' do it 'has "one" and "other" plural keys' do plural_keys.size.should == 2 plural_keys.should include(:one, :other) end [0, 1].each do |count| it "detects that #{count.inspect} in category 'one'" do rule.call(count).should == :one end e...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/pluralization/one_two_other.rb
spec/unit/pluralization/one_two_other.rb
shared_examples 'one-two-other forms language' do it 'has "one", "two" and "other" plural keys' do plural_keys.size.should == 3 plural_keys.should include(:one, :two, :other) end it "detects that 1 in category 'one'" do rule.call(1).should == :one end it "detects that 2 in category 'two'" do ...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/pluralization/one_other.rb
spec/unit/pluralization/one_other.rb
shared_examples 'one-other forms language' do it 'has "one" and "other" plural keys' do plural_keys.size.should == 2 plural_keys.should include(:one, :other) end it "detects that 1 in category 'one'" do rule.call(1).should == :one end [0, "0", 0.3, 1.2, 2, "2", 3, 5, 10, 11, 21, 23, 31, 50, 81, ...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/pluralization/west_slavic.rb
spec/unit/pluralization/west_slavic.rb
shared_examples 'West Slavic' do it 'has "one", "few" and "other" plural keys' do plural_keys.size.should == 3 plural_keys.should include(:one, :few, :other) end it "detects that 1 in category 'one'" do rule.call(1).should == :one end [2, 3, 4].each do |count| it "detects that #{count.inspec...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/matchers/have_keys_for_restrict_dependent_destroy_matcher.rb
spec/unit/matchers/have_keys_for_restrict_dependent_destroy_matcher.rb
RSpec::Matchers.define :have_keys_for_restrict_dependent_destroy do def check_keys(scope, hash) return unless hash['errors'] return unless hash['errors']['messages'] return unless hash['errors']['messages']['restrict_dependent_destroy'] return if hash['errors']['messages']['restrict_dependent_destroy'...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/unit/matchers/have_missing_particular_pluralization_keys_matcher.rb
spec/unit/matchers/have_missing_particular_pluralization_keys_matcher.rb
RSpec::Matchers.define :have_missing_particular_pluralization_keys do match do |actual| @locale_file = I18nSpec::LocaleFile.new(actual) keys = if @locale_file.locale.language @locale_file.missing_pluralization_keys.reject do |key, value| key.match(/\.errors\.messages\.restrict_depende...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/spec/other/locale_files_spec.rb
spec/other/locale_files_spec.rb
# encoding: utf-8 require 'thor' require 'spec_helper' require_relative '../../rails/test/lib/check_locales.rb' describe "Locale files" do # there should not be any orphan pluralization files it "a pluralization file should have a corresponding locale.yml file" do expect(CheckLocales.orphan_pluralizations).to...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/lib/rails_i18n.rb
lib/rails_i18n.rb
module RailsI18n def self.enabled_modules @enabled_modules ||= Set.new end def self.enabled_modules=(other) @enabled_modules = Set.new(other) end end require 'rails_i18n/railtie'
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/lib/rails-i18n.rb
lib/rails-i18n.rb
require 'rails_i18n'
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/lib/rails_i18n/pluralization.rb
lib/rails_i18n/pluralization.rb
module RailsI18n module Pluralization module Arabic def self.rule lambda do |n| return :other unless n.is_a?(Numeric) mod100 = n % 100 if n == 0 :zero elsif n == 1 :one elsif n == 2 :two elsif (3..10).t...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/lib/rails_i18n/railtie.rb
lib/rails_i18n/railtie.rb
require 'rails' module RailsI18n class Railtie < ::Rails::Railtie #:nodoc: config.rails_i18n = RailsI18n initializer 'rails-i18n' do |app| RailsI18n::Railtie.instance_eval do pattern = pattern_from app.config.i18n.available_locales if app.config.rails_i18n.enabled_modules.empty? ...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/lib/rails_i18n/transliteration.rb
lib/rails_i18n/transliteration.rb
# frozen_string_literal: true module RailsI18n module Transliteration module Ukrainian class << self def rule lambda do |string| next '' unless string string.gsub(/./) do |char| # Regexp.last_match is local to the thread and method scope ...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/lib/rails_i18n/common_pluralizations/one_few_other.rb
lib/rails_i18n/common_pluralizations/one_few_other.rb
module RailsI18n module Pluralization module OneFewOther FROM_2_TO_4 = (2..4).to_a.freeze FROM_12_TO_14 = (12..14).to_a.freeze def self.rule lambda do |n| return :other unless n.is_a?(Numeric) frac = (n.to_d % 1) if frac.nonzero? n = frac.to...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/lib/rails_i18n/common_pluralizations/east_slavic.rb
lib/rails_i18n/common_pluralizations/east_slavic.rb
# Originally was implemented by Yaroslav Markin in "russian" gem # (http://github.com/yaroslav/russian) # # Used for Belarusian, Russian, Ukrainian. module RailsI18n module Pluralization module EastSlavic FROM_2_TO_4 = (2..4).to_a.freeze FROM_5_TO_9 = (5..9).to_a.freeze FROM_11_TO_14 = (11....
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/lib/rails_i18n/common_pluralizations/other.rb
lib/rails_i18n/common_pluralizations/other.rb
module RailsI18n module Pluralization module Other def self.rule Proc.new { :other } end def self.with_locale(locale) { locale => { :'i18n' => { :plural => { :keys => [:other], :rule => rule }}}} end end end e...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/lib/rails_i18n/common_pluralizations/romanian.rb
lib/rails_i18n/common_pluralizations/romanian.rb
# Used for Moldavian, Romanian. module RailsI18n module Pluralization module Romanian FROM_1_TO_19 = (1..19).to_a.freeze def self.rule lambda do |n| return :other unless n.is_a?(Numeric) if n == 1 :one elsif n == 0 || FROM_1_TO_19.include?(n % 100) ...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/lib/rails_i18n/common_pluralizations/one_upto_two_other.rb
lib/rails_i18n/common_pluralizations/one_upto_two_other.rb
# Used for French, Fulah, Kabyle. module RailsI18n module Pluralization module OneUptoTwoOther def self.rule lambda do |n| n.is_a?(Numeric) && n >= 0 && n < 2 ? :one : :other end end def self.with_locale(locale) { locale => { :'i18n' => { ...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/lib/rails_i18n/common_pluralizations/one_with_zero_other.rb
lib/rails_i18n/common_pluralizations/one_with_zero_other.rb
# Used in Akan, Amharic, Bihari, Filipino, guw, Hindi, Lingala, Malagasy, # Northen Sotho, Tachelhit, Tagalog, Tigrinya, Walloon. module RailsI18n module Pluralization module OneWithZeroOther def self.rule lambda do |n| case n when 0, 1 then :one else :other ...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/lib/rails_i18n/common_pluralizations/one_two_other.rb
lib/rails_i18n/common_pluralizations/one_two_other.rb
# Used for Cornish, Inari Sami, Inuktitut, Lule Sami, Nama, Northern Sami, # Sami Language, Skolt Sami, Southern Sami. module RailsI18n module Pluralization module OneTwoOther def self.rule lambda do |n| case n when 1 then :one when 2 then :two else :other ...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/lib/rails_i18n/common_pluralizations/one_other.rb
lib/rails_i18n/common_pluralizations/one_other.rb
# Used as "default" pluralization rule module RailsI18n module Pluralization module OneOther def self.rule lambda { |n| n == 1 ? :one : :other } end def self.with_locale(locale) { locale => { :'i18n' => { :plural => { :keys => [:one, :o...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
svenfuchs/rails-i18n
https://github.com/svenfuchs/rails-i18n/blob/266106f902ba693f5c98f3ac8f8371a795a55722/lib/rails_i18n/common_pluralizations/west_slavic.rb
lib/rails_i18n/common_pluralizations/west_slavic.rb
# Used for Czech, Slovak. module RailsI18n module Pluralization module WestSlavic def self.rule lambda do |n| case n when 1 then :one when 2, 3, 4 then :few else :other end end end def self.with_locale(locale) { locale =...
ruby
MIT
266106f902ba693f5c98f3ac8f8371a795a55722
2026-01-04T15:47:45.015279Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/comm_stub.rb
test/comm_stub.rb
module CommStub class Stub def initialize(gateway, method_to_stub, action) @gateway = gateway @action = action @complete = false @method_to_stub = method_to_stub @check = nil end def check_request(skip_response: false, &block) if skip_response @complete = true ...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/test_helper.rb
test/test_helper.rb
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'bundler/setup' require 'test/unit' require 'mocha/test_unit' require 'yaml' require 'json' require 'active_merchant' require 'comm_stub' require 'active_support/core_ext/integer/time' require 'active_support/core_ext/numeric/time' require 'active_s...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/support/mercury_helper.rb
test/support/mercury_helper.rb
module MercuryHelper module BatchClosing def close_batch xml = Builder::XmlMarkup.new xml.tag! 'TStream' do xml.tag! 'Admin' do xml.tag! 'MerchantID', @options[:login] xml.tag! 'TranCode', 'BatchSummary' end end xml = xml.target! response = commit(...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_cyber_source_test.rb
test/remote/gateways/remote_cyber_source_test.rb
require 'test_helper' class RemoteCyberSourceTest < Test::Unit::TestCase # Reduce code duplication: use `assert_successful_response` when feasible! def setup Base.mode = :test @gateway = CyberSourceGateway.new({ nexus: 'NC' }.merge(fixtures(:cyber_source))) @gateway_certificate = CyberSourceGateway.ne...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
true
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_moka_test.rb
test/remote/gateways/remote_moka_test.rb
require 'test_helper' class RemoteMokaTest < Test::Unit::TestCase def setup @gateway = MokaGateway.new(fixtures(:moka)) @amount = 100 @credit_card = credit_card('5269111122223332') @declined_card = credit_card('4000300011112220') @options = { description: 'Store Purchase' } @three_...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_inspire_test.rb
test/remote/gateways/remote_inspire_test.rb
require 'test_helper' class RemoteBraintreeTest < Test::Unit::TestCase def setup @gateway = InspireGateway.new(fixtures(:inspire)) @amount = rand(1001..11000) @credit_card = credit_card('4111111111111111', brand: 'visa') @declined_amount = rand(99) @options = { order_id: generate_unique_id, ...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_fortis_test.rb
test/remote/gateways/remote_fortis_test.rb
require 'test_helper' class RemoteFortisTest < Test::Unit::TestCase def setup @gateway = FortisGateway.new(fixtures(:fortis)) @amount = 100 @credit_card = credit_card('5454545454545454', verification_value: '999') @incomplete_credit_card = credit_card('54545454545454') @billing_address = { ...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_optimal_payment_test.rb
test/remote/gateways/remote_optimal_payment_test.rb
require 'test_helper' class RemoteOptimalPaymentTest < Test::Unit::TestCase def setup @gateway = OptimalPaymentGateway.new(fixtures(:optimal_payment)) @amount = 100 @declined_amount = 5 @credit_card = credit_card('4387751111011') @expired_card = credit_card('4387751111011', month: 12, year: 2019...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_decidir_test.rb
test/remote/gateways/remote_decidir_test.rb
require 'test_helper' class RemoteDecidirTest < Test::Unit::TestCase def setup @gateway_for_purchase = DecidirGateway.new(fixtures(:decidir_purchase)) @gateway_for_auth = DecidirGateway.new(fixtures(:decidir_authorize)) @amount = 100 @credit_card = credit_card('4507990000004905') @master_card_cr...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_decidir_plus_test.rb
test/remote/gateways/remote_decidir_plus_test.rb
require 'test_helper' require 'securerandom' class RemoteDecidirPlusTest < Test::Unit::TestCase def setup @gateway_purchase = DecidirPlusGateway.new(fixtures(:decidir_plus)) @gateway_auth = DecidirPlusGateway.new(fixtures(:decidir_plus_preauth)) @amount = 100 @credit_card = credit_card('448459015992...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_borgun_test.rb
test/remote/gateways/remote_borgun_test.rb
require 'test_helper' class RemoteBorgunTest < Test::Unit::TestCase def setup # Borgun's test server has an improperly installed cert BorgunGateway.ssl_strict = false @gateway = BorgunGateway.new(fixtures(:borgun)) @amount = 100 @credit_card = credit_card('5587402000012011', year: 2027, month: ...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_wirecard_test.rb
test/remote/gateways/remote_wirecard_test.rb
# encoding: UTF-8 require 'test_helper' class RemoteWirecardTest < Test::Unit::TestCase def setup test_account = fixtures(:wirecard) @gateway = WirecardGateway.new(test_account) @amount = 100 @credit_card = credit_card('4200000000000000') @declined_card = credit_card('4000300011112220') @am...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_payway_test.rb
test/remote/gateways/remote_payway_test.rb
require 'test_helper' class PaywayTest < Test::Unit::TestCase def setup @amount = 1100 @options = { order_id: generate_unique_id } @gateway = ActiveMerchant::Billing::PaywayGateway.new(fixtures(:payway)) @visa = credit_card( '4564710000000004', month: 2, year: 2019, verific...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_payscout_test.rb
test/remote/gateways/remote_payscout_test.rb
require 'test_helper' class RemotePayscoutTest < Test::Unit::TestCase def setup @gateway = PayscoutGateway.new(fixtures(:payscout)) @amount = 100 @credit_card = credit_card('4111111111111111', verification_value: 999) @declined_card = credit_card('34343') @options = { order_id: '1', ...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_ezic_test.rb
test/remote/gateways/remote_ezic_test.rb
require 'test_helper' class RemoteEzicTest < Test::Unit::TestCase def setup @gateway = EzicGateway.new(fixtures(:ezic)) @amount = 100 @failed_amount = 19088 @credit_card = credit_card('4000100011112224') @options = { order_id: '1', billing_address: address, description: 'Store...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_ct_payment_test.rb
test/remote/gateways/remote_ct_payment_test.rb
require 'test_helper' class RemoteCtPaymentTest < Test::Unit::TestCase def setup @gateway = CtPaymentGateway.new(fixtures(:ct_payment)) @amount = 100 @credit_card = credit_card('4501161107217214') @declined_card = credit_card('4502244713161718') @options = { billing_address: address, ...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_transact_pro_test.rb
test/remote/gateways/remote_transact_pro_test.rb
require 'test_helper' require 'active_support/core_ext/hash/slice' class RemoteTransactProTest < Test::Unit::TestCase def setup test_credentials = fixtures(:transact_pro).slice(:guid, :password, :terminal) test_card = fixtures(:transact_pro).slice(:card_number, :verification_value, :month, :year) @gatew...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_cardprocess_test.rb
test/remote/gateways/remote_cardprocess_test.rb
require 'test_helper' class RemoteCardprocessTest < Test::Unit::TestCase def setup @gateway = CardprocessGateway.new(fixtures(:cardprocess)) @amount = 100 @credit_card = credit_card('4200000000000000') @credit_card_3ds = credit_card('4711100000000000') @options = { billing_address: addres...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_cams_test.rb
test/remote/gateways/remote_cams_test.rb
require 'test_helper' class RemoteCamsTest < Test::Unit::TestCase @@amount = 100 def setup @gateway = CamsGateway.new(fixtures(:cams)) @amount = rand(100..100000) @credit_card = credit_card('4111111111111111') @declined_card = credit_card('4000300015555555') @options = { order_id: gene...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_trans_first_transaction_express_test.rb
test/remote/gateways/remote_trans_first_transaction_express_test.rb
require 'test_helper' class RemoteTransFirstTransactionExpressTest < Test::Unit::TestCase def setup @gateway = TransFirstTransactionExpressGateway.new(fixtures(:trans_first_transaction_express)) @amount = 100 @declined_amount = 21 @credit_card = credit_card('4485896261017708', verification_value: 99...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_komoju_test.rb
test/remote/gateways/remote_komoju_test.rb
require 'test_helper' require 'securerandom' class RemoteKomojuTest < Test::Unit::TestCase def setup @gateway = KomojuGateway.new(fixtures(:komoju)) @amount = 100 @credit_card = credit_card('4111111111111111') @declined_card = credit_card('4123111111111059') @fraudulent_card = credit_card('41231...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_beanstream_interac_test.rb
test/remote/gateways/remote_beanstream_interac_test.rb
require 'test_helper' class RemoteBeanstreamInteracTest < Test::Unit::TestCase def setup @gateway = BeanstreamInteracGateway.new(fixtures(:beanstream_interac)) @amount = 100 @options = { order_id: generate_unique_id, billing_address: { name: 'xiaobo zzz', phone: '555-555-555...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_commercegate_test.rb
test/remote/gateways/remote_commercegate_test.rb
require 'test_helper' class RemoteCommercegateTest < Test::Unit::TestCase def setup @gateway = CommercegateGateway.new(fixtures(:commercegate)) @amount = 1000 @options = { address: } @credit_card = credit_card(fixtures(:commercegate)[:card_number]) @expired_credit_card = credit_card(...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_braintree_orange_test.rb
test/remote/gateways/remote_braintree_orange_test.rb
require 'test_helper' class RemoteBraintreeOrangeTest < Test::Unit::TestCase def setup @gateway = BraintreeGateway.new(fixtures(:braintree_orange)) @amount = rand(1001..11000) @credit_card = credit_card('4111111111111111') @check = check() @declined_amount = rand(99) @options = { order_id: ...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_swipe_checkout_test.rb
test/remote/gateways/remote_swipe_checkout_test.rb
require 'test_helper' class RemoteSwipeCheckoutTest < Test::Unit::TestCase def setup @gateway = SwipeCheckoutGateway.new(fixtures(:swipe_checkout)) @amount = 100 @accepted_card = credit_card('1234123412341234') @declined_card = credit_card('1111111111111111') @invalid_card = credit_card('100000...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_stripe_emv_test.rb
test/remote/gateways/remote_stripe_emv_test.rb
require 'test_helper' class RemoteStripeEmvTest < Test::Unit::TestCase CHARGE_ID_REGEX = /ch_[a-zA-Z\d]{24}/ def setup @gateway = StripeGateway.new(fixtures(:stripe)) @amount = 100 @emv_credit_cards = { uk: ActiveMerchant::Billing::CreditCard.new(icc_data: '5A08476173900101011957114761739001010...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_qbms_test.rb
test/remote/gateways/remote_qbms_test.rb
require 'test_helper' class QbmsTest < Test::Unit::TestCase def setup Base.mode = :test @gateway_options = fixtures(:qbms) @gateway = QbmsGateway.new(@gateway_options) @amount = 100 @card = credit_card('4111111111111111') @options = { billing_address: address } end def t...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_ebanx_test.rb
test/remote/gateways/remote_ebanx_test.rb
require 'test_helper' class RemoteEbanxTest < Test::Unit::TestCase def setup @gateway = EbanxGateway.new(fixtures(:ebanx)) @gateway_local = EbanxGateway.new(fixtures(:ebanx_local)) @amount = 100 @credit_card = credit_card('4111111111111111') @declined_card = credit_card('5102026827345142') @...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_datatrans_test.rb
test/remote/gateways/remote_datatrans_test.rb
require 'test_helper' class RemoteDatatransTest < Test::Unit::TestCase def setup @gateway = DatatransGateway.new(fixtures(:datatrans)) @amount = 756 @credit_card = credit_card('4242424242424242', verification_value: '123', first_name: 'John', last_name: 'Smith', month: 6, year: Time.now.year) @bad_a...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false
activemerchant/active_merchant
https://github.com/activemerchant/active_merchant/blob/ca45b1b063ce2e1495e1427e0a1d42dcb482d57d/test/remote/gateways/remote_authorize_net_arb_test.rb
test/remote/gateways/remote_authorize_net_arb_test.rb
require 'test_helper' class AuthorizeNetArbTest < Test::Unit::TestCase def setup @gateway = AuthorizeNetArbGateway.new(fixtures(:authorize_net)) @amount = 100 @credit_card = credit_card('4242424242424242') @check = check @options = { amount: 100, subscription_name: 'Test Subscription...
ruby
MIT
ca45b1b063ce2e1495e1427e0a1d42dcb482d57d
2026-01-04T15:45:54.027332Z
false