dynaccount 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dynaccount.rb +1 -1
- data/lib/dynaccount/dynaccount_object.rb +11 -0
- data/lib/dynaccount/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08aed386009e4e574c4f8bdc03a68bde489bd9b6'
|
4
|
+
data.tar.gz: f4b89bfc6b7f225863000eedb86430bc19819b77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f549b129e9e042212f35d2a47a91a47c12f42a1317b94aad2af00cc27a120cdf8e7b768cc6943a7af11986e5500a38e30cae1821a8049915ed23d3bb5c24963
|
7
|
+
data.tar.gz: ce901eeaeab9044c670575dccf5c8983de81ff05e49ced1302f908a07839f1fc0b967a624e79bc529080a2bd2811a1e09cabd44fafce6b464dbc89e3a763792f
|
data/lib/dynaccount.rb
CHANGED
@@ -81,7 +81,7 @@ module Dynaccount
|
|
81
81
|
def request(url, params = {}, _method = :post)
|
82
82
|
@api_connection ||= Faraday.new(url: "https://#{@base_url}") do |faraday|
|
83
83
|
faraday.request :url_encoded
|
84
|
-
faraday.response :logger, ::Logger.new(STDOUT), bodies: (debug
|
84
|
+
faraday.response :logger, ::Logger.new(STDOUT), bodies: (debug || false)
|
85
85
|
faraday.adapter :net_http_persistent
|
86
86
|
end
|
87
87
|
|
@@ -1,7 +1,10 @@
|
|
1
1
|
module Dynaccount
|
2
2
|
class DynaccountObject
|
3
|
+
attr_accessor :values
|
4
|
+
|
3
5
|
def initialize(attributes)
|
4
6
|
@keys = attributes.keys
|
7
|
+
@values = attributes
|
5
8
|
attributes.each do |k, v|
|
6
9
|
singleton_class.send(:attr_accessor, k.to_sym)
|
7
10
|
send("#{k}=", v)
|
@@ -54,5 +57,13 @@ module Dynaccount
|
|
54
57
|
url += "?" + params.map { |k,v| "#{k}=#{v}" }.join('&') if params.any?
|
55
58
|
url
|
56
59
|
end
|
60
|
+
|
61
|
+
def marshal_dump
|
62
|
+
values
|
63
|
+
end
|
64
|
+
|
65
|
+
def marshal_load(val)
|
66
|
+
initialize(val)
|
67
|
+
end
|
57
68
|
end
|
58
69
|
end
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frederik Spang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|