padrino-core 0.13.3.1 → 0.13.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/padrino-core/application/application_setup.rb +1 -1
- data/lib/padrino-core/application/params_protection.rb +1 -1
- data/lib/padrino-core/application/routing.rb +1 -1
- data/lib/padrino-core/cli/binstub.rb +1 -1
- data/lib/padrino-core/mounter.rb +2 -2
- data/lib/padrino-core/version.rb +1 -1
- data/lib/padrino-core.rb +1 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c520f17025850cb73e09a637eb0cd8ab8565dd35
|
4
|
+
data.tar.gz: ea7853c7622e65cda595072d8ba4934260938463
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fc4d76ef3cb98fe74e7ec1c80fc6943df00d34482d29bf2a41daf910a75b47de5e30efd9a31e8e433d8dd1d4211d9fafc3aecce9fe9d35729ba59c730af37a2
|
7
|
+
data.tar.gz: 47c49980091e206fb860533e9e7a23d6c17819768f14b15656d5ee8b67f4c586fea2e5b8514a330fb5052f60cdda4593f9cc1c4947e0b107b756fbd9e24e1628
|
@@ -13,7 +13,7 @@ module Padrino
|
|
13
13
|
#
|
14
14
|
def default_configuration!
|
15
15
|
set :app_file, File.expand_path(caller_files.first || $0)
|
16
|
-
set :app_name,
|
16
|
+
set :app_name, Inflections.underscore(settings).to_sym
|
17
17
|
|
18
18
|
set :environment, Padrino.env
|
19
19
|
set :reload, proc { development? }
|
@@ -94,7 +94,7 @@ module Padrino
|
|
94
94
|
next if value.kind_of?(Array) && type
|
95
95
|
case
|
96
96
|
when type.kind_of?(Hash) && value.kind_of?(Hash)
|
97
|
-
if key ==
|
97
|
+
if key == Inflections.pluralize(key) && value.values.first.kind_of?(Hash)
|
98
98
|
value.each do |array_index,array_value|
|
99
99
|
value[array_index] = filter_params!(array_value, type)
|
100
100
|
end
|
@@ -388,7 +388,7 @@ module Padrino
|
|
388
388
|
def process_path_for_parent_params(path, parent_params)
|
389
389
|
parent_prefix = parent_params.flatten.compact.uniq.map do |param|
|
390
390
|
map = (param.respond_to?(:map) && param.map ? param.map : param.to_s)
|
391
|
-
part = "#{map}/:#{
|
391
|
+
part = "#{map}/:#{Inflections.singularize(param)}_id/"
|
392
392
|
part = "(#{part})?" if param.respond_to?(:optional) && param.optional?
|
393
393
|
part
|
394
394
|
end
|
data/lib/padrino-core/mounter.rb
CHANGED
@@ -29,8 +29,8 @@ module Padrino
|
|
29
29
|
#
|
30
30
|
def initialize(name, options={})
|
31
31
|
@name = name.to_s
|
32
|
-
@app_class = options[:app_class] || @name
|
33
|
-
@gem = options[:gem] || @app_class.split("::").first
|
32
|
+
@app_class = options[:app_class] || Inflections.camelize(@name)
|
33
|
+
@gem = options[:gem] || Inflections.underscore(@app_class.split("::").first)
|
34
34
|
@app_file = options[:app_file] || locate_app_file
|
35
35
|
@app_obj = options[:app_obj] || app_constant || locate_app_object
|
36
36
|
ensure_app_file! || ensure_app_object!
|
data/lib/padrino-core/version.rb
CHANGED
data/lib/padrino-core.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: padrino-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.3.
|
4
|
+
version: 0.13.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Padrino Team
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-
|
14
|
+
date: 2016-09-06 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: padrino-support
|
@@ -19,14 +19,14 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.13.3.
|
22
|
+
version: 0.13.3.2
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.13.3.
|
29
|
+
version: 0.13.3.2
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: sinatra
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|