amara 0.0.2 → 0.0.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: 7596fc5964396ba836a4a4cda6a466c228ba8d0f
4
- data.tar.gz: 10376cc8986eeea646c7c22bf0bb9d06487316ac
3
+ metadata.gz: cb71839ee3ae5733b9a9cf50421a0d8dae793773
4
+ data.tar.gz: 50244918e66cb0378bae5a1a751aca9fe16f4068
5
5
  SHA512:
6
- metadata.gz: c7fbe2bcbf185039429c1b7d763bd118367faad6c6cc98f3ff1b55bea0b4a9c36dba6f9a7b22cd9c85f4df4ba62468c36d1faf47f97a81ce451b8a30ae3af413
7
- data.tar.gz: dddf4b661e45472565d4316fe8f920161a4592c6976e6fbe89984cd76ac24aa71f85e5753bbb6dd8de82d18fbbe87b7ae2cc41dda2e31b7848579d7867808d78
6
+ metadata.gz: be6217c3aafff5c865fd9a788249a9d3f033b9ce21b204fcff87959437ac24312486cf8903541c8157d3c20f7da01d8f496e30bd1c53881374dfc0707cb581b3
7
+ data.tar.gz: 4fac54ac1e87d09581392502ec04904a127d7adb81e3bd007c19cbb1782354fd014d8d7c3390db323ebdbce9a42c763c57c42f190556c4e62feb680209091a5d
@@ -45,7 +45,7 @@ module Amara
45
45
  request.url(request_path, params)
46
46
  when :post, :put
47
47
  request.path = request_path
48
- request.body = params[:data] unless params.empty?
48
+ request.body = params[:data] ? params[:data].to_json : nil
49
49
  end
50
50
  end
51
51
  Amara::Response.new(response, {api: self, method: method, path: path, params: params})
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  module Amara
4
- VERSION = "0.0.2"
4
+ VERSION = "0.0.4"
5
5
  end
@@ -23,7 +23,7 @@ describe Amara::Teams::Projects do
23
23
  first_response = '{"meta": {"limit": 2, "next": "/api2/partners/teams/test-team/projects/?limit=2&offset=2", "offset": 0, "previous": null, "total_count": 5}, "objects": [{"created": "2013-02-14T07:29:55"}, {"created": "2011-03-01T11:38:16"}]}'
24
24
 
25
25
  stub_request(:get, "https://www.amara.org/api2/partners/teams/test-team/projects/?limit=2&offset=0").
26
- with(:headers => {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'Host'=>'www.amara.org:443', 'User-Agent'=>'Amara Ruby Gem 0.0.1'}).
26
+ with(:headers => {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'Host'=>'www.amara.org:443'}).
27
27
  to_return(:status => 200, :body => "", :headers => {})
28
28
 
29
29
  amara = Amara::Client.new
@@ -7,7 +7,7 @@ require 'amara/teams'
7
7
 
8
8
  require 'webmock/minitest'
9
9
 
10
- describe Amara::Client do
10
+ describe Amara::Teams do
11
11
 
12
12
  it "gets the base path for this subclass of API" do
13
13
  teams = Amara::Teams.new
@@ -20,7 +20,6 @@ describe Amara::Client do
20
20
  to_return(body: first_response)
21
21
 
22
22
  teams = Amara::Teams.new(api_key: 'thisisakey', api_username: 'test_user')
23
- # puts teams.list.raw.inspect
24
23
 
25
24
  response = teams.list(limit: 2)
26
25
  response.objects.must_equal response.object
@@ -37,7 +36,6 @@ describe Amara::Client do
37
36
  to_return(body: response)
38
37
 
39
38
  teams = Amara::Teams.new(api_key: 'thisisakey', api_username: 'test_user')
40
- # puts teams.list.raw.inspect
41
39
 
42
40
  response = teams.get("tedx-import")
43
41
  response.object.wont_be_nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kuklewicz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-14 00:00:00.000000000 Z
11
+ date: 2013-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday