script_finder 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -19,7 +19,7 @@ Examples (in a rails app):
19
19
  RowsLogger plugin enables mysql
20
20
  >> exit
21
21
  ~/rails_app/app/views$ s r 'some ruby'
22
- 's r' was too ambiguous. Try:
22
+ 's r' was ambiguous. Try:
23
23
  's ru' for 'script/runner'
24
24
  's re' for 'script/remote'
25
25
  ~/rails_app/app/views$ s ru 'some ruby'
@@ -48,8 +48,10 @@ Email me at: tcrawley@gmail.com if you find any problems.
48
48
 
49
49
  h1. INSTALL
50
50
 
51
- * gem sources -a http://gems.github.com
52
- * sudo gem install tobias-script_finder
51
+ From "gemcutter":http://gemcutter.org/:
52
+
53
+ * gem install script_finder
54
+
53
55
 
54
56
  h1. LICENSE
55
57
 
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 2
4
- :patch: 0
4
+ :patch: 1
@@ -9,23 +9,14 @@ module ScriptFinder
9
9
  end
10
10
 
11
11
  class Finder
12
+ attr_accessor :bin_dir
13
+ attr_reader :command
14
+
12
15
  def initialize(command, bin_dir = nil)
13
16
  @command = command
14
- self.bin_dir = bin_dir
15
- end
16
-
17
- def bin_dir=(dir)
18
- @bin_dir = dir
17
+ self.bin_dir = bin_dir || DEFAULT_BIN_DIR
19
18
  end
20
19
 
21
- def bin_dir
22
- @bin_dir ||= DEFAULT_BIN_DIR
23
- end
24
-
25
- def command
26
- @command
27
- end
28
-
29
20
  def execute_command
30
21
  dir = find_bin_dir
31
22
 
@@ -120,7 +111,7 @@ module ScriptFinder
120
111
 
121
112
  def too_many_cmds_found(possibles)
122
113
  exec_name = File.basename($0)
123
- puts "'#{exec_name} #{command.first}' was too ambiguous. Try:"
114
+ puts "'#{exec_name} #{command.first}' was ambiguous. Try:"
124
115
  unique_prefixes(possibles).each do |cmd, prefix|
125
116
  puts "\t'#{exec_name} #{prefix}' for '#{File.join(bin_dir, cmd)}'"
126
117
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: script_finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Crawley
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-01 00:00:00 -04:00
12
+ date: 2009-11-15 00:00:00 -05:00
13
13
  default_executable: s
14
14
  dependencies: []
15
15