rails-sh 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rails/sh/commands.rb +6 -1
- data/lib/rails/sh/forkable.rb +12 -7
- data/rails-sh.gemspec +2 -2
- metadata +13 -13
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.5.
|
1
|
+
1.5.1
|
data/lib/rails/sh/commands.rb
CHANGED
@@ -26,7 +26,12 @@ Rails::Sh::Rails.sub_commands.map do |c|
|
|
26
26
|
end
|
27
27
|
|
28
28
|
Command.define 'rake' do |arg|
|
29
|
-
|
29
|
+
case arg
|
30
|
+
when /^routes/
|
31
|
+
Rails::Sh::Rake.invoke(arg, :pager => true)
|
32
|
+
else
|
33
|
+
Rails::Sh::Rake.invoke(arg)
|
34
|
+
end
|
30
35
|
end
|
31
36
|
|
32
37
|
Rails::Sh::Rake.task_names.map do |name|
|
data/lib/rails/sh/forkable.rb
CHANGED
@@ -5,19 +5,24 @@ module Rails
|
|
5
5
|
module Forkable
|
6
6
|
include Rails::Sh::Helpers
|
7
7
|
|
8
|
-
def invoke(line)
|
8
|
+
def invoke(line, options = {})
|
9
9
|
run_before_fork
|
10
10
|
pid = fork do
|
11
11
|
run_after_fork
|
12
12
|
|
13
|
-
|
14
|
-
|
13
|
+
if options[:pager]
|
14
|
+
begin
|
15
|
+
$stdout = StringIO.new
|
16
|
+
_invoke(line)
|
17
|
+
ensure
|
18
|
+
output = $stdout.string
|
19
|
+
lesspipe output
|
20
|
+
$stdout = STDOUT
|
21
|
+
end
|
22
|
+
else
|
15
23
|
_invoke(line)
|
16
|
-
ensure
|
17
|
-
output = $stdout.string
|
18
|
-
lesspipe output
|
19
|
-
$stdout = STDOUT
|
20
24
|
end
|
25
|
+
|
21
26
|
end
|
22
27
|
Process.waitpid(pid)
|
23
28
|
end
|
data/rails-sh.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "rails-sh"
|
8
|
-
s.version = "1.5.
|
8
|
+
s.version = "1.5.1"
|
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 = "2011-11-
|
12
|
+
s.date = "2011-11-27"
|
13
13
|
s.description = "The Rails Shell to execute sub commands of rails quickly."
|
14
14
|
s.email = "jugyo.org@gmail.com"
|
15
15
|
s.executables = ["rails-sh"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-sh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-11-
|
12
|
+
date: 2011-11-27 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156321320 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - =
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.8.7
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2156321320
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &2156320720 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 2.3.0
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2156320720
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &2156320120 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.0.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2156320120
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: jeweler
|
49
|
-
requirement: &
|
49
|
+
requirement: &2156319540 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.5.2
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2156319540
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rcov
|
60
|
-
requirement: &
|
60
|
+
requirement: &2156318960 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2156318960
|
69
69
|
description: The Rails Shell to execute sub commands of rails quickly.
|
70
70
|
email: jugyo.org@gmail.com
|
71
71
|
executables:
|
@@ -111,7 +111,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
111
|
version: '0'
|
112
112
|
segments:
|
113
113
|
- 0
|
114
|
-
hash:
|
114
|
+
hash: 3788200360727470980
|
115
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|