ycurrency 1.0.2 → 1.0.3

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: 0a27cd982e999ef0c9e130de36598794cd51b577
4
- data.tar.gz: 79bfa786ea779c69776663be3486940d951f27e7
3
+ metadata.gz: 35b3db818d8865dbc237919943d2005af0a70078
4
+ data.tar.gz: a4266b357a63e4242dfb89dfd8be9d57afe3aefa
5
5
  SHA512:
6
- metadata.gz: 3471f09c85fe18ff9edd66f4ae46043997d8496854ef193985ee894b99b8212c3c6e7a52b2858afc21bc5c784dc35c9055be2856fbbba38c86dfaea28d1c99c0
7
- data.tar.gz: 9ae80887d220dfd8919a6698959d547faa2f5a406354d4e95d1ff96a338415d9ce590ed84159022b2954cbbd97043e6a96ad988e8e86490559e34a30581a8ea9
6
+ metadata.gz: 31df095db72e35f261b10ad642bf19550ef031ba659df602b52877f456802e9625c800d6f79f236b4b42a0b3cf9f486b61e39f9efeb7ecd52f43cd688fbd5474
7
+ data.tar.gz: '097aaba8e93149815daa65d076330b5986cbb8a9fab9fb2db5622142cb22f9f2502539bbd62b7036d8eea5b4b70a21e6603e07dfa198c1df3ea05394c757b498'
data/Gemfile CHANGED
@@ -1,16 +1,7 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
- gem 'rclconf'
3
+ gemspec
4
4
 
5
- group :development, :test do
6
- gem 'flexmock'
7
- gem 'rake'
8
- gem 'minitest', '>=5.0.0'
9
- gem 'simplecov'
10
- gem 'rspec'
11
- gem 'hoe'
12
- end
13
-
14
- group :development do
15
- gem 'pry-debugger', :platforms => [:ruby_19, :ruby_20]
5
+ group :debugger do
6
+ gem 'pry-byebug'
16
7
  end
@@ -1,55 +1,55 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ycurrency (1.0.3)
5
+
1
6
  GEM
2
- remote: http://rubygems.org/
7
+ remote: https://rubygems.org/
3
8
  specs:
4
- coderay (1.1.0)
5
- columnize (0.3.6)
6
- debugger (1.6.2)
7
- columnize (>= 0.3.1)
8
- debugger-linecache (~> 1.2.0)
9
- debugger-ruby_core_source (~> 1.2.3)
10
- debugger-linecache (1.2.0)
11
- debugger-ruby_core_source (1.2.4)
12
- diff-lcs (1.2.5)
13
- docile (1.1.0)
14
- flexmock (1.3.2)
15
- hoe (3.7.1)
16
- rake (>= 0.8, < 11.0)
17
- method_source (0.8.2)
18
- minitest (5.0.8)
19
- multi_json (1.8.2)
20
- pry (0.9.12.4)
21
- coderay (~> 1.0)
22
- method_source (~> 0.8)
23
- slop (~> 3.4)
24
- pry-debugger (0.2.2)
25
- debugger (~> 1.3)
26
- pry (~> 0.9.10)
27
- rake (10.1.0)
28
- rclconf (1.0.0)
29
- rspec (2.14.1)
30
- rspec-core (~> 2.14.0)
31
- rspec-expectations (~> 2.14.0)
32
- rspec-mocks (~> 2.14.0)
33
- rspec-core (2.14.7)
34
- rspec-expectations (2.14.4)
35
- diff-lcs (>= 1.1.3, < 2.0)
36
- rspec-mocks (2.14.4)
37
- simplecov (0.8.2)
9
+ byebug (9.1.0)
10
+ coderay (1.1.2)
11
+ diff-lcs (1.3)
12
+ docile (1.1.5)
13
+ flexmock (2.3.6)
14
+ json (2.1.0)
15
+ method_source (0.9.0)
16
+ pry (0.11.3)
17
+ coderay (~> 1.1.0)
18
+ method_source (~> 0.9.0)
19
+ pry-byebug (3.5.0)
20
+ byebug (~> 9.1)
21
+ pry (~> 0.10)
22
+ rake (12.2.1)
23
+ rspec (3.7.0)
24
+ rspec-core (~> 3.7.0)
25
+ rspec-expectations (~> 3.7.0)
26
+ rspec-mocks (~> 3.7.0)
27
+ rspec-core (3.7.0)
28
+ rspec-support (~> 3.7.0)
29
+ rspec-expectations (3.7.0)
30
+ diff-lcs (>= 1.2.0, < 2.0)
31
+ rspec-support (~> 3.7.0)
32
+ rspec-mocks (3.7.0)
33
+ diff-lcs (>= 1.2.0, < 2.0)
34
+ rspec-support (~> 3.7.0)
35
+ rspec-support (3.7.0)
36
+ simplecov (0.15.1)
38
37
  docile (~> 1.1.0)
39
- multi_json
40
- simplecov-html (~> 0.8.0)
41
- simplecov-html (0.8.0)
42
- slop (3.4.7)
38
+ json (>= 1.8, < 3)
39
+ simplecov-html (~> 0.10.0)
40
+ simplecov-html (0.10.2)
43
41
 
44
42
  PLATFORMS
45
43
  ruby
46
44
 
47
45
  DEPENDENCIES
46
+ bundler
48
47
  flexmock
49
- hoe
50
- minitest (>= 5.0.0)
51
- pry-debugger
48
+ pry-byebug
52
49
  rake
53
- rclconf
54
50
  rspec
55
51
  simplecov
52
+ ycurrency!
53
+
54
+ BUNDLED WITH
55
+ 1.16.0.pre.3
@@ -1,3 +1,9 @@
1
+ === 1.0.3 / 15..2017
2
+
3
+ * Use open-uri to fetch result from https instead of http
4
+ * Use new expect syntax for rspec
5
+ * Updated dependencies, simplified Gemfile
6
+
1
7
  === 1.0.2 / 11.08.2017
2
8
 
3
9
  * Updated currencyd to use ruby 2.4.0
@@ -3,7 +3,7 @@
3
3
  # Currency -- de.oddb.org -- 26.02.2007 -- hwyss@ywesee.com
4
4
 
5
5
  require 'thread'
6
- require 'net/http'
6
+ require "open-uri"
7
7
 
8
8
  module Currency
9
9
  @rates = {}
@@ -14,9 +14,9 @@ module Currency
14
14
  end
15
15
  end
16
16
  def Currency.get_html(origin, target)
17
- Net::HTTP.start('www.google.com') { |session|
18
- session.get("/finance/converter?a=1&from=#{origin.upcase}&to=#{target.upcase}").body
19
- }
17
+ url = "https://finance.google.com/finance/converter?a=1&from=#{origin.upcase}&to=#{target.upcase}"
18
+ @data = URI.parse(url).read
19
+ return @data
20
20
  end
21
21
  def Currency.rate(origin, target)
22
22
  origin = origin.to_s.upcase[/^[A-Z]{3}/]
@@ -1,3 +1,3 @@
1
1
  module Currency
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
data/readme.md CHANGED
@@ -6,8 +6,8 @@
6
6
 
7
7
  Simple local DRb-service for Currency-Conversion.
8
8
 
9
- [[The project name at https://github.com/zdavatz/currency is currency but the project name at Rubyforge and
10
- Rubygems is ycurrency as the name "currency" was already taken.]]
9
+ [The project name at https://github.com/zdavatz/currency is currency but the project name at Rubyforge and
10
+ Rubygems is ycurrency as the name "currency" was already taken.]
11
11
 
12
12
  ## INSTALL:
13
13
 
@@ -5,10 +5,10 @@ require 'currency'
5
5
  require 'rspec'
6
6
 
7
7
  describe Currency do
8
- it 'should read from a manifest' do
8
+ it 'should convert correctly from CHF to EUR' do
9
9
  rate = Currency.rate('CHF', 'EUR')
10
- rate.class.should eql Float
11
- rate.should < 1.0
12
- rate.should > 0.5
10
+ expect(rate.class).to eq Float
11
+ expect(rate).to be < 1.0
12
+ expect(rate).to be > 0.5
13
13
  end
14
14
  end
@@ -16,6 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
20
 
20
21
  spec.add_development_dependency "bundler"
21
22
  spec.add_development_dependency "simplecov"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ycurrency
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masaomi Hatakeyama, Zeno R.R. Davatz, Niklaus Giger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-11 00:00:00.000000000 Z
11
+ date: 2017-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler