payola-payments 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Rakefile +7 -11
- data/app/assets/javascripts/payola.js +1 -0
- data/app/assets/javascripts/payola/checkout_button.js +62 -0
- data/app/controllers/payola/application_controller.rb +2 -0
- data/app/controllers/payola/transactions_controller.rb +48 -58
- data/app/helpers/payola/price_helper.rb +7 -0
- data/{lib → app/models/concerns}/payola/sellable.rb +11 -1
- data/app/models/payola/affiliate.rb +5 -0
- data/app/models/payola/coupon.rb +5 -0
- data/app/models/payola/sale.rb +15 -4
- data/app/models/payola/stripe_webhook.rb +5 -0
- data/app/services/payola/charge_card.rb +6 -5
- data/app/services/payola/create_sale.rb +9 -5
- data/app/views/payola/transactions/_checkout.html.erb +48 -0
- data/app/views/payola/transactions/_form.html.erb +141 -0
- data/app/views/payola/transactions/iframe.html.erb +2 -0
- data/app/views/payola/transactions/new.html.erb +1 -0
- data/app/views/payola/transactions/show.html.erb +5 -0
- data/app/views/payola/transactions/wait.html.erb +25 -0
- data/config/routes.rb +0 -3
- data/db/migrate/20141001170138_create_payola_sales.rb +4 -4
- data/db/migrate/20141001203541_create_payola_stripe_webhooks.rb +9 -0
- data/db/migrate/20141002013618_create_payola_coupons.rb +10 -0
- data/db/migrate/20141002013701_create_payola_affiliates.rb +11 -0
- data/db/migrate/20141002203725_add_stripe_customer_id_to_sale.rb +6 -0
- data/lib/payola.rb +30 -5
- data/lib/payola/engine.rb +8 -0
- data/lib/payola/version.rb +1 -1
- data/lib/payola/worker.rb +22 -4
- data/spec/concerns/sellable_spec.rb +32 -0
- data/spec/controllers/payola/transactions_controller_spec.rb +7 -0
- data/{test → spec}/dummy/README.rdoc +0 -0
- data/{test → spec}/dummy/Rakefile +0 -0
- data/{test → spec}/dummy/app/assets/javascripts/application.js +1 -0
- data/spec/dummy/app/assets/javascripts/buy.js +2 -0
- data/{test → spec}/dummy/app/assets/stylesheets/application.css +0 -0
- data/spec/dummy/app/assets/stylesheets/buy.css +4 -0
- data/{test → spec}/dummy/app/controllers/application_controller.rb +0 -0
- data/spec/dummy/app/controllers/buy_controller.rb +7 -0
- data/{test → spec}/dummy/app/helpers/application_helper.rb +0 -0
- data/spec/dummy/app/helpers/buy_helper.rb +2 -0
- data/spec/dummy/app/models/product.rb +7 -0
- data/spec/dummy/app/views/buy/index.html.erb +1 -0
- data/{test → spec}/dummy/app/views/layouts/application.html.erb +2 -1
- data/{test → spec}/dummy/bin/bundle +0 -0
- data/{test → spec}/dummy/bin/rails +0 -0
- data/{test → spec}/dummy/bin/rake +0 -0
- data/{test → spec}/dummy/config.ru +0 -0
- data/{test → spec}/dummy/config/application.rb +0 -0
- data/{test → spec}/dummy/config/boot.rb +0 -0
- data/{test → spec}/dummy/config/database.yml +0 -0
- data/{test → spec}/dummy/config/environment.rb +0 -0
- data/{test → spec}/dummy/config/environments/development.rb +0 -0
- data/{test → spec}/dummy/config/environments/production.rb +0 -0
- data/{test → spec}/dummy/config/environments/test.rb +0 -0
- data/{test → spec}/dummy/config/initializers/assets.rb +0 -0
- data/{test → spec}/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/{test → spec}/dummy/config/initializers/cookies_serializer.rb +0 -0
- data/{test → spec}/dummy/config/initializers/filter_parameter_logging.rb +0 -0
- data/{test → spec}/dummy/config/initializers/inflections.rb +0 -0
- data/{test → spec}/dummy/config/initializers/mime_types.rb +0 -0
- data/spec/dummy/config/initializers/payola.rb +5 -0
- data/{test → spec}/dummy/config/initializers/session_store.rb +0 -0
- data/{test → spec}/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/{test → spec}/dummy/config/locales/en.yml +0 -0
- data/{test → spec}/dummy/config/routes.rb +1 -1
- data/{test → spec}/dummy/config/secrets.yml +0 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20141001230848_create_products.rb +11 -0
- data/spec/dummy/db/schema.rb +76 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +7452 -0
- data/spec/dummy/log/test.log +9849 -0
- data/{test → spec}/dummy/public/404.html +0 -0
- data/{test → spec}/dummy/public/422.html +0 -0
- data/{test → spec}/dummy/public/500.html +0 -0
- data/{test → spec}/dummy/public/favicon.ico +0 -0
- data/spec/dummy/spec/controllers/buy_controller_spec.rb +5 -0
- data/spec/dummy/spec/factories/products.rb +9 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0e585aeb88c1555ae8f5292f7c7a9068 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0f0c99469c51f1b2d76b08f481781d09 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/1b54952339cbc96811097cee5f8923b4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/1cbc4f4790f2067a2c161c1eb480f276 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5afa4bc970e0bc781b3500c696ba25ff +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/664efeb51d1b486dcfc30d142db56f3c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/68a3bbdc64a0729b5896fa1e33fce4b1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/aea159adbc0944b120d91d5b578612ba +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b83da90cb58011313e13a97a4a41cb6e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c0b954b40f2881a6d286061bc069643e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c5b3877d49b39932a7557611cefca9a6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ca491e325ff6948be9292f701aa4ce64 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d9856638a3c7b9cfd9d1b884e3b33982 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ddba6e841f28d3005e828fbfffd18b74 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/df935e399019055729aa968bd7062096 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ef82c31948061751bb026663b54484e1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f0b5d4bea0c6cdd1904e1e9a0a45532f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f8018075b7aca72974f4014bbbc75ab5 +0 -0
- data/spec/factories/payola_affiliates.rb +9 -0
- data/spec/factories/payola_coupons.rb +8 -0
- data/spec/factories/product.rb +7 -0
- data/spec/factories/sales.rb +7 -0
- data/spec/models/payola/sale_spec.rb +71 -0
- data/spec/models/payola/stripe_webhook_spec.rb +17 -0
- data/spec/payola_spec.rb +93 -0
- data/spec/services/payola/charge_card_spec.rb +37 -0
- data/spec/services/payola/create_sale_spec.rb +64 -0
- data/spec/spec_helper.rb +73 -0
- data/spec/worker_spec.rb +36 -0
- metadata +275 -81
- data/test/fixtures/payola/sales.yml +0 -11
- data/test/integration/navigation_test.rb +0 -10
- data/test/models/payola/sale_test.rb +0 -9
- data/test/payola_test.rb +0 -7
- data/test/test_helper.rb +0 -15
@@ -1,11 +0,0 @@
|
|
1
|
-
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
2
|
-
|
3
|
-
# This model initially had no columns defined. If you add columns to the
|
4
|
-
# model remove the '{}' from the fixture names and add the columns immediately
|
5
|
-
# below each fixture, per the syntax in the comments below
|
6
|
-
#
|
7
|
-
one: {}
|
8
|
-
# column: value
|
9
|
-
#
|
10
|
-
two: {}
|
11
|
-
# column: value
|
data/test/payola_test.rb
DELETED
data/test/test_helper.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# Configure Rails Environment
|
2
|
-
ENV["RAILS_ENV"] = "test"
|
3
|
-
|
4
|
-
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
|
-
require "rails/test_help"
|
6
|
-
|
7
|
-
Rails.backtrace_cleaner.remove_silencers!
|
8
|
-
|
9
|
-
# Load support files
|
10
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
11
|
-
|
12
|
-
# Load fixtures from the engine
|
13
|
-
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
|
14
|
-
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
15
|
-
end
|