loquor 0.6.0 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cfe52db79896211774e1d089c9214411c2357a6
4
- data.tar.gz: 624d56b874f89f65dbcba8fae1d58701a12ae967
3
+ metadata.gz: 837513aa345f52c304b8524e4e0c7f8b12dd5869
4
+ data.tar.gz: 13a5373cc387569f252695d476fd03ec5a477fc5
5
5
  SHA512:
6
- metadata.gz: 3b877ce234feba0ccbdf1b22da876456dac29f12fe4a3fad2b05114dbbf7f051bcc581ab9aabbbdfd04e2ab4b23389f870d8f801fe675c5bee99492f2eabe3af
7
- data.tar.gz: 5a964b9378199a23451a913fbdf5a246009cb9820a06cf0c4ed7c98fc6dcd6e6bb40d22ecf72b7a14cd9f2e286fdc12517e69988c229364e821e329c53482048
6
+ metadata.gz: 3d5a08684effe150f0dad33625649399953dab6c79996c7a9c4c1187e27523c76571902c4a3bbcfba7acd55f8eebf30c3355892bb1ade2cd6f8cf413ca3fb333
7
+ data.tar.gz: 10c496162c95d058cd31c1e7299c9e62c0d32d8203ef0ce7998429fb4e4f8756c6c649a8c2a56e347ec3fec4b62142f4c417f08bd5682ea4cd454bf34506b8f1
@@ -1,3 +1,6 @@
1
+ # 0.7.0 / 2013-12-16
2
+ * [FEATURE] Use Payload for POST
3
+
1
4
  # 0.6.0 / 2013-12-13
2
5
  * [FEATURE] Add strict mode to ObjectHash
3
6
  * [FEATURE] Don't allow arbitary sample attributes to be overriden
@@ -10,7 +10,7 @@ module Loquor
10
10
  @config.logger.info "Signing request."
11
11
  ApiAuth.sign!(request, @config.access_id, @config.secret_key)
12
12
  end
13
-
13
+
14
14
  def execute
15
15
  @config.logger.info "Making HTTP request to: #{full_url}"
16
16
  signed_request.execute
@@ -21,9 +21,9 @@ module Loquor
21
21
  @config.logger.error("Exception while executing request: #{e.message} <#{e.class}>")
22
22
  raise
23
23
  end
24
-
24
+
25
25
  private
26
-
26
+
27
27
  def full_url
28
28
  "#{@config.endpoint}#{@url}"
29
29
  end
@@ -44,7 +44,7 @@ module Loquor
44
44
  end
45
45
 
46
46
  def self.create(payload)
47
- ApiCall::Create.new(self, payload).execute
47
+ ApiCall::Create.new(self, payload: payload).execute
48
48
  end
49
49
 
50
50
  def self.update(id, payload)
@@ -45,5 +45,9 @@ module Loquor
45
45
  def create(attrs)
46
46
  self.new(attrs)
47
47
  end
48
+
49
+ def update(attrs)
50
+ true
51
+ end
48
52
  end
49
53
  end
@@ -1,3 +1,3 @@
1
1
  module Loquor
2
- VERSION = "0.6.0"
2
+ VERSION = "0.7.0"
3
3
  end
@@ -38,6 +38,12 @@ module Loquor
38
38
  Foobar.where(email: email).to_a
39
39
  end
40
40
 
41
+ def test_create_should_put_correct_params
42
+ payload = {bar: 'foo'}
43
+ Loquor.expects(:post).with("/foobar", payload: payload)
44
+ Foobar.create(payload)
45
+ end
46
+
41
47
  def test_update_should_put_correct_params
42
48
  id = 8
43
49
  payload = {bar: 'foo'}
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: 0.6.0
4
+ version: 0.7.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: 2013-12-13 00:00:00.000000000 Z
11
+ date: 2013-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: filum