rails-sh 1.1.2 → 1.1.3
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.rb +6 -0
- data/spec/rails/sh_spec.rb +5 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.3
|
data/lib/rails/sh.rb
CHANGED
@@ -45,8 +45,14 @@ module Rails
|
|
45
45
|
ARGV.clear
|
46
46
|
ARGV.concat line.split(/\s+/)
|
47
47
|
puts "\e[42m$ rails #{ARGV.join(" ")}\e[0m"
|
48
|
+
clear_dependencies
|
48
49
|
load 'rails/commands.rb'
|
49
50
|
end
|
51
|
+
|
52
|
+
def clear_dependencies
|
53
|
+
ActiveSupport::DescendantsTracker.clear
|
54
|
+
ActiveSupport::Dependencies.clear
|
55
|
+
end
|
50
56
|
end
|
51
57
|
end
|
52
58
|
end
|
data/spec/rails/sh_spec.rb
CHANGED
@@ -25,6 +25,10 @@ describe Rails::Sh do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
['console', 'g --help'].each do |line|
|
28
|
+
before do
|
29
|
+
Rails::Sh.stub(:clear_dependencies)
|
30
|
+
end
|
31
|
+
|
28
32
|
it "a rails's command should be executed if the line is #{line}" do
|
29
33
|
Rails::Sh.should_receive(:load).with("rails/commands.rb") do
|
30
34
|
ARGV.should eq(line.split(/\s+/))
|
@@ -32,4 +36,4 @@ describe Rails::Sh do
|
|
32
36
|
Rails::Sh.execute(line)
|
33
37
|
end
|
34
38
|
end
|
35
|
-
end
|
39
|
+
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 1.1.
|
8
|
+
- 3
|
9
|
+
version: 1.1.3
|
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-31 00:00:00 +09:00
|
18
18
|
default_executable: rails-sh
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -114,7 +114,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
hash:
|
117
|
+
hash: -4011070128636660767
|
118
118
|
segments:
|
119
119
|
- 0
|
120
120
|
version: "0"
|