amara 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/amara/api.rb +1 -1
- data/lib/amara/version.rb +1 -1
- data/test/teams/projects_test.rb +1 -1
- data/test/teams_test.rb +1 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb71839ee3ae5733b9a9cf50421a0d8dae793773
|
4
|
+
data.tar.gz: 50244918e66cb0378bae5a1a751aca9fe16f4068
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be6217c3aafff5c865fd9a788249a9d3f033b9ce21b204fcff87959437ac24312486cf8903541c8157d3c20f7da01d8f496e30bd1c53881374dfc0707cb581b3
|
7
|
+
data.tar.gz: 4fac54ac1e87d09581392502ec04904a127d7adb81e3bd007c19cbb1782354fd014d8d7c3390db323ebdbce9a42c763c57c42f190556c4e62feb680209091a5d
|
data/lib/amara/api.rb
CHANGED
@@ -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]
|
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})
|
data/lib/amara/version.rb
CHANGED
data/test/teams/projects_test.rb
CHANGED
@@ -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'
|
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
|
data/test/teams_test.rb
CHANGED
@@ -7,7 +7,7 @@ require 'amara/teams'
|
|
7
7
|
|
8
8
|
require 'webmock/minitest'
|
9
9
|
|
10
|
-
describe Amara::
|
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.
|
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-
|
11
|
+
date: 2013-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|