soup 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e3d6c5cdcae259cead6e16b21a1aacecdd44ab83
4
- data.tar.gz: 6495467cbdc7268ef2389ab7f7b52acf84c119ec
3
+ metadata.gz: c2cdde42bcba5e8941e39c5357151f663583dcf5
4
+ data.tar.gz: 25aad47ac91728b5185dfa5ea44e1afdd1df58d0
5
5
  SHA512:
6
- metadata.gz: 47a65a9ff370847a33ea9d845825b99f4fc6531eba46e3ed462b3783b9109a355caf6039cfc51f160a886cc987a532c1e1d855869281dce5fcde561f8a903a43
7
- data.tar.gz: 98b441fb09269f4c9b03d3b7fd8423a98f28d45f20afc7871b817510fa849cbd5a312eba38c36e263c71fb72bf97108a1da5d6a1ffe10deae27707ad0cb39c19
6
+ metadata.gz: 559c0a7caba3609db903f53e58e803049ad2a52f34ac6f2a268ca0ee7735c29bd07f7e88ef1bfd0e1f153cc0a5d169f2a35c2b0543cdcd9226c9d999c08be5fb
7
+ data.tar.gz: b080481909c140e1795ba68206d8fe04604a65ed34416cb382b9d7c3f23e50c9d7274ece2523da778c321e715cad209102a2aab482989b1602abd6125d05a1f4
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ spec = Gem::Specification.new do |s|
21
21
 
22
22
  # Change these as appropriate
23
23
  s.name = "soup"
24
- s.version = "1.0.12"
24
+ s.version = "1.0.13"
25
25
  s.summary = "A super-simple data store"
26
26
  s.author = "James Adam"
27
27
  s.email = "james@lazyatom.com"
@@ -39,7 +39,7 @@ class Soup
39
39
  end
40
40
 
41
41
  def respond_to?(method, include_all=false)
42
- @attributes.keys.include?(method.to_s)
42
+ @attributes.keys.any? { |k| k.to_s == method.to_s }
43
43
  end
44
44
 
45
45
  def method_missing(method, *args)
@@ -35,4 +35,19 @@ context "A snip" do
35
35
  assert_equal Soup::Snip.new({:name => 'test'}, nil), @soup['test']
36
36
  end
37
37
  end
38
- end
38
+
39
+ context "respond_to?" do
40
+ should "be true when snip has given attribute" do
41
+ assert @snip.respond_to?(:name)
42
+ end
43
+
44
+ should "be false is snip doesn't have given attribute" do
45
+ assert !@snip.respond_to?(:blah)
46
+ end
47
+
48
+ should "allow comparison using symbols or strings" do
49
+ assert @snip.respond_to?(:name)
50
+ assert @snip.respond_to?('name')
51
+ end
52
+ end
53
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soup
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Adam