rails-sh 1.2.0 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -17,6 +17,10 @@ You can specify an environment as follows:
17
17
 
18
18
  == Examples
19
19
 
20
+ Execute rake task:
21
+
22
+ rails> rake db:migrate
23
+
20
24
  Generate a controller:
21
25
 
22
26
  rails> g controller foo bar
@@ -37,19 +41,14 @@ Run console:
37
41
 
38
42
  rails> console
39
43
 
40
- use `irb_exit` to exit from console.
41
-
42
- Print routes:
43
-
44
- rails> routes
45
- foo_bar GET /foo/bar(.:format) {:controller=>"foo", :action=>"bar"}
46
-
47
44
  == Commands
48
45
 
49
46
  please type help
50
47
 
51
48
  == TODO
52
49
 
50
+ * parse args of rake commands and set values as ENV
51
+
53
52
  == Contributing to rails-sh
54
53
 
55
54
  * 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.2.0
1
+ 1.2.2
@@ -5,17 +5,23 @@ Command.define 'help' do
5
5
  puts <<HELP
6
6
 
7
7
  \e[36mThe rails-sh commands are:
8
- help print help
9
- routes CONTROLLER print routes
10
- exit exit from rails-sh
11
- restart restart rails-sh
12
- system execute a system command
13
- eval eval as ruby script\e[0m
8
+ help print help
9
+ rake TASK execute rake task
10
+ tasks PATTERN print rake tasks
11
+ exit exit from rails-sh
12
+ restart restart rails-sh
13
+ system execute a system command
14
+ eval eval as ruby script\e[0m
14
15
  HELP
15
16
  end
16
17
 
17
18
  Command.define 'rake' do |arg|
18
- Rails::Sh::Rake.invoke(arg)
19
+ Rails::Sh::Rake.invoke(arg || :default)
20
+ end
21
+
22
+ Command.define 'tasks' do |arg|
23
+ Rake.application.options.show_task_pattern = arg ? Regexp.new(arg) : //
24
+ Rake.application.display_tasks_and_comments
19
25
  end
20
26
 
21
27
  Command.define 'system' do |arg|
@@ -32,7 +38,7 @@ end
32
38
 
33
39
  Command.define 'restart' do
34
40
  puts 'restarting...'
35
- _exec File.expand_path($0)
41
+ _exec File.expand_path('../../../../bin/rails-sh', __FILE__)
36
42
  end
37
43
 
38
44
  Command.define 'exit' do
data/rails-sh.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rails-sh}
8
- s.version = "1.2.0"
8
+ s.version = "1.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jugyo"]
12
- s.date = %q{2011-02-02}
12
+ s.date = %q{2011-02-03}
13
13
  s.default_executable = %q{rails-sh}
14
14
  s.description = %q{The Rails Shell to execute sub commands of rails quickly.}
15
15
  s.email = %q{jugyo.org@gmail.com}
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rails-sh
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.2.0
5
+ version: 1.2.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - jugyo
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-02-02 00:00:00 +09:00
13
+ date: 2011-02-03 00:00:00 +09:00
14
14
  default_executable: rails-sh
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -99,7 +99,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
- hash: 4602907216406005952
102
+ hash: 1781657170898971860
103
103
  segments:
104
104
  - 0
105
105
  version: "0"