frenchy 0.2.3 → 0.2.4

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: 16af458377a1de408890760f4ac784abaad0a414
4
- data.tar.gz: 84de7abdc7e201642c2521b3ec7add47869572a6
3
+ metadata.gz: 755aa8a35ab0b0d40c2a875c0e917b3acd30142b
4
+ data.tar.gz: 8fb75094c4051c595071ed07526f63fd7bc0d465
5
5
  SHA512:
6
- metadata.gz: f347685ae4c325a22ff0a7b76b6c11dd51742549c9ad51d1d38dc6bf5a188af842d5b8919a0cb61c42239ca41a2a987462b6838f08922cd932c65cff53e30895
7
- data.tar.gz: 350dde3459350edb714c2f579cd912f1dd835b97865908249ceb99bca97d2b2ff151f590b5b66c1836f59c80dff11fe8b7ca1a31fec740df5dfcefeb17df81d3
6
+ metadata.gz: 63325bcbd4d405b5d866277f9e8608b63393fcba92beb34abd5f0e4d5b092f2f5340e376e0287a256976e53d05c5d4c8ff85f82392585e9de44dfd988fa1ab23
7
+ data.tar.gz: 1b58dcad673e8fe998539a443a5311f390f5f3a6a4661eafc4f51a552b3300ef8b5232db5cd7a600b4a6ecb7d04e1b235d3bdd0c12b9caf3b8ad5266eaaded30
@@ -26,7 +26,7 @@ module Frenchy
26
26
  params.stringify_keys!
27
27
  name, endpoint = resolve_endpoints(endpoints)
28
28
  method = endpoint["method"] || "get"
29
- extras = {"model" => self.name, "endpoint" => name}
29
+ extras = {"model" => self.name.underscore, "endpoint" => name}
30
30
 
31
31
  response = Frenchy::Request.new(@service, method, endpoint["path"], params, extras).value
32
32
  digest_response(response, endpoint)
@@ -1,3 +1,3 @@
1
1
  module Frenchy
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
@@ -101,5 +101,16 @@ describe Frenchy::Resource do
101
101
  BinNoEndpoints.find_with_endpoint(:nonexist, myarg: "mydata")
102
102
  end.to raise_exception(Frenchy::Error)
103
103
  end
104
+
105
+ it "includes the under_score model name in extras" do
106
+ response = double("Frenchy::Request", value: {})
107
+
108
+ expect(Frenchy::Request).
109
+ to receive(:new).
110
+ with("httpbin", "get", "/get", {"id" => 1}, {"model" => "bin_one_endpoint", "endpoint" => "default"}).
111
+ and_return(response)
112
+
113
+ BinOneEndpoint.find_with_endpoint(:default, id: 1)
114
+ end
104
115
  end
105
116
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frenchy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Coene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-18 00:00:00.000000000 Z
11
+ date: 2014-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
179
  version: '0'
180
180
  requirements: []
181
181
  rubyforge_project:
182
- rubygems_version: 2.2.2
182
+ rubygems_version: 2.2.0
183
183
  signing_key:
184
184
  specification_version: 4
185
185
  summary: Opinionated JSON API modeling framework for Ruby.