bundler_bash_completion 0.2.0 → 0.2.1
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/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/lib/bundler_bash_completion.rb +0 -15
- data/spec/bundler_bash_completion_spec.rb +2 -18
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
@@ -114,7 +114,6 @@ class BundlerBashCompletion
|
|
114
114
|
end
|
115
115
|
|
116
116
|
def complete
|
117
|
-
return rake_tasks_completion if rake_tasks_completion?
|
118
117
|
return task_options_completion if task_options_completion?
|
119
118
|
return tasks_completion if tasks_completion?
|
120
119
|
[]
|
@@ -138,12 +137,6 @@ class BundlerBashCompletion
|
|
138
137
|
end
|
139
138
|
end
|
140
139
|
|
141
|
-
def rake_tasks
|
142
|
-
@rake_tasks ||= `bundle exec rake -T`.split("\n").map { |line| line[/^rake (.+)\s+# /, 1].strip }
|
143
|
-
rescue
|
144
|
-
[]
|
145
|
-
end
|
146
|
-
|
147
140
|
def task
|
148
141
|
@task ||= (completion_step > 1) ? arguments[1].to_s : ''
|
149
142
|
end
|
@@ -184,14 +177,6 @@ class BundlerBashCompletion
|
|
184
177
|
end
|
185
178
|
end
|
186
179
|
|
187
|
-
def rake_tasks_completion
|
188
|
-
rake_tasks.select { |t| t.start_with?(completion_word) }
|
189
|
-
end
|
190
|
-
|
191
|
-
def rake_tasks_completion?
|
192
|
-
bundle_command? && completion_step == 3 && task == 'exec' && task_options == ['rake']
|
193
|
-
end
|
194
|
-
|
195
180
|
def tasks_completion
|
196
181
|
TASKS.keys.select { |t| t.start_with?(completion_word) }
|
197
182
|
end
|
@@ -218,16 +218,8 @@ describe BundlerBashCompletion do
|
|
218
218
|
|
219
219
|
context 'with "bundle exec rake "' do
|
220
220
|
|
221
|
-
it 'is
|
222
|
-
completion('bundle exec rake ').complete.should
|
223
|
-
end
|
224
|
-
|
225
|
-
end
|
226
|
-
|
227
|
-
context 'with "bundle exec rake re"' do
|
228
|
-
|
229
|
-
it 'is ["release"]' do
|
230
|
-
completion('bundle exec rake re').complete.should == ['release']
|
221
|
+
it 'is an empty array' do
|
222
|
+
completion('bundle exec rake ').complete.should == []
|
231
223
|
end
|
232
224
|
|
233
225
|
end
|
@@ -282,14 +274,6 @@ describe BundlerBashCompletion do
|
|
282
274
|
|
283
275
|
end
|
284
276
|
|
285
|
-
describe '#rake_tasks' do
|
286
|
-
|
287
|
-
it 'returns rake tasks' do
|
288
|
-
completion.rake_tasks.should include('default', 'install', 'build')
|
289
|
-
end
|
290
|
-
|
291
|
-
end
|
292
|
-
|
293
277
|
describe '#task' do
|
294
278
|
|
295
279
|
it 'is an empty string when not ending with a whitespace' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler_bash_completion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -93,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
93
|
version: '0'
|
94
94
|
segments:
|
95
95
|
- 0
|
96
|
-
hash:
|
96
|
+
hash: -475694564160695178
|
97
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
98
|
none: false
|
99
99
|
requirements:
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: '0'
|
103
103
|
segments:
|
104
104
|
- 0
|
105
|
-
hash:
|
105
|
+
hash: -475694564160695178
|
106
106
|
requirements: []
|
107
107
|
rubyforge_project: bundler_bash_completion
|
108
108
|
rubygems_version: 1.8.23
|