nordea 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +5 -1
- data/CHANGELOG +7 -0
- data/README.md +1 -1
- data/lib/nordea.rb +14 -8
- data/lib/nordea/version.rb +2 -2
- data/nordea.gemspec +7 -6
- data/spec/support/sample_currencies.marshal +0 -0
- metadata +51 -28
data/.travis.yml
CHANGED
data/CHANGELOG
ADDED
data/README.md
CHANGED
@@ -60,7 +60,7 @@ For more information, read the [documentation](http://rubydoc.info/gems/nordea).
|
|
60
60
|
Travis CI Build Status
|
61
61
|
----------------------
|
62
62
|
|
63
|
-
|
63
|
+
The gem should work with Ruby 1.8.7, Ruby 1.9.2, jRuby, REE, and Rubinius.
|
64
64
|
|
65
65
|
[![Build Status](http://travis-ci.org/k33l0r/nordea.png)](http://travis-ci.org/k33l0r/nordea)
|
66
66
|
|
data/lib/nordea.rb
CHANGED
@@ -1,24 +1,30 @@
|
|
1
1
|
require "nordea/bank"
|
2
2
|
require "nordea/exchange_rates"
|
3
3
|
require "nordea/version"
|
4
|
+
require "tzinfo"
|
4
5
|
|
5
6
|
# Ruby interface to the Nordea Bank exchange rate data.
|
6
7
|
module Nordea
|
8
|
+
# The default timezone, Europe/Helsinki
|
9
|
+
TZ = TZInfo::Timezone.get("Europe/Helsinki")
|
10
|
+
|
7
11
|
# Parses the datetime format used in the Nordea data.
|
8
12
|
#
|
9
13
|
# @example
|
10
|
-
# Nordea.parse_time("20150101120056") #=> 2015-01-01
|
14
|
+
# Nordea.parse_time("20150101120056") #=> 2015-01-01 10:00:05 UTC
|
11
15
|
#
|
12
16
|
# @param [String] the datetime string (YYYYMMDDHHmmSS)
|
13
17
|
# @return [Time] the string converted into a Time object
|
14
18
|
def self.parse_time(datetime)
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
time = Time.utc( datetime[0..3].to_i,
|
20
|
+
datetime[4..5].to_i,
|
21
|
+
datetime[6..7].to_i,
|
22
|
+
datetime[8..9].to_i,
|
23
|
+
datetime[10..11].to_i,
|
24
|
+
datetime[11..12].to_i )
|
25
|
+
|
26
|
+
# Convert the local time to UTC time.
|
27
|
+
TZ.local_to_utc(time)
|
22
28
|
rescue
|
23
29
|
nil
|
24
30
|
end
|
data/lib/nordea/version.rb
CHANGED
data/nordea.gemspec
CHANGED
@@ -14,16 +14,17 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.rubyforge_project = "nordea"
|
15
15
|
|
16
16
|
s.add_dependency "money", "~> 3.7.1"
|
17
|
+
s.add_dependency "tzinfo", "~> 0.3.28"
|
17
18
|
|
18
|
-
s.add_development_dependency "yard"
|
19
|
-
s.add_development_dependency "rspec"
|
20
|
-
s.add_development_dependency "webmock"
|
21
19
|
s.add_development_dependency "awesome_print"
|
22
|
-
s.add_development_dependency "
|
20
|
+
s.add_development_dependency "bundler", "~> 1.0.15"
|
23
21
|
s.add_development_dependency "rake", "~> 0.9.2"
|
22
|
+
s.add_development_dependency "rspec", "~> 2.6.0"
|
23
|
+
s.add_development_dependency "simplecov"
|
24
|
+
s.add_development_dependency "webmock"
|
25
|
+
s.add_development_dependency "yard"
|
24
26
|
|
25
27
|
s.files = `git ls-files`.split("\n")
|
26
|
-
s.test_files = `git ls-files --
|
27
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
28
|
+
s.test_files = `git ls-files -- spec/*`.split("\n")
|
28
29
|
s.require_paths = ["lib"]
|
29
30
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nordea
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-06-
|
12
|
+
date: 2011-06-19 00:00:00.000000000 +03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: money
|
17
|
-
requirement: &
|
17
|
+
requirement: &2152836180 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,21 @@ dependencies:
|
|
22
22
|
version: 3.7.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2152836180
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
|
-
name:
|
28
|
-
requirement: &
|
27
|
+
name: tzinfo
|
28
|
+
requirement: &2152835680 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.3.28
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *2152835680
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: awesome_print
|
39
|
+
requirement: &2152835220 !ruby/object:Gem::Requirement
|
29
40
|
none: false
|
30
41
|
requirements:
|
31
42
|
- - ! '>='
|
@@ -33,32 +44,43 @@ dependencies:
|
|
33
44
|
version: '0'
|
34
45
|
type: :development
|
35
46
|
prerelease: false
|
36
|
-
version_requirements: *
|
47
|
+
version_requirements: *2152835220
|
37
48
|
- !ruby/object:Gem::Dependency
|
38
|
-
name:
|
39
|
-
requirement: &
|
49
|
+
name: bundler
|
50
|
+
requirement: &2152834600 !ruby/object:Gem::Requirement
|
40
51
|
none: false
|
41
52
|
requirements:
|
42
|
-
- -
|
53
|
+
- - ~>
|
43
54
|
- !ruby/object:Gem::Version
|
44
|
-
version:
|
55
|
+
version: 1.0.15
|
45
56
|
type: :development
|
46
57
|
prerelease: false
|
47
|
-
version_requirements: *
|
58
|
+
version_requirements: *2152834600
|
48
59
|
- !ruby/object:Gem::Dependency
|
49
|
-
name:
|
50
|
-
requirement: &
|
60
|
+
name: rake
|
61
|
+
requirement: &2152834060 !ruby/object:Gem::Requirement
|
51
62
|
none: false
|
52
63
|
requirements:
|
53
|
-
- -
|
64
|
+
- - ~>
|
54
65
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
66
|
+
version: 0.9.2
|
56
67
|
type: :development
|
57
68
|
prerelease: false
|
58
|
-
version_requirements: *
|
69
|
+
version_requirements: *2152834060
|
59
70
|
- !ruby/object:Gem::Dependency
|
60
|
-
name:
|
61
|
-
requirement: &
|
71
|
+
name: rspec
|
72
|
+
requirement: &2152833600 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 2.6.0
|
78
|
+
type: :development
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: *2152833600
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: simplecov
|
83
|
+
requirement: &2152833200 !ruby/object:Gem::Requirement
|
62
84
|
none: false
|
63
85
|
requirements:
|
64
86
|
- - ! '>='
|
@@ -66,10 +88,10 @@ dependencies:
|
|
66
88
|
version: '0'
|
67
89
|
type: :development
|
68
90
|
prerelease: false
|
69
|
-
version_requirements: *
|
91
|
+
version_requirements: *2152833200
|
70
92
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
72
|
-
requirement: &
|
93
|
+
name: webmock
|
94
|
+
requirement: &2152832660 !ruby/object:Gem::Requirement
|
73
95
|
none: false
|
74
96
|
requirements:
|
75
97
|
- - ! '>='
|
@@ -77,18 +99,18 @@ dependencies:
|
|
77
99
|
version: '0'
|
78
100
|
type: :development
|
79
101
|
prerelease: false
|
80
|
-
version_requirements: *
|
102
|
+
version_requirements: *2152832660
|
81
103
|
- !ruby/object:Gem::Dependency
|
82
|
-
name:
|
83
|
-
requirement: &
|
104
|
+
name: yard
|
105
|
+
requirement: &2152832240 !ruby/object:Gem::Requirement
|
84
106
|
none: false
|
85
107
|
requirements:
|
86
|
-
- -
|
108
|
+
- - ! '>='
|
87
109
|
- !ruby/object:Gem::Version
|
88
|
-
version: 0
|
110
|
+
version: '0'
|
89
111
|
type: :development
|
90
112
|
prerelease: false
|
91
|
-
version_requirements: *
|
113
|
+
version_requirements: *2152832240
|
92
114
|
description: A Money.gem compatible currency exchange rate implementation for Nordea
|
93
115
|
Bank
|
94
116
|
email:
|
@@ -99,6 +121,7 @@ extra_rdoc_files: []
|
|
99
121
|
files:
|
100
122
|
- .gitignore
|
101
123
|
- .travis.yml
|
124
|
+
- CHANGELOG
|
102
125
|
- Gemfile
|
103
126
|
- LICENSE
|
104
127
|
- README.md
|