rails_complete 0.2.0 → 0.3.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/.gitignore +1 -0
- data/README.mkd +11 -2
- data/VERSION +1 -1
- data/bin/rails-complete +1 -2
- data/lib/rails_complete.rb +1 -1
- data/rails_complete.gemspec +5 -3
- data/test/test_executable.rb +25 -0
- metadata +4 -2
data/.gitignore
CHANGED
data/README.mkd
CHANGED
@@ -4,9 +4,18 @@ Rails Complete
|
|
4
4
|
Adds auto-completion to the `rails` command.
|
5
5
|
|
6
6
|
|
7
|
+
Install
|
8
|
+
-------
|
9
|
+
|
10
|
+
First, you need to run `gem install rails_complete`. Then just add the following
|
11
|
+
line to your `.bashrc`
|
12
|
+
|
13
|
+
complete -C rails-complete -o default rails
|
14
|
+
|
15
|
+
|
7
16
|
License
|
8
17
|
-------
|
9
18
|
|
10
|
-
Copyright (c) 2010 Daniel Schierbeck
|
19
|
+
Copyright (c) 2010 Daniel Schierbeck.
|
11
20
|
|
12
|
-
See MIT-LICENSE for details.
|
21
|
+
Released under the MIT license. See MIT-LICENSE for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/bin/rails-complete
CHANGED
data/lib/rails_complete.rb
CHANGED
data/rails_complete.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rails_complete}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.3.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"]
|
@@ -26,7 +26,8 @@ Gem::Specification.new do |s|
|
|
26
26
|
"bin/rails-complete",
|
27
27
|
"lib/rails_complete.rb",
|
28
28
|
"rails_complete.gemspec",
|
29
|
-
"test/test_completions.rb"
|
29
|
+
"test/test_completions.rb",
|
30
|
+
"test/test_executable.rb"
|
30
31
|
]
|
31
32
|
s.homepage = %q{http://github.com/dasch/rails-complete}
|
32
33
|
s.rdoc_options = ["--charset=UTF-8"]
|
@@ -34,7 +35,8 @@ Gem::Specification.new do |s|
|
|
34
35
|
s.rubygems_version = %q{1.3.6}
|
35
36
|
s.summary = %q{Bash completion for the rails command}
|
36
37
|
s.test_files = [
|
37
|
-
"test/
|
38
|
+
"test/test_executable.rb",
|
39
|
+
"test/test_completions.rb"
|
38
40
|
]
|
39
41
|
|
40
42
|
if s.respond_to? :specification_version then
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
BIN_DIR = File.join(File.dirname(__FILE__), '..', 'bin')
|
5
|
+
|
6
|
+
COMMANDS = %w(server generate destroy plugin benchmarker profiler
|
7
|
+
console dbconsole application runner)
|
8
|
+
|
9
|
+
class TestExecutable < Test::Unit::TestCase
|
10
|
+
def test_should_complete_commands
|
11
|
+
assert_equal %w(server), complete("ser")
|
12
|
+
assert_equal %w(plugin profiler), complete("p")
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_should_list_commands_when_no_prefix_is_given
|
16
|
+
assert_equal COMMANDS.sort, complete("").sort
|
17
|
+
end
|
18
|
+
|
19
|
+
protected
|
20
|
+
|
21
|
+
def complete(prefix)
|
22
|
+
cmd = %(COMP_LINE="rails #{prefix}" #{BIN_DIR}/rails-complete)
|
23
|
+
`#{cmd}`.split("\n")
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 3
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.3.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Daniel Schierbeck
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- lib/rails_complete.rb
|
37
37
|
- rails_complete.gemspec
|
38
38
|
- test/test_completions.rb
|
39
|
+
- test/test_executable.rb
|
39
40
|
has_rdoc: true
|
40
41
|
homepage: http://github.com/dasch/rails-complete
|
41
42
|
licenses: []
|
@@ -67,4 +68,5 @@ signing_key:
|
|
67
68
|
specification_version: 3
|
68
69
|
summary: Bash completion for the rails command
|
69
70
|
test_files:
|
71
|
+
- test/test_executable.rb
|
70
72
|
- test/test_completions.rb
|