fio_api 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +26 -0
  3. data/.travis.yml +7 -2
  4. data/Gemfile +9 -12
  5. data/README.rdoc +8 -3
  6. data/Rakefile +11 -13
  7. data/VERSION +1 -1
  8. data/fio_api.gemspec +57 -33
  9. data/lib/base/account.rb +2 -2
  10. data/lib/base/deserializers/import_response_deserializer.rb +51 -0
  11. data/lib/base/deserializers/list_response_deserializer.rb +47 -36
  12. data/lib/base/list.rb +9 -14
  13. data/lib/base/payment.rb +40 -0
  14. data/lib/base/payments/domestic.rb +13 -0
  15. data/lib/base/payments/status.rb +8 -0
  16. data/lib/base/payments/xml/item.rb +41 -0
  17. data/lib/base/payments/xml/root.rb +30 -0
  18. data/lib/base/request.rb +4 -54
  19. data/lib/base/transaction.rb +2 -2
  20. data/lib/base.rb +2 -6
  21. data/lib/fio_api.rb +16 -10
  22. data/lib/utils/hash.rb +2 -2
  23. data/spec/base/account_spec.rb +4 -8
  24. data/spec/base/deserializers/import_response_deserializer_spec.rb +41 -0
  25. data/spec/base/deserializers/list_response_deserializer_spec.rb +48 -59
  26. data/spec/base/list_spec.rb +36 -23
  27. data/spec/base/payment_spec.rb +38 -0
  28. data/spec/base/payments/domestic_spec.rb +14 -0
  29. data/spec/base/payments/status_spec.rb +13 -0
  30. data/spec/base/payments/xml/root_spec.rb +63 -0
  31. data/spec/base/request_spec.rb +2 -49
  32. data/spec/base/transaction_spec.rb +5 -9
  33. data/spec/fio_api_spec.rb +4 -7
  34. data/spec/fixtures/vcr_cassettes/by_date_range.yml +47 -0
  35. data/spec/fixtures/vcr_cassettes/by_listing_id_and_year.yml +49 -0
  36. data/spec/fixtures/vcr_cassettes/from_last_fetch.yml +44 -0
  37. data/spec/fixtures/vcr_cassettes/import.yml +53 -0
  38. data/spec/fixtures/vcr_cassettes/invalid_import.yml +51 -0
  39. data/spec/fixtures/vcr_cassettes/set_last_fetch_date.yml +44 -0
  40. data/spec/fixtures/vcr_cassettes/set_last_fetch_id.yml +47 -0
  41. data/spec/spec_helper.rb +7 -2
  42. data/spec/utils/hash_spec.rb +10 -15
  43. metadata +70 -24
  44. data/lib/base/deserializer.rb +0 -19
  45. data/spec/base/deserializer_spec.rb +0 -12
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fio_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin Bortlik
8
+ - Adam Martinik
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-07-15 00:00:00.000000000 Z
12
+ date: 2018-06-04 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: httparty
@@ -16,86 +17,114 @@ dependencies:
16
17
  requirements:
17
18
  - - ">="
18
19
  - !ruby/object:Gem::Version
19
- version: 0.9.0
20
+ version: 0.16.2
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
25
  - - ">="
25
26
  - !ruby/object:Gem::Version
26
- version: 0.9.0
27
+ version: 0.16.2
27
28
  - !ruby/object:Gem::Dependency
28
- name: rspec
29
+ name: bundler
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
32
  - - ">="
32
33
  - !ruby/object:Gem::Version
33
- version: 2.8.0
34
+ version: 1.10.6
34
35
  type: :development
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
39
  - - ">="
39
40
  - !ruby/object:Gem::Version
40
- version: 2.8.0
41
+ version: 1.10.6
41
42
  - !ruby/object:Gem::Dependency
42
- name: rspec-mocks
43
+ name: jeweler
43
44
  requirement: !ruby/object:Gem::Requirement
44
45
  requirements:
45
46
  - - ">="
46
47
  - !ruby/object:Gem::Version
47
- version: 2.8.0
48
+ version: 2.1.1
48
49
  type: :development
49
50
  prerelease: false
50
51
  version_requirements: !ruby/object:Gem::Requirement
51
52
  requirements:
52
53
  - - ">="
53
54
  - !ruby/object:Gem::Version
54
- version: 2.8.0
55
+ version: 2.1.1
55
56
  - !ruby/object:Gem::Dependency
56
57
  name: rdoc
57
58
  requirement: !ruby/object:Gem::Requirement
58
59
  requirements:
59
60
  - - ">="
60
61
  - !ruby/object:Gem::Version
61
- version: '3.12'
62
+ version: 4.2.0
62
63
  type: :development
63
64
  prerelease: false
64
65
  version_requirements: !ruby/object:Gem::Requirement
65
66
  requirements:
66
67
  - - ">="
67
68
  - !ruby/object:Gem::Version
68
- version: '3.12'
69
+ version: 4.2.0
69
70
  - !ruby/object:Gem::Dependency
70
- name: bundler
71
+ name: rspec
71
72
  requirement: !ruby/object:Gem::Requirement
72
73
  requirements:
73
74
  - - ">="
74
75
  - !ruby/object:Gem::Version
75
- version: 1.2.0
76
+ version: '0'
76
77
  type: :development
77
78
  prerelease: false
78
79
  version_requirements: !ruby/object:Gem::Requirement
79
80
  requirements:
80
81
  - - ">="
81
82
  - !ruby/object:Gem::Version
82
- version: 1.2.0
83
+ version: '0'
83
84
  - !ruby/object:Gem::Dependency
84
- name: jeweler
85
+ name: rspec-mocks
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 3.4.0
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: 3.4.0
98
+ - !ruby/object:Gem::Dependency
99
+ name: vcr
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: webmock
85
114
  requirement: !ruby/object:Gem::Requirement
86
115
  requirements:
87
116
  - - ">="
88
117
  - !ruby/object:Gem::Version
89
- version: 1.8.4
118
+ version: '0'
90
119
  type: :development
91
120
  prerelease: false
92
121
  version_requirements: !ruby/object:Gem::Requirement
93
122
  requirements:
94
123
  - - ">="
95
124
  - !ruby/object:Gem::Version
96
- version: 1.8.4
125
+ version: '0'
97
126
  description: API wrapper for FIO bank
98
- email: robinbortlik@gmail.com
127
+ email: a.martinik@gmail.com
99
128
  executables: []
100
129
  extensions: []
101
130
  extra_rdoc_files:
@@ -103,6 +132,7 @@ extra_rdoc_files:
103
132
  - README.rdoc
104
133
  files:
105
134
  - ".rspec"
135
+ - ".rubocop.yml"
106
136
  - ".travis.yml"
107
137
  - Gemfile
108
138
  - LICENSE.txt
@@ -112,23 +142,39 @@ files:
112
142
  - fio_api.gemspec
113
143
  - lib/base.rb
114
144
  - lib/base/account.rb
115
- - lib/base/deserializer.rb
145
+ - lib/base/deserializers/import_response_deserializer.rb
116
146
  - lib/base/deserializers/list_response_deserializer.rb
117
147
  - lib/base/list.rb
148
+ - lib/base/payment.rb
149
+ - lib/base/payments/domestic.rb
150
+ - lib/base/payments/status.rb
151
+ - lib/base/payments/xml/item.rb
152
+ - lib/base/payments/xml/root.rb
118
153
  - lib/base/request.rb
119
154
  - lib/base/transaction.rb
120
155
  - lib/fio_api.rb
121
156
  - lib/utils/hash.rb
122
157
  - spec/base/account_spec.rb
123
- - spec/base/deserializer_spec.rb
158
+ - spec/base/deserializers/import_response_deserializer_spec.rb
124
159
  - spec/base/deserializers/list_response_deserializer_spec.rb
125
160
  - spec/base/list_spec.rb
161
+ - spec/base/payment_spec.rb
162
+ - spec/base/payments/domestic_spec.rb
163
+ - spec/base/payments/status_spec.rb
164
+ - spec/base/payments/xml/root_spec.rb
126
165
  - spec/base/request_spec.rb
127
166
  - spec/base/transaction_spec.rb
128
167
  - spec/fio_api_spec.rb
168
+ - spec/fixtures/vcr_cassettes/by_date_range.yml
169
+ - spec/fixtures/vcr_cassettes/by_listing_id_and_year.yml
170
+ - spec/fixtures/vcr_cassettes/from_last_fetch.yml
171
+ - spec/fixtures/vcr_cassettes/import.yml
172
+ - spec/fixtures/vcr_cassettes/invalid_import.yml
173
+ - spec/fixtures/vcr_cassettes/set_last_fetch_date.yml
174
+ - spec/fixtures/vcr_cassettes/set_last_fetch_id.yml
129
175
  - spec/spec_helper.rb
130
176
  - spec/utils/hash_spec.rb
131
- homepage: http://github.com/robinbortlik/fio_api
177
+ homepage: http://github.com/14113/fio_api
132
178
  licenses:
133
179
  - MIT
134
180
  metadata: {}
@@ -148,8 +194,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
194
  version: '0'
149
195
  requirements: []
150
196
  rubyforge_project:
151
- rubygems_version: 2.4.5
197
+ rubygems_version: 2.6.11
152
198
  signing_key:
153
- specification_version: 3
199
+ specification_version: 4
154
200
  summary: API wrapper for FIO bank
155
201
  test_files: []
@@ -1,19 +0,0 @@
1
- module FioAPI
2
- # == Base class for deserializers. Should
3
- class Deserializer < FioAPI::Base
4
-
5
- # Deserialize method is required for every deserializer
6
- #
7
- # == Parameters:
8
- # hash::
9
- # Hash returned form request
10
- #
11
- # == Returns:
12
- # Should return new deserialized object
13
- #
14
- def deserialize(json)
15
- raise "Implement deserialize method"
16
- end
17
-
18
- end
19
- end
@@ -1,12 +0,0 @@
1
- require_relative "../spec_helper"
2
-
3
- describe FioAPI::Deserializer do
4
-
5
- describe "deserialize" do
6
-
7
- it "should raise exception" do
8
- expect { FioAPI::Deserializer.new.deserialize }.to raise_error
9
- end
10
-
11
- end
12
- end