commands 0.0.2 → 0.0.3
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/commands-0.0.2.gem +0 -0
- data/commands.gemspec +1 -1
- data/lib/commands.rb +10 -9
- metadata +2 -1
data/commands-0.0.2.gem
ADDED
Binary file
|
data/commands.gemspec
CHANGED
data/lib/commands.rb
CHANGED
@@ -18,15 +18,15 @@ class Commands
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def rake(task, *args)
|
21
|
-
|
22
|
-
|
21
|
+
silence_active_record_logger { Rake::Task[task].invoke(*args) }
|
22
|
+
|
23
23
|
# Rake by default only allows tasks to be run once per session
|
24
24
|
Rake.application.tasks.each(&:reenable)
|
25
25
|
|
26
|
-
|
26
|
+
"Completed"
|
27
27
|
rescue SystemExit
|
28
28
|
# Swallow exit/abort calls as we'll never want to exit the IRB session
|
29
|
-
|
29
|
+
"Failed"
|
30
30
|
end
|
31
31
|
|
32
32
|
# FIXME: Turn this into calls directly to the test classes, so we don't have to load environment again.
|
@@ -66,15 +66,16 @@ class Commands
|
|
66
66
|
ARGV.replace [nil]
|
67
67
|
end
|
68
68
|
|
69
|
-
|
69
|
+
"Completed"
|
70
70
|
end
|
71
71
|
|
72
72
|
# Only just ensured that this method is available in rails/master, so need a guard for a bit.
|
73
|
-
def
|
74
|
-
|
75
|
-
ActiveRecord::Base.logger.
|
76
|
-
else
|
73
|
+
def silence_active_record_logger
|
74
|
+
begin
|
75
|
+
old_logger_level, ActiveRecord::Base.logger.level = ActiveRecord::Base.logger.level, Logger::ERROR
|
77
76
|
yield
|
77
|
+
ensure
|
78
|
+
ActiveRecord::Base.logger.level = old_logger_level
|
78
79
|
end
|
79
80
|
end
|
80
81
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commands
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -33,6 +33,7 @@ executables: []
|
|
33
33
|
extensions: []
|
34
34
|
extra_rdoc_files: []
|
35
35
|
files:
|
36
|
+
- ./commands-0.0.2.gem
|
36
37
|
- ./commands.gemspec
|
37
38
|
- ./Gemfile
|
38
39
|
- ./Gemfile.lock
|