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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 124058c97bc5b73e8f0dc1187c9a88f806ab428a
4
- data.tar.gz: da78a2c86f8aab48a5771a3954d249b66e02f49d
3
+ metadata.gz: '08aed386009e4e574c4f8bdc03a68bde489bd9b6'
4
+ data.tar.gz: f4b89bfc6b7f225863000eedb86430bc19819b77
5
5
  SHA512:
6
- metadata.gz: 32b51abc26c2a0efbc486f78c09c2c97b8038d6eccdfa516af53d86013252b4d8688f07073b4e045129ff0f16df099ed7b12b05299f18d11d456e63e14c7e0e9
7
- data.tar.gz: 6741cb6170634b3204d4871aa34857aa6284e042e73e0ee0680104e71f5b316ca0d7a9141034f4b4988a07f706089520972d5c6f7d7fd7872fed43dcdede259d
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.present? ? debug : false)
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
@@ -1,3 +1,3 @@
1
1
  module Dynaccount
2
- VERSION = '0.9.4'.freeze
2
+ VERSION = '0.9.5'.freeze
3
3
  end
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
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-03 00:00:00.000000000 Z
11
+ date: 2017-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json