piston_api 0.1.1 → 0.1.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.
data/Gemfile.lock ADDED
@@ -0,0 +1,23 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ json (1.6.1)
5
+ mime-types (1.17.2)
6
+ monster_mash (0.3.0)
7
+ typhoeus (>= 0.3.3)
8
+ typhoeus (>= 0.3.3)
9
+ rspec (1.3.1)
10
+ signed_request (1.0.4)
11
+ typhoeus (0.3.3)
12
+ mime-types
13
+ vcr (1.10.0)
14
+
15
+ PLATFORMS
16
+ ruby
17
+
18
+ DEPENDENCIES
19
+ json
20
+ monster_mash (>= 0.2.0)
21
+ rspec (= 1.3.1)
22
+ signed_request
23
+ vcr (>= 1.3.0)
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ begin
10
10
  gem.email = "david@mediapiston.com"
11
11
  gem.homepage = "http://github.com/mediapiston/piston_api"
12
12
  gem.authors = ["David Balatero"]
13
- gem.add_dependency "monster_mash", ">= 0.2.0"
13
+ gem.add_dependency "monster_mash", ">= 0.3.0"
14
14
  gem.add_dependency "signed_request"
15
15
  gem.add_dependency 'json'
16
16
  gem.add_development_dependency "rspec", ">= 1.3.1"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -1,7 +1,9 @@
1
+ require 'cgi'
2
+
1
3
  module PistonApi
2
4
  class Client < MonsterMash::Base
3
5
  defaults do
4
- user_agent "MediaPiston API Ruby Client"
6
+ headers 'User-Agent' => 'MediaPiston API Ruby Client'
5
7
  end
6
8
 
7
9
  post :create_batch do |json|
@@ -23,7 +25,7 @@ module PistonApi
23
25
  end
24
26
 
25
27
  def self.sign_params(path, api_key, params)
26
- params[:signature] = SignedRequest.sign(params, api_key, :path => path)
28
+ params[:signature] = CGI.escape(SignedRequest.sign(params, api_key, :path => path))
27
29
  params
28
30
  end
29
31
  end
data/piston_api.gemspec CHANGED
@@ -1,71 +1,78 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{piston_api}
8
- s.version = "0.1.1"
7
+ s.name = "piston_api"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David Balatero"]
12
- s.date = %q{2010-12-14}
13
- s.description = %q{Provides a Ruby interface to the MediaPiston API.}
14
- s.email = %q{david@mediapiston.com}
12
+ s.date = "2011-11-21"
13
+ s.description = "Provides a Ruby interface to the MediaPiston API."
14
+ s.email = "david@mediapiston.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
- ".gitignore",
22
- "CHANGELOG.md",
23
- "Gemfile",
24
- "LICENSE",
25
- "README.rdoc",
26
- "Rakefile",
27
- "VERSION",
28
- "examples/create_batch.rb",
29
- "lib/piston_api.rb",
30
- "lib/piston_api/client.rb",
31
- "piston_api.gemspec",
32
- "spec/fixtures/vcr_cassettes/create_batch/basic.yml",
33
- "spec/fixtures/vcr_cassettes/create_batch/errors.yml",
34
- "spec/fixtures/vcr_cassettes/create_batch/key_phrases.yml",
35
- "spec/piston_api/client_spec.rb",
36
- "spec/piston_api_spec.rb",
37
- "spec/spec.opts",
38
- "spec/spec_helper.rb"
21
+ "CHANGELOG.md",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "examples/create_batch.rb",
29
+ "lib/piston_api.rb",
30
+ "lib/piston_api/client.rb",
31
+ "piston_api.gemspec",
32
+ "spec/fixtures/vcr_cassettes/create_batch/basic.yml",
33
+ "spec/fixtures/vcr_cassettes/create_batch/errors.yml",
34
+ "spec/fixtures/vcr_cassettes/create_batch/key_phrases.yml",
35
+ "spec/piston_api/client_spec.rb",
36
+ "spec/piston_api_spec.rb",
37
+ "spec/spec.opts",
38
+ "spec/spec_helper.rb"
39
39
  ]
40
- s.homepage = %q{http://github.com/mediapiston/piston_api}
41
- s.rdoc_options = ["--charset=UTF-8"]
40
+ s.homepage = "http://github.com/mediapiston/piston_api"
42
41
  s.require_paths = ["lib"]
43
- s.rubygems_version = %q{1.3.7}
44
- s.summary = %q{Provides a Ruby interface to the MediaPiston API.}
42
+ s.rubygems_version = "1.8.10"
43
+ s.summary = "Provides a Ruby interface to the MediaPiston API."
45
44
  s.test_files = [
45
+ "examples/create_batch.rb",
46
46
  "spec/piston_api/client_spec.rb",
47
- "spec/piston_api_spec.rb",
48
- "spec/spec_helper.rb",
49
- "examples/create_batch.rb"
47
+ "spec/piston_api_spec.rb",
48
+ "spec/spec_helper.rb"
50
49
  ]
51
50
 
52
51
  if s.respond_to? :specification_version then
53
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
54
52
  s.specification_version = 3
55
53
 
56
54
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
55
+ s.add_runtime_dependency(%q<signed_request>, [">= 0"])
57
56
  s.add_runtime_dependency(%q<monster_mash>, [">= 0.2.0"])
57
+ s.add_runtime_dependency(%q<json>, [">= 0"])
58
+ s.add_runtime_dependency(%q<monster_mash>, [">= 0.3.0"])
58
59
  s.add_runtime_dependency(%q<signed_request>, [">= 0"])
59
60
  s.add_runtime_dependency(%q<json>, [">= 0"])
60
61
  s.add_development_dependency(%q<rspec>, [">= 1.3.1"])
61
62
  else
63
+ s.add_dependency(%q<signed_request>, [">= 0"])
62
64
  s.add_dependency(%q<monster_mash>, [">= 0.2.0"])
65
+ s.add_dependency(%q<json>, [">= 0"])
66
+ s.add_dependency(%q<monster_mash>, [">= 0.3.0"])
63
67
  s.add_dependency(%q<signed_request>, [">= 0"])
64
68
  s.add_dependency(%q<json>, [">= 0"])
65
69
  s.add_dependency(%q<rspec>, [">= 1.3.1"])
66
70
  end
67
71
  else
72
+ s.add_dependency(%q<signed_request>, [">= 0"])
68
73
  s.add_dependency(%q<monster_mash>, [">= 0.2.0"])
74
+ s.add_dependency(%q<json>, [">= 0"])
75
+ s.add_dependency(%q<monster_mash>, [">= 0.3.0"])
69
76
  s.add_dependency(%q<signed_request>, [">= 0"])
70
77
  s.add_dependency(%q<json>, [">= 0"])
71
78
  s.add_dependency(%q<rspec>, [">= 1.3.1"])
@@ -6,7 +6,7 @@
6
6
  body:
7
7
  headers:
8
8
  user-agent:
9
- - MediaPiston API Client v0.0.0
9
+ - MediaPiston API Ruby Client
10
10
  response: !ruby/struct:VCR::Response
11
11
  status: !ruby/struct:VCR::ResponseStatus
12
12
  code: 200
@@ -14,16 +14,16 @@
14
14
  headers:
15
15
  etag:
16
16
  - "\"6b5916d9534bf8744512cada5aa59145\""
17
- content-type:
18
- - application/json; charset=utf-8
19
17
  connection:
20
18
  - keep-alive
21
- x-runtime:
22
- - "9"
23
- date:
24
- - Tue, 30 Nov 2010 19:59:32 GMT
19
+ content-type:
20
+ - application/json; charset=utf-8
25
21
  server:
26
22
  - nginx/0.7.67
23
+ date:
24
+ - Tue, 30 Nov 2010 19:59:32 GMT
25
+ x-runtime:
26
+ - "9"
27
27
  content-length:
28
28
  - "44"
29
29
  cache-control:
@@ -40,9 +40,24 @@
40
40
  - MediaPiston API Ruby Client
41
41
  response: !ruby/struct:VCR::Response
42
42
  status: !ruby/struct:VCR::ResponseStatus
43
- code: 0
44
- message:
45
- headers: {}
46
-
47
- body: ""
48
- http_version:
43
+ code: 200
44
+ message: OK
45
+ headers:
46
+ x-ua-compatible:
47
+ - IE=Edge
48
+ etag:
49
+ - "\"6b5916d9534bf8744512cada5aa59145\""
50
+ content-type:
51
+ - application/json; charset=utf-8
52
+ server:
53
+ - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
54
+ date:
55
+ - Mon, 21 Nov 2011 22:00:49 GMT
56
+ x-runtime:
57
+ - "0.258930"
58
+ content-length:
59
+ - "44"
60
+ cache-control:
61
+ - max-age=0, private, must-revalidate
62
+ body: "{\"batch_id\":1234567890,\"articles_created\":3}"
63
+ http_version: "1.1"
@@ -14,19 +14,50 @@
14
14
  headers:
15
15
  etag:
16
16
  - "\"0b37d0aaf9c5640a23ee27de320c67fd\""
17
+ content-type:
18
+ - application/json; charset=utf-8
17
19
  connection:
18
20
  - keep-alive
21
+ x-runtime:
22
+ - "34"
23
+ date:
24
+ - Tue, 14 Dec 2010 23:29:58 GMT
25
+ server:
26
+ - nginx/0.7.67
27
+ content-length:
28
+ - "44"
29
+ cache-control:
30
+ - private, max-age=0, must-revalidate
31
+ body: "{\"articles_created\":3,\"batch_id\":1234567890}"
32
+ http_version: "1.1"
33
+ - !ruby/struct:VCR::HTTPInteraction
34
+ request: !ruby/struct:VCR::Request
35
+ method: :post
36
+ uri: http://localhost:3000/api/v1/batches
37
+ body:
38
+ headers:
39
+ user-agent:
40
+ - MediaPiston API Ruby Client
41
+ response: !ruby/struct:VCR::Response
42
+ status: !ruby/struct:VCR::ResponseStatus
43
+ code: 200
44
+ message: OK
45
+ headers:
46
+ x-ua-compatible:
47
+ - IE=Edge
48
+ etag:
49
+ - "\"6b5916d9534bf8744512cada5aa59145\""
19
50
  content-type:
20
51
  - application/json; charset=utf-8
21
52
  server:
22
- - nginx/0.7.67
53
+ - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
23
54
  date:
24
- - Tue, 14 Dec 2010 23:29:58 GMT
55
+ - Mon, 21 Nov 2011 21:59:32 GMT
25
56
  x-runtime:
26
- - "34"
57
+ - "0.185853"
27
58
  content-length:
28
59
  - "44"
29
60
  cache-control:
30
- - private, max-age=0, must-revalidate
31
- body: "{\"articles_created\":3,\"batch_id\":1234567890}"
61
+ - max-age=0, private, must-revalidate
62
+ body: "{\"batch_id\":1234567890,\"articles_created\":3}"
32
63
  http_version: "1.1"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piston_api
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
5
- prerelease: false
4
+ hash: 31
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Balatero
@@ -15,13 +15,24 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-14 00:00:00 -08:00
19
- default_executable:
18
+ date: 2011-11-21 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
- name: monster_mash
23
- prerelease: false
24
21
  requirement: &id001 !ruby/object:Gem::Requirement
22
+ none: false
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ hash: 3
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ version_requirements: *id001
31
+ name: signed_request
32
+ prerelease: false
33
+ type: :runtime
34
+ - !ruby/object:Gem::Dependency
35
+ requirement: &id002 !ruby/object:Gem::Requirement
25
36
  none: false
26
37
  requirements:
27
38
  - - ">="
@@ -32,12 +43,12 @@ dependencies:
32
43
  - 2
33
44
  - 0
34
45
  version: 0.2.0
46
+ version_requirements: *id002
47
+ name: monster_mash
48
+ prerelease: false
35
49
  type: :runtime
36
- version_requirements: *id001
37
50
  - !ruby/object:Gem::Dependency
38
- name: signed_request
39
- prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
51
+ requirement: &id003 !ruby/object:Gem::Requirement
41
52
  none: false
42
53
  requirements:
43
54
  - - ">="
@@ -46,12 +57,28 @@ dependencies:
46
57
  segments:
47
58
  - 0
48
59
  version: "0"
60
+ version_requirements: *id003
61
+ name: json
62
+ prerelease: false
49
63
  type: :runtime
50
- version_requirements: *id002
51
64
  - !ruby/object:Gem::Dependency
52
- name: json
65
+ requirement: &id004 !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ hash: 19
71
+ segments:
72
+ - 0
73
+ - 3
74
+ - 0
75
+ version: 0.3.0
76
+ version_requirements: *id004
77
+ name: monster_mash
53
78
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
79
+ type: :runtime
80
+ - !ruby/object:Gem::Dependency
81
+ requirement: &id005 !ruby/object:Gem::Requirement
55
82
  none: false
56
83
  requirements:
57
84
  - - ">="
@@ -60,12 +87,26 @@ dependencies:
60
87
  segments:
61
88
  - 0
62
89
  version: "0"
90
+ version_requirements: *id005
91
+ name: signed_request
92
+ prerelease: false
63
93
  type: :runtime
64
- version_requirements: *id003
65
94
  - !ruby/object:Gem::Dependency
66
- name: rspec
95
+ requirement: &id006 !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ hash: 3
101
+ segments:
102
+ - 0
103
+ version: "0"
104
+ version_requirements: *id006
105
+ name: json
67
106
  prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
107
+ type: :runtime
108
+ - !ruby/object:Gem::Dependency
109
+ requirement: &id007 !ruby/object:Gem::Requirement
69
110
  none: false
70
111
  requirements:
71
112
  - - ">="
@@ -76,8 +117,10 @@ dependencies:
76
117
  - 3
77
118
  - 1
78
119
  version: 1.3.1
120
+ version_requirements: *id007
121
+ name: rspec
122
+ prerelease: false
79
123
  type: :development
80
- version_requirements: *id004
81
124
  description: Provides a Ruby interface to the MediaPiston API.
82
125
  email: david@mediapiston.com
83
126
  executables: []
@@ -89,9 +132,9 @@ extra_rdoc_files:
89
132
  - README.rdoc
90
133
  files:
91
134
  - .document
92
- - .gitignore
93
135
  - CHANGELOG.md
94
136
  - Gemfile
137
+ - Gemfile.lock
95
138
  - LICENSE
96
139
  - README.rdoc
97
140
  - Rakefile
@@ -107,13 +150,12 @@ files:
107
150
  - spec/piston_api_spec.rb
108
151
  - spec/spec.opts
109
152
  - spec/spec_helper.rb
110
- has_rdoc: true
111
153
  homepage: http://github.com/mediapiston/piston_api
112
154
  licenses: []
113
155
 
114
156
  post_install_message:
115
- rdoc_options:
116
- - --charset=UTF-8
157
+ rdoc_options: []
158
+
117
159
  require_paths:
118
160
  - lib
119
161
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -137,12 +179,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
179
  requirements: []
138
180
 
139
181
  rubyforge_project:
140
- rubygems_version: 1.3.7
182
+ rubygems_version: 1.8.10
141
183
  signing_key:
142
184
  specification_version: 3
143
185
  summary: Provides a Ruby interface to the MediaPiston API.
144
186
  test_files:
187
+ - examples/create_batch.rb
145
188
  - spec/piston_api/client_spec.rb
146
189
  - spec/piston_api_spec.rb
147
190
  - spec/spec_helper.rb
148
- - examples/create_batch.rb
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC