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
joshuay03/dial
https://github.com/joshuay03/dial
lib/dial/storage.rb
Ruby
mit
229
main
1,781
# frozen_string_literal: true require_relative "storage/file_adapter" require_relative "storage/redis_adapter" require_relative "storage/memcached_adapter" module Dial class Storage SUPPORTED_ADAPTERS = [FileAdapter, RedisAdapter, MemcachedAdapter].freeze @mutex = Mutex.new class << self def val...
github
joshuay03/dial
https://github.com/joshuay03/dial
lib/dial/engine/routes.rb
Ruby
mit
229
main
986
# frozen_string_literal: true require "uri" Dial::Engine.routes.draw do get "/profile", to: lambda { |env| query_params = URI.decode_www_form(env[::Rack::QUERY_STRING]).to_h profile_key = query_params["key"] unless profile_key && profile_key.match?(/\A[0-9a-f-]+_vernier\z/i) return [ 400, ...
github
joshuay03/dial
https://github.com/joshuay03/dial
lib/dial/middleware/ruby_stat.rb
Ruby
mit
229
main
895
# frozen_string_literal: true module Dial module RubyStat private def ruby_vm_stat_diff before, after stat_diff before, after, no_diff: [:next_shape_id] end def gc_stat_diff before, after stat_diff before, after, no_diff: [ :heap_allocatable_slots, :malloc_increase_bytes...
github
joshuay03/dial
https://github.com/joshuay03/dial
lib/dial/middleware/rails_stat.rb
Ruby
mit
229
main
448
# frozen_string_literal: true module Dial module RailsStat private def server_timing headers timing = if ::ActionDispatch.const_defined? "Constants::SERVER_TIMING" headers[::ActionDispatch::Constants::SERVER_TIMING] else headers["Server-Timing"] end (timing || "").spl...
github
joshuay03/dial
https://github.com/joshuay03/dial
lib/dial/middleware/panel.rb
Ruby
mit
229
main
11,240
# frozen_string_literal: true require "uri" module Dial class Panel QUERY_CHARS_TRUNCATION_THRESHOLD = 100 class << self def html env, headers, profile_key, query_logs, ruby_vm_stat, gc_stat, gc_stat_heap, server_timing <<~HTML <style>#{style}</style> <div id="dial"> ...
github
joshuay03/dial
https://github.com/joshuay03/dial
test/app.rb
Ruby
mit
229
main
1,241
# frozen_string_literal: true require "rack/test" require "active_record/railtie" require "action_controller/railtie" ENV["DATABASE_URL"] = "sqlite3::memory:" class DialApp < Rails::Application config.eager_load = false config.logger = Logger.new nil config.secret_key_base = "secret_key_base" config.hosts <...
github
joshuay03/dial
https://github.com/joshuay03/dial
test/test_helper.rb
Ruby
mit
229
main
1,557
# frozen_string_literal: true $LOAD_PATH.unshift File.expand_path "../lib", __dir__ require "dial" require "app" require "minitest/mock" require "minitest/autorun" require "rails/dom/testing" require "rails/dom/testing/railtie" module Dial class Test < Minitest::Test include Rack::Test::Methods include R...
github
joshuay03/dial
https://github.com/joshuay03/dial
test/dial/test_storage_integration.rb
Ruby
mit
229
main
3,858
# frozen_string_literal: true require_relative "../test_helper" module Dial class TestStorageIntegration < Dial::Test def setup super @app = lambda { |env| [200, { "Content-Type" => "text/html" }, ["<html><body>Test</body></html>"]] } @middleware = Middleware.new @app @env = { "H...
github
joshuay03/dial
https://github.com/joshuay03/dial
test/dial/test_middleware.rb
Ruby
mit
229
main
1,971
# frozen_string_literal: true require_relative "../test_helper" module Dial class TestMiddleware < Dial::Test def setup super @app = lambda { |env| [200, { "Content-Type" => "text/html" }, ["<html><body>Test</body></html>"]] } @middleware = Middleware.new @app @base_env = { "HTTP...
github
joshuay03/dial
https://github.com/joshuay03/dial
test/dial/test_storage.rb
Ruby
mit
229
main
4,578
# frozen_string_literal: true require_relative "../test_helper" module Dial class TestStorage < Dial::Test def setup super reset_storage_adapter end def teardown super reset_storage_adapter end def test_adapter_defaults_to_file_in_development with_rails_env "devel...
github
joshuay03/dial
https://github.com/joshuay03/dial
test/dial/test_prosopite_integration.rb
Ruby
mit
229
main
3,867
# frozen_string_literal: true require "test_helper" module Dial class TestProsopiteIntegration < ActiveSupport::TestCase def setup ::Prosopite.instance_variable_set :@custom_logger, false ::Prosopite.instance_variable_set :@dial_logger, nil ::Prosopite.instance_variable_set :@original_logger, ...
github
joshuay03/dial
https://github.com/joshuay03/dial
test/dial/test_panel.rb
Ruby
mit
229
main
3,505
# frozen_string_literal: true require "test_helper" module Dial class TestPanel < Dial::Test def setup unless app.initialized? app.initialize! ActiveRecord::Migration.verbose = false ActiveRecord::Schema.define do create_table :gauges, force: true do end ...
github
joshuay03/dial
https://github.com/joshuay03/dial
test/dial/test_configuration.rb
Ruby
mit
229
main
3,853
# frozen_string_literal: true require "test_helper" module Dial class TestConfiguration < Dial::Test def test_configure_yields_a_new_configuration Dial.configure do |config| assert_instance_of Dial::Configuration, config end end def test_configuration_has_default_values Dial.c...
github
joshuay03/dial
https://github.com/joshuay03/dial
test/dial/test_prosopite_composite_logger.rb
Ruby
mit
229
main
1,946
# frozen_string_literal: true require "test_helper" module Dial class TestProsopiteCompositeLogger < ActiveSupport::TestCase def setup @dial_logger = ProsopiteLogger.new @existing_logger = Logger.new StringIO.new @composite_logger = ProsopiteCompositeLogger.new @dial_logger, @existing_logger ...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spree_gateway.gemspec
Ruby
bsd-3-clause
229
main
1,329
# coding: utf-8 lib = File.expand_path('../lib/', __FILE__) $LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib) require 'spree_gateway/version' Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = 'spree_gateway' s.version = SpreeGateway::VERSION s.summary = 'Collection...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
Gemfile
Ruby
bsd-3-clause
229
main
591
source 'https://rubygems.org' git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/') "https://github.com/#{repo_name}.git" end gem 'rails-controller-testing' gem 'spree', github: 'spree/spree', branch: 'main' gem 'spree_emails', github: 'spree/spree', branch: 'ma...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
Rakefile
Ruby
bsd-3-clause
229
main
324
require 'bundler' Bundler::GemHelper.install_tasks require 'rspec/core/rake_task' require 'spree/testing_support/extension_rake' RSpec::Core::RakeTask.new task :default => [:spec] desc "Generates a dummy app for testing" task :test_app do ENV['LIB_NAME'] = 'spree_gateway' Rake::Task['extension:test_app'].invoke...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
lib/active_merchant/billing/stripe_gateway_decorator.rb
Ruby
bsd-3-clause
229
main
1,047
module ActiveMerchant module Billing module StripeGatewayDecorator def verify(source, **options) customer = source.gateway_customer_profile_id bank_account_token = source.gateway_payment_profile_id commit(:post, "customers/#{CGI.escape(customer)}/sources/#{bank_account_token}/verify...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
lib/generators/spree_gateway/install/install_generator.rb
Ruby
bsd-3-clause
229
main
525
module SpreeGateway module Generators class InstallGenerator < Rails::Generators::Base class_option :migrate, type: :boolean, default: true, banner: 'Migrate the database' def add_migrations run 'bundle exec rake railties:install:migrations FROM=spree_gateway' end def run_migrati...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
lib/spree_frontend/controllers/spree/checkout_controller_decorator.rb
Ruby
bsd-3-clause
229
main
631
module Spree module CheckoutControllerDecorator def self.prepended(base) base.before_action :process_payments_and_set_keys, only: :edit, if: proc { params[:state] == 'payment_confirm' } end def process_payments_and_set_keys @order.tap do |order| order.process_payments! order.r...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
lib/controllers/spree/apple_pay_domain_verification_controller.rb
Ruby
bsd-3-clause
229
main
310
module Spree class ApplePayDomainVerificationController < ::ActionController::Base def show gateway = Spree::Gateway::StripeApplePayGateway.active.last raise ActiveRecord::RecordNotFound unless gateway render plain: gateway.preferred_domain_verification_certificate end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
lib/controllers/spree/api/v2/storefront/intents_controller.rb
Ruby
bsd-3-clause
229
main
1,634
module Spree module Api module V2 module Storefront class IntentsController < ::Spree::Api::V2::BaseController include Spree::Api::V2::Storefront::OrderConcern def payment_confirmation_data spree_authorize! :update, spree_current_order, order_token if sp...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
lib/spree_gateway/engine.rb
Ruby
bsd-3-clause
229
main
3,812
module SpreeGateway class Engine < Rails::Engine engine_name 'spree_gateway' config.autoload_paths += %W(#{config.root}/lib) config.after_initialize do |app| app.config.spree.payment_methods << Spree::Gateway::AuthorizeNet app.config.spree.payment_methods << Spree::Gateway::AuthorizeNetCim ...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree_gateway/apple_pay_order_decorator.rb
Ruby
bsd-3-clause
229
main
631
module SpreeGateway module ApplePayOrderDecorator def confirmation_required? return false if paid_with_apple_pay? # Little hacky fix for #4117 # If this wasn't here, order would transition to address state on confirm failure # because there would be no valid payments any more. Spree...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree_gateway/apple_pay_payment_decorator.rb
Ruby
bsd-3-clause
229
main
224
module SpreeGateway module ApplePayPaymentDecorator def apple_pay? payment_method.is_a? Spree::Gateway::StripeApplePayGateway end end end ::Spree::Payment.prepend(::SpreeGateway::ApplePayPaymentDecorator)
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree_gateway/payment_decorator.rb
Ruby
bsd-3-clause
229
main
914
module SpreeGateway module PaymentDecorator def handle_response(response, success_state, failure_state) if response.success? && response.respond_to?(:params) self.intent_client_key = response.params['client_secret'] if response.params['client_secret'] end super end def verify!(*...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree_gateway/order_decorator.rb
Ruby
bsd-3-clause
229
main
852
module SpreeGateway module OrderDecorator def self.prepended(base) return if base.checkout_steps.key?(:payment_confirm) base.insert_checkout_step( :payment_confirm, before: :complete, if: ->(order) { order.intents? } ) end def process_payments! # Payments ...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree_gateway/credit_card_decorator.rb
Ruby
bsd-3-clause
229
main
246
module SpreeGateway module CreditCardDecorator def set_last_digits self.last_digits ||= number.to_s.length <= 4 ? number : number.to_s.slice(-4..-1) end end end ::Spree::CreditCard.prepend(::SpreeGateway::CreditCardDecorator)
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/check.rb
Ruby
bsd-3-clause
229
main
1,340
module Spree class Check < Spree::Base attr_accessor :imported belongs_to :payment_method belongs_to :user, class_name: Spree.user_class.to_s, foreign_key: 'user_id', optional: true has_many :payments, as: :source scope :with_payment_profile, -> { where.not(gateway_customer_profi...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/billing_integration.rb
Ruby
bsd-3-clause
229
main
632
module Spree class BillingIntegration < PaymentMethod validates :name, presence: true preference :server, :string, default: 'test' preference :test_mode, :boolean, default: true def provider integration_options = options ActiveMerchant::Billing::Base.integration_mode = integration_option...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/data_cash.rb
Ruby
bsd-3-clause
229
main
203
module Spree class Gateway::DataCash < Gateway preference :login, :string preference :password, :string def provider_class ActiveMerchant::Billing::DataCashGateway end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/authorize_net_cim.rb
Ruby
bsd-3-clause
229
main
8,031
module Spree class Gateway::AuthorizeNetCim < Gateway preference :login, :string preference :password, :string preference :server, :string, default: "test" preference :test_mode, :boolean, default: false preference :validate_on_profile_create, :boolean, default: false ActiveMerchant::Billing:...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/stripe_gateway.rb
Ruby
bsd-3-clause
229
main
4,429
module Spree class Gateway::StripeGateway < Gateway preference :secret_key, :string preference :publishable_key, :string CARD_TYPE_MAPPING = { 'American Express' => 'american_express', 'Diners Club' => 'diners_club', 'Discover' => 'discover', 'JCB' => 'jcb', 'Laser' => 'lase...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/pay_junction.rb
Ruby
bsd-3-clause
229
main
289
module Spree class Gateway::PayJunction < Gateway preference :login, :string preference :password, :string def provider_class ActiveMerchant::Billing::PayJunctionGateway end def options super().merge(:test => self.preferred_test_mode) end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/moneris.rb
Ruby
bsd-3-clause
229
main
203
module Spree class Gateway::Moneris < Gateway preference :login, :string preference :password, :password def provider_class ActiveMerchant::Billing::MonerisGateway end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/stripe_apple_pay_gateway.rb
Ruby
bsd-3-clause
229
main
249
module Spree class Gateway::StripeApplePayGateway < Gateway::StripeGateway preference :country_code, :string, default: 'US' preference :domain_verification_certificate, :text def method_type 'stripe_apple_pay' end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/paymill.rb
Ruby
bsd-3-clause
229
main
263
module Spree class Gateway::Paymill < Gateway preference :public_key, :string preference :private_key, :string preference :currency, :string, :default => 'GBP' def provider_class ActiveMerchant::Billing::PaymillGateway end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/worldpay.rb
Ruby
bsd-3-clause
229
main
2,944
module Spree class Gateway::Worldpay < Gateway preference :login, :string preference :password, :string preference :currency, :string, :default => 'GBP' preference :installation_id, :string preference :american_express_login, :string preference :discover_login, :string preference :jcb_log...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/stripe_ach_gateway.rb
Ruby
bsd-3-clause
229
main
1,741
module Spree class Gateway::StripeAchGateway < Gateway::StripeGateway def method_type 'stripe_ach' end def payment_source_class Check end def verify(source, gateway_options) provider.verify(source, gateway_options) end def create_profile(payment) return unless p...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/eway.rb
Ruby
bsd-3-clause
229
main
353
module Spree class Gateway::Eway < Gateway preference :login, :string # Note: EWay supports purchase method only (no authorize method). def auto_capture? true end def provider_class ActiveMerchant::Billing::EwayGateway end def options super().merge(:test => self.prefer...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/payflow_pro.rb
Ruby
bsd-3-clause
229
main
319
module Spree class Gateway::PayflowPro < Gateway preference :login, :string preference :password, :password preference :partner, :string def provider_class ActiveMerchant::Billing::PayflowGateway end def options super().merge(:test => self.preferred_test_mode) end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/eway_rapid.rb
Ruby
bsd-3-clause
229
main
285
module Spree class Gateway::EwayRapid < Gateway preference :login, :string preference :password, :string def provider_class ActiveMerchant::Billing::EwayRapidGateway end def options super().merge(:test => self.preferred_test_mode) end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/card_save.rb
Ruby
bsd-3-clause
229
main
202
module Spree class Gateway::CardSave < Gateway preference :login, :string preference :password, :string def provider_class ActiveMerchant::Billing::CardSaveGateway end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/spreedly_core_gateway.rb
Ruby
bsd-3-clause
229
main
256
module Spree class Gateway::SpreedlyCoreGateway < Gateway preference :login, :string preference :password, :string preference :gateway_token, :string def provider_class ActiveMerchant::Billing::SpreedlyCoreGateway end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/banwire.rb
Ruby
bsd-3-clause
229
main
342
module Spree class Gateway::Banwire < Gateway preference :login, :string def provider_class ActiveMerchant::Billing::BanwireGateway end def purchase(money, creditcard, gateway_options) gateway_options[:description] = "Spree Order" provider.purchase(money, creditcard, gateway_optio...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/balanced_gateway.rb
Ruby
bsd-3-clause
229
main
2,086
module Spree class Gateway::BalancedGateway < Gateway preference :login, :string preference :on_behalf_of_uri, :string def authorize(money, creditcard, gateway_options) if token = creditcard.gateway_payment_profile_id # The Balanced ActiveMerchant gateway supports passing the token directly...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/pay_pal_gateway.rb
Ruby
bsd-3-clause
229
main
280
module Spree class Gateway::PayPalGateway < Gateway preference :login, :string preference :password, :string preference :signature, :string preference :currency_code, :string def provider_class ActiveMerchant::Billing::PaypalGateway end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/pin_gateway.rb
Ruby
bsd-3-clause
229
main
1,609
module Spree class Gateway::PinGateway < Gateway preference :api_key, :string preference :currency, :string, :default => 'AUD' def provider_class ActiveMerchant::Billing::PinGateway end def purchase(money, creditcard, options = {}) super(money, creditcard.try(:gateway_customer_pr...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/cyber_source.rb
Ruby
bsd-3-clause
229
main
211
module Spree class Gateway::CyberSource < Gateway preference :login, :string preference :password, :password def provider_class ActiveMerchant::Billing::CyberSourceGateway end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/authorize_net.rb
Ruby
bsd-3-clause
229
main
1,642
module Spree class Gateway::AuthorizeNet < Gateway preference :login, :string preference :password, :string preference :server, :string, default: "test" def provider_class ActiveMerchant::Billing::AuthorizeNetGateway end def options if !['live','test'].include?(self.preferred_ser...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/stripe_elements_gateway.rb
Ruby
bsd-3-clause
229
main
2,041
module Spree class Gateway::StripeElementsGateway < Gateway::StripeGateway preference :intents, :boolean, default: true def method_type 'stripe_elements' end def provider_class if get_preference(:intents) ActiveMerchant::Billing::StripePaymentIntentsGateway else Act...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/maxipago.rb
Ruby
bsd-3-clause
229
main
256
module Spree class Gateway::Maxipago < Gateway preference :login, :string # ID preference :password, :string # KEY def provider_class ActiveMerchant::Billing::MaxipagoGateway end def auto_capture? true end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/braintree_gateway.rb
Ruby
bsd-3-clause
229
main
6,000
module Spree class Gateway::BraintreeGateway < Gateway preference :environment, :string preference :merchant_id, :string preference :merchant_account_id, :string preference :public_key, :string preference :private_key, :string preference :client_side_encryption_key, :text CARD_TYPE_MAPPIN...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/migs.rb
Ruby
bsd-3-clause
229
main
232
module Spree class Gateway::Migs < Gateway preference :login, :string preference :password, :string preference :secure_hash, :string def provider_class ActiveMerchant::Billing::MigsGateway end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/sage_pay.rb
Ruby
bsd-3-clause
229
main
234
module Spree class Gateway::SagePay < Gateway preference :login, :string preference :password, :string preference :account, :string def provider_class ActiveMerchant::Billing::SagePayGateway end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/secure_pay_au.rb
Ruby
bsd-3-clause
229
main
209
module Spree class Gateway::SecurePayAU < Gateway preference :login, :string preference :password, :string def provider_class ActiveMerchant::Billing::SecurePayAuGateway end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
app/models/spree/gateway/beanstream.rb
Ruby
bsd-3-clause
229
main
7,554
module Spree class Gateway::Beanstream < Gateway preference :login, :string preference :user, :string preference :password, :string preference :secure_profile_api_key, :string def provider_class ActiveMerchant::Billing::BeanstreamGateway end def payment_profiles_supported? tr...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
config/routes.rb
Ruby
bsd-3-clause
229
main
669
# we need to add this route to the root Rails application because Spree can # be mounted to some path eg. /shop and Apple Pay expects to access this file # via https://example.com/.well-known/apple-developer-merchantid-domain-association Rails.application.routes.draw do get '/.well-known/apple-developer-merchantid-do...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
db/migrate/20200317135551_add_spree_check_payment_source.rb
Ruby
bsd-3-clause
229
main
683
class AddSpreeCheckPaymentSource < ActiveRecord::Migration[5.1] def change create_table :spree_checks do |t| t.references :payment_method t.references :user t.string 'account_holder_name' t.string 'account_holder_type' t.string 'routing_number' t.string 'account_number' t...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/spree/order_spec.rb
Ruby
bsd-3-clause
229
main
2,387
require 'spec_helper' describe Spree::Order do let(:order_one) { OrderWalkthrough.up_to(:payment) } let(:order_two) { OrderWalkthrough.up_to(:payment) } let(:stripe_apple_pay_payment_method) do Spree::Gateway::StripeApplePayGateway.create!( name: 'ApplePay', preferred_domain_verification_certific...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/authorize_net_cim_spec.rb
Ruby
bsd-3-clause
229
main
766
require 'spec_helper' describe Spree::Gateway::AuthorizeNetCim do let (:gateway) { described_class.new } context '.provider_class' do it 'is a AuthorizeNetCim gateway' do expect(gateway.provider_class).to eq ::Spree::Gateway::AuthorizeNetCim end end context '.payment_profiles_supported?' do ...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/banwire_spec.rb
Ruby
bsd-3-clause
229
main
322
require 'spec_helper' describe Spree::Gateway::Banwire do let(:gateway) { described_class.create!(name: 'Banwire', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a Banwire gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::BanwireGateway end end en...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/card_save_spec.rb
Ruby
bsd-3-clause
229
main
325
require 'spec_helper' describe Spree::Gateway::CardSave do let(:gateway) { described_class.create!(name: 'CardSave', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a CardSave gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::CardSaveGateway end en...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/authorize_net_spec.rb
Ruby
bsd-3-clause
229
main
682
require 'spec_helper' describe Spree::Gateway::AuthorizeNet do let (:gateway) { described_class.create!(name: 'Authorize.net', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a AuthorizeNet gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::AuthorizeNetGa...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/pay_junction_spec.rb
Ruby
bsd-3-clause
229
main
687
require 'spec_helper' describe Spree::Gateway::PayJunction do let(:gateway) { described_class.create!(name: 'PayJunction', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a PayJunction gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::PayJunctionGateway ...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/usa_epay_transaction_spec.rb
Ruby
bsd-3-clause
229
main
1,630
require 'spec_helper' describe Spree::Gateway::UsaEpayTransaction do before do Spree::Gateway.update_all(active: false) @gateway = Spree::Gateway::UsaEpayTransaction.create!(name: 'USA EPay Gateway', active: true, stores: [::Spree::Store.default]) @gateway.set_preference(:login, '0r19zQBdp5nS8i3t4hFxz0di...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/secure_pay_au_spec.rb
Ruby
bsd-3-clause
229
main
338
require 'spec_helper' describe Spree::Gateway::SecurePayAU do let(:gateway) { described_class.create!(name: 'SecurePayAU', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a SecurePayAU gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::SecurePayAuGateway ...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/pay_pal_spec.rb
Ruby
bsd-3-clause
229
main
324
require 'spec_helper' describe Spree::Gateway::PayPalGateway do let(:gateway) { described_class.create!(name: 'PayPal', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a PayPal gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::PaypalGateway end end...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/balanced_gateway_spec.rb
Ruby
bsd-3-clause
229
main
477
require 'spec_helper' describe Spree::Gateway::BalancedGateway do let(:gateway) { described_class.create!(name: 'Balanced', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a Balanced gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::BalancedGateway e...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/moneris_spec.rb
Ruby
bsd-3-clause
229
main
321
require 'spec_helper' describe Spree::Gateway::Moneris do let(:gateway) { described_class.create!(name: 'Moneris', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a Moneris gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::MonerisGateway end end en...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/pin_gateway_spec.rb
Ruby
bsd-3-clause
229
main
1,614
require 'spec_helper' describe Spree::Gateway::PinGateway do before do Spree::Gateway.update_all(active: false) @gateway = described_class.create!(name: 'Pin Gateway', active: true, stores: [::Spree::Store.default]) @gateway.set_preference(:api_key, 'W_VzkRCZSILiKWUS-dndUg') @gateway.save! coun...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/data_cash_spec.rb
Ruby
bsd-3-clause
229
main
325
require 'spec_helper' describe Spree::Gateway::DataCash do let(:gateway) { described_class.create!(name: 'DataCash', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a DataCash gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::DataCashGateway end en...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/maxipago_spec.rb
Ruby
bsd-3-clause
229
main
407
require 'spec_helper' describe Spree::Gateway::Maxipago do let(:gateway) { described_class.create!(name: 'Maxipago') } context '.provider_class' do it 'is a Maxipago gateway' do expect(subject.provider_class).to eq ::ActiveMerchant::Billing::MaxipagoGateway end end context '.auto_capture?' do ...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/payflow_pro_spec.rb
Ruby
bsd-3-clause
229
main
673
require 'spec_helper' describe Spree::Gateway::PayflowPro do let(:gateway) { described_class.create!(name: 'PayflowPro', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a Payflow gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::PayflowGateway end ...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/cyber_source_spec.rb
Ruby
bsd-3-clause
229
main
304
require 'spec_helper' describe Spree::Gateway::CyberSource do let(:gateway) { described_class.create!(name: 'CyberSource') } context '.provider_class' do it 'is a CyberSource gateway' do expect(subject.provider_class).to eq ::ActiveMerchant::Billing::CyberSourceGateway end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/eway_rapid_spec.rb
Ruby
bsd-3-clause
229
main
707
require 'spec_helper' describe Spree::Gateway::EwayRapid do let(:gateway) { described_class.create!(name: 'eWAY Rapid', stores: [::Spree::Store.default]) } describe '#provider_class' do it 'should be an eWAY Rapid gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::EwayRapidGatew...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/stripe_gateway_spec.rb
Ruby
bsd-3-clause
229
main
5,763
require 'spec_helper' describe Spree::Gateway::StripeGateway do let(:secret_key) { 'key' } let(:email) { 'customer@example.com' } let(:source) { Spree::CreditCard.new } let(:payment) { double('Spree::Payment', source: source, order: double('Spree::Order', email: email, bill_add...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/worldpay_spec.rb
Ruby
bsd-3-clause
229
main
326
require 'spec_helper' describe Spree::Gateway::Worldpay do let(:gateway) { described_class.create!(name: 'Worldpay', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a Worldpay gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::WorldpayGateway end en...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/beanstream_spec.rb
Ruby
bsd-3-clause
229
main
477
require 'spec_helper' describe Spree::Gateway::Beanstream do let(:gateway) { described_class.create!(name: 'Beanstream', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a Beanstream gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::BeanstreamGateway ...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/stripe_ach_gateway_spec.rb
Ruby
bsd-3-clause
229
main
5,222
require 'spec_helper' describe Spree::Gateway::StripeAchGateway do let(:secret_key) { 'key' } let(:email) { 'customer@example.com' } let(:source) { Spree::Check.new } let(:payment) { double('Spree::Payment', source: source, order: double('Spree::Order', email:...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/paymill_spec.rb
Ruby
bsd-3-clause
229
main
322
require 'spec_helper' describe Spree::Gateway::Paymill do let(:gateway) { described_class.create!(name: 'Paymill', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a Paymill gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::PaymillGateway end end en...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/epay_spec.rb
Ruby
bsd-3-clause
229
main
310
require 'spec_helper' describe Spree::Gateway::Epay do let(:gateway) { described_class.create!(name: 'Epay', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a Epay gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::EpayGateway end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/eway_spec.rb
Ruby
bsd-3-clause
229
main
793
require 'spec_helper' describe Spree::Gateway::Eway do let(:gateway) { described_class.create!(name: 'Eway', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a Eway gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::EwayGateway end end context '.a...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/sage_pay_spec.rb
Ruby
bsd-3-clause
229
main
321
require 'spec_helper' describe Spree::Gateway::SagePay do let(:gateway) { described_class.create!(name: 'SagePay', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a SagePay gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::SagePayGateway end end en...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/quickpay_spec.rb
Ruby
bsd-3-clause
229
main
336
require 'spec_helper' describe Spree::Gateway::Quickpay do let(:gateway) { described_class.create!(name: 'QuickpayGateway', stores: [::Spree::Store.default]) } context '.provider_class' do it 'is a Quickpay gateway' do expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::QuickpayV10Gateway ...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/models/gateway/braintree_gateway_spec.rb
Ruby
bsd-3-clause
229
main
15,143
require 'spec_helper' require 'pry' describe Spree::Gateway::BraintreeGateway do before do country = Spree::Country.find_by(name: 'United States of America') country.update(name: 'United States', iso_name: 'UNITED STATES', iso3: 'USA', iso: 'US', numcode: 840) state = create(:state, name: 'Maryland', abb...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/requests/apple_pay_domain_verification.rb
Ruby
bsd-3-clause
229
main
1,222
require 'spec_helper' describe 'Apple Pay Domain Verification', type: :request do let(:domain_verification_certificate) { FFaker::Lorem.characters(20) } let(:stripe_apple_pay_payment_method) do Spree::Gateway::StripeApplePayGateway.create!( name: 'ApplePay', preferred_domain_verification_certificat...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/requests/spree/api/v2/storefront/intents_controller_spec.rb
Ruby
bsd-3-clause
229
main
6,269
require 'spec_helper' describe 'Api V2 Storefront Intents Spec', type: :request do let!(:store) { Spree::Store.default } let(:currency) { store.default_currency } let(:user) { create(:user) } let(:order) { create(:order, user: user, store: store, currency: currency) } include_context 'API v2 tokens' des...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/support/within_stripe_3ds_popup.rb
Ruby
bsd-3-clause
229
main
220
def within_stripe_3ds_popup using_wait_time(10) do within_frame 0 do within_frame 0 do expect(page).to have_text('3D Secure 2 Test Page', normalize_ws: true) yield end end end end
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/support/wait_for_stripe.rb
Ruby
bsd-3-clause
229
main
786
module WaitForStripe def wait_for_stripe Timeout.timeout(Capybara.default_max_wait_time) do loop until page.evaluate_script('window.activeStripeRequests').zero? end end def setup_stripe_watcher page.evaluate_script <<-JS window.activeStripeRequests = 0; $('#checkout_form_payment [da...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/support/order_walktrough.rb
Ruby
bsd-3-clause
229
main
2,100
class OrderWalkthrough def self.up_to(state) # A default store must exist to provide store settings store = Spree::Store.default || FactoryBot.create(:store, default: true) # A payment method must exist for an order to proceed through the Address state unless Spree::PaymentMethod.exists? Factor...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/features/stripe_elements_3ds_checkout_spec.rb
Ruby
bsd-3-clause
229
main
8,441
# frozen_string_literal: true require 'spec_helper' describe 'Stripe Elements 3ds checkout', type: :feature, js: true do let!(:product) { create(:product, name: 'RoR Mug') } let!(:stripe_payment_method) do Spree::Gateway::StripeElementsGateway.create!( name: 'Stripe', preferred_secret_key: 'sk...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/features/stripe_checkout_spec.rb
Ruby
bsd-3-clause
229
main
5,161
require 'spec_helper' describe "Stripe checkout", type: :feature, js: true do let!(:country) { create(:country, :states_required => true) } let!(:state) { create(:state, :country => country) } let!(:shipping_method) { create(:shipping_method) } let!(:stock_location) { create(:stock_location) } let!(:mug) { c...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/features/admin/stripe_elements_payment_spec.rb
Ruby
bsd-3-clause
229
main
3,173
require 'spec_helper' describe 'Admin Panel Stripe elements payment', type: :feature, js: true do stub_authorization! let!(:country) { create(:country, states_required: true) } let!(:state) { create(:state, country: country) } let!(:shipping_method) { create(:shipping_method) } let!(:stock_location) { creat...
github
spree-contrib/spree_gateway
https://github.com/spree-contrib/spree_gateway
spec/factories/check_factory.rb
Ruby
bsd-3-clause
229
main
328
FactoryBot.define do factory :check, class: Spree::Check do account_holder_name { 'John Doe' } account_holder_type { 'Individual' } account_type { 'checking' } routing_number { '110000000' } account_number { '000123456789' } association(:payment_method, factory: :credit_card_payment_method) ...
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
sidekiq_monitor.gemspec
Ruby
mit
229
master
725
require File.expand_path('../lib/sidekiq/monitor/version', __FILE__) Gem::Specification.new do |s| s.authors = ["Tom Benner"] s.email = ["tombenner@gmail.com"] s.description = s.summary = %q{Advanced monitoring for Sidekiq} s.homepage = "https://github.com/socialpandas/sidekiq_monitor" s....
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
lib/generators/sidekiq/monitor/install/install_generator.rb
Ruby
mit
229
master
752
require 'rails/generators' require 'rails/generators/base' module Sidekiq module Monitor module Generators class InstallGenerator < ::Rails::Generators::Base include ::Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) desc "Install the migrations" ...
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
lib/generators/sidekiq/monitor/install/templates/create_sidekiq_jobs.rb
Ruby
mit
229
master
694
class CreateSidekiqJobs < ActiveRecord::Migration def change create_table :sidekiq_jobs do |t| t.string :jid t.string :queue t.string :class_name t.text :args t.boolean :retry t.datetime :enqueued_at t.datetime :started_at t.datetime :finished_at t.string :sta...
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
lib/sidekiq/monitor.rb
Ruby
mit
229
master
1,261
require 'slim' require 'jquery-datatables-rails' require 'rails-datatables' directory = File.dirname(File.absolute_path(__FILE__)) Dir.glob("#{directory}/monitor/**/*.rb") { |file| require file } # Require JobsDatatable to expose JobsDatatable.add_search_filter Dir.glob("#{directory}/../../app/datatables/sidekiq/monit...
github
socialpandas/sidekiq_monitor
https://github.com/socialpandas/sidekiq_monitor
lib/sidekiq/monitor/custom_views.rb
Ruby
mit
229
master
487
module Sidekiq module Monitor class CustomViews @views = [] class << self def add(name, path, &block) @views << { name: name, path: path, filter: block } end def for_job(job) views = [] @views.each do...