amara 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d3e7865d9dcaaf8abeb6b6725410ed715bd5ef7
4
- data.tar.gz: 166300588baa4c4d90fe1638bc7b0ff4a39c8568
3
+ metadata.gz: 8510ef4c28f4fe621d93af3e766474f0cfae1059
4
+ data.tar.gz: 5fb1800d65cbd59a5b1b51b34b6793cfb6ead749
5
5
  SHA512:
6
- metadata.gz: ab6c774fbfe6aaeba7128b6a50d28ef43d3375779ebc5240d5ec153774c4967b664a63ca6cef3071e164e03f98bbd15bcdb698e9aa7ac5ddbebf67d4ba814242
7
- data.tar.gz: b788f82c9f06038db39893c1c08eb82e12adbd4a3334dd01c973830a5ad6d4c298b3edf03c695b1ac2e03cd37d501c828d3b1878115d001a43c4605e8806d512
6
+ metadata.gz: b1517cbc3df344f5ec6dd0f7a5485bd75f183d54b785f10fbcd576ad286daf6f4e562e5d6682fe5b3e3c1dda422464da133569b03b01eb160d0a404b61620604
7
+ data.tar.gz: 7e0bd035c547bc960283bb145d02eadaa3aa5fccc8a56ff51b19402a9c2f1e53047c26fda13faaf745da1be0f597d964984327a47c12bf2b51357e24cd77b7e4
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Amara
2
2
 
3
+ [![Build Status](https://travis-ci.org/PRX/amara.svg?branch=master)](https://travis-ci.org/PRX/amara)
4
+
3
5
  Ruby gem to access the Amara API.
4
6
 
5
7
  http://www.amara.org/
@@ -17,6 +17,7 @@ require 'amara/videos'
17
17
  require 'amara/videos/languages'
18
18
  require 'amara/videos/languages/subtitles'
19
19
  require 'amara/videos/urls'
20
+ require 'amara/activity'
20
21
  require 'amara/client'
21
22
 
22
23
  module Amara
@@ -28,13 +28,12 @@ module Amara
28
28
  ).merge(opts)
29
29
  options[:headers] = options[:headers].merge(headers)
30
30
  Amara::HEADERS.each{|k,v| options[:headers][v] = options.delete(k) if options.key?(k)}
31
- options
31
+ options.slice(*ALLOWED_OPTIONS)
32
32
  end
33
33
 
34
34
  def connection(options={})
35
35
  opts = merge_default_options(options)
36
- # puts "connection:\n\toptions: #{options.inspect}\n\topts: #{opts.inspect}"
37
- Faraday::Connection.new(opts) do |connection|
36
+ Faraday.new(opts) do |connection|
38
37
  connection.request :url_encoded
39
38
 
40
39
  connection.response :mashify
@@ -43,7 +42,6 @@ module Amara
43
42
 
44
43
  connection.adapter(adapter)
45
44
  end
46
-
47
45
  end
48
46
  end
49
47
  end
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  module Amara
4
- VERSION = "0.1.1"
4
+ VERSION = '0.2.0'
5
5
  end
@@ -53,7 +53,7 @@ describe Amara::Teams do
53
53
 
54
54
  stub_request(:post, "https://www.amara.org/api2/partners/teams/").
55
55
  with(:body => "{\"slug\":\"prx-test-1\",\"name\":\"prx test 1\"}",
56
- :headers => {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'Host'=>'www.amara.org:443', 'User-Agent'=>'Amara Ruby Gem 0.1.0', 'X-Api-Username'=>'test_user', 'X-Apikey'=>'thisisakey'}).
56
+ :headers => {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'Host'=>'www.amara.org:443', 'X-Api-Username'=>'test_user', 'X-Apikey'=>'thisisakey'}).
57
57
  to_return(:status => 200, :body => create_response, :headers => {})
58
58
 
59
59
 
@@ -66,7 +66,7 @@ describe Amara::Videos do
66
66
 
67
67
  stub_request(:post, "https://www.amara.org/api2/partners/videos/").
68
68
  with(:body => "{\"team\":\"test-team\",\"title\":\"title\",\"video_url\":\"https://archive.org/download/1-test-mp3.JRiaC2.popuparchive.org/test.ogg\",\"primary_audio_language_code\":\"en\"}",
69
- :headers => {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'Host'=>'www.amara.org:443', 'User-Agent'=>'Amara Ruby Gem 0.1.0', 'X-Api-Username'=>'test_user', 'X-Apikey'=>'thisisakey'}).
69
+ :headers => {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'Host'=>'www.amara.org:443', 'X-Api-Username'=>'test_user', 'X-Apikey'=>'thisisakey'}).
70
70
  to_return(:status => 200, :body => response, :headers => {})
71
71
 
72
72
  videos = Amara::Videos.new(api_key: 'thisisakey', api_username: 'test_user')
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.1.1
4
+ version: 0.2.0
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-10-18 00:00:00.000000000 Z
11
+ date: 2015-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  version: '0'
213
213
  requirements: []
214
214
  rubyforge_project:
215
- rubygems_version: 2.1.5
215
+ rubygems_version: 2.0.14
216
216
  signing_key:
217
217
  specification_version: 4
218
218
  summary: Works with API v1.2, http://amara.readthedocs.org/en/latest/api.html