rails-sh 1.0.3 → 1.1.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/README.rdoc +31 -4
- data/VERSION +1 -1
- data/bin/rails-sh +0 -2
- data/lib/rails/sh.rb +2 -0
- data/lib/rails/sh/command.rb +11 -0
- data/spec/rails/sh/command_spec.rb +1 -1
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
= rails-sh
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
This only supports Rails3 :)
|
3
|
+
rails-sh is a mini shell for rails3 that provides a uniform and quick access to commands.
|
6
4
|
|
7
5
|
== Install
|
8
6
|
|
@@ -13,7 +11,13 @@ This only supports Rails3 :)
|
|
13
11
|
$ cd your-rails3-app
|
14
12
|
$ rails-sh
|
15
13
|
|
16
|
-
|
14
|
+
You can specify an environment as follows:
|
15
|
+
|
16
|
+
$ rails-sh test
|
17
|
+
|
18
|
+
== Examples
|
19
|
+
|
20
|
+
Generate a controller:
|
17
21
|
|
18
22
|
rails> g controller foo bar
|
19
23
|
$ rails g controller foo bar
|
@@ -29,9 +33,32 @@ This only supports Rails3 :)
|
|
29
33
|
invoke test_unit
|
30
34
|
create test/unit/helpers/foo_helper_test.rb
|
31
35
|
|
36
|
+
Run console:
|
37
|
+
|
38
|
+
rails> console
|
39
|
+
|
40
|
+
use `irb_exit` to exit from console.
|
41
|
+
|
42
|
+
Print routes:
|
43
|
+
|
32
44
|
rails> routes
|
33
45
|
foo_bar GET /foo/bar(.:format) {:controller=>"foo", :action=>"bar"}
|
34
46
|
|
47
|
+
== Commands
|
48
|
+
|
49
|
+
* generate
|
50
|
+
* destroy
|
51
|
+
* plugin
|
52
|
+
* benchmarker
|
53
|
+
* profiler
|
54
|
+
* console
|
55
|
+
* server
|
56
|
+
* dbconsole
|
57
|
+
* application
|
58
|
+
* runner
|
59
|
+
* routes
|
60
|
+
* exit
|
61
|
+
|
35
62
|
== Contributing to rails-sh
|
36
63
|
|
37
64
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0
|
1
|
+
1.1.0
|
data/bin/rails-sh
CHANGED
data/lib/rails/sh.rb
CHANGED
data/lib/rails/sh/command.rb
CHANGED
@@ -35,6 +35,17 @@ Rails::Sh::Command.define 'exit' do
|
|
35
35
|
_exit
|
36
36
|
end
|
37
37
|
|
38
|
+
Rails::Sh::Command.define 'help' do
|
39
|
+
Rails::Sh.execute_rails_command('--help')
|
40
|
+
puts <<-HELP
|
41
|
+
|
42
|
+
The rails-sh commands are:
|
43
|
+
help print help
|
44
|
+
routes print routes
|
45
|
+
exit exit from rails-sh
|
46
|
+
HELP
|
47
|
+
end
|
48
|
+
|
38
49
|
Rails::Sh::Command.define 'routes' do |controller|
|
39
50
|
Rails.application.reload_routes!
|
40
51
|
all_routes = Rails.application.routes.routes
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 1
|
7
|
+
- 1
|
7
8
|
- 0
|
8
|
-
|
9
|
-
version: 1.0.3
|
9
|
+
version: 1.1.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- jugyo
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-01-
|
17
|
+
date: 2011-01-25 00:00:00 +09:00
|
18
18
|
default_executable: rails-sh
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -113,7 +113,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
113
113
|
requirements:
|
114
114
|
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
hash: -
|
116
|
+
hash: -794054863153019561
|
117
117
|
segments:
|
118
118
|
- 0
|
119
119
|
version: "0"
|