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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 33124fc7a2cac824324138a48c0fda3a890aae3f
4
- data.tar.gz: d051bf2e1b63df26a05aa63cdc6d77e97429c51a
3
+ metadata.gz: c520f17025850cb73e09a637eb0cd8ab8565dd35
4
+ data.tar.gz: ea7853c7622e65cda595072d8ba4934260938463
5
5
  SHA512:
6
- metadata.gz: 00d7e8413a335c6b8faa73c114f93ecf8bc73174b25f508c71c0f2f939c591029b608a7251ae0944a9378df0c22bf9a26d4c5dba09d3793f8ee06af38400681c
7
- data.tar.gz: c874f43d918e9d8f819b69ddeb0e404c0659cc5de995da64774d3f73578fb0b103d66c217d360fc5400dbc99e841f88ae8b60e8c16fae098ab7e83986e22601b
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, settings.to_s.underscore.to_sym
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 == key.pluralize && value.values.first.kind_of?(Hash)
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}/:#{param.to_s.singularize}_id/"
391
+ part = "#{map}/:#{Inflections.singularize(param)}_id/"
392
392
  part = "(#{part})?" if param.respond_to?(:optional) && param.optional?
393
393
  part
394
394
  end
@@ -5,7 +5,7 @@ module Padrino
5
5
  def self.replace_with_binstub(executable)
6
6
  begin
7
7
  return if Bundler.definition.missing_specs.empty?
8
- rescue NameError, NoMethodError
8
+ rescue NameError, NoMethodError, Bundler::GemfileNotFound
9
9
  end
10
10
 
11
11
  project_root = Dir.pwd
@@ -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.camelize
33
- @gem = options[:gem] || @app_class.split("::").first.underscore
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!
@@ -6,7 +6,7 @@
6
6
  #
7
7
  module Padrino
8
8
  # The version constant for the current version of Padrino.
9
- VERSION = '0.13.3.1' unless defined?(Padrino::VERSION)
9
+ VERSION = '0.13.3.2' unless defined?(Padrino::VERSION)
10
10
 
11
11
  #
12
12
  # The current Padrino version.
data/lib/padrino-core.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'sinatra/base'
2
2
  require 'padrino-core/version'
3
3
  require 'padrino-support'
4
+ require 'padrino-support/inflections'
4
5
  require 'padrino-core/configuration'
5
6
  require 'padrino-core/application'
6
7
 
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.1
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-08-30 00:00:00.000000000 Z
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.1
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.1
29
+ version: 0.13.3.2
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: sinatra
32
32
  requirement: !ruby/object:Gem::Requirement