flame 4.0.9 → 4.0.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75e02998d8d17eae77b354d3e0f728bf0fbf37e6
4
- data.tar.gz: c6e806c54b89f1f89e3bad8334f654fad103278b
3
+ metadata.gz: be14da9200fed3ac85396734b7a7922b0d3b656f
4
+ data.tar.gz: 722b7fb4e367d44480df72e3d06a885b18c406ee
5
5
  SHA512:
6
- metadata.gz: 357ad3becd4d875377fa55c76b23eb4f2ab7d1c94e9c8f3493751b125f4d085e747bce14d0aeac8463d74095ab433dd6e6842fccb122f8b39c295f8b2784f42b
7
- data.tar.gz: 7fda6f630bedcd1755161218e567a9c0741536145213ccef10579562210e560b9a5c58ebccc6cd673d19c733fd2ae366afd9be34a5de3836c632c30bc052862e
6
+ metadata.gz: 90d68783b528231e9ff24c6c1e754b8f8910651cb3c7dc750b09a08f112d960449332dc314d788c77329f7e30975e9ab713e7718efe97b337d9bec32121c28fc
7
+ data.tar.gz: 7ffd1f069de71b3484a3b04c9331b48f94d42e0917aeb9f01fb412757a3aa578566cbcf1dd7a1a930f3fead6bd0385b72e026481443b6fdb6582c430f5c5e386
@@ -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('/')
@@ -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)
@@ -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 { |route| route.action }
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),
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Flame
4
- VERSION = '4.0.9'.freeze
4
+ VERSION = '4.0.10'.freeze
5
5
  end
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.9
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-08 00:00:00.000000000 Z
11
+ date: 2016-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack