flame 4.0.4 → 4.0.5

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: 822d755cbdcceea040e12eb3a7c016621037792c
4
- data.tar.gz: 6ce5ee4d6fc9a667548ccebd0f88fb5d7fde8094
3
+ metadata.gz: 5878fea74c5c10e10b235d28652f1443563d174f
4
+ data.tar.gz: ea1edb1402a414b601952ef852c2aa00d043f41b
5
5
  SHA512:
6
- metadata.gz: cbaa1fd260ec10224ae6d68a7d7f7bf7f2657c0c73b2fe070853987abddec6a8aaf840fe82468331bbcd0c121875b7249549067c7f0dd8af337ce7448343030b
7
- data.tar.gz: b379caa8e57e6ef2fcd9011b8156f9b0761100c793ed01b8fce1855d5d9f2d03ea5dcb934aad937a643c7d0ed61c7c148c8abb6c5c0e668deaf97ac12cd47e47
6
+ metadata.gz: 7e448213ec77f57a6014c315f4dd3cbc5a6477ac8c805820da9bba4c4c13a78bc72a9bdc0c55c3f24fdd2fb06b2aacbfa2891b7bd0dd95412522d62b9e48c401
7
+ data.tar.gz: a23c186cb889b2473d339e02232e6d52b1d2a30480222e726acd0facd0590d703fb2363667642758cc702d530c4dfe08d3448648e868f3b7c675b23bcb8b215e
@@ -83,10 +83,9 @@ module Flame
83
83
  using GorillaPatch::StringExt
84
84
 
85
85
  ## Default root path of the controller for requests
86
- def default_path(last = false)
87
- (name.split('::').last.underscore.split('_') - %w(index controller ctrl))
88
- .join('/').split('/')
89
- .unshift(nil)[(last ? -1 : 0)..-1].join('/')
86
+ def default_path
87
+ parts = name.demodulize.underscore.split('_')
88
+ (parts - %w(index controller ctrl)).join('_')
90
89
  end
91
90
  end
92
91
  end
@@ -132,7 +132,7 @@ module Flame
132
132
  def mount(ctrl, path = nil, &block)
133
133
  path = path_merge(
134
134
  @path,
135
- (path || ctrl.default_path(true))
135
+ (path || ctrl.default_path)
136
136
  )
137
137
  @router.add_controller(ctrl, path, block)
138
138
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Flame
2
- VERSION = '4.0.4'.freeze
4
+ VERSION = '4.0.5'.freeze
3
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flame
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.4
4
+ version: 4.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Popov