flame 4.0.9 → 4.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flame/render.rb +1 -1
- data/lib/flame/router.rb +3 -0
- data/lib/flame/validators.rb +1 -1
- data/lib/flame/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be14da9200fed3ac85396734b7a7922b0d3b656f
|
4
|
+
data.tar.gz: 722b7fb4e367d44480df72e3d06a885b18c406ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90d68783b528231e9ff24c6c1e754b8f8910651cb3c7dc750b09a08f112d960449332dc314d788c77329f7e30975e9ab713e7718efe97b337d9bec32121c28fc
|
7
|
+
data.tar.gz: 7ffd1f069de71b3484a3b04c9331b48f94d42e0917aeb9f01fb412757a3aa578566cbcf1dd7a1a930f3fead6bd0385b72e026481443b6fdb6582c430f5c5e386
|
data/lib/flame/render.rb
CHANGED
@@ -72,7 +72,7 @@ module Flame
|
|
72
72
|
## Find possible directories for the controller
|
73
73
|
def controller_dirs
|
74
74
|
controller_dir_parts = @ctrl.class.underscore.split('/').map do |part|
|
75
|
-
(part.split('_') - %w(controller controllers ctrl)).join('_')
|
75
|
+
(part.split('_') - %w(index controller controllers ctrl)).join('_')
|
76
76
|
end
|
77
77
|
controller_dir_parts.map.with_index do |_part, ind|
|
78
78
|
controller_dir_parts[ind..-1].join('/')
|
data/lib/flame/router.rb
CHANGED
@@ -96,11 +96,14 @@ module Flame
|
|
96
96
|
## post :goodbye
|
97
97
|
method = request_method.downcase
|
98
98
|
define_method(method) do |path, action = nil, prefix: false|
|
99
|
+
## Swap arguments if action in path variable
|
99
100
|
unless action
|
100
101
|
action = path.to_sym
|
101
102
|
path = nil
|
102
103
|
end
|
104
|
+
## Make path by controller method with parameners
|
103
105
|
path = default_action_path(action, path) if prefix || path.nil?
|
106
|
+
## Merge action path with controller path
|
104
107
|
path = Route.path_merge(@path, path)
|
105
108
|
route = Route.new(@ctrl, action, method, path)
|
106
109
|
index = find_route_index(action: action)
|
data/lib/flame/validators.rb
CHANGED
@@ -63,7 +63,7 @@ module Flame
|
|
63
63
|
## Compare actions from routes and from controller
|
64
64
|
class ActionsValidator
|
65
65
|
def initialize(route_refine)
|
66
|
-
@routes_actions = route_refine.routes.map
|
66
|
+
@routes_actions = route_refine.routes.map(&:action)
|
67
67
|
@ctrl = route_refine.ctrl
|
68
68
|
@ctrl_actions = {
|
69
69
|
public: @ctrl.public_instance_methods(false),
|
data/lib/flame/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flame
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Popov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|