dolarblue 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/.travis.yml +4 -1
- data/CHANGELOG.md +24 -2
- data/dolarblue.gemspec +5 -5
- data/lib/dolarblue/exchange.rb +1 -1
- data/lib/dolarblue/instance_methods.rb +2 -10
- data/lib/dolarblue/version.rb +1 -1
- data/spec/exchange_spec.rb +1 -1
- metadata +30 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9ae386656edae500a054d15ca7147b271c3ca77
|
4
|
+
data.tar.gz: 0cd1a7ae029999db63984cf0a1f0927f82f94041
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42bd7e3a11d3e2ffb7b6112716feb86427c375a4311e9186ba1e30a8a49d8fe249189ce07c6e3f99d97bd02293499d24954468d284609ad1035769b5cad6812e
|
7
|
+
data.tar.gz: 0fa7f6edf4e021a458253bf25477c555ad951fea6cd669e3d3940f96a4d0be0def9beadf611ba394cb7aecbced0180efebea2652cfb9e0df770bd7feaafc855d
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.9.2-p320
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,31 @@
|
|
1
|
-
## [In git](https://github.com/elgalu/dolarblue/compare/v0.0
|
1
|
+
## [In git](https://github.com/elgalu/dolarblue/compare/v0.2.0...HEAD)
|
2
2
|
|
3
3
|
### New Features
|
4
4
|
* n/a
|
5
5
|
|
6
|
-
###
|
6
|
+
### Bug Fixes
|
7
|
+
* n/a
|
8
|
+
|
9
|
+
### Chores
|
10
|
+
* n/a
|
11
|
+
|
12
|
+
## [v0.2.0](https://github.com/elgalu/dolarblue/tree/v0.2.0)
|
13
|
+
|
14
|
+
### New Features
|
15
|
+
* Added "dolar tarjeta" values for 20% government fees on AR credit cards. (Leo Gallucci)
|
16
|
+
|
17
|
+
### Bug Fixes
|
18
|
+
* n/a
|
19
|
+
|
20
|
+
### Chores
|
21
|
+
* n/a
|
22
|
+
|
23
|
+
## [v0.1.0](https://github.com/elgalu/dolarblue/tree/v0.1.0)
|
24
|
+
|
25
|
+
### New Features
|
26
|
+
* Made backward compatible for ruby >= 1.9 (Leo Gallucci)
|
27
|
+
|
28
|
+
### Bug Fixes
|
7
29
|
* n/a
|
8
30
|
|
9
31
|
### Chores
|
data/dolarblue.gemspec
CHANGED
@@ -10,8 +10,8 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.summary = %q{Query Argentine Peso vs US$ exchange values with particular interest in official vs. ilegal (blue) reference prices.}
|
11
11
|
spec.description = spec.summary
|
12
12
|
|
13
|
-
spec.required_ruby_version = '>=
|
14
|
-
spec.required_rubygems_version = '>=
|
13
|
+
spec.required_ruby_version = '>= 1.9.2'
|
14
|
+
spec.required_rubygems_version = '>= 1.3.6'
|
15
15
|
|
16
16
|
spec.license = 'MIT'
|
17
17
|
|
@@ -27,12 +27,12 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_runtime_dependency "twitter_anonymous_client", ">= 1.0.2.0"
|
28
28
|
spec.add_runtime_dependency "time_ago_in_words", ">= 0.1.0"
|
29
29
|
|
30
|
-
spec.add_development_dependency "bundler", ">= 1.
|
30
|
+
spec.add_development_dependency "bundler", ">= 1.3"
|
31
31
|
spec.add_development_dependency "rake"
|
32
32
|
spec.add_development_dependency "rspec", "~> 2.13"
|
33
|
-
spec.add_development_dependency "redcarpet", ">= 2.2"
|
33
|
+
spec.add_development_dependency "redcarpet", ">= 2.2.2"
|
34
34
|
spec.add_development_dependency "yard", ">= 0.8.5.2"
|
35
35
|
spec.add_development_dependency "simplecov", ">= 0.7.1"
|
36
|
-
spec.add_development_dependency 'coveralls', '>= 0.
|
36
|
+
spec.add_development_dependency 'coveralls', '>= 0.6.2'
|
37
37
|
|
38
38
|
end
|
data/lib/dolarblue/exchange.rb
CHANGED
@@ -19,7 +19,7 @@ class Dolarblue
|
|
19
19
|
# @return [self]
|
20
20
|
#
|
21
21
|
# @note Using ruby 2 feature: Keyworded Arguments
|
22
|
-
def initialize(name
|
22
|
+
def initialize(name, screen_name, regexp, buy_sell_factor)
|
23
23
|
fail ArgumentError, "name, screen_name, regexp and buy_sell_factor are all required" unless name && screen_name && regexp && buy_sell_factor
|
24
24
|
@name = name
|
25
25
|
@screen_name = screen_name
|
@@ -8,16 +8,8 @@ class Dolarblue
|
|
8
8
|
# @return [Dolarblue] new instance
|
9
9
|
def initialize(config = Configuration.instance)
|
10
10
|
fail ArgumentError, "Expected a Dolarblue::Configuration instance as argument" unless config.is_a?(Configuration)
|
11
|
-
@blue = Dolarblue::Exchange.new(
|
12
|
-
|
13
|
-
screen_name: config.blue_screen_name,
|
14
|
-
regexp: config.blue_regexp,
|
15
|
-
buy_sell_factor: config.buy_sell_factor)
|
16
|
-
@official = Dolarblue::Exchange.new(
|
17
|
-
name: 'Official',
|
18
|
-
screen_name: config.official_screen_name,
|
19
|
-
regexp: config.official_regexp,
|
20
|
-
buy_sell_factor: config.buy_sell_factor)
|
11
|
+
@blue = Dolarblue::Exchange.new('Blue', config.blue_screen_name, config.blue_regexp, config.buy_sell_factor)
|
12
|
+
@official = Dolarblue::Exchange.new('Official', config.official_screen_name, config.official_regexp, config.buy_sell_factor)
|
21
13
|
self
|
22
14
|
end
|
23
15
|
|
data/lib/dolarblue/version.rb
CHANGED
data/spec/exchange_spec.rb
CHANGED
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Dolarblue::Exchange do
|
4
4
|
let(:screen_name) { 'DolarBlue' }
|
5
|
-
let(:blue) { described_class.new(
|
5
|
+
let(:blue) { described_class.new('Blue', screen_name, /\$(\d+)[\.,](\d+)/, 0.99) }
|
6
6
|
let(:blue_tweet) do
|
7
7
|
Twitter::Tweet.new({
|
8
8
|
id: '309326405148233731',
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dolarblue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leo Gallucci
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-03-
|
11
|
+
date: 2013-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: twitter_anonymous_client
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - '>='
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.0.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - '>='
|
24
|
+
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.0.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: time_ago_in_words
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - '>='
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.1.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - '>='
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.1.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - '>='
|
45
|
+
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - '>='
|
52
|
+
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
54
|
+
version: '1.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - '>='
|
59
|
+
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - '>='
|
66
|
+
- - ! '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
@@ -84,58 +84,58 @@ dependencies:
|
|
84
84
|
name: redcarpet
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - '>='
|
87
|
+
- - ! '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 2.2.2
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - '>='
|
94
|
+
- - ! '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 2.2.2
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: yard
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - '>='
|
101
|
+
- - ! '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 0.8.5.2
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - '>='
|
108
|
+
- - ! '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 0.8.5.2
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: simplecov
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - '>='
|
115
|
+
- - ! '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: 0.7.1
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - '>='
|
122
|
+
- - ! '>='
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 0.7.1
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: coveralls
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - '>='
|
129
|
+
- - ! '>='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
131
|
+
version: 0.6.2
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - '>='
|
136
|
+
- - ! '>='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
138
|
+
version: 0.6.2
|
139
139
|
description: Query Argentine Peso vs US$ exchange values with particular interest
|
140
140
|
in official vs. ilegal (blue) reference prices.
|
141
141
|
email:
|
@@ -147,6 +147,7 @@ extra_rdoc_files: []
|
|
147
147
|
files:
|
148
148
|
- .gitignore
|
149
149
|
- .rspec
|
150
|
+
- .ruby-version
|
150
151
|
- .travis.yml
|
151
152
|
- .yardopts
|
152
153
|
- CHANGELOG.md
|
@@ -175,17 +176,17 @@ require_paths:
|
|
175
176
|
- lib
|
176
177
|
required_ruby_version: !ruby/object:Gem::Requirement
|
177
178
|
requirements:
|
178
|
-
- - '>='
|
179
|
+
- - ! '>='
|
179
180
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
181
|
+
version: 1.9.2
|
181
182
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
183
|
requirements:
|
183
|
-
- - '>='
|
184
|
+
- - ! '>='
|
184
185
|
- !ruby/object:Gem::Version
|
185
|
-
version:
|
186
|
+
version: 1.3.6
|
186
187
|
requirements: []
|
187
188
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.0.
|
189
|
+
rubygems_version: 2.0.3
|
189
190
|
signing_key:
|
190
191
|
specification_version: 4
|
191
192
|
summary: Query Argentine Peso vs US$ exchange values with particular interest in official
|