speechpad 0.0.1 → 0.0.2

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzI5OGRiZDM4ODUxYWE0ZjYwMmIxNzRmZTlmYTA1ZDhkOTY2YTA3ZQ==
4
+ ZDgzMzUwOGE1YWUyMjAyM2ZkNzJkZmMxZTIwYmE2N2ZmYzE3ZWYwMw==
5
5
  data.tar.gz: !binary |-
6
- NDNhNTBiMDU3ZGEwZGMxNjEwNmY4MjY0MDJmNmViZmU5NWZkNGViNA==
6
+ MzY4MWU1NTg3ZTY2MTk2NDQ2Mjc3ZTY3YWQ1YjU0YWRlMzA3MmIyYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGZkYWM1MDY3MTc5Y2MzNzUwMDdiZjFkNmQ0YzhlZDFjMGIzNzNlNzFjMWY4
10
- ZTM3N2UzOWViMzQwZjhlZDU0MTg5N2NmM2NjOGExMTliYzhmNjYyZmVjZTFi
11
- MmQxODQwZTJmMzlmNjIzZTQ2NTkzNzhlOGI0YjU5MTZkMzI3ZDU=
9
+ ODI4M2Y2Y2JjYjliNTcyOTM1MDE3NDMzZjMzOGFhMjczNmViOWEyNjE1MTQw
10
+ MGEyYjhkNGU5MjFiOWVjMjA2OGZhNDVjY2FjNGI0ZTcwZGE4Yjg0ODY5ZmYz
11
+ ODM0MDcxZGFkYzk4ZDYwNjRhNTY0NzQxODE4Nzc3Y2UwODBjYjU=
12
12
  data.tar.gz: !binary |-
13
- ZjFjNDBhMjFmYTI4MmQ1MjI5OWE5ZDdmNzhkMDAxMzRjYTIxYzQ0MWIxYTk1
14
- Mzc4Njg3YTM1YWVjYzdkMTQxYTU2Njk2MGJhMzJkYTE0MGY0YjExZTM3MGJk
15
- OWFlMDEyNDI3ZWM4ZThlNWI4ZDc2OGFmNTZkZjY3MzZkNDZkMjk=
13
+ ZWJmMzk4N2ZjNGJkNGJiYjM2NmE0Mzk2MGFjM2Q2NzZmMjhkOGY2ZmMwNjFl
14
+ YmNjNzE2NjlmMjhiMmIzYjY3ZjZlODdjYzUxODY5MWJkZDEyNjJhMDhmNzA0
15
+ YTI5YWU1ODhhMWI5NGViN2IwNjhkZTUxNWQ3ZGNlZDdjZjJlYTc=
data/README.md CHANGED
@@ -10,6 +10,7 @@ A Ruby wrapper for the Speechpad API
10
10
 
11
11
  ## Documentation
12
12
 
13
+ [http://rdoc.info/gems/speechpad](http://rdoc.info/gems/speechpad)
13
14
 
14
15
  ## Usage Examples
15
16
  require 'spechpad'
@@ -6,7 +6,7 @@ module Speechpad
6
6
  def initialize(options={})
7
7
  @access_key = options[:access_key]
8
8
  @secret_key = options[:secret_key]
9
- @speechpad_url = options[:url] || 'http://www.speechpad.com/'
9
+ @speechpad_url = options[:url] || 'https://www.speechpad.com/'
10
10
  end
11
11
 
12
12
  include Speechpad::Connection
@@ -1,3 +1,3 @@
1
1
  module Speechpad
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -11,6 +11,6 @@ require 'webmock/rspec'
11
11
 
12
12
  RSpec.configure do |config|
13
13
  config.before(:all) do
14
- Timecop.freeze(Time.local(2014))
14
+ Timecop.freeze(Time.utc(2014))
15
15
  end
16
16
  end
@@ -20,9 +20,8 @@ describe Speechpad do
20
20
 
21
21
  describe ".test" do
22
22
  it "should make a test call to the Speechpad API" do
23
-
24
- stub_request(:get, "http://dev.speechpad.com/services?access_key=abc123&format=json&method=get&operation=test&service_name=account&service_version=1.0.0&signature=MP6ZzbYANYB7vuJnUIg40Z2yPz4=&timestamp=2014-01-01T08:00:00Z&value=123").
25
- to_return(:status => 200, :body => '{"error_string":"SUCCESS","response":{"value":"123"}}', :headers => {'Content-Type' => 'application/json'})
23
+ stub_request(:get, "http://dev.speechpad.com/services?access_key=abc123&format=json&method=get&operation=test&service_name=account&service_version=1.0.0&signature=nemMj6yGWm6mqSpawlLRNN4ReaQ=&timestamp=2014-01-01T00:00:00Z&value=123").
24
+ to_return(:status => 200, :body => '{"error_string":"SUCCESS","response":{"value":"123"}}', :headers => {'Content-Type' => 'application/json'})
26
25
 
27
26
  @client.test.response.value.should eql "123"
28
27
  end
@@ -30,7 +29,7 @@ describe Speechpad do
30
29
 
31
30
  describe ".add_audio_url" do
32
31
  it "should be a success when passing a url with a file to transcribe" do
33
- stub_request(:get, "http://dev.speechpad.com/services?access_key=abc123&format=json&method=post&operation=add_audio_url&service_name=account&service_version=1.0.0&signature=0in1rEuhI%2BHdXZqQg7dAGlV3AEE=&timestamp=2014-01-01T08:00:00Z&transcribe=true&url=https://www.speechpad.com/is_a.mp3&visible_filename=https://www.speechpad.com/is_a.mp3").
32
+ stub_request(:get, "http://dev.speechpad.com/services?access_key=abc123&format=json&method=post&operation=add_audio_url&service_name=account&service_version=1.0.0&signature=QoXYbX3s1oVqJVHoKlRBcBvE780=&timestamp=2014-01-01T00:00:00Z&transcribe=true&url=https://www.speechpad.com/is_a.mp3&visible_filename=https://www.speechpad.com/is_a.mp3").
34
33
  to_return(:status => 200, :body => '{"error_string":"SUCCESS", "response":{"audio_id": 63068}}' , :headers => {'Content-Type' => 'application/json'})
35
34
 
36
35
  test = @client.add_audio_url('https://www.speechpad.com/is_a.mp3')
@@ -40,7 +39,7 @@ describe Speechpad do
40
39
 
41
40
  describe ".add_media_url" do
42
41
  it "should be a success when passing a url to transcribe" do
43
- stub_request(:get, "http://dev.speechpad.com/services?access_key=abc123&format=json&method=post&operation=add_media_url&service_name=account&service_version=1.0.0&signature=YOWA%2BAut3xvLaKhBe2sc5vr%2BZ1o=&timestamp=2014-01-01T08:00:00Z&transcribe=true&url=http://www.youtube.com/watch?v=meiU6TxysCg").
42
+ stub_request(:get, "http://dev.speechpad.com/services?access_key=abc123&format=json&method=post&operation=add_media_url&service_name=account&service_version=1.0.0&signature=u749AUoG%2BVmQApHrebxpv3N7ZgI=&timestamp=2014-01-01T00:00:00Z&transcribe=true&url=http://www.youtube.com/watch?v=meiU6TxysCg").
44
43
  to_return(:status => 200, :body => '{"error_string":"SUCCESS", "response":{"audio_id": 63068}}' , :headers => {'Content-Type' => 'application/json'})
45
44
 
46
45
  test = @client.add_media_url('http://www.youtube.com/watch?v=meiU6TxysCg')
@@ -50,7 +49,7 @@ describe Speechpad do
50
49
 
51
50
  describe ".get_transcription" do
52
51
  it "should get the transcription of the audo file and return it" do
53
- stub_request(:get, "http://dev.speechpad.com/services?access_key=abc123&audio_id=1234&format=json&method=get&operation=get_transcription&service_name=account&service_version=1.0.0&signature=KjqOK1mHDkyMVi%2B%2Bj%2BnpwZEdTCw=&timestamp=2014-01-01T08:00:00Z").
52
+ stub_request(:get, "http://dev.speechpad.com/services?access_key=abc123&audio_id=1234&format=json&method=get&operation=get_transcription&service_name=account&service_version=1.0.0&signature=RFYtgGb2t4T5h5Bq5vqdl4KgL5I=&timestamp=2014-01-01T00:00:00Z").
54
53
  to_return(:status => 200, :body => '{"error_string":"SUCCESS","response":"Hello!"}' , :headers => {'Content-Type' => 'application/json'})
55
54
  test = @client.get_transcription(1234)
56
55
  test.response.should eql "Hello!"
@@ -59,7 +58,7 @@ describe Speechpad do
59
58
 
60
59
  describe ".get_machine_transcription" do
61
60
  it "should get the machine transcription of the audo file and return it" do
62
- stub_request(:get, "http://dev.speechpad.com/services?access_key=abc123&audio_id=1234&format=json&method=get&operation=get_machine_transcription&service_name=account&service_version=1.0.0&signature=wBZvG0znUqF1YvvJXEbQzF%2Buq1k=&timestamp=2014-01-01T08:00:00Z").
61
+ stub_request(:get, "http://dev.speechpad.com/services?access_key=abc123&audio_id=1234&format=json&method=get&operation=get_machine_transcription&service_name=account&service_version=1.0.0&signature=6yg9RfjBygBzqNVbAmfNFHI1UwE=&timestamp=2014-01-01T00:00:00Z").
63
62
  to_return(:status => 200, :body => '{"error_string":"SUCCESS","response":"Hello!"}' , :headers => {'Content-Type' => 'application/json'})
64
63
 
65
64
  test = @client.get_machine_transcription(1234)
@@ -69,7 +68,7 @@ describe Speechpad do
69
68
 
70
69
  describe ".machine_transcription_status" do
71
70
  it "should get the status of the machine trascript with the given id" do
72
- stub_request(:get, "http://dev.speechpad.com/services?access_key=abc123&audio_id=1234&format=json&method=get&operation=machine_transcription_status&service_name=account&service_version=1.0.0&signature=k4tkFqwsZYrHpVDl0JYCzs6LtLE=&timestamp=2014-01-01T08:00:00Z").
71
+ stub_request(:get, "http://dev.speechpad.com/services?access_key=abc123&audio_id=1234&format=json&method=get&operation=machine_transcription_status&service_name=account&service_version=1.0.0&signature=zB0g92ya8OZBmpGw24eSP5p37as=&timestamp=2014-01-01T00:00:00Z").
73
72
  to_return(:status => 200, :body => '{"error_string":"SUCCESS","response":{"1234":"done"}}' , :headers => {'Content-Type' => 'application/json'})
74
73
  test = @client.machine_transcription_status('1234')
75
74
  test.response['1234'].should eql 'done'
@@ -78,7 +77,7 @@ describe Speechpad do
78
77
 
79
78
  describe ".transcription_status" do
80
79
  it "should get the status of the transcription with the given id" do
81
- stub_request(:get, "http://dev.speechpad.com/services?access_key=abc123&audio_id=1234&format=json&method=get&operation=transcription_status&service_name=account&service_version=1.0.0&signature=YOHVemU8vLwSMsuinuOGifgLfsg=&timestamp=2014-01-01T08:00:00Z").
80
+ stub_request(:get, "http://dev.speechpad.com/services?access_key=abc123&audio_id=1234&format=json&method=get&operation=transcription_status&service_name=account&service_version=1.0.0&signature=REAuCvHzSrsIFEIPA4iWTQMk0yg=&timestamp=2014-01-01T00:00:00Z").
82
81
  to_return(:status => 200, :body => '{"error_string":"SUCCESS","response":{"1234":"done"}}' , :headers => {'Content-Type' => 'application/json'})
83
82
  test = @client.transcription_status('1234')
84
83
  test.response['1234'].should eql 'done'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: speechpad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Upworthy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-05 00:00:00.000000000 Z
11
+ date: 2014-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday