ycurrency 1.0.2 → 1.0.3
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 +4 -4
- data/Gemfile +4 -13
- data/Gemfile.lock +43 -43
- data/History.txt +6 -0
- data/lib/currency.rb +4 -4
- data/lib/currency/version.rb +1 -1
- data/readme.md +2 -2
- data/spec/currency_spec.rb +4 -4
- data/ycurrency.gemspec +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 35b3db818d8865dbc237919943d2005af0a70078
|
|
4
|
+
data.tar.gz: a4266b357a63e4242dfb89dfd8be9d57afe3aefa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 31df095db72e35f261b10ad642bf19550ef031ba659df602b52877f456802e9625c800d6f79f236b4b42a0b3cf9f486b61e39f9efeb7ecd52f43cd688fbd5474
|
|
7
|
+
data.tar.gz: '097aaba8e93149815daa65d076330b5986cbb8a9fab9fb2db5622142cb22f9f2502539bbd62b7036d8eea5b4b70a21e6603e07dfa198c1df3ea05394c757b498'
|
data/Gemfile
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
source "
|
|
1
|
+
source "https://rubygems.org"
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
gemspec
|
|
4
4
|
|
|
5
|
-
group :
|
|
6
|
-
gem '
|
|
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
|
data/Gemfile.lock
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
ycurrency (1.0.3)
|
|
5
|
+
|
|
1
6
|
GEM
|
|
2
|
-
remote:
|
|
7
|
+
remote: https://rubygems.org/
|
|
3
8
|
specs:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
40
|
-
simplecov-html (~> 0.
|
|
41
|
-
simplecov-html (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
|
-
|
|
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
|
data/History.txt
CHANGED
data/lib/currency.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Currency -- de.oddb.org -- 26.02.2007 -- hwyss@ywesee.com
|
|
4
4
|
|
|
5
5
|
require 'thread'
|
|
6
|
-
require
|
|
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
|
-
|
|
18
|
-
|
|
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}/]
|
data/lib/currency/version.rb
CHANGED
data/readme.md
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
Simple local DRb-service for Currency-Conversion.
|
|
8
8
|
|
|
9
|
-
[
|
|
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
|
|
data/spec/currency_spec.rb
CHANGED
|
@@ -5,10 +5,10 @@ require 'currency'
|
|
|
5
5
|
require 'rspec'
|
|
6
6
|
|
|
7
7
|
describe Currency do
|
|
8
|
-
it 'should
|
|
8
|
+
it 'should convert correctly from CHF to EUR' do
|
|
9
9
|
rate = Currency.rate('CHF', 'EUR')
|
|
10
|
-
rate.class.
|
|
11
|
-
rate.
|
|
12
|
-
rate.
|
|
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
|
data/ycurrency.gemspec
CHANGED
|
@@ -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.
|
|
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-
|
|
11
|
+
date: 2017-11-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|