relish 0.0.7 → 0.0.8
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/lib/relish/commands/base.rb +2 -0
- data/lib/relish/commands/projects.rb +2 -2
- data/lib/relish/commands/push.rb +2 -3
- data/lib/relish/options_file.rb +2 -2
- data/relish.gemspec +1 -1
- data/spec/relish/commands/push_spec.rb +3 -10
- metadata +4 -4
data/lib/relish/commands/base.rb
CHANGED
@@ -18,14 +18,14 @@ module Relish
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def add
|
21
|
-
puts resource['projects'].post(:
|
21
|
+
puts resource['projects'].post(:handle => @param)
|
22
22
|
rescue RestClient::Exception => exception
|
23
23
|
warn exception.response
|
24
24
|
exit 1
|
25
25
|
end
|
26
26
|
|
27
27
|
def remove
|
28
|
-
puts resource["projects/#{@param}
|
28
|
+
puts resource["projects/#{@param}"].delete
|
29
29
|
rescue RestClient::Exception => exception
|
30
30
|
warn exception.response
|
31
31
|
exit 1
|
data/lib/relish/commands/push.rb
CHANGED
@@ -30,9 +30,8 @@ module Relish
|
|
30
30
|
|
31
31
|
def parameters
|
32
32
|
"".tap do |str|
|
33
|
-
str << "project_id=#{project}
|
34
|
-
str << "version_id=#{version}
|
35
|
-
str << "api_token=#{api_token}"
|
33
|
+
str << "project_id=#{project}"
|
34
|
+
str << "&version_id=#{version}" if version
|
36
35
|
end
|
37
36
|
end
|
38
37
|
|
data/lib/relish/options_file.rb
CHANGED
@@ -13,10 +13,10 @@ module Relish
|
|
13
13
|
# Store the given options into the file. Existing options with the same keys
|
14
14
|
# will be overwritten.
|
15
15
|
def store(options)
|
16
|
-
|
16
|
+
@options = self.options.merge(options)
|
17
17
|
FileUtils.touch(@path)
|
18
18
|
File.open(@path, 'w') do |file|
|
19
|
-
YAML.dump(
|
19
|
+
YAML.dump(@options, file)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
data/relish.gemspec
CHANGED
@@ -14,18 +14,13 @@ module Relish
|
|
14
14
|
end
|
15
15
|
|
16
16
|
describe '#parameters' do
|
17
|
-
before
|
18
|
-
push.should_receive(:project).and_return('rspec')
|
19
|
-
push.should_receive(:api_token).and_return('abc')
|
20
|
-
end
|
17
|
+
before { push.should_receive(:project).and_return('rspec') }
|
21
18
|
|
22
19
|
context 'without version' do
|
23
20
|
let(:push) { described_class.new }
|
24
21
|
|
25
22
|
specify do
|
26
|
-
push.parameters.should eq(
|
27
|
-
"project_id=rspec&api_token=abc"
|
28
|
-
)
|
23
|
+
push.parameters.should eq("project_id=rspec")
|
29
24
|
end
|
30
25
|
end
|
31
26
|
|
@@ -33,9 +28,7 @@ module Relish
|
|
33
28
|
let(:push) { described_class.new(['--version', 'one']) }
|
34
29
|
|
35
30
|
specify do
|
36
|
-
push.parameters.should eq(
|
37
|
-
"project_id=rspec&version_id=one&api_token=abc"
|
38
|
-
)
|
31
|
+
push.parameters.should eq("project_id=rspec&version_id=one")
|
39
32
|
end
|
40
33
|
end
|
41
34
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matt Wynne
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-09-23 00:00:00
|
19
|
+
date: 2010-09-23 00:00:00 +01:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|