zeus 0.15.14 → 0.15.15.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5a20f52042da7071acb34efb173a4688c41e8f9e
4
- data.tar.gz: d64e011fd6bf6e1d1da2590e7f0d59b88a5e46d1
3
+ metadata.gz: 078593c5a5572592002b4305e2ef07acb53660ab
4
+ data.tar.gz: e67d7b55bfa163abeb629233ebf83c6f6589cfe1
5
5
  SHA512:
6
- metadata.gz: 1221de2bc9f105d833f0ffe7ba9846dff06118d28a27f1ea6c1453dc7e7540519fd10987784a99ab9ed527791fb05db48d35bbce8721b0a9ef2209244f2a70b8
7
- data.tar.gz: 976f2f98663ae05fabc2731e74dfe7d084c223ddb54c81614aa1959f1ae356a72c8ce9ba65aa64f0052d9eda59b0fefdc8bbcc198939c608e0c060aff1ee9fc1
6
+ metadata.gz: 3bdfc81544cc5ead552370bd04a07c44834e10129ac1e1901c9f812db550e9cd649def0aa3913235080e3a85b0f5da7946ed9f2bcf3fd035c7a138f5a637b6ed
7
+ data.tar.gz: 07d011fae3e0723970f4a8b85aac08dd1e46ab81a0dbfedca79f8bb8eccdbec698f57d7f405095be0a59449f0b39f16c6401210fbdf54e8bd029f14afc734843
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zeus (0.15.14)
4
+ zeus (0.15.15.pre)
5
5
  method_source (>= 0.6.7)
6
6
 
7
7
  GEM
Binary file
Binary file
Binary file
@@ -115,56 +115,81 @@ module Zeus
115
115
 
116
116
  def generate
117
117
  load_rails_generators
118
- require 'rails/commands/generate'
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
- require 'rails/commands/destroy'
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
- require 'rails/commands/runner'
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
- require 'rails/commands/console'
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
- ::Rails::Console.start(::Rails.application)
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
- require 'rails/commands/dbconsole'
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
- meth = ::Rails::DBConsole.method(:start)
170
+ meth = ::Rails::DBConsole.method(:start)
151
171
 
152
- # `Rails::DBConsole.start` has been changed to load faster in
153
- # https://github.com/rails/rails/commit/346bb018499cde6699fcce6c68dd7e9be45c75e1
154
- #
155
- # This will work with both versions.
156
- if meth.arity.zero?
157
- ::Rails::DBConsole.start
158
- else
159
- ::Rails::DBConsole.start(::Rails.application)
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
- require 'rails/commands/server'
165
- server = ::Rails::Server.new
166
- Dir.chdir(::Rails.application.root)
167
- server.start
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
 
@@ -1,3 +1,3 @@
1
1
  module Zeus
2
- VERSION = "0.15.14"
2
+ VERSION = "0.15.15.pre"
3
3
  end
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.14
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-01 00:00:00.000000000 Z
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: '0'
112
+ version: 1.3.1
113
113
  requirements: []
114
114
  rubyforge_project:
115
115
  rubygems_version: 2.4.8