sk_calc 0.0.3 → 0.0.4

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.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MWE1ZTA5MmYzYjE5MjM4NmRmNjA1ZTk1YWJjMTkxN2QzYTI0YmExYQ==
5
+ data.tar.gz: !binary |-
6
+ MjEzY2E4NTgwNjhmNmNkNTI1M2FmYzU2NjEyZDhkNmUxY2IwYjBmYw==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ NjIzZmU0YTk5YmRlNTJhMTUzYTFmZmY4ODdkNTllN2ZkYzE4YTI2NDdmOGE1
10
+ MDNlNjkxZTdiNzhiMTU0YzQzYzliOTU2ODRmN2EzN2Y4MDU0NzQ5YTUyNzFm
11
+ YTZmYjUyMzc2NjliYjNkYThhNGMwYTk5YTk5MjgyNzNmZWE4OTc=
12
+ data.tar.gz: !binary |-
13
+ NTA5MzdhMDM3ZjY2YmQyNGJhYjY3OTg0MDc5NjUxYmMyMTc0MGQ4MjM5MmU2
14
+ N2U5NTRjNGM3ZTQ4Y2Y3MmU4ZTQ4MjM1MjI5MWE4ZmQwN2U5YzMzYWUwM2Ey
15
+ MjUyN2QzYjk3YmZmZmMwMWQyMDZiYzczYjRiZWUyNTIwMzgxOGQ=
data/.gitignore CHANGED
@@ -1,9 +1,6 @@
1
1
  .rvmrc
2
- nbproject/*
3
2
  coverage/*
4
3
  rdoc/*
5
4
  pkg/*
6
- ci/Gemfile.lock
7
- ci/vendor
8
- ci/.bundle
5
+ Gemfile.lock
9
6
  spec/settings.yml
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ rvm:
2
+ - 1.8.7
3
+ - 1.9.2
4
+ - 1.9.3
data/Gemfile CHANGED
@@ -1,4 +1,2 @@
1
1
  source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in ..gemspec
4
2
  gemspec
data/README.rdoc CHANGED
@@ -1,4 +1,5 @@
1
1
  = SalesKing Calculation
2
+ {<img src="https://secure.travis-ci.org/salesking/sk_calc.png?branch=master" alt="Build Status" />}[http://travis-ci.org/salesking/sk_calc]
2
3
 
3
4
  Why?
4
5
 
@@ -6,10 +7,10 @@ Why?
6
7
  2. Ever stumbled upon rounding problems, when calculating totals?
7
8
  3. Wouldn't it be nice to change a calculation strategy?
8
9
 
9
- We decided to open-source this part, so everybody can transparently see
10
- how we calculate item and document totals.
10
+ We decided to open-source this part, so everybody can transparently see
11
+ how we calculate item and document totals.
11
12
 
12
- You can take advantage of this lib for example when using our API and
13
+ You can take advantage of this lib for example when using our API and
13
14
  mixing it into your local classes.
14
15
 
15
16
 
@@ -18,12 +19,9 @@ mixing it into your local classes.
18
19
  gem install sk_calc
19
20
 
20
21
 
21
- == Classes
22
-
23
-
24
22
  == Usage
25
23
 
26
- Comming ..
24
+ read spec/sk_calc/*.rb to see examples
27
25
 
28
26
  require 'sk_calc'
29
27
 
data/Rakefile CHANGED
@@ -3,6 +3,7 @@ require 'rake'
3
3
  require 'rdoc/task'
4
4
  require 'rspec'
5
5
  require 'rspec/core/rake_task'
6
+ require 'bundler/gem_tasks'
6
7
 
7
8
  desc 'Default: run specs.'
8
9
  task :default => :spec
@@ -13,13 +14,6 @@ RSpec::Core::RakeTask.new do |t|
13
14
  # Put spec opts in a file named .rspec in root
14
15
  end
15
16
 
16
- desc "Generate code coverage"
17
- RSpec::Core::RakeTask.new(:coverage) do |t|
18
- t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
19
- t.rcov = true
20
- t.rcov_opts = ['--exclude', 'spec']
21
- end
22
-
23
17
  desc 'Generate documentation.'
24
18
  Rake::RDocTask.new(:rdoc) do |rdoc|
25
19
  rdoc.rdoc_dir = 'rdoc'
@@ -29,7 +23,3 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
29
23
  rdoc.rdoc_files.include('lib/**/*.rb')
30
24
  end
31
25
 
32
- #require "bundler/gem_tasks"
33
- ########### to be dropped when we go public
34
- require "bundler/gem_helper"
35
- Bundler::GemHelper.install_tasks
@@ -2,7 +2,6 @@
2
2
  # - convert empty or integer values into BigDecimals
3
3
  module SK::Calc::Helper
4
4
 
5
-
6
5
  private
7
6
 
8
7
  # Init price single with 0 if nil and cast to BigDecimal
@@ -18,12 +17,12 @@ module SK::Calc::Helper
18
17
  def conv_tax
19
18
  to_bd(tax || 0)
20
19
  end
21
-
20
+
22
21
  # Cast a val to BigDecimal
23
22
  # == Return
24
23
  # <BigDecimal>
25
- def to_bd(val)
26
- val.is_a?(BigDecimal) ? val : BigDecimal.new("#{val}")
24
+ def to_bd(val)
25
+ val.is_a?(BigDecimal) ? val : BigDecimal.new("#{val}")
27
26
  end
28
27
 
29
28
  end
data/lib/sk_calc/item.rb CHANGED
@@ -49,14 +49,12 @@ module SK::Calc::Item
49
49
  # Total unrounded net basis incl discount
50
50
  # Use this internally to do calculations! Differs from net_total_base which is
51
51
  # used to output the rounded & formatted values
52
- # ==== Returns
53
- # <BigDecimal>::
52
+ # @return [BigDecimal]
54
53
  def net_total_base
55
- (100 - discount) * total / 100
54
+ (100 - (discount||0)) * total / 100
56
55
  end
57
56
 
58
- # ==== Returns
59
- # <BigDecimal>:: total amount of tax
57
+ # @return [BigDecimal] total amount of tax
60
58
  def tax_total_base
61
59
  (net_total_base * conv_tax) / 100
62
60
  end
@@ -64,10 +62,9 @@ module SK::Calc::Item
64
62
  # Single net price with discount applied
65
63
  # DO NOT use this method to calculate(eg. totals for a document) use net_total
66
64
  # or gross_total instead
67
- # ==== Returns
68
- # <BigDecimal>:: rounded 2 decimals
65
+ # @return [BigDecimal] rounded 2 decimals
69
66
  def net_single_base
70
- conv_price_single * ( 1 - (discount / 100 ) )
67
+ conv_price_single * ( 1 - ((discount||0) / 100 ) )
71
68
  end
72
69
 
73
70
  def gross_single_base
@@ -75,23 +72,20 @@ module SK::Calc::Item
75
72
  end
76
73
 
77
74
  # Total gross price incl. discount
78
- # ==== Returns
79
- # <BigDecimal>:: total gross base
75
+ # @return [BigDecimal] total gross base
80
76
  def gross_total_base
81
77
  net_total_base + tax_total_base
82
78
  end
83
79
 
84
80
  # The discount amount unrounded
85
- # ==== Returns
86
- # <BigDecimal>:: rounded
81
+ # @return [BigDecimal] rounded
87
82
  def discount_total_base
88
- total * (discount / 100)
83
+ total * ((discount||0) / 100)
89
84
  end
90
85
 
91
86
  # Unrounded item total price * quantity, excl discount
92
87
  # Use it to do calculations!
93
- # ==== Returns
94
- # <BigDecimal>::
88
+ # @return [BigDecimal]
95
89
  def total
96
90
  conv_price_single * ( quantity || 0)
97
91
  end
@@ -104,39 +98,32 @@ module SK::Calc::Item
104
98
  ### for calculations!
105
99
 
106
100
  # Total gross price incl. discount
107
- # ==== Returns
108
- # <BigDecimal>:: rounded 2 decimals
101
+ # @return [BigDecimal] rounded 2 decimals
109
102
  def gross_total
110
103
  gross_total_base.round(2)
111
104
  end
112
105
 
113
106
  # Total net price(2 decimals) incl. discount
114
- # ==== Returns
115
- # <BigDecimal>:: rounded 2 decimals
107
+ # @return [BigDecimal] rounded 2 decimals
116
108
  def net_total
117
109
  net_total_base.round(2)
118
110
  end
119
111
 
120
-
121
- # ==== Returns
122
- # <BigDecimal>:: rounded 2 decimals
112
+ # @return [BigDecimal] rounded 2 decimals
123
113
  def tax_total
124
114
  tax_total_base.round(2)
125
115
  end
126
116
 
127
117
  # The discount amount
128
- # ==== Returns
129
- # <BigDecimal>:: rounded 2 decimals
118
+ # @return [BigDecimal] rounded 2 decimals
130
119
  def discount_total
131
120
  discount_total_base.round(2)
132
121
  end
133
122
 
134
-
135
123
  # Single net price with discount applied rounded 2.
136
124
  # DO NOT use this method to calculate(eg. totals for a document) use net_total
137
125
  # or gross_total instead
138
- # ==== Returns
139
- # <BigDecimal>:: rounded 2 decimals
126
+ # @return [BigDecimal] rounded 2 decimals
140
127
  def net_single
141
128
  net_single_base.round(2)
142
129
  end
@@ -144,8 +131,7 @@ module SK::Calc::Item
144
131
  # Single gross price rounded 2.
145
132
  # DONT use this method to calculate(eg. totals for a document) use net_total
146
133
  # or gross_total instead
147
- # ==== Returns
148
- # <BigDecimal>:: rounded 2 decimals
134
+ # @return [BigDecimal] rounded 2 decimals
149
135
  def gross_single
150
136
  gross_single_base.round(2)
151
137
  end
@@ -158,29 +144,25 @@ module SK::Calc::Item
158
144
  ### for calculations!
159
145
 
160
146
  # Total gross price incl. discount
161
- # ==== Returns
162
- # <BigDecimal>:: rounded 2 decimals
147
+ # @return [BigDecimal] rounded 2 decimals
163
148
  def gross_total_4
164
149
  gross_total_base.round(4)
165
150
  end
166
151
 
167
- # Total net price(2 decimals) incl. discount
168
- # ==== Returns
169
- # <BigDecimal>:: rounded 2 decimals
152
+ # Total net price
153
+ # @return [BigDecimal] rounded 4 decimals
170
154
  def net_total_4
171
155
  net_total_base.round(4)
172
156
  end
173
157
 
174
158
 
175
- # ==== Returns
176
- # <BigDecimal>:: rounded 2 decimals
159
+ # @return [BigDecimal] rounded 4 decimals
177
160
  def tax_total_4
178
161
  tax_total_base.round(4)
179
162
  end
180
163
 
181
164
  # The discount amount
182
- # ==== Returns
183
- # <BigDecimal>:: rounded 2 decimals
165
+ # @return [BigDecimal] rounded 4 decimals
184
166
  def discount_total_4
185
167
  discount_total_base.round(4)
186
168
  end
@@ -189,8 +171,7 @@ module SK::Calc::Item
189
171
  # Single net price with discount applied rounded 2.
190
172
  # DO NOT use this method to calculate(eg. totals for a document) use net_total
191
173
  # or gross_total instead
192
- # ==== Returns
193
- # <BigDecimal>:: rounded 2 decimals
174
+ # @return [BigDecimal] rounded 4 decimals
194
175
  def net_single_4
195
176
  net_single_base.round(4)
196
177
  end
@@ -198,8 +179,7 @@ module SK::Calc::Item
198
179
  # Single gross price rounded 2.
199
180
  # DONT use this method to calculate(eg. totals for a document) use net_total
200
181
  # or gross_total instead
201
- # ==== Returns
202
- # <BigDecimal>:: rounded 2 decimals
182
+ # @return [BigDecimal] rounded 4 decimals
203
183
  def gross_single_4
204
184
  gross_single_base.round(4)
205
185
  end
@@ -207,8 +187,7 @@ module SK::Calc::Item
207
187
  private
208
188
 
209
189
  # Init price single with 0 if nil and cast to BigDecimal
210
- # == Return
211
- # <BigDecimal>
190
+ # @return [BigDecimal]
212
191
  def conv_price_single
213
192
  to_bd(price_single || 0)
214
193
  end
data/lib/sk_calc/items.rb CHANGED
@@ -1,44 +1,54 @@
1
1
  # Calculate totals for a multiple items eg in an invoice
2
2
  # Including class MUST respond to:
3
3
  # - price_total
4
- # - precision
5
4
  # - price_tax
6
5
  # - line_items
7
6
  module SK::Calc::Items
8
7
  include SK::Calc::Helper
9
8
 
10
- # Unrounded net total so one can see the base sum of the line items before
11
- # rounding
9
+ # Unrounded net total the taxation base
10
+ # @return [BigDecimal]
12
11
  def net_total_base
13
12
  conv_price_total
14
13
  end
15
14
 
16
- # Gross total
15
+ # Gross total unrounded
16
+ # @return [BigDecimal]
17
17
  def gross_total_base
18
- (net_total_base || 0) + conv_tax
18
+ (net_total_base || 0) + tax_total_base
19
19
  end
20
20
 
21
- # Net total rounded to 2 decimals, the taxation base
21
+ # Net total rounded to 2 decimals
22
22
  def net_total
23
23
  net_total_base.round(2)
24
24
  end
25
25
 
26
26
  # Gross total rounded to 2 decimals
27
+ # @return [BigDecimal]
27
28
  def gross_total
28
29
  gross_total_base.round(2)
29
30
  end
30
31
 
31
- # Rounded price_tax to 2 decimals
32
+ # Tax total rounded price_tax to 2 decimals
33
+ # @return [BigDecimal]
34
+ def tax_total_base
35
+ conv_tax
36
+ end
37
+
38
+ # Tax total rounded price_tax to 2 decimals
39
+ # @return [BigDecimal]
32
40
  def tax_total
33
41
  conv_tax.round(2)
34
42
  end
35
43
 
36
- # Net total rounded to 2 decimals, the taxation base
44
+ # Net total rounded to 4 decimals
45
+ # @return [BigDecimal]
37
46
  def net_total_4
38
47
  net_total_base.round(4)
39
48
  end
40
49
 
41
- # Rounded price_tax to 2 decimals
50
+ # Rounded price_tax to 4 decimals
51
+ # @return [BigDecimal]
42
52
  def tax_total_4
43
53
  conv_tax.round(4)
44
54
  end
@@ -55,22 +65,23 @@ module SK::Calc::Items
55
65
  end
56
66
 
57
67
  # Sums up the tax price of the line items, grouped by tax
58
- # Results a sorted hash (=array) like [ [ 7, 3.50 ], [ 19, 47.50 ] ]
59
- #==Example
60
- # a sorted array like [ [ 7, 3.50 ], [ 19, 47.50 ] ] for each price/tax combination
68
+ #
69
+ # @example
70
+ # Sums up the price_total and calculate the tax -does not sum price_tax
71
+ # because of rounding errors!
72
+ # Returns a sorted sorted hash
73
+ # { [ 7, 3.50 ], [ 19, 47.50 ] } for each price/tax combination
61
74
  # So if you are using two kinds of tax (7%/19%) in an document:
62
75
  #
63
76
  # [0] =>
64
77
  # [0] => 7 # the tax percentage
65
78
  # [1] => 14.00 # tax sum of all line item with this tax (items summ is 200.00)
66
79
  # [1] =>
67
- # [0] => 19 # the tax percentage
68
- # [1] => 57 # tax sum of all line item with this tax(items sum = 300)
69
- #
80
+ # [0] => 19
81
+ # [1] => 57 #(items sum = 300)
70
82
  #
71
- # Sum up the price_total and calculate the tax -
72
- # don't sum price_tax because of rounding errors!
73
83
  #
84
+ # @return [Hash]
74
85
  def tax_grouped(items=nil)
75
86
  items ||= line_items
76
87
  result = {}
@@ -84,15 +95,13 @@ module SK::Calc::Items
84
95
  private
85
96
 
86
97
  # Init price single with 0 if nil and cast to BigDecimal
87
- # == Return
88
- # <BigDecimal>
98
+ # @return [BigDecimal]
89
99
  def conv_price_total
90
100
  to_bd(price_total || 0)
91
101
  end
92
102
 
93
103
  # Init tax with 0 if nil and cast to BigDecimal .. same in helper
94
- # == Return
95
- # <BigDecimal>
104
+ # @return [BigDecimal]
96
105
  def conv_tax
97
106
  to_bd(price_tax || 0)
98
107
  end
@@ -1,5 +1,5 @@
1
1
  module SK
2
2
  module Calc
3
- VERSION = "0.0.3"
3
+ VERSION = '0.0.4'
4
4
  end
5
5
  end
data/lib/sk_calc.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'bigdecimal'
2
- require "active_support/core_ext/enumerable"
2
+ require 'active_support/core_ext/enumerable'
3
3
  module SK
4
4
  # calculation module
5
5
  # == Usage
data/sk_calc.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  s.summary = %q{SalesKing Calculation Module}
25
25
 
26
26
  s.add_development_dependency 'rspec'
27
- s.add_development_dependency 'rcov'
27
+ s.add_development_dependency 'simplecov'
28
28
  s.add_development_dependency 'rdoc'
29
29
  s.add_development_dependency 'activesupport'
30
30
  s.add_development_dependency 'rake', '>= 0.9.2'
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,13 @@
1
- require 'rubygems'
1
+ # encoding: utf-8
2
+ require 'simplecov'
2
3
  require 'yaml'
3
4
  require 'rspec'
4
- require "active_support"
5
+ require 'active_support'
6
+
7
+ SimpleCov.start do
8
+ root File.join(File.dirname(__FILE__), '..')
9
+ add_filter "/bin/"
10
+ add_filter "/spec/"
11
+ end
12
+
5
13
  require "#{File.dirname(__FILE__)}/../lib/sk_calc"
metadata CHANGED
@@ -1,112 +1,100 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: sk_calc
3
- version: !ruby/object:Gem::Version
4
- hash: 25
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 3
10
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Georg Leciejewski
14
- - "Mike Po\xC5\x82tyn"
8
+ - Mike Połtyn
15
9
  autorequire:
16
10
  bindir: bin
17
11
  cert_chain: []
18
-
19
- date: 2012-02-15 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-02-15 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: rspec
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ! '>='
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
33
21
  type: :development
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: rcov
37
22
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ! '>='
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: simplecov
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ! '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
47
35
  type: :development
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: rdoc
51
36
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rdoc
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
61
49
  type: :development
62
- version_requirements: *id003
63
- - !ruby/object:Gem::Dependency
64
- name: activesupport
65
50
  prerelease: false
66
- requirement: &id004 !ruby/object:Gem::Requirement
67
- none: false
68
- requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- hash: 3
72
- segments:
73
- - 0
74
- version: "0"
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: activesupport
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
75
63
  type: :development
76
- version_requirements: *id004
77
- - !ruby/object:Gem::Dependency
78
- name: rake
79
64
  prerelease: false
80
- requirement: &id005 !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- hash: 63
86
- segments:
87
- - 0
88
- - 9
89
- - 2
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rake
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
90
76
  version: 0.9.2
91
77
  type: :development
92
- version_requirements: *id005
93
- description: Calculate document and line item totals. This moule is used inside SalesKIng and outsourced for transparency and reusability.
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ! '>='
82
+ - !ruby/object:Gem::Version
83
+ version: 0.9.2
84
+ description: Calculate document and line item totals. This moule is used inside SalesKIng
85
+ and outsourced for transparency and reusability.
94
86
  email: gl@salesking.eu
95
87
  executables: []
96
-
97
88
  extensions: []
98
-
99
- extra_rdoc_files:
89
+ extra_rdoc_files:
100
90
  - README.rdoc
101
- files:
91
+ files:
102
92
  - .gitignore
93
+ - .travis.yml
103
94
  - Gemfile
104
- - Gemfile.lock
105
95
  - LICENSE
106
96
  - README.rdoc
107
97
  - Rakefile
108
- - VERSION
109
- - ci/Gemfile
110
98
  - lib/sk_calc.rb
111
99
  - lib/sk_calc/helper.rb
112
100
  - lib/sk_calc/item.rb
@@ -118,38 +106,25 @@ files:
118
106
  - spec/spec_helper.rb
119
107
  homepage: http://github.com/salesking/sk_calc
120
108
  licenses: []
121
-
109
+ metadata: {}
122
110
  post_install_message:
123
111
  rdoc_options: []
124
-
125
- require_paths:
112
+ require_paths:
126
113
  - lib
127
- required_ruby_version: !ruby/object:Gem::Requirement
128
- none: false
129
- requirements:
130
- - - ">="
131
- - !ruby/object:Gem::Version
132
- hash: 3
133
- segments:
134
- - 0
135
- version: "0"
136
- required_rubygems_version: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ">="
140
- - !ruby/object:Gem::Version
141
- hash: 3
142
- segments:
143
- - 0
144
- version: "0"
114
+ required_ruby_version: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ required_rubygems_version: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ! '>='
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
145
124
  requirements: []
146
-
147
125
  rubyforge_project:
148
- rubygems_version: 1.8.6
126
+ rubygems_version: 2.1.11
149
127
  signing_key:
150
- specification_version: 3
128
+ specification_version: 4
151
129
  summary: SalesKing Calculation Module
152
- test_files:
153
- - spec/sk_calc/item_spec.rb
154
- - spec/sk_calc/items_spec.rb
155
- - spec/spec_helper.rb
130
+ test_files: []
data/Gemfile.lock DELETED
@@ -1,36 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- sk_calc (0.0.1)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- activesupport (3.1.3)
10
- multi_json (~> 1.0)
11
- diff-lcs (1.1.3)
12
- json (1.6.4)
13
- multi_json (1.0.4)
14
- rake (0.9.2.2)
15
- rcov (0.9.11)
16
- rdoc (3.12)
17
- json (~> 1.4)
18
- rspec (2.7.0)
19
- rspec-core (~> 2.7.0)
20
- rspec-expectations (~> 2.7.0)
21
- rspec-mocks (~> 2.7.0)
22
- rspec-core (2.7.1)
23
- rspec-expectations (2.7.0)
24
- diff-lcs (~> 1.1.2)
25
- rspec-mocks (2.7.0)
26
-
27
- PLATFORMS
28
- ruby
29
-
30
- DEPENDENCIES
31
- activesupport
32
- rake (>= 0.9.2)
33
- rcov
34
- rdoc
35
- rspec
36
- sk_calc!
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.0.3
data/ci/Gemfile DELETED
@@ -1,8 +0,0 @@
1
- source :gemcutter
2
- gem "rake"
3
- gem "rdoc"
4
- gem "rcov"
5
- gem "activesupport"
6
- group :test do
7
- gem "rspec"
8
- end