Skip to content
Browse files

Change organization to publisher

  • Loading branch information...
1 parent a0e7f7c commit 10d29ee18eaccea4533e7f2b04fbc7e395a16ad9 @mattwynne mattwynne committed
View
13 lib/relish/commands/help.rb
@@ -5,13 +5,12 @@ class Help < Base
desc 'show this usage'
command :default do
puts <<-TEXT
-A <project> can be scoped by an organization or user handle. For
-example, if an organiztion (rspec) has a project (rspec-core), then
-the <project> would be `rspec/rspec-core`. If a user (justin) has a
-project (my-project), then <project> would be `justin/my-project`.
+A <project> can be scoped by a publisher name. For
+example, if a publisher (rspec) has a project (rspec-core), then
+the <project> would be `rspec/rspec-core`.
-If you leave off the organization or user handle, then it defaults
-to the user (you).
+If you leave off the publisher name, then it defaults
+to the user (you), assuming you are publishing projects.
TEXT
puts "=== Available Commands\n\n"
@@ -53,4 +52,4 @@ def max_usage_length
end
end
-end
+end
View
4 lib/relish/commands/projects.rb
@@ -7,7 +7,7 @@ class Projects < Base
puts format(resource['projects'].get(:accept => :json))
end
- usage 'projects:add <org or user handle>/<project handle>'
+ usage 'projects:add <publisher name>/<project name>'
desc 'add a project',
'append :private to make the project private',
'example: relish projects:add rspec/rspec-core:private'
@@ -72,4 +72,4 @@ def private?
end
end
-end
+end
View
14 lib/relish/commands/push.rb
@@ -18,11 +18,11 @@ class Push < Base
post files_as_tar_gz, project_params
end
- usage 'push:org <organization handle>'
- desc 'push markdown files to an organization',
- 'example: relish push:org rspec'
- command :org do
- post files_as_tar_gz, organization_params
+ usage 'push:publisher <publisher name>'
+ desc 'push markdown files to a publisher',
+ 'example: relish push:publisher rspec'
+ command :publisher do
+ post files_as_tar_gz, publisher_params
end
private
@@ -40,8 +40,8 @@ def project_params
end
end
- def organization_params
- "organization_id=#{@param}"
+ def publisher_params
+ "publisher_id=#{@param}"
end
def project
View
14 spec/relish/options_file_spec.rb
@@ -11,15 +11,15 @@ module Relish
context 'with options file that exists' do
let(:options) do
- {'organization' => 'rspec', 'project' => 'rspec-core'}
+ {'publisher' => 'rspec', 'project' => 'rspec-core'}
end
before do
File.open(path, 'w') { |f| YAML.dump(options, f) }
end
- it 'parses the organization' do
- global_options['organization'].should eq('rspec')
+ it 'parses the publisher' do
+ global_options['publisher'].should eq('rspec')
end
it 'parses the project' do
@@ -42,16 +42,16 @@ module Relish
context 'with options file that exists' do
let(:options) do
- {'organization' => 'rspec', 'project' => 'rspec-core'}
+ {'publisher' => 'rspec', 'project' => 'rspec-core'}
end
before do
File.open(path, 'w') { |f| YAML.dump(options, f) }
- global_options.store('organization' => 'relish')
+ global_options.store('publisher' => 'relish')
end
it "over-writes existing values" do
- OptionsFile.new(path).options['organization'].should == 'relish'
+ OptionsFile.new(path).options['publisher'].should == 'relish'
end
it 'leaves existing options alone' do
@@ -62,4 +62,4 @@ module Relish
end
end
-end
+end

0 comments on commit 10d29ee

Please sign in to comment.
Something went wrong with that request. Please try again.