bundler_bash_completion 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,4 +1,4 @@
1
1
  .DS_Store
2
2
  .bundle
3
- .rbenv-version
3
+ .ruby-version
4
4
  pkg/*
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
data/Gemfile.lock CHANGED
@@ -1,35 +1,34 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bundler_bash_completion (0.2.2)
4
+ bundler_bash_completion (0.2.3)
5
5
 
6
6
  GEM
7
- remote: http://rubygems.org/
7
+ remote: https://rubygems.org/
8
8
  specs:
9
9
  columnize (0.3.6)
10
- debugger (1.2.2)
10
+ debugger (1.6.0)
11
11
  columnize (>= 0.3.1)
12
- debugger-linecache (~> 1.1.1)
13
- debugger-ruby_core_source (~> 1.1.5)
14
- debugger-linecache (1.1.2)
15
- debugger-ruby_core_source (>= 1.1.1)
16
- debugger-ruby_core_source (1.1.5)
17
- diff-lcs (1.1.3)
18
- rake (10.0.2)
19
- rspec (2.12.0)
20
- rspec-core (~> 2.12.0)
21
- rspec-expectations (~> 2.12.0)
22
- rspec-mocks (~> 2.12.0)
23
- rspec-core (2.12.0)
24
- rspec-expectations (2.12.0)
25
- diff-lcs (~> 1.1.3)
26
- rspec-mocks (2.12.0)
12
+ debugger-linecache (~> 1.2.0)
13
+ debugger-ruby_core_source (~> 1.2.1)
14
+ debugger-linecache (1.2.0)
15
+ debugger-ruby_core_source (1.2.2)
16
+ diff-lcs (1.2.4)
17
+ rake (10.0.4)
18
+ rspec (2.13.0)
19
+ rspec-core (~> 2.13.0)
20
+ rspec-expectations (~> 2.13.0)
21
+ rspec-mocks (~> 2.13.0)
22
+ rspec-core (2.13.1)
23
+ rspec-expectations (2.13.0)
24
+ diff-lcs (>= 1.1.3, < 2.0)
25
+ rspec-mocks (2.13.1)
27
26
 
28
27
  PLATFORMS
29
28
  ruby
30
29
 
31
30
  DEPENDENCIES
32
31
  bundler_bash_completion!
33
- debugger (~> 1.2.0)
32
+ debugger (~> 1.6.0)
34
33
  rake (~> 10.0.0)
35
- rspec (~> 2.12.0)
34
+ rspec (~> 2.13.0)
data/README.mdown CHANGED
@@ -17,4 +17,4 @@ First, install gem:
17
17
 
18
18
  Then, add following line to your `~/.bashrc` file:
19
19
 
20
- complete -C /path/to/complete_bundle_bash_command -o default bundle
20
+ eval `complete_bundle_bash_command init`
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -1,5 +1,9 @@
1
- #! /usr/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
- require File.expand_path(File.dirname(__FILE__) + '/../lib/bundler_bash_completion')
3
+ if ARGV[0] == 'init'
4
+ puts "complete -C #{File.expand_path(__FILE__)} -o default bundle"
5
+ else
6
+ require File.expand_path(File.dirname(__FILE__) + '/../lib/bundler_bash_completion')
4
7
 
5
- puts BundlerBashCompletion.new(ENV['COMP_LINE']).complete.sort.join("\n")
8
+ puts BundlerBashCompletion.new(ENV['COMP_LINE']).complete.sort.join("\n")
9
+ end
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
16
16
  s.require_paths = ['lib']
17
17
 
18
- s.add_development_dependency 'debugger', '~> 1.2.0'
18
+ s.add_development_dependency 'debugger', '~> 1.6.0'
19
19
  s.add_development_dependency 'rake', '~> 10.0.0'
20
- s.add_development_dependency 'rspec', '~> 2.12.0'
20
+ s.add_development_dependency 'rspec', '~> 2.13.0'
21
21
  end
@@ -1,5 +1,4 @@
1
1
  require 'rubygems'
2
- require 'yaml'
3
2
 
4
3
  class BundlerBashCompletion
5
4
 
@@ -83,6 +82,8 @@ class BundlerBashCompletion
83
82
  },
84
83
  }
85
84
 
85
+ CONFIG_PATH = '.bundle/config'
86
+
86
87
  attr_reader :line
87
88
 
88
89
  def initialize(line)
@@ -154,9 +155,11 @@ class BundlerBashCompletion
154
155
 
155
156
  def bundle_path
156
157
  @bundle_path ||= begin
157
- require 'yaml'
158
- path = YAML.load_file('.bundle/config')['BUNDLE_PATH']
159
- path && File.expand_path(path)
158
+ if File.exists?(CONFIG_PATH)
159
+ require 'yaml'
160
+ path = YAML.load_file(CONFIG_PATH)['BUNDLE_PATH']
161
+ path && File.expand_path(path)
162
+ end
160
163
  rescue
161
164
  nil
162
165
  end
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.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-22 00:00:00.000000000 Z
12
+ date: 2013-05-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: debugger
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 1.2.0
21
+ version: 1.6.0
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 1.2.0
29
+ version: 1.6.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rake
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: 2.12.0
53
+ version: 2.13.0
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ dependencies:
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 2.12.0
61
+ version: 2.13.0
62
62
  description: Provides bash completion for bundle command
63
63
  email: al@alweb.org
64
64
  executables:
@@ -93,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  segments:
95
95
  - 0
96
- hash: 4383984777999458945
96
+ hash: -2727985824899206997
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: 4383984777999458945
105
+ hash: -2727985824899206997
106
106
  requirements: []
107
107
  rubyforge_project: bundler_bash_completion
108
108
  rubygems_version: 1.8.23