shutl_resource 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NmRlNDY2N2JlODI4YmZhYzdmZWJkOGVjOGFhOWFkMTQ1NGZlYmIxZg==
4
+ NzAyN2EwMWRhNjYwOWUxYjIzNWYwZWY0ZDcyZWI4YTlhOWVlNDZhZA==
5
5
  data.tar.gz: !binary |-
6
- Yzg2NTQ4YjZmNzg3MTI4MTNmYmVhYjQ0MTQxYTU4MjVlZDNjYWUxMA==
6
+ ZmQ3MGQ0ZTY2MWFjNGYzMjlmM2FjMjg0ZjAxYTE2ZjM5ZDYxZDM0Mg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODlhY2MyYWE2ZjM1YTNkNjYyYjA0NzFjZTBkZjU2MmMzZDAyMzA1OWI1MTQ1
10
- ZThmZDdmOWJkZjg5ZGQ1Nzk3YWZlYjljMzViNTkyMmY3MDkzMThhZTIyYTJk
11
- Y2E3Mjc0Y2RkMWMyNDVlN2I0ZTg0YTNkMDdhMzBmZmE4NjU4NjA=
9
+ OTIzN2YyYzI0ZWU4YTNhYWZlYzc0ZTU1MDE2MGQ3MDkzYjk5MzM2ZDVhNjNm
10
+ ZGM2MWNlNzRjZGQ4YmQzNWRlOGQ3ZDgyZWFhNTE1YmNkMTk5MTY5YjY0ZDgw
11
+ MTY2OTQyZDJhNzI3YjdkY2E0ODhlYWRlMmZjYjU0MDE3N2Y0ZjE=
12
12
  data.tar.gz: !binary |-
13
- ODJlMzU5ZTM5MzRhZjkxODBlMmVlMjdlMWFhZWFjZDBkOWE0YTEzNzRjN2Qw
14
- ZmFmZDJjNTRiYTNjNDZhNDRjZWNmYWMzMjlkMTkxMTFlZjc1OTY2MDJiODg4
15
- MWFjY2I5ZWIyNjRmOWZjZDM5ZjI1N2VkMjE3ODBlYmM4NjQwMjU=
13
+ NmQwYWY0MWJkMGEzZjcxYWI5NjNlMjEzNDdiMThmNGU1N2IxODYzZGY1ZTRl
14
+ NDhjZmE1NmYwOTI0YzFjZDlmMWVhOTJhOWM2ZTFjYzYyOGIzNjM1ZGZjMzUw
15
+ MTQzOTQxYWY1MzQwMmI5ZGZkY2YyNjMwMzAxYTIyODdiMTBiMzE=
@@ -61,10 +61,9 @@ module Shutl::Resource
61
61
  end
62
62
 
63
63
  def respond_to? method
64
- attributes.has_key?(method) ? true : super
64
+ attributes.has_key?(String(method)) ? true : super
65
65
  end
66
66
 
67
-
68
67
  def next_resource
69
68
  pagination["next_resource"] if pagination
70
69
  end
@@ -1,5 +1,5 @@
1
1
  module Shutl
2
2
  module Resource
3
- VERSION = '1.5.0'
3
+ VERSION = '1.5.1'
4
4
  end
5
5
  end
@@ -470,5 +470,15 @@ describe Shutl::Resource::Rest do
470
470
  end
471
471
  end
472
472
 
473
+ describe '#respond_to?' do
474
+ subject { TestRest.new a:1, b:2 }
473
475
 
476
+ it 'responds to a getter if it has an attribute' do
477
+ subject.respond_to?(:a).should be_true
478
+ end
479
+
480
+ it 'does not responsd to a getter if there is no attributes' do
481
+ subject.respond_to?(:foo).should be_false
482
+ end
483
+ end
474
484
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shutl_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rouchy