cnb 2.0.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 858f3fe634e67b77e82d87c3745e5b131bc50354
4
- data.tar.gz: 86c130801822ec5bf9d2a64764483c7ad8bb7bd4
3
+ metadata.gz: 9ae0ebce1d0cc51c7aa9a5b1642339c4a6bc56a9
4
+ data.tar.gz: 32e92888accc50577b9bb61834f97515f97bdfa2
5
5
  SHA512:
6
- metadata.gz: 9dee283458065e6e87dbe69603c26780750df48db0b5ff3250bde2b853bc5050710a19f12e3d4c8447539484a29acbb90fbeb11bd9d1272b08f3b05e6e1084db
7
- data.tar.gz: 478fbdb5558b95dfd7493517b2551a574c3a1b67b1e5ee68197e7f17ac60c694ab9548e6c6d5ab58df7756fef1de9167e809ef4aaadadd95fd7dacdd21206acb
6
+ metadata.gz: f73423981ec7d18efcfc12fc4b2af02a4b9e869c22bf23984976fb0759f6cd7188262bfbfe12ed31066f5ff0ddbb198f2914c09c225bcab54bd44b02e43ddc50
7
+ data.tar.gz: ac914db91aaf2e41fb14aebee0d997a846d17f4f22b617535b1840bc2d5e55451c14a03d6adc59504d7bba3117d6716771a5c782c926d685887f7406af0d1ae7
data/.gitignore CHANGED
@@ -9,6 +9,7 @@ Gemfile.lock
9
9
  coverage
10
10
  rdoc
11
11
  pkg
12
+ tmp/*
12
13
 
13
14
  ## PROJECT::SPECIFIC
14
15
  config/*.yml
@@ -0,0 +1,2 @@
1
+ ruby:
2
+ config_file: .rubocop.yml
@@ -0,0 +1,10 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ AllCops:
4
+ CacheRootDirectory: './tmp'
5
+
6
+ Style/StringLiterals:
7
+ EnforcedStyle: single_quotes
8
+ SupportedStyles:
9
+ - single_quotes
10
+ - double_quotes
@@ -0,0 +1,24 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2015-12-02 14:43:14 +0100 using RuboCop version 0.35.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 4
10
+ # Configuration parameters: AllowURI, URISchemes.
11
+ Metrics/LineLength:
12
+ Max: 99
13
+
14
+ # Offense count: 5
15
+ # Configuration parameters: Exclude.
16
+ Style/Documentation:
17
+ Exclude:
18
+ - 'spec/**/*'
19
+ - 'test/**/*'
20
+ - 'lib/cnb/base.rb'
21
+ - 'lib/cnb/config.rb'
22
+ - 'lib/cnb/daily_rates.rb'
23
+ - 'lib/cnb/monthly_rates.rb'
24
+ - 'lib/cnb/version.rb'
@@ -1 +1 @@
1
- 2.2.2
1
+ 2.2.3
@@ -18,12 +18,13 @@ Gem::Specification.new do |s|
18
18
  s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
19
  s.test_files = `git ls-files -- spec/**/*`.split("\n")
20
20
 
21
- s.require_paths = %w('lib', 'config')
21
+ s.require_paths = %w(lib)
22
22
 
23
23
  s.add_dependency('nokogiri', '~> 1.6')
24
24
  s.add_development_dependency('bundler')
25
25
  s.add_development_dependency('rake', '~> 10.4')
26
26
  s.add_development_dependency('rspec', '~> 2.14')
27
+ s.add_development_dependency('rubocop', '~> 0.35.1')
27
28
  s.add_development_dependency('pry')
28
29
  s.add_development_dependency('webmock')
29
30
  s.add_development_dependency('timecop')
@@ -13,7 +13,7 @@ module CNB
13
13
 
14
14
  fail CurrencyNotSupported if rate.nil?
15
15
 
16
- rate.attr('kurz').tr(',', '.').to_f
16
+ rate.attr('kurz').tr(',', '.').to_f / rate.attr('mnozstvi').to_f
17
17
  end
18
18
 
19
19
  private
@@ -1,3 +1,3 @@
1
1
  module CNB
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.2'
3
3
  end
@@ -27,11 +27,11 @@ RSpec.describe CNB::MonthlyRates do
27
27
 
28
28
  context 'valid parameters' do
29
29
  it 'returns rate for given currency and date' do
30
- expect(monthly_rates.rate_for(currency, Date.today)).to eql(19.564)
30
+ expect(monthly_rates.rate_for(currency, Date.today)).to eql(0.19564)
31
31
  end
32
32
 
33
33
  it 'returns rate for given currency with default date' do
34
- expect(monthly_rates.rate_for(currency)).to eql(19.564)
34
+ expect(monthly_rates.rate_for(currency)).to eql(0.19564)
35
35
  end
36
36
  end
37
37
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cnb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Zikán
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-29 00:00:00.000000000 Z
12
+ date: 2015-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -67,6 +67,20 @@ dependencies:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '2.14'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rubocop
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: 0.35.1
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: 0.35.1
70
84
  - !ruby/object:Gem::Dependency
71
85
  name: pry
72
86
  requirement: !ruby/object:Gem::Requirement
@@ -146,7 +160,10 @@ extensions: []
146
160
  extra_rdoc_files: []
147
161
  files:
148
162
  - ".gitignore"
163
+ - ".hound.yml"
149
164
  - ".rspec"
165
+ - ".rubocop.yml"
166
+ - ".rubocop_todo.yml"
150
167
  - ".ruby-gemset"
151
168
  - ".ruby-version"
152
169
  - ".travis.yml"
@@ -173,8 +190,7 @@ metadata: {}
173
190
  post_install_message:
174
191
  rdoc_options: []
175
192
  require_paths:
176
- - "'lib',"
177
- - "'config'"
193
+ - lib
178
194
  required_ruby_version: !ruby/object:Gem::Requirement
179
195
  requirements:
180
196
  - - ">="