bundler_bash_completion 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ab7fb40ab822609d52fa65eca4973bdbb2e6aff6
4
- data.tar.gz: fbf1ab18ab0e2ff356c3df71df50d6240de5ada1
2
+ SHA256:
3
+ metadata.gz: 143492f6ab2521be599802b485c28bee213415848ae192373885893ba496c691
4
+ data.tar.gz: 0a386ab26e4ad85cf9213fe928b21cfc20a112beaf518ddd7eecb28b049f6dd1
5
5
  SHA512:
6
- metadata.gz: 7138ff42c7fed892e390548edfc69564fcfc4598c1a0aa7597e329fd04bcae51991cc991ae4ddad7caa07517b94bb64bb8d75f3b88bc15c431489ebb827ba2e2
7
- data.tar.gz: 6b31200e819bab9a9fdd9ad1416d931c10adb5e9ff679fa3dd9650dc0fa7ff97e2870a5d8684012aa504be768beae7b48f5e668e7756345fbb94e4de90398e70
6
+ metadata.gz: 8d210e88ae0e55a6463d1aef9fdd3add996ad327134195ce3178d6a3335d4faa39997a3d27a0e871da30a66e4a2bd8116a2973d562e4514fbad8876f53befa0e
7
+ data.tar.gz: bb25d0b8746b3284d745d1998cb9730978196930966fbbf5c619642a52fca0deaa099caf04fcb28a60fd94e1dd46f90462713b8d1dbf106202e9ec8bb848e86e
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.1
1
+ 0.6.2
@@ -9,13 +9,16 @@ Gem::Specification.new do |s|
9
9
  s.description = 'Provides bash completion for bundle command'
10
10
  s.license = 'MIT'
11
11
 
12
- s.files = `git ls-files | grep -vE '^(spec/|test/|\\.|Gemfile|Rakefile)'`.split("\n")
13
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
12
+ s.files = %x(git ls-files | grep -vE '^(spec/|test/|\\.|Gemfile|Rakefile)').split("\n")
13
+ s.executables = %x(git ls-files -- bin/*).split("\n").map { |f| File.basename(f) }
14
14
  s.require_paths = ['lib']
15
15
 
16
16
  s.required_ruby_version = '>= 2.0.0'
17
17
 
18
- s.add_development_dependency 'byebug', '>= 9.0.0', '< 10.0.0'
19
- s.add_development_dependency 'rake', '>= 12.0.0', '< 13.0.0'
18
+ s.add_development_dependency 'byebug', '>= 9.0.0', '< 12.0.0'
19
+ s.add_development_dependency 'rake', '>= 12.0.0', '< 14.0.0'
20
20
  s.add_development_dependency 'rspec', '>= 3.5.0', '< 4.0.0'
21
+ s.add_development_dependency 'rubocop', '>= 1.25.0', '< 2.0.0'
22
+ s.add_development_dependency 'rubocop-rake', '>= 0.6.0', '< 1.0.0'
23
+ s.add_development_dependency 'rubocop-rspec', '>= 2.8.0', '< 3.0.0'
21
24
  end
@@ -31,13 +31,13 @@ class BundlerBashCompletion
31
31
  '--verbose' => :continue,
32
32
  },
33
33
  'exec' => {
34
- :bin => :continue,
34
+ bin: :continue,
35
35
  },
36
36
  'gem' => {
37
37
  '--bin' => :block,
38
38
  },
39
39
  'help' => {
40
- :task => :continue,
40
+ task: :continue,
41
41
  },
42
42
  'init' => {
43
43
  '--no-color' => :continue,
@@ -87,7 +87,7 @@ class BundlerBashCompletion
87
87
  '--verbose' => :continue,
88
88
  },
89
89
  'open' => {
90
- :gem => :continue,
90
+ gem: :continue,
91
91
  },
92
92
  'outdated' => {
93
93
  '--local' => :continue,
@@ -117,9 +117,11 @@ class BundlerBashCompletion
117
117
  :gem => :continue,
118
118
  },
119
119
  'update' => {
120
+ '--bundler' => :block,
120
121
  '--no-color' => :continue,
121
122
  '--no-no-color' => :continue,
122
123
  '--no-verbose' => :continue,
124
+ '--quiet' => :continue,
123
125
  '--retry' => :block,
124
126
  '--source' => :block,
125
127
  '--verbose' => :continue,
@@ -139,9 +141,9 @@ class BundlerBashCompletion
139
141
  '--version' => :continue,
140
142
  '--without' => :block,
141
143
  },
142
- }
144
+ }.freeze
143
145
 
144
- CONFIG_PATH = '.bundle/config'
146
+ CONFIG_PATH = '.bundle/config'.freeze
145
147
 
146
148
  attr_reader :line
147
149
 
@@ -157,7 +159,7 @@ class BundlerBashCompletion
157
159
  @bins ||= begin
158
160
  gem_paths.map { |path| Dir.glob("#{path}/{bin,exe}/*") }.tap do |paths|
159
161
  paths.flatten!
160
- paths.reject! { |path| !File.executable?(path) }
162
+ paths.select! { |path| File.executable?(path) }
161
163
  paths.map! { |path| File.basename(path) }
162
164
  paths.push('gem', 'ruby')
163
165
  paths.sort!
@@ -171,7 +173,7 @@ class BundlerBashCompletion
171
173
  end
172
174
 
173
175
  def completion_word
174
- @completion_word ||= (line =~ /\s+$/) ? '' : arguments.last
176
+ @completion_word ||= line =~ /\s+$/ ? '' : arguments.last
175
177
  end
176
178
 
177
179
  def complete
@@ -182,7 +184,7 @@ class BundlerBashCompletion
182
184
 
183
185
  def gems
184
186
  @gems ||= begin
185
- gems = File.readlines("#{Dir.pwd}/Gemfile.lock").grep(/\(.+\)/).tap do |lines|
187
+ File.readlines("#{Dir.pwd}/Gemfile.lock").grep(/\(.+\)/).tap do |lines|
186
188
  lines.each do |line|
187
189
  line.gsub!(/\(.+/, '')
188
190
  line.gsub!(/\s+/, '')
@@ -193,17 +195,17 @@ class BundlerBashCompletion
193
195
  gems.sort!
194
196
  gems.uniq!
195
197
  end
196
- rescue Exception
198
+ rescue
197
199
  []
198
200
  end
199
201
  end
200
202
 
201
203
  def task
202
- @task ||= (completion_step > 1) ? arguments[1].to_s : ''
204
+ @task ||= completion_step > 1 ? arguments[1].to_s : ''
203
205
  end
204
206
 
205
207
  def task_options
206
- @task_options ||= (completion_step > 2) ? arguments[2..(completion_step - 1)] : []
208
+ @task_options ||= completion_step > 2 ? arguments[2..(completion_step - 1)] : []
207
209
  end
208
210
 
209
211
  private
@@ -214,7 +216,7 @@ class BundlerBashCompletion
214
216
 
215
217
  def bundle_path
216
218
  @bundle_path ||= begin
217
- if File.exists?(CONFIG_PATH)
219
+ if File.exist?(CONFIG_PATH)
218
220
  require 'yaml'
219
221
  path = YAML.load_file(CONFIG_PATH)['BUNDLE_PATH']
220
222
  path && File.expand_path(path)
@@ -252,13 +254,14 @@ class BundlerBashCompletion
252
254
  options = TASKS[task] || {}
253
255
  return [] if options[task_options.last] == :block
254
256
  completion = options.keys.map do |key|
255
- if key == :task
257
+ case key
258
+ when :task
256
259
  (task_options & TASKS.keys).empty? ? TASKS.keys : nil
257
- elsif key == :gem
260
+ when :gem
258
261
  task_options.empty? ? gems : nil
259
- elsif key == :gems
262
+ when :gems
260
263
  gems - task_options
261
- elsif key == :bin
264
+ when :bin
262
265
  task_options.empty? ? bins : nil
263
266
  else
264
267
  key
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler_bash_completion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexis Toulotte
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-18 00:00:00.000000000 Z
11
+ date: 2022-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 9.0.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 10.0.0
22
+ version: 12.0.0
23
23
  type: :development
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 9.0.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 10.0.0
32
+ version: 12.0.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rake
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: 12.0.0
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: 13.0.0
42
+ version: 14.0.0
43
43
  type: :development
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: 12.0.0
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: 13.0.0
52
+ version: 14.0.0
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: rspec
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -70,6 +70,66 @@ dependencies:
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
72
  version: 4.0.0
73
+ - !ruby/object:Gem::Dependency
74
+ name: rubocop
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: 1.25.0
80
+ - - "<"
81
+ - !ruby/object:Gem::Version
82
+ version: 2.0.0
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 1.25.0
90
+ - - "<"
91
+ - !ruby/object:Gem::Version
92
+ version: 2.0.0
93
+ - !ruby/object:Gem::Dependency
94
+ name: rubocop-rake
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 0.6.0
100
+ - - "<"
101
+ - !ruby/object:Gem::Version
102
+ version: 1.0.0
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: 0.6.0
110
+ - - "<"
111
+ - !ruby/object:Gem::Version
112
+ version: 1.0.0
113
+ - !ruby/object:Gem::Dependency
114
+ name: rubocop-rspec
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: 2.8.0
120
+ - - "<"
121
+ - !ruby/object:Gem::Version
122
+ version: 3.0.0
123
+ type: :development
124
+ prerelease: false
125
+ version_requirements: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: 2.8.0
130
+ - - "<"
131
+ - !ruby/object:Gem::Version
132
+ version: 3.0.0
73
133
  description: Provides bash completion for bundle command
74
134
  email: al@alweb.org
75
135
  executables:
@@ -87,7 +147,7 @@ homepage: https://github.com/alexistoulotte/bundler_bash_completion
87
147
  licenses:
88
148
  - MIT
89
149
  metadata: {}
90
- post_install_message:
150
+ post_install_message:
91
151
  rdoc_options: []
92
152
  require_paths:
93
153
  - lib
@@ -102,9 +162,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
162
  - !ruby/object:Gem::Version
103
163
  version: '0'
104
164
  requirements: []
105
- rubyforge_project:
106
- rubygems_version: 2.6.8
107
- signing_key:
165
+ rubygems_version: 3.3.3
166
+ signing_key:
108
167
  specification_version: 4
109
168
  summary: Bundler bash completion
110
169
  test_files: []