loquor 1.2.0 → 1.2.1

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: 9a1c662fecb099a96aaf567f6b51e6ad9c4638dd
4
- data.tar.gz: a6d61c28522534f7833ffb23b254ee059e25eda3
3
+ metadata.gz: 39b95098c1be5aa6115bfe299f9e0ffe900b1c34
4
+ data.tar.gz: df73558cb5a1f5e9215f102c3c099db768457809
5
5
  SHA512:
6
- metadata.gz: aba203c507be449bbaae6c1a942e05dcec2a1f5542f45489ef5ec36862e1f5d196086acea96e1dca64ed00765af6a782c3fcc2733e1ac8f2753d35701777a27a
7
- data.tar.gz: 908fb33fb8e47fadde344f73b1134a56951afffb8d5c5098eb129b8796d3c791e07754394ec88138b066cf9ac60c28cb81dadb7199f4064a1fc0292368700e76
6
+ metadata.gz: 7132361f5e11f1f4abcf6696389d54e4805aefc211a83a984fc04927ef58bc9c0c7bb4b5b6012f3b0eb06bdeac764ce08129948f50a66fa13ba001209edd137d
7
+ data.tar.gz: af3c8063b4a0af2f67a04ec00981943d6f7bfadfffe40cb924e7c8fe7f17ba7f86790cdea863edb086a7069d2fe343a7e6695521712d53cd9f6c0b12653da2ea
@@ -1,3 +1,6 @@
1
+ # 1.2.1 / 2014-02-19
2
+ * [BUGFIX] Posts should return JSON, not resources
3
+
1
4
  # 1.2.0 / 2014-02-11
2
5
  [FEATURE] Add support for hashes as filters.
3
6
 
@@ -13,7 +13,7 @@ module Loquor
13
13
  @config.logger.info "Making POST request to: #{full_url}"
14
14
  response = JSON.parse(signed_request.execute)
15
15
  @config.logger.info "Signed request executed. Response: #{response}"
16
- Resource.new(response)
16
+ response
17
17
  end
18
18
 
19
19
  private
@@ -1,3 +1,3 @@
1
1
  module Loquor
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -15,12 +15,12 @@ module Loquor
15
15
  HttpAction::Post.post("foobar", {}, {})
16
16
  end
17
17
 
18
- def test_post_parses_request
18
+ def test_post_returns_response
19
19
  output = {'foo' => 'bar'}
20
20
  json = output.to_json
21
- posts = HttpAction::Post.new("", {}, deps)
22
- posts.expects(signed_request: mock(execute: json))
23
- assert_equal 'bar', posts.post.foo
21
+ post = HttpAction::Post.new("", {}, deps)
22
+ response = post.expects(signed_request: mock(execute: json))
23
+ assert_equal output, post.post
24
24
  end
25
25
 
26
26
  def test_request_is_generated_correctly
@@ -45,13 +45,6 @@ module Loquor
45
45
  ApiAuth.expects(:sign!).with(request, @access_id, @secret_key)
46
46
  posts.send(:signed_request)
47
47
  end
48
-
49
- def test_response_is_a_representation
50
- posts = HttpAction::Post.new("", {}, deps)
51
- posts.stubs(signed_request: mock(execute: {foo: 'bar'}.to_json))
52
- response = posts.post
53
- assert response.is_a?(Resource)
54
- end
55
48
  end
56
49
  end
57
50
 
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.2.0
4
+ version: 1.2.1
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-02-12 00:00:00.000000000 Z
11
+ date: 2014-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: filum