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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 598e8175e3cf77c2e86bd359dc1edb196a1ac74b
4
- data.tar.gz: 2cb3e49446e77f6a5c33b1d84b2ff2a4e560a404
3
+ metadata.gz: cf3ab034b43dbc253be1de3a52bd36888ab9d330
4
+ data.tar.gz: 84414b462e0b69d805cf8f54b569fc11f99e3107
5
5
  SHA512:
6
- metadata.gz: 736b9387276958a6ac86223a5ae45b81592853cb596fcaa28abf90b3d19bcf18fb9cffb911786ff5f461ad8ae2e6d14d4fe5becbe06d17f95a01702842821d8d
7
- data.tar.gz: 7aa2c8e1569fcc61ac700e59db2ef42fd6c4dd4e8061fe24741f9fce6742e393cd7bff7498dbec4147adac6321b59fc90ac52a1a6cf1cc7776e5703e0c9a8607
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
- ```ruby
163
+ ```
164
164
  % rails g motorhead ENGINE_NAME
165
165
  ```
166
166
 
167
167
  Example:
168
168
 
169
- ```ruby
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
- ```ruby
179
+ ```
180
180
  % rails g motorhead ENGINE_NAME CONTROLLER_NAME [action action] [options]
181
181
  ```
182
182
 
183
183
  Example:
184
184
 
185
- ```ruby
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(method_name, *args)
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
@@ -1,3 +1,3 @@
1
1
  module Motorhead
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
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.1.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-10-28 00:00:00.000000000 Z
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
data/bin/setup DELETED
@@ -1,7 +0,0 @@
1
- #!/bin/bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
-
5
- bundle install
6
-
7
- # Do any other automated setup that you need to do here