loquor 1.0.0 → 1.1.0
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/loquor/object_hash.rb +5 -0
- data/lib/loquor/resource.rb +5 -0
- data/lib/loquor/version.rb +1 -1
- data/test/object_hash_test.rb +15 -0
- data/test/resource_test.rb +15 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d5223911307f2a072de37742e93f4c08a67592a
|
4
|
+
data.tar.gz: af4b9f1dc22ea1affdcb1b4d7df4813fdd9c42fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a645d10cd0c71c6cc2e4495e9faef127a7b17659b227fe54f92bfa14faeaf808d82af1f098920d50a417726ec103d5f455b3064c50c732d68ab55b9a7541629
|
7
|
+
data.tar.gz: 05207e53a713ec9892e96f960fa47572f68e3114c1b1ff57c0a5cdd8df98551371d25f6bee838269ac6fd0031c7a4d18cffb4bea6d24058817782cd76e820fad
|
data/CHANGELOG.md
CHANGED
data/lib/loquor/object_hash.rb
CHANGED
data/lib/loquor/resource.rb
CHANGED
data/lib/loquor/version.rb
CHANGED
data/test/object_hash_test.rb
CHANGED
@@ -22,6 +22,21 @@ module Loquor
|
|
22
22
|
assert_equal "bar", representation[1]
|
23
23
|
end
|
24
24
|
|
25
|
+
def test_respond_to_still_proxies_to_super
|
26
|
+
representation = ObjectHash.new({})
|
27
|
+
assert_equal true, representation.respond_to?(:to_s)
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_respond_to_still_returns_false_for_non_existant_keys
|
31
|
+
representation = ObjectHash.new({})
|
32
|
+
assert_equal false, representation.respond_to?(:dog)
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_respond_to_knows_about_hash_keys
|
36
|
+
representation = ObjectHash.new({foo: "bar"})
|
37
|
+
assert_equal true, representation.respond_to?(:foo)
|
38
|
+
end
|
39
|
+
|
25
40
|
def test_hash_keys_are_accessible_via_methods
|
26
41
|
representation = ObjectHash.new({foo: "bar"})
|
27
42
|
assert_equal "bar", representation.foo
|
data/test/resource_test.rb
CHANGED
@@ -6,6 +6,21 @@ module Loquor
|
|
6
6
|
self.path = "/foobar"
|
7
7
|
end
|
8
8
|
|
9
|
+
def test_respond_to_still_proxies_to_super
|
10
|
+
foobar = Foobar.new({})
|
11
|
+
assert_equal true, foobar.respond_to?(:to_s)
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_respond_to_still_returns_false_for_non_existant_keys
|
15
|
+
foobar = Foobar.new({})
|
16
|
+
assert_equal false, foobar.respond_to?(:dog)
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_respond_to_should_proxy_to_data
|
20
|
+
foobar = Foobar.new({foo: 'bar'})
|
21
|
+
assert foobar.respond_to?(:foo)
|
22
|
+
end
|
23
|
+
|
9
24
|
def test_find_should_get_correct_path_with_simple_path
|
10
25
|
id = 8
|
11
26
|
Loquor.expects(:get).with("/foobar/#{id}")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loquor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Walker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: filum
|
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
174
|
version: '0'
|
175
175
|
requirements: []
|
176
176
|
rubyforge_project:
|
177
|
-
rubygems_version: 2.
|
177
|
+
rubygems_version: 2.1.9
|
178
178
|
signing_key:
|
179
179
|
specification_version: 4
|
180
180
|
summary: This library dispatches requests to Meducation
|
@@ -193,3 +193,4 @@ test_files:
|
|
193
193
|
- test/resource_mock_test.rb
|
194
194
|
- test/resource_test.rb
|
195
195
|
- test/test_helper.rb
|
196
|
+
has_rdoc:
|