zeus 0.15.14 → 0.15.15.pre
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/build/zeus-darwin-amd64 +0 -0
- data/build/zeus-linux-386 +0 -0
- data/build/zeus-linux-amd64 +0 -0
- data/lib/zeus/rails.rb +63 -29
- data/lib/zeus/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 078593c5a5572592002b4305e2ef07acb53660ab
|
4
|
+
data.tar.gz: e67d7b55bfa163abeb629233ebf83c6f6589cfe1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bdfc81544cc5ead552370bd04a07c44834e10129ac1e1901c9f812db550e9cd649def0aa3913235080e3a85b0f5da7946ed9f2bcf3fd035c7a138f5a637b6ed
|
7
|
+
data.tar.gz: 07d011fae3e0723970f4a8b85aac08dd1e46ab81a0dbfedca79f8bb8eccdbec698f57d7f405095be0a59449f0b39f16c6401210fbdf54e8bd029f14afc734843
|
data/Gemfile.lock
CHANGED
data/build/zeus-darwin-amd64
CHANGED
Binary file
|
data/build/zeus-linux-386
CHANGED
Binary file
|
data/build/zeus-linux-amd64
CHANGED
Binary file
|
data/lib/zeus/rails.rb
CHANGED
@@ -115,56 +115,81 @@ module Zeus
|
|
115
115
|
|
116
116
|
def generate
|
117
117
|
load_rails_generators
|
118
|
-
|
118
|
+
|
119
|
+
if rails_5_1_or_higher?
|
120
|
+
run_rails_5_1_or_higer_command('generate')
|
121
|
+
else
|
122
|
+
require 'rails/commands/generate'
|
123
|
+
end
|
124
|
+
|
119
125
|
end
|
120
126
|
|
121
127
|
def destroy
|
122
128
|
load_rails_generators
|
123
|
-
|
129
|
+
if rails_5_1_or_higher?
|
130
|
+
run_rails_5_1_or_higer_command('destroy')
|
131
|
+
else
|
132
|
+
require 'rails/commands/destroy'
|
133
|
+
end
|
124
134
|
end
|
125
135
|
|
126
136
|
def runner
|
127
|
-
|
137
|
+
if rails_5_1_or_higher?
|
138
|
+
run_rails_5_1_or_higer_command('runner')
|
139
|
+
else
|
140
|
+
require 'rails/commands/runner'
|
141
|
+
end
|
128
142
|
end
|
129
143
|
|
130
144
|
def console
|
131
|
-
|
132
|
-
|
133
|
-
if defined?(Pry)
|
134
|
-
# Adding Rails Console helpers to Pry.
|
135
|
-
if (3..4).include?(::Rails::VERSION::MAJOR)
|
136
|
-
require 'rails/console/app'
|
137
|
-
require 'rails/console/helpers'
|
138
|
-
TOPLEVEL_BINDING.eval('self').extend ::Rails::ConsoleMethods
|
139
|
-
end
|
140
|
-
|
141
|
-
Pry.start
|
145
|
+
if rails_5_1_or_higher?
|
146
|
+
run_rails_5_1_or_higer_command('console')
|
142
147
|
else
|
143
|
-
|
148
|
+
require 'rails/commands/console'
|
149
|
+
if defined?(Pry)
|
150
|
+
# Adding Rails Console helpers to Pry.
|
151
|
+
if (3..4).include?(::Rails::VERSION::MAJOR)
|
152
|
+
require 'rails/console/app'
|
153
|
+
require 'rails/console/helpers'
|
154
|
+
TOPLEVEL_BINDING.eval('self').extend ::Rails::ConsoleMethods
|
155
|
+
end
|
156
|
+
|
157
|
+
Pry.start
|
158
|
+
else
|
159
|
+
::Rails::Console.start(::Rails.application)
|
160
|
+
end
|
144
161
|
end
|
145
162
|
end
|
146
163
|
|
147
164
|
def dbconsole
|
148
|
-
|
165
|
+
if rails_5_1_or_higher?
|
166
|
+
run_rails_5_1_or_higer_command('dbconsole')
|
167
|
+
else
|
168
|
+
require 'rails/commands/dbconsole'
|
149
169
|
|
150
|
-
|
170
|
+
meth = ::Rails::DBConsole.method(:start)
|
151
171
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
172
|
+
# `Rails::DBConsole.start` has been changed to load faster in
|
173
|
+
# https://github.com/rails/rails/commit/346bb018499cde6699fcce6c68dd7e9be45c75e1
|
174
|
+
#
|
175
|
+
# This will work with both versions.
|
176
|
+
if meth.arity.zero?
|
177
|
+
::Rails::DBConsole.start
|
178
|
+
else
|
179
|
+
::Rails::DBConsole.start(::Rails.application)
|
180
|
+
end
|
160
181
|
end
|
161
182
|
end
|
162
183
|
|
163
184
|
def server
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
185
|
+
if rails_5_1_or_higher?
|
186
|
+
run_rails_5_1_or_higer_command('server')
|
187
|
+
else
|
188
|
+
require 'rails/commands/server'
|
189
|
+
server = ::Rails::Server.new
|
190
|
+
Dir.chdir(::Rails.application.root)
|
191
|
+
server.start
|
192
|
+
end
|
168
193
|
end
|
169
194
|
|
170
195
|
def test_environment
|
@@ -271,6 +296,15 @@ module Zeus
|
|
271
296
|
rescue LoadError # Rails 3.0 doesn't require this block to be run, but 3.2+ does
|
272
297
|
end
|
273
298
|
|
299
|
+
def run_rails_5_1_or_higer_command(command)
|
300
|
+
require 'rails/command'
|
301
|
+
::Rails::Command.invoke(command, ARGV)
|
302
|
+
end
|
303
|
+
|
304
|
+
def rails_5_1_or_higher?
|
305
|
+
(::Rails::VERSION::MAJOR == 5 && ::Rails::VERSION::MINOR >= 1) ||
|
306
|
+
::Rails::VERSION::MAJOR > 5
|
307
|
+
end
|
274
308
|
end
|
275
309
|
end
|
276
310
|
|
data/lib/zeus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zeus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.15.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Burke Libbey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: method_source
|
@@ -107,9 +107,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
|
-
- - "
|
110
|
+
- - ">"
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version:
|
112
|
+
version: 1.3.1
|
113
113
|
requirements: []
|
114
114
|
rubyforge_project:
|
115
115
|
rubygems_version: 2.4.8
|