rails_complete 0.3.0 → 0.4.0
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/VERSION +1 -1
- data/bin/rails-complete +8 -7
- data/rails_complete.gemspec +3 -6
- data/test/test_executable.rb +1 -1
- metadata +3 -6
- data/lib/rails_complete.rb +0 -15
- data/test/test_completions.rb +0 -14
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/bin/rails-complete
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
COMMANDS = %w(server generate destroy plugin benchmarker profiler
|
4
|
+
console dbconsole application runner new)
|
5
|
+
|
6
|
+
def complete(string)
|
7
|
+
string = string.chomp
|
8
|
+
|
9
|
+
COMMANDS.select {|cmd| cmd[0, string.length] == string }
|
7
10
|
end
|
8
11
|
|
9
12
|
comp_line = ENV["COMP_LINE"]
|
@@ -11,8 +14,6 @@ exit -1 if comp_line.nil?
|
|
11
14
|
|
12
15
|
parts = comp_line.scan(/\w+/)
|
13
16
|
|
14
|
-
require 'rails_complete'
|
15
|
-
|
16
17
|
prefix = parts[1] || ""
|
17
18
|
|
18
|
-
puts
|
19
|
+
puts complete(prefix)
|
data/rails_complete.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rails_complete}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.4.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Daniel Schierbeck"]
|
12
|
-
s.date = %q{2010-09-
|
12
|
+
s.date = %q{2010-09-28}
|
13
13
|
s.default_executable = %q{rails-complete}
|
14
14
|
s.description = %q{Tab completion for the rails command-line tool.}
|
15
15
|
s.email = %q{daniel.schierbeck@gmail.com}
|
@@ -24,9 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
"Rakefile",
|
25
25
|
"VERSION",
|
26
26
|
"bin/rails-complete",
|
27
|
-
"lib/rails_complete.rb",
|
28
27
|
"rails_complete.gemspec",
|
29
|
-
"test/test_completions.rb",
|
30
28
|
"test/test_executable.rb"
|
31
29
|
]
|
32
30
|
s.homepage = %q{http://github.com/dasch/rails-complete}
|
@@ -35,8 +33,7 @@ Gem::Specification.new do |s|
|
|
35
33
|
s.rubygems_version = %q{1.3.6}
|
36
34
|
s.summary = %q{Bash completion for the rails command}
|
37
35
|
s.test_files = [
|
38
|
-
"test/test_executable.rb"
|
39
|
-
"test/test_completions.rb"
|
36
|
+
"test/test_executable.rb"
|
40
37
|
]
|
41
38
|
|
42
39
|
if s.respond_to? :specification_version then
|
data/test/test_executable.rb
CHANGED
@@ -4,7 +4,7 @@ require 'test/unit'
|
|
4
4
|
BIN_DIR = File.join(File.dirname(__FILE__), '..', 'bin')
|
5
5
|
|
6
6
|
COMMANDS = %w(server generate destroy plugin benchmarker profiler
|
7
|
-
console dbconsole application runner)
|
7
|
+
new console dbconsole application runner)
|
8
8
|
|
9
9
|
class TestExecutable < Test::Unit::TestCase
|
10
10
|
def test_should_complete_commands
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 4
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.4.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Daniel Schierbeck
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-09-
|
17
|
+
date: 2010-09-28 00:00:00 +02:00
|
18
18
|
default_executable: rails-complete
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -33,9 +33,7 @@ files:
|
|
33
33
|
- Rakefile
|
34
34
|
- VERSION
|
35
35
|
- bin/rails-complete
|
36
|
-
- lib/rails_complete.rb
|
37
36
|
- rails_complete.gemspec
|
38
|
-
- test/test_completions.rb
|
39
37
|
- test/test_executable.rb
|
40
38
|
has_rdoc: true
|
41
39
|
homepage: http://github.com/dasch/rails-complete
|
@@ -69,4 +67,3 @@ specification_version: 3
|
|
69
67
|
summary: Bash completion for the rails command
|
70
68
|
test_files:
|
71
69
|
- test/test_executable.rb
|
72
|
-
- test/test_completions.rb
|
data/lib/rails_complete.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
|
2
|
-
module RailsComplete
|
3
|
-
class << self
|
4
|
-
|
5
|
-
COMMANDS = %w(server generate destroy plugin benchmarker profiler
|
6
|
-
console dbconsole application runner new)
|
7
|
-
|
8
|
-
def complete(string)
|
9
|
-
string = string.chomp
|
10
|
-
|
11
|
-
COMMANDS.select {|cmd| cmd[0, string.length] == string }
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
data/test/test_completions.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
|
2
|
-
require 'test/unit'
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
5
|
-
|
6
|
-
require 'rails_complete'
|
7
|
-
|
8
|
-
class TestCompletions < Test::Unit::TestCase
|
9
|
-
def test_simple_completions
|
10
|
-
%w(s se ser serv serve server).each do |s|
|
11
|
-
assert_equal %w(server), RailsComplete.complete(s)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|