motorhead 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/gemfiles/Gemfile-rails.4.2.x +1 -0
- data/lib/motorhead/abstract_controller.rb +3 -3
- data/lib/motorhead/version.rb +1 -1
- metadata +2 -4
- data/bin/console +0 -14
- data/bin/setup +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf3ab034b43dbc253be1de3a52bd36888ab9d330
|
4
|
+
data.tar.gz: 84414b462e0b69d805cf8f54b569fc11f99e3107
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64a8d3b384a52eb0ef859c5a6f02b9386c6efde194d1d4c59ae0241d50815d45b341b675c43378be929ee12aaec0e901a8d81c001af03b4376930d8fe70f52b6
|
7
|
+
data.tar.gz: d26b8028e083213581fbe434f1cf003b5f5fa98caf3863816ad300ae294575e911475455bf4043db32d95d73024be6c2ac9883cd79eb65d46f58f5457795252b
|
data/README.md
CHANGED
@@ -160,13 +160,13 @@ Motorhead provides some handy code generators.
|
|
160
160
|
|
161
161
|
### Generating an engine
|
162
162
|
|
163
|
-
```
|
163
|
+
```
|
164
164
|
% rails g motorhead ENGINE_NAME
|
165
165
|
```
|
166
166
|
|
167
167
|
Example:
|
168
168
|
|
169
|
-
```
|
169
|
+
```
|
170
170
|
% rails g motorhead my_awesome_new_feature
|
171
171
|
```
|
172
172
|
|
@@ -176,13 +176,13 @@ Example:
|
|
176
176
|
### Generating an engine + a controller extension that extends an existing controller
|
177
177
|
|
178
178
|
|
179
|
-
```
|
179
|
+
```
|
180
180
|
% rails g motorhead ENGINE_NAME CONTROLLER_NAME [action action] [options]
|
181
181
|
```
|
182
182
|
|
183
183
|
Example:
|
184
184
|
|
185
|
-
```
|
185
|
+
```
|
186
186
|
% rails g motorhead my_awesome_new_feature welcome index
|
187
187
|
```
|
188
188
|
|
@@ -9,3 +9,4 @@ gem 'view_render_fallback', path: '../test/dummy_app/app/engines/view_render_fal
|
|
9
9
|
gem 'routes_fallback', path: '../test/dummy_app/app/engines/routes_fallback'
|
10
10
|
gem 'italian', path: '../test/dummy_app/app/engines/italian'
|
11
11
|
gem 'spanish', path: '../test/dummy_app/app/engines/spanish'
|
12
|
+
gem 'simple_controller', path: '../test/dummy_app/app/engines/simple_controller'
|
@@ -21,7 +21,7 @@ module Motorhead
|
|
21
21
|
end
|
22
22
|
|
23
23
|
module AbstractController
|
24
|
-
def send_action(
|
24
|
+
def send_action(*)
|
25
25
|
if self.is_a?(Motorhead::Controller)
|
26
26
|
begin
|
27
27
|
super
|
@@ -43,8 +43,8 @@ module Motorhead
|
|
43
43
|
end
|
44
44
|
|
45
45
|
module ActionController
|
46
|
-
def process_action(*args)
|
47
|
-
if self.is_a?(Motorhead::Controller)
|
46
|
+
def process_action(method_name, *args)
|
47
|
+
if self.is_a?(Motorhead::Controller) && method(method_name).super_method
|
48
48
|
headers['X-Cascade'] = 'pass'
|
49
49
|
if self.class.parent::Engine.active?(self)
|
50
50
|
super
|
data/lib/motorhead/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motorhead
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akira Matsuda
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -122,8 +122,6 @@ files:
|
|
122
122
|
- MIT-LICENSE
|
123
123
|
- README.md
|
124
124
|
- Rakefile
|
125
|
-
- bin/console
|
126
|
-
- bin/setup
|
127
125
|
- gemfiles/Gemfile-rails.4.2.x
|
128
126
|
- lib/generators/motorhead/controller_generator.rb
|
129
127
|
- lib/generators/motorhead/templates/controller.rb
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "motorhead"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|