dynaccount 0.9.6 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/dynaccount.rb +2 -2
- data/lib/dynaccount/dynaccount_object.rb +4 -0
- data/lib/dynaccount/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b50703a5a2e1867a47e8da8a5b899e97e513d7dd94e8bfa1b19d99cb0fc2a152
|
4
|
+
data.tar.gz: 6604b58018b0aefb67aac564c2189e0c376237c40ca1288cb89847c27ba23d09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b365e503006696c4eaac831b2ca7e281253f254798e9bc2ff911c98693dae8bc86f751219abe82ea917ecda576b7fb103ff6a7d56e3c8121baba9472a90c93d
|
7
|
+
data.tar.gz: 94a00480d3c367843100d8e1124f2b50fb73812c3d7314cd6eeb8a67ab586a58353b165d957a33dc6d840957e95e9b9f0288a8682192b603d620ad827b59413e
|
data/lib/dynaccount.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'faraday'
|
3
|
-
require 'net/http'
|
3
|
+
require 'net/http/persistent'
|
4
4
|
require 'logger'
|
5
5
|
|
6
6
|
require 'dynaccount/dynaccount_object'
|
@@ -84,7 +84,7 @@ module Dynaccount
|
|
84
84
|
logger = Logger.new STDOUT
|
85
85
|
logger.level = debug ? Logger::DEBUG : Logger::INFO
|
86
86
|
faraday.response :logger, logger, bodies: (debug || false)
|
87
|
-
faraday.adapter
|
87
|
+
faraday.adapter :net_http_persistent
|
88
88
|
end
|
89
89
|
|
90
90
|
@api_connection.post do |req|
|
@@ -44,12 +44,16 @@ module Dynaccount
|
|
44
44
|
req = JSON.parse(Dynaccount.request(url(id, 'get'), {}, :post).body)['result'].map { |res| new(res) }
|
45
45
|
return req[0] if req.size == 1
|
46
46
|
req
|
47
|
+
rescue JSON::ParserError => e
|
48
|
+
return nil
|
47
49
|
end
|
48
50
|
|
49
51
|
def self.find_by(params = {})
|
50
52
|
req = JSON.parse(Dynaccount.request(url(nil, 'get', params), {}, :post).body)['result'].map { |res| new(res) }
|
51
53
|
return req[0] if req.size == 1
|
52
54
|
req
|
55
|
+
rescue JSON::ParserError => e
|
56
|
+
return nil
|
53
57
|
end
|
54
58
|
|
55
59
|
def self.url(id, action, params = {})
|
data/lib/dynaccount/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynaccount
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frederik Spang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07
|
11
|
+
date: 2018-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -44,6 +44,20 @@ dependencies:
|
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0.10'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: net-http-persistent
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "<"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '3'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "<"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '3'
|
47
61
|
description: The dynaccount gem is an module-based integration for Dynaccount, with
|
48
62
|
the classic ActiveRecord structure, find, all etc.
|
49
63
|
email:
|
@@ -144,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
158
|
version: '0'
|
145
159
|
requirements: []
|
146
160
|
rubyforge_project:
|
147
|
-
rubygems_version: 2.
|
161
|
+
rubygems_version: 2.7.7
|
148
162
|
signing_key:
|
149
163
|
specification_version: 4
|
150
164
|
summary: The dynaccount gem is an module-based integration for Dynaccount
|