bond 0.3.1 → 0.3.2

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.
@@ -1,3 +1,6 @@
1
+ == 0.3.2
2
+ * Add Bond.started?
3
+
1
4
  == 0.3.1
2
5
  * Fix install for non-readline platforms
3
6
  * Fix install for rubinius
@@ -105,6 +105,9 @@ module Bond
105
105
  # Useful to debug an incorrect completion.
106
106
  def start(options={}, &block); M.start(options, &block); end
107
107
 
108
+ # Indicates if Bond has already started
109
+ def started?; M.started?; end
110
+
108
111
  # Loads completions for gems that ship with them under lib/bond/completions/, relative to the gem's base directory.
109
112
  def load_gems(*gems); M.load_gems(*gems); end
110
113
 
@@ -57,11 +57,17 @@ module Bond
57
57
  # See {Bond#start}
58
58
  def start(options={}, &block)
59
59
  debrief options
60
+ @started = true
60
61
  load_completions
61
62
  Rc.module_eval(&block) if block
62
63
  true
63
64
  end
64
65
 
66
+ # See {Bond#started?}
67
+ def started?
68
+ !!@started
69
+ end
70
+
65
71
  # Finds the full path to a gem's file relative it's load path directory. Returns nil if not found.
66
72
  def find_gem_file(rubygem, file)
67
73
  begin gem(rubygem); rescue Exception; end
@@ -110,4 +116,4 @@ module Bond
110
116
  load_dir File.join(home, '.bond')
111
117
  end
112
118
  end
113
- end
119
+ end
@@ -1,3 +1,3 @@
1
1
  module Bond
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
@@ -6,7 +6,7 @@ describe "Bond" do
6
6
  Bond.start({:readline_plugin=>valid_readline_plugin}.merge(options), &block)
7
7
  end
8
8
 
9
- before { M.instance_eval("@agent = @config = nil"); M.expects(:load_completions) }
9
+ before { M.instance_eval("@started = @agent = @config = nil"); M.expects(:load_completions) }
10
10
  it "prints error if readline_plugin is not a module" do
11
11
  capture_stderr { start :readline_plugin=>false }.should =~ /Invalid/
12
12
  end
@@ -42,6 +42,12 @@ describe "Bond" do
42
42
  tab("'blah'.").should == []
43
43
  end
44
44
 
45
+ it "status can be checked with started?" do
46
+ Bond.started?.should == false
47
+ start
48
+ Bond.started?.should == true
49
+ end
50
+
45
51
  after_all { M.debrief :readline_plugin=>valid_readline_plugin; M.reset }
46
52
  end
47
53
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bond
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gabriel Horner
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-10 00:00:00 -04:00
18
+ date: 2010-11-08 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -140,7 +140,7 @@ licenses:
140
140
  post_install_message:
141
141
  rdoc_options:
142
142
  - --title
143
- - Bond 0.3.1 Documentation
143
+ - Bond 0.3.2 Documentation
144
144
  require_paths:
145
145
  - lib
146
146
  required_ruby_version: !ruby/object:Gem::Requirement