corrency 0.2.0 → 0.3.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.
- data/.gitignore +2 -7
- data/.rvmrc +1 -1
- data/Gemfile +2 -14
- data/README.md +23 -0
- data/Rakefile +7 -12
- data/corrency.gemspec +4 -9
- data/features/nice_rounding.feature +15 -0
- data/features/profit_margin_calculations.feature +17 -0
- data/features/step_definitions/nice_rounding_steps.rb +4 -0
- data/features/step_definitions/profit_margin_calculations_steps.rb +12 -0
- data/features/step_definitions/vat_calculations_steps.rb +17 -0
- data/features/support/env.rb +6 -0
- data/features/vat_calculations.feature +29 -0
- data/lib/core_ext/big_decimal.rb +5 -1
- data/lib/corrency/version.rb +1 -1
- data/test/big_decimal_test.rb +10 -50
- data/test/corrency_test.rb +9 -17
- data/test/test_helper.rb +4 -23
- metadata +35 -128
- data/Gemfile.lock +0 -111
- data/README.rdoc +0 -16
- data/test/dummy/Rakefile +0 -7
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/controllers/products_controller.rb +0 -6
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/helpers/products_helper.rb +0 -2
- data/test/dummy/app/models/product.rb +0 -2
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/app/views/products/show.html.erb +0 -4
- data/test/dummy/config/application.rb +0 -45
- data/test/dummy/config/boot.rb +0 -10
- data/test/dummy/config/database.yml +0 -22
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -26
- data/test/dummy/config/environments/production.rb +0 -49
- data/test/dummy/config/environments/test.rb +0 -35
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/corrency.rb +0 -1
- data/test/dummy/config/initializers/inflections.rb +0 -10
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/config/initializers/session_store.rb +0 -8
- data/test/dummy/config/locales/en.yml +0 -5
- data/test/dummy/config/routes.rb +0 -3
- data/test/dummy/config.ru +0 -4
- data/test/dummy/db/migrate/20110511100318_create_products.rb +0 -14
- data/test/dummy/db/schema.rb +0 -22
- data/test/dummy/public/404.html +0 -26
- data/test/dummy/public/422.html +0 -26
- data/test/dummy/public/500.html +0 -26
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/javascripts/application.js +0 -2
- data/test/dummy/public/javascripts/controls.js +0 -965
- data/test/dummy/public/javascripts/dragdrop.js +0 -974
- data/test/dummy/public/javascripts/effects.js +0 -1123
- data/test/dummy/public/javascripts/prototype.js +0 -6001
- data/test/dummy/public/javascripts/rails.js +0 -191
- data/test/dummy/public/stylesheets/.gitkeep +0 -0
- data/test/dummy/script/rails +0 -6
- data/test/integration/product_price_test.rb +0 -18
- data/test/support/integration_case.rb +0 -5
data/.gitignore
CHANGED
data/.rvmrc
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rvm use 1.9.
|
1
|
+
rvm use 1.9.3@corrency --create
|
data/Gemfile
CHANGED
@@ -1,15 +1,3 @@
|
|
1
|
-
source
|
1
|
+
source :rubygems
|
2
2
|
|
3
|
-
|
4
|
-
gem "rake", "0.8.7"
|
5
|
-
gem "capybara", ">= 0.4.0"
|
6
|
-
gem "shoulda"
|
7
|
-
gem "sqlite3"
|
8
|
-
gem "jeweler", "~> 1.6.0"
|
9
|
-
gem "rcov", ">= 0"
|
10
|
-
gem "bundler", "~> 1.0.0"
|
11
|
-
gem "rails", ">=3.0.0"
|
12
|
-
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
|
13
|
-
# gem 'ruby-debug'
|
14
|
-
# gem 'ruby-debug19'
|
15
|
-
end
|
3
|
+
gemspec
|
data/README.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# Corrency - Useful Ecommerce Core extensions
|
2
|
+
|
3
|
+
# Usage
|
4
|
+
|
5
|
+
```ruby
|
6
|
+
# Configure the VAT rate
|
7
|
+
Corrency::Config.vat_rate = 20.00
|
8
|
+
|
9
|
+
# Add VAT
|
10
|
+
BigDecimal.new('10.00').inc_vat # 12.00
|
11
|
+
|
12
|
+
# Remove VAT
|
13
|
+
BigDecimal.new('12.00').ex_vat # 10.00
|
14
|
+
|
15
|
+
# Roll up to nearest 99p
|
16
|
+
BigDecimal.new('12.76').next_ninety_nine # 12.99
|
17
|
+
|
18
|
+
# Add 10% Margin
|
19
|
+
BigDecimal.new('90.00').add_margin(10.00) # 100.00
|
20
|
+
```
|
21
|
+
|
22
|
+
# Copyright
|
23
|
+
Copyright (c) 2012 Robert Williams. See MIT-LICENSE for further details.
|
data/Rakefile
CHANGED
@@ -1,15 +1,14 @@
|
|
1
|
-
# encoding: UTF-8
|
2
1
|
require 'rubygems'
|
3
2
|
begin
|
4
|
-
require 'bundler
|
3
|
+
require 'bundler'
|
5
4
|
rescue LoadError
|
6
5
|
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
exit
|
7
7
|
end
|
8
8
|
|
9
|
-
require '
|
10
|
-
require 'rake/rdoctask'
|
9
|
+
require 'bundler/gem_tasks'
|
11
10
|
require 'rake/testtask'
|
12
|
-
require
|
11
|
+
require 'cucumber/rake/task'
|
13
12
|
|
14
13
|
Rake::TestTask.new(:test) do |t|
|
15
14
|
t.libs << 'lib'
|
@@ -18,12 +17,8 @@ Rake::TestTask.new(:test) do |t|
|
|
18
17
|
t.verbose = false
|
19
18
|
end
|
20
19
|
|
21
|
-
task :default => :test
|
20
|
+
task :default => [:features, :test]
|
22
21
|
|
23
|
-
Rake::
|
24
|
-
|
25
|
-
rdoc.title = 'Corrency'
|
26
|
-
rdoc.options << '--line-numbers' << '--inline-source'
|
27
|
-
rdoc.rdoc_files.include('README.rdoc')
|
28
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
22
|
+
Cucumber::Rake::Task.new(:features) do |t|
|
23
|
+
t.cucumber_opts = "features --format=pretty"
|
29
24
|
end
|
data/corrency.gemspec
CHANGED
@@ -19,12 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
21
|
# specify any dependencies here; for example:
|
22
|
-
s.add_development_dependency
|
23
|
-
s.add_development_dependency
|
24
|
-
s.add_development_dependency
|
25
|
-
|
26
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
27
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
28
|
-
s.add_development_dependency(%q<rails>, [">= 3.0.0"])
|
29
|
-
# s.add_runtime_dependency "rest-client"
|
30
|
-
end
|
22
|
+
s.add_development_dependency "rake"
|
23
|
+
s.add_development_dependency "cucumber"
|
24
|
+
s.add_development_dependency "shoulda-context"
|
25
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Feature: Nice Rounding
|
2
|
+
In order to make prices look nicer to customers
|
3
|
+
As a user of the Corrency Library
|
4
|
+
I should be able to round a number up to the nearest 99
|
5
|
+
|
6
|
+
Scenario Outline: Rolling Prices up to the next ninety nine
|
7
|
+
Given there is a value of <price>
|
8
|
+
Then I should have a price nearest ninety nine of <nice_price>
|
9
|
+
|
10
|
+
Examples:
|
11
|
+
| price | nice_price |
|
12
|
+
| 61.33 | 61.99 |
|
13
|
+
| 90.00 | 89.99 |
|
14
|
+
| 100.00 | 99.99 |
|
15
|
+
| 3.43 | 3.99 |
|
@@ -0,0 +1,17 @@
|
|
1
|
+
Feature: Profit Margin Calculations
|
2
|
+
In order to make the correct amount of profit on an item
|
3
|
+
As a user of the Corrency Library
|
4
|
+
I should be able to work out profit margins correctly.
|
5
|
+
|
6
|
+
Scenario Outline: Adding profit margin to costs
|
7
|
+
Given there is a cost of <cost>
|
8
|
+
And I apply a margin of <margin>
|
9
|
+
Then I should have a value of <price>
|
10
|
+
|
11
|
+
Examples:
|
12
|
+
| cost | margin | price |
|
13
|
+
| 61.33 | 28% | 85.18 |
|
14
|
+
| 90.00 | 10% | 100.00 |
|
15
|
+
| 100.00 | 20% | 125.00 |
|
16
|
+
| 3.43 | 12.3% | 3.91 |
|
17
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Given /^there is a cost of (.+)$/ do |cost|
|
2
|
+
@meh = BigDecimal.new(cost)
|
3
|
+
end
|
4
|
+
|
5
|
+
Given /^I apply a margin of (.+)%$/ do |margin|
|
6
|
+
margin = margin.strip.to_f
|
7
|
+
@margin = @meh.add_margin(margin)
|
8
|
+
end
|
9
|
+
|
10
|
+
Then /^I should have a value of (.+)$/ do |price|
|
11
|
+
assert_equal(BigDecimal.new(price).to_s, @margin.to_s)
|
12
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
Given /^there is a value of (.+)$/ do |value|
|
2
|
+
@meh = BigDecimal.new(value)
|
3
|
+
end
|
4
|
+
|
5
|
+
Given /^I configure the VAT rate to (.+)%$/ do |vat_rate|
|
6
|
+
Corrency::Config.vat_rate = vat_rate
|
7
|
+
end
|
8
|
+
|
9
|
+
Then /^I should have a total inc vat of (.+)$/ do |price|
|
10
|
+
@price_inc_vat = @meh.inc_vat
|
11
|
+
assert_equal(BigDecimal.new(price).to_s, @price_inc_vat.to_s)
|
12
|
+
end
|
13
|
+
|
14
|
+
Then /^I should have a total ex vat of (.+)$/ do |price|
|
15
|
+
@price_ex_vat = @meh.ex_vat
|
16
|
+
assert_equal(BigDecimal.new(price).to_s, @price_ex_vat.to_s)
|
17
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
Feature: VAT Calculations
|
2
|
+
In order to charge customers the correct amount of VAT
|
3
|
+
As a user of the Corrency Library
|
4
|
+
I should be able to work out VAT correctly.
|
5
|
+
|
6
|
+
Scenario Outline: Adding VAT to price
|
7
|
+
Given there is a value of <price>
|
8
|
+
And I configure the VAT rate to <vat_rate>
|
9
|
+
Then I should have a total inc vat of <total>
|
10
|
+
|
11
|
+
Examples:
|
12
|
+
| price | vat_rate | total |
|
13
|
+
| 61.33 | 20% | 73.60 |
|
14
|
+
| 90.00 | 17.5% | 105.75 |
|
15
|
+
| 100.00 | 20% | 120.00 |
|
16
|
+
| 3.43 | 20% | 4.12 |
|
17
|
+
|
18
|
+
Scenario Outline: Removing VAT from price
|
19
|
+
Given there is a value of <price>
|
20
|
+
And I configure the VAT rate to <vat_rate>
|
21
|
+
Then I should have a total ex vat of <total>
|
22
|
+
|
23
|
+
Examples:
|
24
|
+
| price | vat_rate | total |
|
25
|
+
| 73.60 | 20% | 61.33 |
|
26
|
+
| 105.75 | 17.5% | 90.00 |
|
27
|
+
| 120.00 | 20% | 100.00 |
|
28
|
+
| 4.12 | 20% | 3.43 |
|
29
|
+
|
data/lib/core_ext/big_decimal.rb
CHANGED
@@ -15,6 +15,10 @@ class BigDecimal
|
|
15
15
|
self.ceil - BigDecimal.new("0.01")
|
16
16
|
end
|
17
17
|
|
18
|
+
def add_margin(margin)
|
19
|
+
((self / (100 - margin)) * 100).to_d.round(2)
|
20
|
+
end
|
21
|
+
|
18
22
|
old_to_s = instance_method :to_s
|
19
23
|
|
20
24
|
define_method :to_s do |*param|
|
@@ -25,4 +29,4 @@ class BigDecimal
|
|
25
29
|
def vat_rate
|
26
30
|
1 + (Corrency::Config.vat_rate.to_f / 100)
|
27
31
|
end
|
28
|
-
end
|
32
|
+
end
|
data/lib/corrency/version.rb
CHANGED
data/test/big_decimal_test.rb
CHANGED
@@ -1,60 +1,20 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
should "return the correct total inc vat" do
|
12
|
-
assert_equal(BigDecimal.new((@bd * (Corrency::Config.vat_rate.to_f / 100 + 1)).to_s), @bd.inc_vat)
|
13
|
-
end
|
14
|
-
|
15
|
-
should "return a BigDecimal" do
|
16
|
-
assert_equal(BigDecimal, @bd.inc_vat.class)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
context "ex_vat" do
|
21
|
-
|
22
|
-
should "return the correct total inc vat" do
|
23
|
-
assert_equal(BigDecimal.new((@bd / (Corrency::Config.vat_rate.to_f / 100 + 1)).to_s), @bd.ex_vat)
|
24
|
-
end
|
25
|
-
|
26
|
-
should "return a BigDecimal" do
|
27
|
-
assert_equal(BigDecimal, @bd.ex_vat.class)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
context "next_ninety_nine" do
|
32
|
-
|
33
|
-
should "return the next nearest 0.99 decimal" do
|
34
|
-
assert_equal(BigDecimal.new("100.99"), @bd.next_ninety_nine)
|
35
|
-
end
|
36
|
-
|
37
|
-
should "return a BigDecimal" do
|
38
|
-
assert_equal(BigDecimal, @bd.next_ninety_nine.class)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
context "to_s" do
|
43
|
-
|
44
|
-
should "return a string rounded to 2 decimal places" do
|
45
|
-
assert_equal(@bd.round(2).to_s, @bd.to_s)
|
46
|
-
end
|
47
|
-
|
48
|
-
should "return the correct class" do
|
49
|
-
assert_equal(String, @bd.to_s.class)
|
3
|
+
describe BigDecimal do
|
4
|
+
|
5
|
+
describe "#to_s" do
|
6
|
+
|
7
|
+
it "should return a string rounded to 2 decimal places" do
|
8
|
+
@bd = BigDecimal.new('100.3799')
|
9
|
+
assert_equal("100.38", BigDecimal.new("100.38000123").to_s)
|
50
10
|
end
|
51
11
|
|
52
|
-
|
12
|
+
it "should round to two decimal places if 0" do
|
53
13
|
assert_equal "0.00", BigDecimal.new("0").to_s
|
54
14
|
end
|
55
15
|
|
56
|
-
|
16
|
+
it "should round to two decimal places if 1.20" do
|
57
17
|
assert_equal "1.20", BigDecimal.new("1.2").to_s
|
58
18
|
end
|
59
19
|
end
|
60
|
-
end
|
20
|
+
end
|
data/test/corrency_test.rb
CHANGED
@@ -1,25 +1,17 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
|
-
|
3
|
+
describe Corrency do
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
it "should have a default vat_rate" do
|
6
|
+
Corrency::Config.vat_rate.must_equal Corrency::DEFAULT_VAT_RATE
|
7
7
|
end
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
assert_equal Corrency::Config.vat_rate.class, Float
|
13
|
-
end
|
14
|
-
|
15
|
-
should "set vat_rate" do
|
16
|
-
Corrency::Config.vat_rate = 17.50
|
17
|
-
assert_equal 17.50, Corrency::Config.vat_rate
|
18
|
-
end
|
9
|
+
it "should set vat_rate" do
|
10
|
+
Corrency::Config.vat_rate = 17.50
|
11
|
+
Corrency::Config.vat_rate.must_equal 17.50
|
19
12
|
end
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
Corrency::Config.vat_rate = @old_vat_rate
|
13
|
+
|
14
|
+
after do
|
15
|
+
Corrency::Config.vat_rate = Corrency::DEFAULT_VAT_RATE
|
24
16
|
end
|
25
17
|
end
|
data/test/test_helper.rb
CHANGED
@@ -1,23 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
require
|
5
|
-
require "rails/test_help"
|
6
|
-
require 'shoulda'
|
7
|
-
|
8
|
-
ActionMailer::Base.delivery_method = :test
|
9
|
-
ActionMailer::Base.perform_deliveries = true
|
10
|
-
ActionMailer::Base.default_url_options[:host] = "test.com"
|
11
|
-
|
12
|
-
Rails.backtrace_cleaner.remove_silencers!
|
13
|
-
|
14
|
-
# Configure capybara for integration testing
|
15
|
-
require "capybara/rails"
|
16
|
-
Capybara.default_driver = :rack_test
|
17
|
-
Capybara.default_selector = :css
|
18
|
-
|
19
|
-
# Run any available migration
|
20
|
-
ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
|
21
|
-
|
22
|
-
# Load support files
|
23
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), '../', 'lib')
|
2
|
+
require 'corrency'
|
3
|
+
require 'minitest/spec'
|
4
|
+
require 'minitest/autorun'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: corrency
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,33 +9,27 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-11-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement:
|
15
|
+
name: rake
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0
|
21
|
+
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: shoulda
|
27
|
-
requirement: &70199186559660 !ruby/object:Gem::Requirement
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
25
|
none: false
|
29
26
|
requirements:
|
30
27
|
- - ! '>='
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: '0'
|
33
|
-
type: :development
|
34
|
-
prerelease: false
|
35
|
-
version_requirements: *70199186559660
|
36
30
|
- !ruby/object:Gem::Dependency
|
37
|
-
name:
|
38
|
-
requirement:
|
31
|
+
name: cucumber
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
39
33
|
none: false
|
40
34
|
requirements:
|
41
35
|
- - ! '>='
|
@@ -43,51 +37,28 @@ dependencies:
|
|
43
37
|
version: '0'
|
44
38
|
type: :development
|
45
39
|
prerelease: false
|
46
|
-
version_requirements:
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: jeweler
|
49
|
-
requirement: &70199186557020 !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
|
-
requirements:
|
52
|
-
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 1.6.0
|
55
|
-
type: :development
|
56
|
-
prerelease: false
|
57
|
-
version_requirements: *70199186557020
|
58
|
-
- !ruby/object:Gem::Dependency
|
59
|
-
name: rcov
|
60
|
-
requirement: &70199186554800 !ruby/object:Gem::Requirement
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
61
41
|
none: false
|
62
42
|
requirements:
|
63
43
|
- - ! '>='
|
64
44
|
- !ruby/object:Gem::Version
|
65
45
|
version: '0'
|
66
|
-
type: :development
|
67
|
-
prerelease: false
|
68
|
-
version_requirements: *70199186554800
|
69
46
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
71
|
-
requirement:
|
47
|
+
name: shoulda-context
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
72
49
|
none: false
|
73
50
|
requirements:
|
74
|
-
- -
|
51
|
+
- - ! '>='
|
75
52
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
53
|
+
version: '0'
|
77
54
|
type: :development
|
78
55
|
prerelease: false
|
79
|
-
version_requirements:
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: rails
|
82
|
-
requirement: &70199186552640 !ruby/object:Gem::Requirement
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
83
57
|
none: false
|
84
58
|
requirements:
|
85
59
|
- - ! '>='
|
86
60
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
88
|
-
type: :development
|
89
|
-
prerelease: false
|
90
|
-
version_requirements: *70199186552640
|
61
|
+
version: '0'
|
91
62
|
description: Adds Ecommerce Extensions to Various Core Libraries it really does
|
92
63
|
email:
|
93
64
|
- rob@r-williams.com
|
@@ -98,57 +69,23 @@ files:
|
|
98
69
|
- .gitignore
|
99
70
|
- .rvmrc
|
100
71
|
- Gemfile
|
101
|
-
- Gemfile.lock
|
102
72
|
- MIT-LICENSE
|
103
|
-
- README.
|
73
|
+
- README.md
|
104
74
|
- Rakefile
|
105
75
|
- corrency.gemspec
|
76
|
+
- features/nice_rounding.feature
|
77
|
+
- features/profit_margin_calculations.feature
|
78
|
+
- features/step_definitions/nice_rounding_steps.rb
|
79
|
+
- features/step_definitions/profit_margin_calculations_steps.rb
|
80
|
+
- features/step_definitions/vat_calculations_steps.rb
|
81
|
+
- features/support/env.rb
|
82
|
+
- features/vat_calculations.feature
|
106
83
|
- lib/core_ext/big_decimal.rb
|
107
84
|
- lib/corrency.rb
|
108
85
|
- lib/corrency/config.rb
|
109
86
|
- lib/corrency/version.rb
|
110
87
|
- test/big_decimal_test.rb
|
111
88
|
- test/corrency_test.rb
|
112
|
-
- test/dummy/Rakefile
|
113
|
-
- test/dummy/app/controllers/application_controller.rb
|
114
|
-
- test/dummy/app/controllers/products_controller.rb
|
115
|
-
- test/dummy/app/helpers/application_helper.rb
|
116
|
-
- test/dummy/app/helpers/products_helper.rb
|
117
|
-
- test/dummy/app/models/product.rb
|
118
|
-
- test/dummy/app/views/layouts/application.html.erb
|
119
|
-
- test/dummy/app/views/products/show.html.erb
|
120
|
-
- test/dummy/config.ru
|
121
|
-
- test/dummy/config/application.rb
|
122
|
-
- test/dummy/config/boot.rb
|
123
|
-
- test/dummy/config/database.yml
|
124
|
-
- test/dummy/config/environment.rb
|
125
|
-
- test/dummy/config/environments/development.rb
|
126
|
-
- test/dummy/config/environments/production.rb
|
127
|
-
- test/dummy/config/environments/test.rb
|
128
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
129
|
-
- test/dummy/config/initializers/corrency.rb
|
130
|
-
- test/dummy/config/initializers/inflections.rb
|
131
|
-
- test/dummy/config/initializers/mime_types.rb
|
132
|
-
- test/dummy/config/initializers/secret_token.rb
|
133
|
-
- test/dummy/config/initializers/session_store.rb
|
134
|
-
- test/dummy/config/locales/en.yml
|
135
|
-
- test/dummy/config/routes.rb
|
136
|
-
- test/dummy/db/migrate/20110511100318_create_products.rb
|
137
|
-
- test/dummy/db/schema.rb
|
138
|
-
- test/dummy/public/404.html
|
139
|
-
- test/dummy/public/422.html
|
140
|
-
- test/dummy/public/500.html
|
141
|
-
- test/dummy/public/favicon.ico
|
142
|
-
- test/dummy/public/javascripts/application.js
|
143
|
-
- test/dummy/public/javascripts/controls.js
|
144
|
-
- test/dummy/public/javascripts/dragdrop.js
|
145
|
-
- test/dummy/public/javascripts/effects.js
|
146
|
-
- test/dummy/public/javascripts/prototype.js
|
147
|
-
- test/dummy/public/javascripts/rails.js
|
148
|
-
- test/dummy/public/stylesheets/.gitkeep
|
149
|
-
- test/dummy/script/rails
|
150
|
-
- test/integration/product_price_test.rb
|
151
|
-
- test/support/integration_case.rb
|
152
89
|
- test/test_helper.rb
|
153
90
|
homepage: ''
|
154
91
|
licenses: []
|
@@ -164,60 +101,30 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
164
101
|
version: '0'
|
165
102
|
segments:
|
166
103
|
- 0
|
167
|
-
hash:
|
104
|
+
hash: 1810353474154341246
|
168
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
106
|
none: false
|
170
107
|
requirements:
|
171
108
|
- - ! '>='
|
172
109
|
- !ruby/object:Gem::Version
|
173
110
|
version: '0'
|
111
|
+
segments:
|
112
|
+
- 0
|
113
|
+
hash: 1810353474154341246
|
174
114
|
requirements: []
|
175
115
|
rubyforge_project: corrency
|
176
|
-
rubygems_version: 1.8.
|
116
|
+
rubygems_version: 1.8.24
|
177
117
|
signing_key:
|
178
118
|
specification_version: 3
|
179
119
|
summary: Adds Ecommerce Extensions to Various Core Libraries
|
180
120
|
test_files:
|
121
|
+
- features/nice_rounding.feature
|
122
|
+
- features/profit_margin_calculations.feature
|
123
|
+
- features/step_definitions/nice_rounding_steps.rb
|
124
|
+
- features/step_definitions/profit_margin_calculations_steps.rb
|
125
|
+
- features/step_definitions/vat_calculations_steps.rb
|
126
|
+
- features/support/env.rb
|
127
|
+
- features/vat_calculations.feature
|
181
128
|
- test/big_decimal_test.rb
|
182
129
|
- test/corrency_test.rb
|
183
|
-
- test/dummy/Rakefile
|
184
|
-
- test/dummy/app/controllers/application_controller.rb
|
185
|
-
- test/dummy/app/controllers/products_controller.rb
|
186
|
-
- test/dummy/app/helpers/application_helper.rb
|
187
|
-
- test/dummy/app/helpers/products_helper.rb
|
188
|
-
- test/dummy/app/models/product.rb
|
189
|
-
- test/dummy/app/views/layouts/application.html.erb
|
190
|
-
- test/dummy/app/views/products/show.html.erb
|
191
|
-
- test/dummy/config.ru
|
192
|
-
- test/dummy/config/application.rb
|
193
|
-
- test/dummy/config/boot.rb
|
194
|
-
- test/dummy/config/database.yml
|
195
|
-
- test/dummy/config/environment.rb
|
196
|
-
- test/dummy/config/environments/development.rb
|
197
|
-
- test/dummy/config/environments/production.rb
|
198
|
-
- test/dummy/config/environments/test.rb
|
199
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
200
|
-
- test/dummy/config/initializers/corrency.rb
|
201
|
-
- test/dummy/config/initializers/inflections.rb
|
202
|
-
- test/dummy/config/initializers/mime_types.rb
|
203
|
-
- test/dummy/config/initializers/secret_token.rb
|
204
|
-
- test/dummy/config/initializers/session_store.rb
|
205
|
-
- test/dummy/config/locales/en.yml
|
206
|
-
- test/dummy/config/routes.rb
|
207
|
-
- test/dummy/db/migrate/20110511100318_create_products.rb
|
208
|
-
- test/dummy/db/schema.rb
|
209
|
-
- test/dummy/public/404.html
|
210
|
-
- test/dummy/public/422.html
|
211
|
-
- test/dummy/public/500.html
|
212
|
-
- test/dummy/public/favicon.ico
|
213
|
-
- test/dummy/public/javascripts/application.js
|
214
|
-
- test/dummy/public/javascripts/controls.js
|
215
|
-
- test/dummy/public/javascripts/dragdrop.js
|
216
|
-
- test/dummy/public/javascripts/effects.js
|
217
|
-
- test/dummy/public/javascripts/prototype.js
|
218
|
-
- test/dummy/public/javascripts/rails.js
|
219
|
-
- test/dummy/public/stylesheets/.gitkeep
|
220
|
-
- test/dummy/script/rails
|
221
|
-
- test/integration/product_price_test.rb
|
222
|
-
- test/support/integration_case.rb
|
223
130
|
- test/test_helper.rb
|