ripple-cli 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Binary file
@@ -1,15 +1,15 @@
1
- module Ripple
2
- class Engine
3
- def execute
4
- system("#{RIPPLE_EXE} #{command} #{build_args}")
5
- end
6
-
7
- def command
8
- throw 'Command to be implemented'
9
- end
10
-
11
- def build_args
12
- throw 'Args to be implemented'
13
- end
14
- end
15
- end
1
+ module Ripple
2
+ class Engine
3
+ def execute
4
+ system("#{RIPPLE_EXE} #{command} #{build_args}")
5
+ end
6
+
7
+ def command
8
+ throw 'Command to be implemented'
9
+ end
10
+
11
+ def build_args
12
+ throw 'Args to be implemented'
13
+ end
14
+ end
15
+ end
@@ -1,28 +1,28 @@
1
- module Ripple
2
- class Restore < Engine
3
-
4
- attr_accessor :feeds, :force, :solution, :cache, :all_solutions, :verbose
5
-
6
- def command
7
- 'restore'
8
- end
9
-
10
- def build_args
11
- args = ''
12
-
13
- args = "#{args} --feeds \"#{@feeds.join('#')}\"" unless @feeds.nil? or @feeds.length < 1
14
- args = "#{args} --force" if @force
15
- args = "#{args} --cache \"#{@cache}\"" unless @cache.nil? or @cache.empty?
16
-
17
- if @all_solutions
18
- args = "#{args} --all"
19
- else
20
- args = "#{args} --solution \"#{@solution}\"" unless @solution.nil? or @solution.empty?
21
- end
22
-
23
- args = "#{args} --verbose" if @verbose
24
-
25
- args.strip
26
- end
27
- end
28
- end
1
+ module Ripple
2
+ class Restore < Engine
3
+
4
+ attr_accessor :feeds, :force, :solution, :cache, :all_solutions, :verbose
5
+
6
+ def command
7
+ 'restore'
8
+ end
9
+
10
+ def build_args
11
+ args = ''
12
+
13
+ args = "#{args} --feeds \"#{@feeds.join('#')}\"" unless @feeds.nil? or @feeds.length < 1
14
+ args = "#{args} --force" if @force
15
+ args = "#{args} --cache \"#{@cache}\"" unless @cache.nil? or @cache.empty?
16
+
17
+ if @all_solutions
18
+ args = "#{args} --all"
19
+ else
20
+ args = "#{args} --solution \"#{@solution}\"" unless @solution.nil? or @solution.empty?
21
+ end
22
+
23
+ args = "#{args} --verbose" if @verbose
24
+
25
+ args.strip
26
+ end
27
+ end
28
+ end
@@ -1,3 +1,3 @@
1
- module Ripple
2
- VERSION = '0.0.6'
3
- end
1
+ module Ripple
2
+ VERSION = '0.0.7'
3
+ end
@@ -1,99 +1,99 @@
1
- require 'ripple-cli'
2
-
3
- module Ripple
4
- describe Restore do
5
- subject { Restore.new }
6
-
7
- describe '#build_args' do
8
- context 'with nil feeds' do
9
- it { subject.build_args.should eq '' }
10
- end
11
-
12
- context 'with no feeds' do
13
- before { subject.feeds = [] }
14
- it { subject.build_args.should eq '' }
15
- end
16
-
17
- context 'with one feed' do
18
- before { subject.feeds = ['feed1'] }
19
- it { subject.build_args.should eq '--feeds "feed1"' }
20
- end
21
-
22
- context 'with multipe feeds' do
23
- before { subject.feeds = ['feed1', 'feed2'] }
24
- it { subject.build_args.should eq '--feeds "feed1#feed2"' }
25
- end
26
-
27
- context 'force no' do
28
- before { subject.force = false }
29
- it { subject.build_args.should eq '' }
30
- end
31
-
32
- context 'force yes' do
33
- before { subject.force = true }
34
- it { subject.build_args.should eq '--force' }
35
- end
36
-
37
- context 'with nil cache' do
38
- it { subject.build_args.should eq '' }
39
- end
40
-
41
- context 'with empty cache' do
42
- before { subject.cache = '' }
43
- it { subject.build_args.should eq '' }
44
- end
45
-
46
- context 'with cache' do
47
- before { subject.cache = 'some/cache' }
48
- it { subject.build_args.should eq '--cache "some/cache"' }
49
- end
50
-
51
- context 'not for all solutions' do
52
- before { subject.all_solutions = false }
53
- it { subject.build_args.should eq '' }
54
- end
55
-
56
- context 'for all solutions' do
57
- before { subject.all_solutions = true }
58
- it { subject.build_args.should eq '--all' }
59
- end
60
-
61
- context 'for specific solution' do
62
- before { subject.solution = 'some/solution' }
63
- it { subject.build_args.should eq '--solution "some/solution"' }
64
- end
65
-
66
- context 'for specific solution and all solutions' do
67
- before {
68
- subject.solution = 'some/solution'
69
- subject.all_solutions = true
70
- }
71
- it { subject.build_args.should eq '--all' }
72
- end
73
-
74
- context 'no solution specified' do
75
- it { subject.build_args.should eq '' }
76
- end
77
-
78
- context 'verbose no' do
79
- it { subject.build_args.should eq '' }
80
- end
81
-
82
- context 'verbose yes' do
83
- before { subject.verbose = true }
84
- it { subject.build_args.should eq '--verbose' }
85
- end
86
-
87
- context 'with feeds, force, cache, all, and verbose' do
88
- before {
89
- subject.feeds = ['feed1', 'feed2']
90
- subject.force = true
91
- subject.cache = 'some/cache'
92
- subject.all_solutions = true
93
- subject.verbose = true
94
- }
95
- it { subject.build_args.should eq '--feeds "feed1#feed2" --force --cache "some/cache" --all --verbose' }
96
- end
97
- end
98
- end
99
- end
1
+ require 'ripple-cli'
2
+
3
+ module Ripple
4
+ describe Restore do
5
+ subject { Restore.new }
6
+
7
+ describe '#build_args' do
8
+ context 'with nil feeds' do
9
+ it { subject.build_args.should eq '' }
10
+ end
11
+
12
+ context 'with no feeds' do
13
+ before { subject.feeds = [] }
14
+ it { subject.build_args.should eq '' }
15
+ end
16
+
17
+ context 'with one feed' do
18
+ before { subject.feeds = ['feed1'] }
19
+ it { subject.build_args.should eq '--feeds "feed1"' }
20
+ end
21
+
22
+ context 'with multipe feeds' do
23
+ before { subject.feeds = ['feed1', 'feed2'] }
24
+ it { subject.build_args.should eq '--feeds "feed1#feed2"' }
25
+ end
26
+
27
+ context 'force no' do
28
+ before { subject.force = false }
29
+ it { subject.build_args.should eq '' }
30
+ end
31
+
32
+ context 'force yes' do
33
+ before { subject.force = true }
34
+ it { subject.build_args.should eq '--force' }
35
+ end
36
+
37
+ context 'with nil cache' do
38
+ it { subject.build_args.should eq '' }
39
+ end
40
+
41
+ context 'with empty cache' do
42
+ before { subject.cache = '' }
43
+ it { subject.build_args.should eq '' }
44
+ end
45
+
46
+ context 'with cache' do
47
+ before { subject.cache = 'some/cache' }
48
+ it { subject.build_args.should eq '--cache "some/cache"' }
49
+ end
50
+
51
+ context 'not for all solutions' do
52
+ before { subject.all_solutions = false }
53
+ it { subject.build_args.should eq '' }
54
+ end
55
+
56
+ context 'for all solutions' do
57
+ before { subject.all_solutions = true }
58
+ it { subject.build_args.should eq '--all' }
59
+ end
60
+
61
+ context 'for specific solution' do
62
+ before { subject.solution = 'some/solution' }
63
+ it { subject.build_args.should eq '--solution "some/solution"' }
64
+ end
65
+
66
+ context 'for specific solution and all solutions' do
67
+ before {
68
+ subject.solution = 'some/solution'
69
+ subject.all_solutions = true
70
+ }
71
+ it { subject.build_args.should eq '--all' }
72
+ end
73
+
74
+ context 'no solution specified' do
75
+ it { subject.build_args.should eq '' }
76
+ end
77
+
78
+ context 'verbose no' do
79
+ it { subject.build_args.should eq '' }
80
+ end
81
+
82
+ context 'verbose yes' do
83
+ before { subject.verbose = true }
84
+ it { subject.build_args.should eq '--verbose' }
85
+ end
86
+
87
+ context 'with feeds, force, cache, all, and verbose' do
88
+ before {
89
+ subject.feeds = ['feed1', 'feed2']
90
+ subject.force = true
91
+ subject.cache = 'some/cache'
92
+ subject.all_solutions = true
93
+ subject.verbose = true
94
+ }
95
+ it { subject.build_args.should eq '--feeds "feed1#feed2" --force --cache "some/cache" --all --verbose' }
96
+ end
97
+ end
98
+ end
99
+ end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ripple-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Matt Smith
@@ -40,25 +41,26 @@ files:
40
41
  - specs/ripple-cli/update_spec.rb
41
42
  homepage: ''
42
43
  licenses: []
43
- metadata: {}
44
44
  post_install_message:
45
45
  rdoc_options: []
46
46
  require_paths:
47
47
  - lib
48
48
  required_ruby_version: !ruby/object:Gem::Requirement
49
+ none: false
49
50
  requirements:
50
51
  - - ! '>='
51
52
  - !ruby/object:Gem::Version
52
53
  version: '0'
53
54
  required_rubygems_version: !ruby/object:Gem::Requirement
55
+ none: false
54
56
  requirements:
55
57
  - - ! '>='
56
58
  - !ruby/object:Gem::Version
57
59
  version: '0'
58
60
  requirements: []
59
61
  rubyforge_project:
60
- rubygems_version: 2.0.3
62
+ rubygems_version: 1.8.24
61
63
  signing_key:
62
- specification_version: 4
64
+ specification_version: 3
63
65
  summary: installs the command line tool ripple
64
66
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- OTE0ZGViNjk4OTliZDk4Yzg5YzExODUwYzc3MGFkNzFhMDdjNjI0OQ==
5
- data.tar.gz: !binary |-
6
- NWViYmViNWVhNDY0ZTFlMDI4ODNmYzM0YTA4MDQ1MmQ3NzExOWQ3OA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- YzIxNDJmZGFhZTkyOTQ1ODVmZDMxNzRlYzRlZDY5YTAwZDU5NDQ0YTllMGUy
10
- YjRjNzAzZTIyM2E3MDM2YThhYjdjZGVhYWJkZTYxYTJmZjkxMDdjZGU3ODNl
11
- ZjIwMzk4YWU4OTZiMjFmODE2OTdhNjgyZmJjYjRmZGZlY2FiYzI=
12
- data.tar.gz: !binary |-
13
- NGVlZTZmNWQ2MjIxY2E5YjVmNGI3ZTlkOTA2NmIwMjU5ZDcyMTc2NGJjODZm
14
- NjM0NTBiZjdiNmUwMTQ0OTcyZTRhMDkxNmZkYTFiNWRlYzlmZWU0ZGUzYTE3
15
- OTU4ZjhiZWNjNjVkMjVmOTIzMGIxMDk0ODVhMGM5Njg1NzQyNDk=