money-rails 1.15.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -6
  3. data/LICENSE +1 -1
  4. data/README.md +121 -102
  5. data/config/locales/money.pt.yml +4 -0
  6. data/lib/money-rails/active_job/money_serializer.rb +19 -0
  7. data/lib/money-rails/active_record/monetizable.rb +17 -7
  8. data/lib/money-rails/configuration.rb +2 -2
  9. data/lib/money-rails/helpers/action_view_extension.rb +1 -1
  10. data/lib/money-rails/hooks.rb +11 -0
  11. data/lib/money-rails/version.rb +3 -1
  12. data/money-rails.gemspec +13 -26
  13. metadata +16 -225
  14. data/Rakefile +0 -84
  15. data/spec/active_record/migration_extensions/schema_statements_spec.rb +0 -101
  16. data/spec/active_record/migration_extensions/table_spec.rb +0 -104
  17. data/spec/active_record/monetizable_spec.rb +0 -1062
  18. data/spec/configuration_spec.rb +0 -147
  19. data/spec/dummy/README.rdoc +0 -261
  20. data/spec/dummy/Rakefile +0 -7
  21. data/spec/dummy/app/assets/config/manifest.js +0 -0
  22. data/spec/dummy/app/assets/javascripts/application.js +0 -15
  23. data/spec/dummy/app/assets/stylesheets/application.css +0 -13
  24. data/spec/dummy/app/controllers/application_controller.rb +0 -3
  25. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  26. data/spec/dummy/app/models/dummy_product.rb +0 -8
  27. data/spec/dummy/app/models/priceable.rb +0 -8
  28. data/spec/dummy/app/models/product.rb +0 -59
  29. data/spec/dummy/app/models/service.rb +0 -5
  30. data/spec/dummy/app/models/transaction.rb +0 -13
  31. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  32. data/spec/dummy/config/application.rb +0 -66
  33. data/spec/dummy/config/boot.rb +0 -13
  34. data/spec/dummy/config/database.yml +0 -25
  35. data/spec/dummy/config/environment.rb +0 -5
  36. data/spec/dummy/config/environments/development.rb +0 -30
  37. data/spec/dummy/config/environments/production.rb +0 -69
  38. data/spec/dummy/config/environments/test.rb +0 -36
  39. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  40. data/spec/dummy/config/initializers/inflections.rb +0 -15
  41. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  42. data/spec/dummy/config/initializers/money.rb +0 -31
  43. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  44. data/spec/dummy/config/initializers/session_store.rb +0 -8
  45. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  46. data/spec/dummy/config/locales/en-GB.yml +0 -11
  47. data/spec/dummy/config/locales/en-US.yml +0 -5
  48. data/spec/dummy/config/locales/en.yml +0 -5
  49. data/spec/dummy/config/locales/it.yml +0 -11
  50. data/spec/dummy/config/mongoid.yml +0 -29
  51. data/spec/dummy/config/routes.rb +0 -3
  52. data/spec/dummy/config.ru +0 -4
  53. data/spec/dummy/db/migrate/20120331190108_create_products.rb +0 -10
  54. data/spec/dummy/db/migrate/20120402080348_add_bonus_cents_to_product.rb +0 -6
  55. data/spec/dummy/db/migrate/20120524052716_create_services.rb +0 -10
  56. data/spec/dummy/db/migrate/20120528181002_create_transactions.rb +0 -11
  57. data/spec/dummy/db/migrate/20120528210103_create_dummy_products.rb +0 -10
  58. data/spec/dummy/db/migrate/20120607210247_add_column_that_allows_nil.rb +0 -5
  59. data/spec/dummy/db/migrate/20120712202655_add_sale_price_cents_to_product.rb +0 -7
  60. data/spec/dummy/db/migrate/20130124023419_add_price_in_a_range_cents_to_products.rb +0 -5
  61. data/spec/dummy/db/migrate/20140110194016_add_validates_method_amount_cents_to_products.rb +0 -5
  62. data/spec/dummy/db/migrate/20141005075025_add_aliased_attr_to_products.rb +0 -5
  63. data/spec/dummy/db/migrate/20150107061030_add_delivery_fee_cents_and_restock_fee_cents_to_product.rb +0 -6
  64. data/spec/dummy/db/migrate/20150126231442_add_reduced_price_to_products.rb +0 -6
  65. data/spec/dummy/db/migrate/20150213234410_add_special_price_to_products.rb +0 -5
  66. data/spec/dummy/db/migrate/20150217222612_add_lambda_price_to_products.rb +0 -5
  67. data/spec/dummy/db/migrate/20150303222230_add_skip_validation_price_cents_to_products.rb +0 -5
  68. data/spec/dummy/db/migrate/20151026220420_add_optional_amount_to_transactions.rb +0 -5
  69. data/spec/dummy/db/schema.rb +0 -59
  70. data/spec/dummy/db/structure.sql +0 -21
  71. data/spec/dummy/public/404.html +0 -26
  72. data/spec/dummy/public/422.html +0 -26
  73. data/spec/dummy/public/500.html +0 -25
  74. data/spec/dummy/public/favicon.ico +0 -0
  75. data/spec/dummy/script/rails +0 -6
  76. data/spec/helpers/action_view_extension_spec.rb +0 -189
  77. data/spec/helpers/form_helper_spec.rb +0 -19
  78. data/spec/money_spec.rb +0 -40
  79. data/spec/mongoid/mongoid_spec.rb +0 -130
  80. data/spec/mongoid/two_spec.rb +0 -80
  81. data/spec/spec_helper.rb +0 -23
  82. data/spec/support/database_cleaner.rb +0 -14
  83. data/spec/test_helpers_spec.rb +0 -72
@@ -1,5 +0,0 @@
1
- # Load the rails application
2
- require File.expand_path('../application', __FILE__)
3
-
4
- # Initialize the rails application
5
- Dummy::Application.initialize!
@@ -1,30 +0,0 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
3
-
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the web server when you make code changes.
7
- config.cache_classes = false
8
-
9
- # Do not eager load code on boot.
10
- config.eager_load = false
11
-
12
- # Show full error reports and disable caching
13
- config.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
15
-
16
- # Don't care if the mailer can't send
17
- config.action_mailer.raise_delivery_errors = false
18
-
19
- # Print deprecation notices to the Rails logger
20
- config.active_support.deprecation = :log
21
-
22
- # Only use best-standards-support built into browsers
23
- config.action_dispatch.best_standards_support = :builtin
24
-
25
- # Do not compress assets
26
- config.assets.compress = false
27
-
28
- # Expands the lines which load the assets
29
- config.assets.debug = true
30
- end
@@ -1,69 +0,0 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
3
-
4
- # Code is not reloaded between requests
5
- config.cache_classes = true
6
-
7
- # Eager load code on boot. This eager loads most of Rails and
8
- # your application in memory, allowing both threaded web servers
9
- # and those relying on copy on write to perform better.
10
- # Rake tasks automatically ignore this option for performance.
11
- config.eager_load = true
12
-
13
- # Full error reports are disabled and caching is turned on
14
- config.consider_all_requests_local = false
15
- config.action_controller.perform_caching = true
16
-
17
- # Disable Rails's static asset server (Apache or nginx will already do this)
18
- config.serve_static_files = false
19
-
20
- # Compress JavaScripts and CSS
21
- config.assets.compress = true
22
-
23
- # Don't fallback to assets pipeline if a precompiled asset is missed
24
- config.assets.compile = false
25
-
26
- # Generate digests for assets URLs
27
- config.assets.digest = true
28
-
29
- # Defaults to Rails.root.join("public/assets")
30
- # config.assets.manifest = YOUR_PATH
31
-
32
- # Specifies the header that your server uses for sending files
33
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
34
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
35
-
36
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
37
- # config.force_ssl = true
38
-
39
- # See everything in the log (default is :info)
40
- # config.log_level = :debug
41
-
42
- # Prepend all log lines with the following tags
43
- # config.log_tags = [ :subdomain, :uuid ]
44
-
45
- # Use a different logger for distributed setups
46
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
47
-
48
- # Use a different cache store in production
49
- # config.cache_store = :mem_cache_store
50
-
51
- # Enable serving of images, stylesheets, and JavaScripts from an asset server
52
- # config.action_controller.asset_host = "http://assets.example.com"
53
-
54
- # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
55
- # config.assets.precompile += %w( search.js )
56
-
57
- # Disable delivery errors, bad email addresses will be ignored
58
- # config.action_mailer.raise_delivery_errors = false
59
-
60
- # Enable threaded mode
61
- # config.threadsafe!
62
-
63
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
64
- # the I18n.default_locale when a translation can not be found)
65
- config.i18n.fallbacks = true
66
-
67
- # Send deprecation notices to registered listeners
68
- config.active_support.deprecation = :notify
69
- end
@@ -1,36 +0,0 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
3
-
4
- # The test environment is used exclusively to run your application's
5
- # test suite. You never need to work with it otherwise. Remember that
6
- # your test database is "scratch space" for the test suite and is wiped
7
- # and recreated between test runs. Don't rely on the data there!
8
- config.cache_classes = true
9
-
10
- # Do not eager load code on boot. This avoids loading your whole application
11
- # just for the purpose of running a single test. If you are using a tool that
12
- # preloads Rails for running tests, you may have to set it to true.
13
- config.eager_load = false
14
-
15
- # Configure static asset server for tests with Cache-Control for performance
16
- config.serve_static_files = true
17
- config.static_cache_control = "public, max-age=3600"
18
-
19
- # Show full error reports and disable caching
20
- config.consider_all_requests_local = true
21
- config.action_controller.perform_caching = false
22
-
23
- # Raise exceptions instead of rendering exception templates
24
- config.action_dispatch.show_exceptions = false
25
-
26
- # Disable request forgery protection in test environment
27
- config.action_controller.allow_forgery_protection = false
28
-
29
- # Tell Action Mailer not to deliver emails to the real world.
30
- # The :test delivery method accumulates sent emails in the
31
- # ActionMailer::Base.deliveries array.
32
- config.action_mailer.delivery_method = :test
33
-
34
- # Print deprecation notices to the stderr
35
- config.active_support.deprecation = :stderr
36
- end
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
- # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
-
6
- # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
- # Rails.backtrace_cleaner.remove_silencers!
@@ -1,15 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new inflection rules using the following format
4
- # (all these examples are active by default):
5
- # ActiveSupport::Inflector.inflections do |inflect|
6
- # inflect.plural /^(ox)$/i, '\1en'
7
- # inflect.singular /^(ox)en/i, '\1'
8
- # inflect.irregular 'person', 'people'
9
- # inflect.uncountable %w( fish sheep )
10
- # end
11
- #
12
- # These inflection rules are supported but not enabled by default:
13
- # ActiveSupport::Inflector.inflections do |inflect|
14
- # inflect.acronym 'RESTful'
15
- # end
@@ -1,5 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone
@@ -1,31 +0,0 @@
1
- # encoding : utf-8
2
-
3
- MoneyRails.configure do |config|
4
-
5
- # To set the default currency
6
- #
7
- config.default_currency = :eur
8
-
9
- # Add some rates
10
- config.add_rate "USD", "CAD", 1.24515
11
- config.add_rate "CAD", "USD", 0.803115
12
-
13
- # To handle the inclusion of validations for monetized fields
14
- # The default value is true
15
- #
16
- config.include_validations = true
17
-
18
- # Register a custom currency
19
- #
20
- config.register_currency = {
21
- priority: 1,
22
- iso_code: "EU4",
23
- name: "Euro with subunit of 4 digits",
24
- symbol: "€",
25
- symbol_first: true,
26
- subunit: "Subcent",
27
- subunit_to_unit: 10000,
28
- thousands_separator: ".",
29
- decimal_mark: ","
30
- }
31
- end
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
- # Make sure the secret is at least 30 characters and all random,
6
- # no regular words or you'll be exposed to dictionary attacks.
7
- Dummy::Application.config.secret_token = 'a296fb1735faa781e147a1a15f644e9a5c74f9fec357b6d0c94983a0700db240c8c1e020f5ed6413f2025f0092cf8a8db9990ab554ee59964c6ef40fe4ba884a'
@@ -1,8 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4
-
5
- # Use the database for sessions instead of the cookie-based default,
6
- # which shouldn't be used to store highly confidential information
7
- # (create the session table with "rails generate session_migration")
8
- # Dummy::Application.config.session_store :active_record_store
@@ -1,14 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
- #
3
- # This file contains settings for ActionController::ParamsWrapper which
4
- # is enabled by default.
5
-
6
- # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
- ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json]
9
- end
10
-
11
- # Disable root element in JSON by default.
12
- ActiveSupport.on_load(:active_record) do
13
- self.include_root_in_json = false
14
- end
@@ -1,11 +0,0 @@
1
- en-GB:
2
- number:
3
- currency:
4
- format:
5
- delimiter: ! ','
6
- format: ! '%u%n'
7
- precision: 2
8
- separator: .
9
- significant: false
10
- strip_insignificant_zeros: false
11
- unit: £
@@ -1,5 +0,0 @@
1
- en-US:
2
- number:
3
- currency:
4
- format:
5
- delimiter: ''
@@ -1,5 +0,0 @@
1
- # Sample localization file for English. Add more files in this directory for other locales.
2
- # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
-
4
- en:
5
- hello: "Hello world"
@@ -1,11 +0,0 @@
1
- it:
2
- number:
3
- currency:
4
- format:
5
- delimiter: "."
6
- format: "%n %u"
7
- precision: 2
8
- separator: ","
9
- significant: false
10
- strip_insignificant_zeros: false
11
- unit: "€"
@@ -1,29 +0,0 @@
1
- development:
2
- # For Mongoid 2.x
3
- host: localhost
4
- database: dummy_development
5
-
6
- # For Mongoid 3.x
7
- sessions:
8
- default:
9
- database: dummy_development
10
- hosts:
11
- - localhost:27017
12
-
13
- test:
14
- # For Mongoid 2.x
15
- host: localhost
16
- database: dummy_test
17
-
18
- # For Mongoid 3.x
19
- sessions:
20
- default:
21
- database: dummy_test
22
- hosts:
23
- - localhost:27017
24
-
25
- clients:
26
- default:
27
- database: dummy_test
28
- hosts:
29
- - localhost:27017
@@ -1,3 +0,0 @@
1
- Rails.application.routes.draw do
2
-
3
- end
data/spec/dummy/config.ru DELETED
@@ -1,4 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run Dummy::Application
@@ -1,10 +0,0 @@
1
- class CreateProducts < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- create_table :products do |t|
4
- t.integer :price_cents
5
- t.integer :discount
6
-
7
- t.timestamps
8
- end
9
- end
10
- end
@@ -1,6 +0,0 @@
1
- class AddBonusCentsToProduct < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- add_column :products, :bonus_cents, :integer
4
-
5
- end
6
- end
@@ -1,10 +0,0 @@
1
- class CreateServices < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- create_table :services do |t|
4
- t.integer :charge_cents
5
- t.integer :discount_cents
6
-
7
- t.timestamps
8
- end
9
- end
10
- end
@@ -1,11 +0,0 @@
1
- class CreateTransactions < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- create_table :transactions do |t|
4
- t.integer :amount_cents
5
- t.integer :tax_cents
6
- t.string :currency
7
-
8
- t.timestamps
9
- end
10
- end
11
- end
@@ -1,10 +0,0 @@
1
- class CreateDummyProducts < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- create_table :dummy_products do |t|
4
- t.string :currency
5
- t.integer :price_cents
6
-
7
- t.timestamps
8
- end
9
- end
10
- end
@@ -1,5 +0,0 @@
1
- class AddColumnThatAllowsNil < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- add_column :products, :optional_price_cents, :integer
4
- end
5
- end
@@ -1,7 +0,0 @@
1
- class AddSalePriceCentsToProduct < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- add_column :products, :sale_price_amount, :integer,
4
- default: 0, null: false
5
- add_column :products, :sale_price_currency_code, :string
6
- end
7
- end
@@ -1,5 +0,0 @@
1
- class AddPriceInARangeCentsToProducts < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- add_column :products, :price_in_a_range_cents, :integer
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddValidatesMethodAmountCentsToProducts < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- add_column :products, :validates_method_amount_cents, :integer
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddAliasedAttrToProducts < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- add_column :products, :aliased_cents, :integer
4
- end
5
- end
@@ -1,6 +0,0 @@
1
- class AddDeliveryFeeCentsAndRestockFeeCentsToProduct < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- add_column :products, :delivery_fee_cents, :integer
4
- add_column :products, :restock_fee_cents, :integer
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- class AddReducedPriceToProducts < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- add_column :products, :reduced_price_cents, :integer
4
- add_column :products, :reduced_price_currency, :string
5
- end
6
- end
@@ -1,5 +0,0 @@
1
- class AddSpecialPriceToProducts < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- add_column :products, :special_price_cents, :integer
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddLambdaPriceToProducts < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- add_column :products, :lambda_price_cents, :integer
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddSkipValidationPriceCentsToProducts < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- add_column :products, :skip_validation_price_cents, :string
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddOptionalAmountToTransactions < (Rails::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
2
- def change
3
- add_column :transactions, :optional_amount_cents, :integer
4
- end
5
- end
@@ -1,59 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 2015_10_26_220420) do
14
-
15
- create_table "dummy_products", force: :cascade do |t|
16
- t.string "currency"
17
- t.integer "price_cents"
18
- t.datetime "created_at"
19
- t.datetime "updated_at"
20
- end
21
-
22
- create_table "products", force: :cascade do |t|
23
- t.integer "price_cents"
24
- t.integer "discount"
25
- t.datetime "created_at"
26
- t.datetime "updated_at"
27
- t.integer "bonus_cents"
28
- t.integer "optional_price_cents"
29
- t.integer "sale_price_amount", default: 0, null: false
30
- t.string "sale_price_currency_code"
31
- t.integer "price_in_a_range_cents"
32
- t.integer "validates_method_amount_cents"
33
- t.integer "aliased_cents"
34
- t.integer "delivery_fee_cents"
35
- t.integer "restock_fee_cents"
36
- t.integer "reduced_price_cents"
37
- t.string "reduced_price_currency"
38
- t.integer "special_price_cents"
39
- t.integer "lambda_price_cents"
40
- t.string "skip_validation_price_cents"
41
- end
42
-
43
- create_table "services", force: :cascade do |t|
44
- t.integer "charge_cents"
45
- t.integer "discount_cents"
46
- t.datetime "created_at"
47
- t.datetime "updated_at"
48
- end
49
-
50
- create_table "transactions", force: :cascade do |t|
51
- t.integer "amount_cents"
52
- t.integer "tax_cents"
53
- t.string "currency"
54
- t.datetime "created_at"
55
- t.datetime "updated_at"
56
- t.integer "optional_amount_cents"
57
- end
58
-
59
- end
@@ -1,21 +0,0 @@
1
- CREATE TABLE "dummy_products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "currency" varchar(255), "price_cents" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL);
2
- CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "price_cents" integer, "discount" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "bonus_cents" integer, "optional_price_cents" integer, "sale_price_amount" integer DEFAULT 0 NOT NULL, "sale_price_currency_code" varchar(255), "price_in_a_range_cents" integer);
3
- CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL);
4
- CREATE TABLE "services" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "charge_cents" integer, "discount_cents" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL);
5
- CREATE TABLE "transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "amount_cents" integer, "tax_cents" integer, "currency" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL);
6
- CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version");
7
- INSERT INTO schema_migrations (version) VALUES ('20120331190108');
8
-
9
- INSERT INTO schema_migrations (version) VALUES ('20120402080348');
10
-
11
- INSERT INTO schema_migrations (version) VALUES ('20120524052716');
12
-
13
- INSERT INTO schema_migrations (version) VALUES ('20120528181002');
14
-
15
- INSERT INTO schema_migrations (version) VALUES ('20120528210103');
16
-
17
- INSERT INTO schema_migrations (version) VALUES ('20120607210247');
18
-
19
- INSERT INTO schema_migrations (version) VALUES ('20120712202655');
20
-
21
- INSERT INTO schema_migrations (version) VALUES ('20130124023419');
@@ -1,26 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The page you were looking for doesn't exist (404)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/404.html -->
21
- <div class="dialog">
22
- <h1>The page you were looking for doesn't exist.</h1>
23
- <p>You may have mistyped the address or the page may have moved.</p>
24
- </div>
25
- </body>
26
- </html>
@@ -1,26 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The change you wanted was rejected (422)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/422.html -->
21
- <div class="dialog">
22
- <h1>The change you wanted was rejected.</h1>
23
- <p>Maybe you tried to change something you didn't have access to.</p>
24
- </div>
25
- </body>
26
- </html>
@@ -1,25 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>We're sorry, but something went wrong (500)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/500.html -->
21
- <div class="dialog">
22
- <h1>We're sorry, but something went wrong.</h1>
23
- </div>
24
- </body>
25
- </html>
File without changes
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
-
4
- APP_PATH = File.expand_path('../../config/application', __FILE__)
5
- require File.expand_path('../../config/boot', __FILE__)
6
- require 'rails/commands'