media_monster_client 2.0.5 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,9 +24,8 @@ module MediaMonsterClient
24
24
 
25
25
  def create_job(job=nil)
26
26
  job ||= MediaMonster::Job.new
27
- yield job
27
+ yield job if block_given?
28
28
  job.tap do |j|
29
- puts "posting: #{j.to_json}"
30
29
  j_str = post(api_url('jobs'), j.to_json, {'Accept'=>'application/json','Content-Type'=>'application/json'}).body
31
30
  json = JSON.parse(j_str)
32
31
  j.id = json['job']['id']
@@ -35,11 +34,10 @@ module MediaMonsterClient
35
34
 
36
35
  def update_job(job)
37
36
  to_model(MediaMonster::Job, job).tap do |j|
38
- puts "putting: #{j.to_json}"
39
37
  put(model_url(j), j.to_json, {'Accept'=>'application/json','Content-Type'=>'application/json'})
40
38
  end
41
39
  end
42
-
40
+
43
41
  def retry_job(job)
44
42
  to_model(MediaMonster::Job, job).tap do |j|
45
43
  put("#{model_url(j)}/retry", {}, {'Accept'=>'application/json'})
@@ -49,7 +47,7 @@ module MediaMonsterClient
49
47
  def update_task(task_id, task_status)
50
48
  json = {'task'=>{'status'=>task_status}}.to_json
51
49
  put(api_url("tasks/#{task_id.to_i}"), json, {'Accept'=>'application/json', 'Content-Type'=>'application/json'})
52
- end
50
+ end
53
51
 
54
52
  protected
55
53
 
@@ -66,7 +64,7 @@ module MediaMonsterClient
66
64
  def api_url(path)
67
65
  "/api/#{version}/#{path}"
68
66
  end
69
-
67
+
70
68
  def model_url(model)
71
69
  api_url("#{model.class.to_s.demodulize.downcase.pluralize}/#{model.id}")
72
70
  end
@@ -1,3 +1,3 @@
1
1
  module MediaMonsterClient
2
- VERSION = "2.0.5"
2
+ VERSION = "2.0.6"
3
3
  end
@@ -16,14 +16,13 @@ Gem::Specification.new do |s|
16
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
18
  s.require_paths = ["lib"]
19
-
20
- s.add_runtime_dependency("activesupport")
21
- s.add_runtime_dependency("oauth")
19
+
20
+ s.add_runtime_dependency("activesupport", "~> 2.3.18")
21
+ s.add_runtime_dependency("oauth", "~> 0.4.7")
22
22
  s.add_runtime_dependency("json")
23
- s.add_runtime_dependency("i18n")
24
-
23
+ s.add_runtime_dependency("i18n", "~> 0.6.1")
24
+
25
25
  s.add_development_dependency "rake"
26
26
  s.add_development_dependency "test-unit"
27
27
  s.add_development_dependency 'fakeweb'
28
-
29
28
  end
metadata CHANGED
@@ -1,135 +1,136 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: media_monster_client
3
- version: !ruby/object:Gem::Version
4
- version: 2.0.5
3
+ version: !ruby/object:Gem::Version
4
+ hash: 3
5
5
  prerelease:
6
+ segments:
7
+ - 2
8
+ - 0
9
+ - 6
10
+ version: 2.0.6
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Andrew Kuklewicz (kookster)
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-10-25 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: activesupport
16
- requirement: !ruby/object:Gem::Requirement
17
+
18
+ date: 2017-08-01 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ requirement: &id001 !ruby/object:Gem::Requirement
17
22
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :runtime
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ hash: 39
27
+ segments:
28
+ - 2
29
+ - 3
30
+ - 18
31
+ version: 2.3.18
32
+ name: activesupport
33
+ version_requirements: *id001
23
34
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
35
+ type: :runtime
36
+ - !ruby/object:Gem::Dependency
37
+ requirement: &id002 !ruby/object:Gem::Requirement
25
38
  none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
30
- - !ruby/object:Gem::Dependency
39
+ requirements:
40
+ - - ~>
41
+ - !ruby/object:Gem::Version
42
+ hash: 1
43
+ segments:
44
+ - 0
45
+ - 4
46
+ - 7
47
+ version: 0.4.7
31
48
  name: oauth
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :runtime
49
+ version_requirements: *id002
39
50
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
51
+ type: :runtime
52
+ - !ruby/object:Gem::Dependency
53
+ requirement: &id003 !ruby/object:Gem::Requirement
41
54
  none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- - !ruby/object:Gem::Dependency
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ hash: 3
59
+ segments:
60
+ - 0
61
+ version: "0"
47
62
  name: json
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :runtime
63
+ version_requirements: *id003
55
64
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
65
+ type: :runtime
66
+ - !ruby/object:Gem::Dependency
67
+ requirement: &id004 !ruby/object:Gem::Requirement
57
68
  none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- - !ruby/object:Gem::Dependency
69
+ requirements:
70
+ - - ~>
71
+ - !ruby/object:Gem::Version
72
+ hash: 5
73
+ segments:
74
+ - 0
75
+ - 6
76
+ - 1
77
+ version: 0.6.1
63
78
  name: i18n
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- type: :runtime
79
+ version_requirements: *id004
71
80
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
81
+ type: :runtime
82
+ - !ruby/object:Gem::Dependency
83
+ requirement: &id005 !ruby/object:Gem::Requirement
73
84
  none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ hash: 3
89
+ segments:
90
+ - 0
91
+ version: "0"
79
92
  name: rake
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
86
- type: :development
93
+ version_requirements: *id005
87
94
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
95
+ type: :development
96
+ - !ruby/object:Gem::Dependency
97
+ requirement: &id006 !ruby/object:Gem::Requirement
89
98
  none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
94
- - !ruby/object:Gem::Dependency
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ hash: 3
103
+ segments:
104
+ - 0
105
+ version: "0"
95
106
  name: test-unit
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
- type: :development
107
+ version_requirements: *id006
103
108
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
109
+ type: :development
110
+ - !ruby/object:Gem::Dependency
111
+ requirement: &id007 !ruby/object:Gem::Requirement
105
112
  none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- - !ruby/object:Gem::Dependency
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ hash: 3
117
+ segments:
118
+ - 0
119
+ version: "0"
111
120
  name: fakeweb
112
- requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
121
+ version_requirements: *id007
119
122
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
123
+ type: :development
126
124
  description: client gem for media monster app
127
- email:
125
+ email:
128
126
  - andrew@prx.org
129
127
  executables: []
128
+
130
129
  extensions: []
130
+
131
131
  extra_rdoc_files: []
132
- files:
132
+
133
+ files:
133
134
  - .gitignore
134
135
  - Gemfile
135
136
  - Rakefile
@@ -143,30 +144,39 @@ files:
143
144
  - media_monster_client.gemspec
144
145
  - test/helper.rb
145
146
  - test/test_media_monster_client.rb
146
- homepage: ''
147
+ homepage: ""
147
148
  licenses: []
149
+
148
150
  post_install_message:
149
151
  rdoc_options: []
150
- require_paths:
152
+
153
+ require_paths:
151
154
  - lib
152
- required_ruby_version: !ruby/object:Gem::Requirement
155
+ required_ruby_version: !ruby/object:Gem::Requirement
153
156
  none: false
154
- requirements:
155
- - - ! '>='
156
- - !ruby/object:Gem::Version
157
- version: '0'
158
- required_rubygems_version: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ hash: 3
161
+ segments:
162
+ - 0
163
+ version: "0"
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
159
165
  none: false
160
- requirements:
161
- - - ! '>='
162
- - !ruby/object:Gem::Version
163
- version: '0'
166
+ requirements:
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ hash: 3
170
+ segments:
171
+ - 0
172
+ version: "0"
164
173
  requirements: []
174
+
165
175
  rubyforge_project:
166
- rubygems_version: 1.8.22
176
+ rubygems_version: 1.8.15
167
177
  signing_key:
168
178
  specification_version: 3
169
179
  summary: client gem for media monster app
170
- test_files:
180
+ test_files:
171
181
  - test/helper.rb
172
182
  - test/test_media_monster_client.rb