haveapi-client 0.4.2 → 0.5.0

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: 11aec50e3cc0854e78738e3fe11ab74c4244f34d
4
- data.tar.gz: 94e74c5add0e53738bc8b93b9c07469ca01bf634
3
+ metadata.gz: 840df0f77708fe4989863028214ef4d5c4fa9766
4
+ data.tar.gz: e11a71e8dd445c300dd6d50eb8299e9807cfd5bf
5
5
  SHA512:
6
- metadata.gz: 94773be2ab58f34047c60a2a3a30a740c074ba0d7bfed59c3e29c0d94e1a22a23e9009fa07f9ded93f3014722c5d64f32b71664ec3ecb55d2753f530648a1bec
7
- data.tar.gz: 2b53c972ac61f6837262bb316b529443ea79ee056ac991f1fede1f84dab2da46f53e8bdf85f7540ecb6f6087ac64bb113ef21be546a9e26e2da1f1de94d3df74
6
+ metadata.gz: b844cbb73490a46e9998030520a73869e77cb0b1d7ae56ac34c913f47273eb262bc7d1ee94490879a9485463a62ab51f180412e6bcea427978e5307007e4bcc5
7
+ data.tar.gz: 5ca4a116bee236baab8b678fe45832c89566071bf2f1d4d47df66911171def317eac980070191bd3177fc9c031e217b3d2f41e9f68d6ca823f785d16001f2c10
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ * Tue Feb 9 2016 - version 0.5.0
2
+ - Fixed validation error reporting for Datetime parameters
3
+ - Fixed resource object cloning
4
+
1
5
  * Sun Jan 24 2016 - version 0.4.2
2
6
  - No changes
3
7
 
@@ -6,7 +6,7 @@ require 'haveapi/client/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'haveapi-client'
8
8
  spec.version = HaveAPI::Client::VERSION
9
- spec.date = '2016-01-24'
9
+ spec.date = '2016-02-09'
10
10
  spec.authors = ['Jakub Skokan']
11
11
  spec.email = ['jakub.skokan@vpsfree.cz']
12
12
  spec.summary =
@@ -17,8 +17,8 @@ module HaveAPI::Client
17
17
  def initialize(params, desc, value)
18
18
  @params = params
19
19
  @desc = desc
20
- @value = coerce(value)
21
20
  @errors = []
21
+ @value = coerce(value)
22
22
  end
23
23
 
24
24
  def valid?
@@ -9,12 +9,11 @@ module HaveAPI::Client
9
9
  @api = api
10
10
  @name = name
11
11
  @prepared_args = []
12
- end
13
-
14
- def setup(description)
15
12
  @actions = {}
16
13
  @resources = {}
14
+ end
17
15
 
16
+ def setup(description)
18
17
  description[:actions].each do |name, desc|
19
18
  action = HaveAPI::Client::Action.new(@api, name, desc, [])
20
19
  define_action(action)
@@ -32,12 +31,14 @@ module HaveAPI::Client
32
31
  # Copy actions and resources from the +original+ resource
33
32
  # and create methods for this instance.
34
33
  def setup_from_clone(original)
35
- original.actions.each_value do |action|
34
+ original.actions.each do |name, action|
36
35
  define_action(action)
36
+ @actions[name] = action
37
37
  end
38
38
 
39
- original.resources.each_value do |resource|
39
+ original.resources.each do |name, resource|
40
40
  define_resource(resource)
41
+ @resources[name] = resource
41
42
  end
42
43
  end
43
44
 
@@ -1,6 +1,6 @@
1
1
  module HaveAPI
2
2
  module Client
3
3
  PROTOCOL_VERSION = '1.0'
4
- VERSION = '0.4.2'
4
+ VERSION = '0.5.0'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haveapi-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Skokan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-24 00:00:00.000000000 Z
11
+ date: 2016-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler