relish 0.6 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/.gitignore +0 -0
  2. data/Gemfile +1 -1
  3. data/LICENSE +0 -0
  4. data/README.md +0 -0
  5. data/Rakefile +0 -0
  6. data/cucumber.yml +0 -0
  7. data/features/help.feature +0 -0
  8. data/features/projects.feature +0 -0
  9. data/features/step_definitions/aruba.rb +0 -0
  10. data/features/step_definitions/fake_web_steps.rb +0 -0
  11. data/features/step_definitions/relish_steps.rb +0 -0
  12. data/features/support/env.rb +0 -0
  13. data/lib/relish.rb +0 -0
  14. data/lib/relish/command.rb +0 -0
  15. data/lib/relish/commands/base.rb +0 -0
  16. data/lib/relish/commands/collab.rb +0 -0
  17. data/lib/relish/commands/config.rb +0 -0
  18. data/lib/relish/commands/dsl.rb +0 -0
  19. data/lib/relish/commands/dsl/command.rb +0 -0
  20. data/lib/relish/commands/dsl/context_class.rb +0 -0
  21. data/lib/relish/commands/dsl/help_text.rb +0 -0
  22. data/lib/relish/commands/dsl/option.rb +0 -0
  23. data/lib/relish/commands/handle.rb +15 -0
  24. data/lib/relish/commands/help.rb +0 -0
  25. data/lib/relish/commands/projects.rb +8 -3
  26. data/lib/relish/commands/push.rb +0 -0
  27. data/lib/relish/commands/versions.rb +0 -0
  28. data/lib/relish/error_messages.rb +0 -0
  29. data/lib/relish/helpers.rb +0 -0
  30. data/lib/relish/options_file.rb +0 -0
  31. data/lib/relish/param_methods.rb +0 -0
  32. data/lib/relish/resource_methods.rb +0 -0
  33. data/lib/relish/ui.rb +0 -0
  34. data/lib/relish/version.rb +1 -1
  35. data/relish.gemspec +1 -2
  36. data/spec/relish/command_spec.rb +0 -0
  37. data/spec/relish/commands/base_spec.rb +0 -0
  38. data/spec/relish/commands/config_spec.rb +0 -0
  39. data/spec/relish/commands/dsl/command_spec.rb +0 -0
  40. data/spec/relish/commands/dsl/help_text_spec.rb +0 -0
  41. data/spec/relish/commands/dsl/option_spec.rb +0 -0
  42. data/spec/relish/commands/handle_spec.rb +23 -0
  43. data/spec/relish/error_messages_spec.rb +0 -0
  44. data/spec/relish/options_file_spec.rb +0 -0
  45. data/spec/relish/param_methods_spec.rb +0 -0
  46. data/spec/relish_spec.rb +0 -0
  47. data/spec/spec_helper.rb +0 -0
  48. data/spec/support/context_class_examples.rb +0 -0
  49. data/tags +0 -0
  50. metadata +76 -140
data/.gitignore CHANGED
File without changes
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
4
  platforms :jruby do
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,15 @@
1
+ module Relish
2
+ module Commands
3
+ class Handle
4
+ def initialize(string)
5
+ @project_id, @publisher_id = *string.split('/').reverse
6
+ end
7
+
8
+ def resource_url
9
+ result = "projects/#{@project_id}"
10
+ result << "?publisher_id=#{@publisher_id}" if @publisher_id
11
+ result
12
+ end
13
+ end
14
+ end
15
+ end
File without changes
@@ -1,3 +1,5 @@
1
+ require 'relish/commands/handle'
2
+
1
3
  module Relish
2
4
  module Command
3
5
  class Projects < Base
@@ -18,14 +20,14 @@ module Relish
18
20
  usage 'projects:remove <project>'
19
21
  desc 'remove a project'
20
22
  command :remove do
21
- puts resource["projects/#{escape(handle_to_remove)}"].delete
23
+ puts resource[resource_url(handle_to_remove)].delete
22
24
  end
23
25
 
24
26
  usage 'projects:visibility <project>:<public or private>'
25
27
  desc 'set the status of a project',
26
28
  'example: relish projects:visibility rspec/rspec-core:private'
27
29
  command :visibility do
28
- puts resource["projects/#{escape(handle_to_update)}"].put(
30
+ puts resource[resource_url(handle_to_update)].put(
29
31
  :project => { :private => private? }
30
32
  )
31
33
  end
@@ -34,7 +36,7 @@ module Relish
34
36
  desc "rename a project's handle",
35
37
  'example: relish projects:rename rspec/rspec-core:rspec-corez'
36
38
  command :rename do
37
- puts resource["projects/#{escape(handle_to_update)}"].put(
39
+ puts resource[resource_url(handle_to_update)].put(
38
40
  :project => { :handle => rename_handle }
39
41
  )
40
42
  end
@@ -70,6 +72,9 @@ module Relish
70
72
  @param.extract_option == 'private'
71
73
  end
72
74
 
75
+ def resource_url(handle)
76
+ Commands::Handle.new(handle).resource_url
77
+ end
73
78
  end
74
79
  end
75
80
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  module Relish
2
2
  module Version
3
- STRING = '0.6'
3
+ STRING = '0.7'
4
4
  end
5
5
  end
6
6
 
@@ -7,7 +7,6 @@ Gem::Specification.new do |s|
7
7
 
8
8
  s.required_rubygems_version = '>= 1.3.5'
9
9
  s.authors = ["Matt Wynne", "Justin Ko"]
10
- s.date = Date.today
11
10
  s.description = %q{Client gem for http://relishapp.com}
12
11
  s.email = "matt@mattwynne.net"
13
12
 
@@ -30,7 +29,7 @@ Gem::Specification.new do |s|
30
29
  end
31
30
 
32
31
  {
33
- 'bundler' => '~> 1.2.0.pre.1',
32
+ 'bundler' => '~> 1.3',
34
33
  'rake' => '~> 0.8.7',
35
34
  'rspec' => '~> 2.8.0',
36
35
  'cucumber' => '~> 1.0.2',
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,23 @@
1
+ require 'relish/commands/handle'
2
+
3
+ module Relish
4
+ module Commands
5
+ describe Handle do
6
+ context "converting to resource URL" do
7
+ context "with publisher and project id" do
8
+ handle = Handle.new('foo/bar')
9
+ it "converts to a URL with a querystring parameter" do
10
+ handle.resource_url.should == "projects/bar?publisher_id=foo"
11
+ end
12
+ end
13
+
14
+ context "with project id only" do
15
+ handle = Handle.new('bar')
16
+ it "converts to one querystring parameter" do
17
+ handle.resource_url.should == "projects/bar"
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/tags CHANGED
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relish
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.6'
4
+ version: '0.7'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-07-13 00:00:00.000000000 Z
13
+ date: 2013-06-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: archive-tar-minitar
@@ -67,7 +67,7 @@ dependencies:
67
67
  requirements:
68
68
  - - ~>
69
69
  - !ruby/object:Gem::Version
70
- version: 1.2.0.pre.1
70
+ version: '1.3'
71
71
  type: :development
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
@@ -75,7 +75,7 @@ dependencies:
75
75
  requirements:
76
76
  - - ~>
77
77
  - !ruby/object:Gem::Version
78
- version: 1.2.0.pre.1
78
+ version: '1.3'
79
79
  - !ruby/object:Gem::Dependency
80
80
  name: rake
81
81
  requirement: !ruby/object:Gem::Requirement
@@ -159,107 +159,60 @@ dependencies:
159
159
  description: Client gem for http://relishapp.com
160
160
  email: matt@mattwynne.net
161
161
  executables:
162
- - !binary |-
163
- cmVsaXNo
162
+ - relish
164
163
  extensions: []
165
164
  extra_rdoc_files: []
166
165
  files:
167
- - !binary |-
168
- LmdpdGlnbm9yZQ==
169
- - !binary |-
170
- R2VtZmlsZQ==
171
- - !binary |-
172
- TElDRU5TRQ==
173
- - !binary |-
174
- UkVBRE1FLm1k
175
- - !binary |-
176
- UmFrZWZpbGU=
177
- - !binary |-
178
- YmluL3JlbGlzaA==
179
- - !binary |-
180
- Y3VjdW1iZXIueW1s
181
- - !binary |-
182
- ZmVhdHVyZXMvaGVscC5mZWF0dXJl
183
- - !binary |-
184
- ZmVhdHVyZXMvcHJvamVjdHMuZmVhdHVyZQ==
185
- - !binary |-
186
- ZmVhdHVyZXMvc3RlcF9kZWZpbml0aW9ucy9hcnViYS5yYg==
187
- - !binary |-
188
- ZmVhdHVyZXMvc3RlcF9kZWZpbml0aW9ucy9mYWtlX3dlYl9zdGVwcy5yYg==
189
- - !binary |-
190
- ZmVhdHVyZXMvc3RlcF9kZWZpbml0aW9ucy9yZWxpc2hfc3RlcHMucmI=
191
- - !binary |-
192
- ZmVhdHVyZXMvc3VwcG9ydC9lbnYucmI=
193
- - !binary |-
194
- bGliL3JlbGlzaC5yYg==
195
- - !binary |-
196
- bGliL3JlbGlzaC9jb21tYW5kLnJi
197
- - !binary |-
198
- bGliL3JlbGlzaC9jb21tYW5kcy9iYXNlLnJi
199
- - !binary |-
200
- bGliL3JlbGlzaC9jb21tYW5kcy9jb2xsYWIucmI=
201
- - !binary |-
202
- bGliL3JlbGlzaC9jb21tYW5kcy9jb25maWcucmI=
203
- - !binary |-
204
- bGliL3JlbGlzaC9jb21tYW5kcy9kc2wucmI=
205
- - !binary |-
206
- bGliL3JlbGlzaC9jb21tYW5kcy9kc2wvY29tbWFuZC5yYg==
207
- - !binary |-
208
- bGliL3JlbGlzaC9jb21tYW5kcy9kc2wvY29udGV4dF9jbGFzcy5yYg==
209
- - !binary |-
210
- bGliL3JlbGlzaC9jb21tYW5kcy9kc2wvaGVscF90ZXh0LnJi
211
- - !binary |-
212
- bGliL3JlbGlzaC9jb21tYW5kcy9kc2wvb3B0aW9uLnJi
213
- - !binary |-
214
- bGliL3JlbGlzaC9jb21tYW5kcy9oZWxwLnJi
215
- - !binary |-
216
- bGliL3JlbGlzaC9jb21tYW5kcy9wcm9qZWN0cy5yYg==
217
- - !binary |-
218
- bGliL3JlbGlzaC9jb21tYW5kcy9wdXNoLnJi
219
- - !binary |-
220
- bGliL3JlbGlzaC9jb21tYW5kcy92ZXJzaW9ucy5yYg==
221
- - !binary |-
222
- bGliL3JlbGlzaC9lcnJvcl9tZXNzYWdlcy5yYg==
223
- - !binary |-
224
- bGliL3JlbGlzaC9oZWxwZXJzLnJi
225
- - !binary |-
226
- bGliL3JlbGlzaC9vcHRpb25zX2ZpbGUucmI=
227
- - !binary |-
228
- bGliL3JlbGlzaC9wYXJhbV9tZXRob2RzLnJi
229
- - !binary |-
230
- bGliL3JlbGlzaC9yZXNvdXJjZV9tZXRob2RzLnJi
231
- - !binary |-
232
- bGliL3JlbGlzaC91aS5yYg==
233
- - !binary |-
234
- bGliL3JlbGlzaC92ZXJzaW9uLnJi
235
- - !binary |-
236
- cmVsaXNoLmdlbXNwZWM=
237
- - !binary |-
238
- c3BlYy9yZWxpc2gvY29tbWFuZF9zcGVjLnJi
239
- - !binary |-
240
- c3BlYy9yZWxpc2gvY29tbWFuZHMvYmFzZV9zcGVjLnJi
241
- - !binary |-
242
- c3BlYy9yZWxpc2gvY29tbWFuZHMvY29uZmlnX3NwZWMucmI=
243
- - !binary |-
244
- c3BlYy9yZWxpc2gvY29tbWFuZHMvZHNsL2NvbW1hbmRfc3BlYy5yYg==
245
- - !binary |-
246
- c3BlYy9yZWxpc2gvY29tbWFuZHMvZHNsL2hlbHBfdGV4dF9zcGVjLnJi
247
- - !binary |-
248
- c3BlYy9yZWxpc2gvY29tbWFuZHMvZHNsL29wdGlvbl9zcGVjLnJi
249
- - !binary |-
250
- c3BlYy9yZWxpc2gvZXJyb3JfbWVzc2FnZXNfc3BlYy5yYg==
251
- - !binary |-
252
- c3BlYy9yZWxpc2gvb3B0aW9uc19maWxlX3NwZWMucmI=
253
- - !binary |-
254
- c3BlYy9yZWxpc2gvcGFyYW1fbWV0aG9kc19zcGVjLnJi
255
- - !binary |-
256
- c3BlYy9yZWxpc2hfc3BlYy5yYg==
257
- - !binary |-
258
- c3BlYy9zcGVjX2hlbHBlci5yYg==
259
- - !binary |-
260
- c3BlYy9zdXBwb3J0L2NvbnRleHRfY2xhc3NfZXhhbXBsZXMucmI=
261
- - !binary |-
262
- dGFncw==
166
+ - .gitignore
167
+ - Gemfile
168
+ - LICENSE
169
+ - README.md
170
+ - Rakefile
171
+ - bin/relish
172
+ - cucumber.yml
173
+ - features/help.feature
174
+ - features/projects.feature
175
+ - features/step_definitions/aruba.rb
176
+ - features/step_definitions/fake_web_steps.rb
177
+ - features/step_definitions/relish_steps.rb
178
+ - features/support/env.rb
179
+ - lib/relish.rb
180
+ - lib/relish/command.rb
181
+ - lib/relish/commands/base.rb
182
+ - lib/relish/commands/collab.rb
183
+ - lib/relish/commands/config.rb
184
+ - lib/relish/commands/dsl.rb
185
+ - lib/relish/commands/dsl/command.rb
186
+ - lib/relish/commands/dsl/context_class.rb
187
+ - lib/relish/commands/dsl/help_text.rb
188
+ - lib/relish/commands/dsl/option.rb
189
+ - lib/relish/commands/handle.rb
190
+ - lib/relish/commands/help.rb
191
+ - lib/relish/commands/projects.rb
192
+ - lib/relish/commands/push.rb
193
+ - lib/relish/commands/versions.rb
194
+ - lib/relish/error_messages.rb
195
+ - lib/relish/helpers.rb
196
+ - lib/relish/options_file.rb
197
+ - lib/relish/param_methods.rb
198
+ - lib/relish/resource_methods.rb
199
+ - lib/relish/ui.rb
200
+ - lib/relish/version.rb
201
+ - relish.gemspec
202
+ - spec/relish/command_spec.rb
203
+ - spec/relish/commands/base_spec.rb
204
+ - spec/relish/commands/config_spec.rb
205
+ - spec/relish/commands/dsl/command_spec.rb
206
+ - spec/relish/commands/dsl/help_text_spec.rb
207
+ - spec/relish/commands/dsl/option_spec.rb
208
+ - spec/relish/commands/handle_spec.rb
209
+ - spec/relish/error_messages_spec.rb
210
+ - spec/relish/options_file_spec.rb
211
+ - spec/relish/param_methods_spec.rb
212
+ - spec/relish_spec.rb
213
+ - spec/spec_helper.rb
214
+ - spec/support/context_class_examples.rb
215
+ - tags
263
216
  homepage: http://relishapp.com
264
217
  licenses: []
265
218
  post_install_message:
@@ -275,7 +228,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
275
228
  version: '0'
276
229
  segments:
277
230
  - 0
278
- hash: -1171980964409836435
231
+ hash: -2069326935424182989
279
232
  required_rubygems_version: !ruby/object:Gem::Requirement
280
233
  none: false
281
234
  requirements:
@@ -284,44 +237,27 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
237
  version: 1.3.5
285
238
  requirements: []
286
239
  rubyforge_project:
287
- rubygems_version: 1.8.24
240
+ rubygems_version: 1.8.23
288
241
  signing_key:
289
242
  specification_version: 3
290
243
  summary: Client gem for http://relishapp.com
291
244
  test_files:
292
- - !binary |-
293
- ZmVhdHVyZXMvaGVscC5mZWF0dXJl
294
- - !binary |-
295
- ZmVhdHVyZXMvcHJvamVjdHMuZmVhdHVyZQ==
296
- - !binary |-
297
- ZmVhdHVyZXMvc3RlcF9kZWZpbml0aW9ucy9hcnViYS5yYg==
298
- - !binary |-
299
- ZmVhdHVyZXMvc3RlcF9kZWZpbml0aW9ucy9mYWtlX3dlYl9zdGVwcy5yYg==
300
- - !binary |-
301
- ZmVhdHVyZXMvc3RlcF9kZWZpbml0aW9ucy9yZWxpc2hfc3RlcHMucmI=
302
- - !binary |-
303
- ZmVhdHVyZXMvc3VwcG9ydC9lbnYucmI=
304
- - !binary |-
305
- c3BlYy9yZWxpc2gvY29tbWFuZF9zcGVjLnJi
306
- - !binary |-
307
- c3BlYy9yZWxpc2gvY29tbWFuZHMvYmFzZV9zcGVjLnJi
308
- - !binary |-
309
- c3BlYy9yZWxpc2gvY29tbWFuZHMvY29uZmlnX3NwZWMucmI=
310
- - !binary |-
311
- c3BlYy9yZWxpc2gvY29tbWFuZHMvZHNsL2NvbW1hbmRfc3BlYy5yYg==
312
- - !binary |-
313
- c3BlYy9yZWxpc2gvY29tbWFuZHMvZHNsL2hlbHBfdGV4dF9zcGVjLnJi
314
- - !binary |-
315
- c3BlYy9yZWxpc2gvY29tbWFuZHMvZHNsL29wdGlvbl9zcGVjLnJi
316
- - !binary |-
317
- c3BlYy9yZWxpc2gvZXJyb3JfbWVzc2FnZXNfc3BlYy5yYg==
318
- - !binary |-
319
- c3BlYy9yZWxpc2gvb3B0aW9uc19maWxlX3NwZWMucmI=
320
- - !binary |-
321
- c3BlYy9yZWxpc2gvcGFyYW1fbWV0aG9kc19zcGVjLnJi
322
- - !binary |-
323
- c3BlYy9yZWxpc2hfc3BlYy5yYg==
324
- - !binary |-
325
- c3BlYy9zcGVjX2hlbHBlci5yYg==
326
- - !binary |-
327
- c3BlYy9zdXBwb3J0L2NvbnRleHRfY2xhc3NfZXhhbXBsZXMucmI=
245
+ - features/help.feature
246
+ - features/projects.feature
247
+ - features/step_definitions/aruba.rb
248
+ - features/step_definitions/fake_web_steps.rb
249
+ - features/step_definitions/relish_steps.rb
250
+ - features/support/env.rb
251
+ - spec/relish/command_spec.rb
252
+ - spec/relish/commands/base_spec.rb
253
+ - spec/relish/commands/config_spec.rb
254
+ - spec/relish/commands/dsl/command_spec.rb
255
+ - spec/relish/commands/dsl/help_text_spec.rb
256
+ - spec/relish/commands/dsl/option_spec.rb
257
+ - spec/relish/commands/handle_spec.rb
258
+ - spec/relish/error_messages_spec.rb
259
+ - spec/relish/options_file_spec.rb
260
+ - spec/relish/param_methods_spec.rb
261
+ - spec/relish_spec.rb
262
+ - spec/spec_helper.rb
263
+ - spec/support/context_class_examples.rb