fidor_api 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/.travis.yml +11 -3
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/fidor_api.gemspec +2 -2
- data/lib/fidor_api/password.rb +3 -4
- data/lib/fidor_api/user.rb +2 -2
- data/lib/fidor_api/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 97d79aedc44411ce99bd89c3700e70ae29ab2ebe63c087ec4334dd7ab0eb060f
|
4
|
+
data.tar.gz: c86deca6712ddba2367a2a85be38fde92a6eb3fd832bf7c7a72bdba22557cf82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89297cd1ac37f13e1a59666ee0bb87954d8d71a325d0568ac6b4540ac20659e3ad911400ddba946dfa3387973ed3d99d79027ecbc82fc230de49fce4ce3030d4
|
7
|
+
data.tar.gz: 2a6850779ef5e7c0670b990a03a43812fa8d681143517d7b031e476e10ac99a0147b5b96562baa6e0e57af2653319793eb12712a59dc88782a6c7a12fa7d8b24
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.5.0
|
data/.travis.yml
CHANGED
@@ -1,12 +1,20 @@
|
|
1
|
+
branches:
|
2
|
+
only:
|
3
|
+
- master
|
4
|
+
|
1
5
|
language: ruby
|
6
|
+
|
2
7
|
rvm:
|
3
|
-
- "2.
|
4
|
-
- "2.3
|
5
|
-
- "2.
|
8
|
+
- "2.3.6"
|
9
|
+
- "2.4.3"
|
10
|
+
- "2.5.0"
|
11
|
+
|
6
12
|
before_install:
|
7
13
|
- gem install bundler
|
14
|
+
|
8
15
|
addons:
|
9
16
|
code_climate:
|
10
17
|
repo_token: 2b2b2a8c28682817f985f0afba1e5d643bcc801c6af1a1294869bc118742e95f
|
18
|
+
|
11
19
|
after_success:
|
12
20
|
- bundle exec codeclimate-test-reporter
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/fidor_api.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
20
|
spec.add_dependency "faraday", "~> 0.8"
|
21
|
-
spec.add_dependency "activesupport", ">= 4.2", "<
|
22
|
-
spec.add_dependency "activemodel", ">= 4.2", "<
|
21
|
+
spec.add_dependency "activesupport", ">= 4.2", "< 6.0"
|
22
|
+
spec.add_dependency "activemodel", ">= 4.2", "< 6.0"
|
23
23
|
spec.add_dependency "model_attribute", "~> 2.1"
|
24
24
|
end
|
data/lib/fidor_api/password.rb
CHANGED
@@ -2,15 +2,14 @@ module FidorApi
|
|
2
2
|
class Password < Connectivity::Resource
|
3
3
|
extend ModelAttribute
|
4
4
|
|
5
|
-
self.endpoint = Connectivity::Endpoint.new("/password_resets", :collection, version: "2", tokenless: true)
|
6
|
-
|
7
5
|
def self.request_new(email)
|
8
|
-
|
9
|
-
response = endpoint.for(self).put(
|
6
|
+
endpoint = Connectivity::Endpoint.new("/password_resets/new_token", :resource, version: "2", tokenless: true)
|
7
|
+
response = endpoint.for(self).put(payload: { email: email, type: "reset_token" })
|
10
8
|
response.body["success"]
|
11
9
|
end
|
12
10
|
|
13
11
|
def self.update(attributes)
|
12
|
+
endpoint = Connectivity::Endpoint.new("/password_resets", :collection, version: "2", tokenless: true)
|
14
13
|
response = endpoint.for(self).post(payload: attributes)
|
15
14
|
response.body["success"]
|
16
15
|
end
|
data/lib/fidor_api/user.rb
CHANGED
@@ -2,7 +2,7 @@ module FidorApi
|
|
2
2
|
class User < Connectivity::Resource
|
3
3
|
extend ModelAttribute
|
4
4
|
|
5
|
-
self.endpoint = Connectivity::Endpoint.new('/users', :
|
5
|
+
self.endpoint = Connectivity::Endpoint.new('/users/current', :resource)
|
6
6
|
|
7
7
|
attribute :id, :integer
|
8
8
|
attribute :email, :string
|
@@ -12,7 +12,7 @@ module FidorApi
|
|
12
12
|
attribute :updated_at, :time
|
13
13
|
|
14
14
|
def self.current
|
15
|
-
new endpoint.for(self).get
|
15
|
+
new endpoint.for(self).get.body
|
16
16
|
end
|
17
17
|
|
18
18
|
module ClientSupport
|
data/lib/fidor_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fidor_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fidor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: '4.2'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
36
|
+
version: '6.0'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '4.2'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '6.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: activemodel
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
version: '4.2'
|
54
54
|
- - "<"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
56
|
+
version: '6.0'
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -63,7 +63,7 @@ dependencies:
|
|
63
63
|
version: '4.2'
|
64
64
|
- - "<"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: '
|
66
|
+
version: '6.0'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: model_attribute
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
171
|
version: '0'
|
172
172
|
requirements: []
|
173
173
|
rubyforge_project:
|
174
|
-
rubygems_version: 2.
|
174
|
+
rubygems_version: 2.7.4
|
175
175
|
signing_key:
|
176
176
|
specification_version: 4
|
177
177
|
summary: Simple ruby client for the Fidor Bank API
|