padrino-support 0.13.1 → 0.13.2
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:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 98254f4842554e96dd0accf958ab629966ae8484
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 508e6954fe00f2856c9ff99a45cc3ae06d1a67d4
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: b35602c73202904b25577d8944e960a2f0835802c8499488cfb42f7853009abae55131750734eed24e318b2401b910411f6f6f23b0bd3f8c1c81923827286758
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: e1d56e38387badce7ba88c35f3dcbf2fa28a0641294844fa5fc7c5b76278ea8c274efa55cb13622fca561adbc8f5dc0e641f405d77b5696fe0eed005366e8a42
         
     | 
    
        data/lib/padrino-support.rb
    CHANGED
    
    | 
         @@ -1,8 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ##
         
     | 
| 
       2 
2 
     | 
    
         
             
            # This file loads certain extensions required by Padrino from ActiveSupport.
         
     | 
| 
       3 
3 
     | 
    
         
             
            #
         
     | 
| 
       4 
     | 
    
         
            -
            require 'active_support/core_ext/module/aliasing'           # alias_method_chain
         
     | 
| 
       5 
     | 
    
         
            -
            require 'active_support/core_ext/hash/reverse_merge'        # reverse_merge
         
     | 
| 
       6 
4 
     | 
    
         
             
            require 'active_support/core_ext/hash/keys'                 # symbolize_keys
         
     | 
| 
       7 
5 
     | 
    
         
             
            require 'active_support/core_ext/hash/indifferent_access'   # params[:foo]
         
     | 
| 
       8 
6 
     | 
    
         
             
            require 'active_support/core_ext/hash/slice'                # slice
         
     | 
| 
         @@ -10,6 +8,10 @@ require 'active_support/core_ext/array/extract_options'     # Array#extract_opti 
     | 
|
| 
       10 
8 
     | 
    
         
             
            require 'active_support/core_ext/object/blank'              # present?
         
     | 
| 
       11 
9 
     | 
    
         
             
            require 'active_support/core_ext/string/output_safety'      # SafeBuffer and html_safe
         
     | 
| 
       12 
10 
     | 
    
         | 
| 
      
 11 
     | 
    
         
            +
            # Remove these on 0.14:
         
     | 
| 
      
 12 
     | 
    
         
            +
            require 'active_support/core_ext/hash/reverse_merge'        # reverse_merge
         
     | 
| 
      
 13 
     | 
    
         
            +
            require 'active_support/core_ext/module/aliasing'           # alias_method_chain
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
       13 
15 
     | 
    
         
             
            require 'padrino-support/core_ext/string/inflections'
         
     | 
| 
       14 
16 
     | 
    
         
             
            require 'padrino-support/core_ext/string/colorize'
         
     | 
| 
       15 
17 
     | 
    
         
             
            require 'padrino-support/core_ext/object_space'
         
     | 
| 
         @@ -30,5 +32,5 @@ end 
     | 
|
| 
       30 
32 
     | 
    
         
             
            # In reloader for accessing class_name Foo._orig_klass_name
         
     | 
| 
       31 
33 
     | 
    
         
             
            #
         
     | 
| 
       32 
34 
     | 
    
         
             
            class Module
         
     | 
| 
       33 
     | 
    
         
            -
              alias :_orig_klass_name : 
     | 
| 
      
 35 
     | 
    
         
            +
              alias :_orig_klass_name :name
         
     | 
| 
       34 
36 
     | 
    
         
             
            end
         
     | 
| 
         @@ -11,21 +11,10 @@ module ObjectSpace 
     | 
|
| 
       11 
11 
     | 
    
         
             
                #    end
         
     | 
| 
       12 
12 
     | 
    
         
             
                #  end
         
     | 
| 
       13 
13 
     | 
    
         
             
                #
         
     | 
| 
       14 
     | 
    
         
            -
                def classes
         
     | 
| 
       15 
     | 
    
         
            -
                   
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
                   
     | 
| 
       18 
     | 
    
         
            -
                    if block_given?
         
     | 
| 
       19 
     | 
    
         
            -
                      if r = yield(klass)
         
     | 
| 
       20 
     | 
    
         
            -
                        # add the returned value if the block returns something
         
     | 
| 
       21 
     | 
    
         
            -
                        rs << r
         
     | 
| 
       22 
     | 
    
         
            -
                      end
         
     | 
| 
       23 
     | 
    
         
            -
                    else
         
     | 
| 
       24 
     | 
    
         
            -
                      rs << klass
         
     | 
| 
       25 
     | 
    
         
            -
                    end
         
     | 
| 
       26 
     | 
    
         
            -
                  end
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
                  rs
         
     | 
| 
      
 14 
     | 
    
         
            +
                def classes(&block)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  warn 'Warning! ObjectSpace.classes will be removed in Padrino 0.14'
         
     | 
| 
      
 16 
     | 
    
         
            +
                  require 'padrino-core/reloader'
         
     | 
| 
      
 17 
     | 
    
         
            +
                  Padrino::Reloader::Storage.send(:object_classes, &block)
         
     | 
| 
       29 
18 
     | 
    
         
             
                end
         
     | 
| 
       30 
19 
     | 
    
         | 
| 
       31 
20 
     | 
    
         
             
                ##
         
     | 
| 
         @@ -39,11 +28,9 @@ module ObjectSpace 
     | 
|
| 
       39 
28 
     | 
    
         
             
                #   ObjectSpace.new_classes(snapshot)
         
     | 
| 
       40 
29 
     | 
    
         
             
                #
         
     | 
| 
       41 
30 
     | 
    
         
             
                def new_classes(snapshot)
         
     | 
| 
       42 
     | 
    
         
            -
                   
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
                    end
         
     | 
| 
       46 
     | 
    
         
            -
                  end
         
     | 
| 
      
 31 
     | 
    
         
            +
                  warn 'Warning! ObjectSpace.new_classes will be removed in Padrino 0.14'
         
     | 
| 
      
 32 
     | 
    
         
            +
                  require 'padrino-core/reloader'
         
     | 
| 
      
 33 
     | 
    
         
            +
                  Padrino::Reloader::Storage.send(:new_classes, snapshot)
         
     | 
| 
       47 
34 
     | 
    
         
             
                end
         
     | 
| 
       48 
35 
     | 
    
         
             
              end
         
     | 
| 
       49 
36 
     | 
    
         
             
            end
         
     | 
| 
         @@ -95,4 +95,18 @@ class String 
     | 
|
| 
       95 
95 
     | 
    
         
             
              def classify
         
     | 
| 
       96 
96 
     | 
    
         
             
                ActiveSupport::Inflector.classify(self)
         
     | 
| 
       97 
97 
     | 
    
         
             
              end
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
      
 99 
     | 
    
         
            +
              ##
         
     | 
| 
      
 100 
     | 
    
         
            +
              # Capitalizes the first word, turns underscores into spaces, and strips a trailing '_id' if present.
         
     | 
| 
      
 101 
     | 
    
         
            +
              #
         
     | 
| 
      
 102 
     | 
    
         
            +
              def humanize(options = {})
         
     | 
| 
      
 103 
     | 
    
         
            +
                ActiveSupport::Inflector.humanize(self, options)
         
     | 
| 
      
 104 
     | 
    
         
            +
              end
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
      
 106 
     | 
    
         
            +
              ##
         
     | 
| 
      
 107 
     | 
    
         
            +
              # Replaces underscores with dashes in the string.
         
     | 
| 
      
 108 
     | 
    
         
            +
              #
         
     | 
| 
      
 109 
     | 
    
         
            +
              def dasherize
         
     | 
| 
      
 110 
     | 
    
         
            +
                ActiveSupport::Inflector.dasherize(self)
         
     | 
| 
      
 111 
     | 
    
         
            +
              end
         
     | 
| 
       98 
112 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: padrino-support
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.13. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.13.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Padrino Team
         
     | 
| 
         @@ -12,20 +12,20 @@ authors: 
     | 
|
| 
       12 
12 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       13 
13 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       14 
14 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       15 
     | 
    
         
            -
            date: 2016- 
     | 
| 
      
 15 
     | 
    
         
            +
            date: 2016-05-09 00:00:00.000000000 Z
         
     | 
| 
       16 
16 
     | 
    
         
             
            dependencies:
         
     | 
| 
       17 
17 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       18 
18 
     | 
    
         
             
              name: activesupport
         
     | 
| 
       19 
19 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       20 
20 
     | 
    
         
             
                requirements:
         
     | 
| 
       21 
     | 
    
         
            -
                - -  
     | 
| 
      
 21 
     | 
    
         
            +
                - - ">="
         
     | 
| 
       22 
22 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       23 
23 
     | 
    
         
             
                    version: '3.1'
         
     | 
| 
       24 
24 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       25 
25 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       26 
26 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       27 
27 
     | 
    
         
             
                requirements:
         
     | 
| 
       28 
     | 
    
         
            -
                - -  
     | 
| 
      
 28 
     | 
    
         
            +
                - - ">="
         
     | 
| 
       29 
29 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       30 
30 
     | 
    
         
             
                    version: '3.1'
         
     | 
| 
       31 
31 
     | 
    
         
             
            description: A number of support methods and extensions for Padrino framework
         
     | 
| 
         @@ -34,9 +34,9 @@ executables: [] 
     | 
|
| 
       34 
34 
     | 
    
         
             
            extensions: []
         
     | 
| 
       35 
35 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       36 
36 
     | 
    
         
             
            files:
         
     | 
| 
       37 
     | 
    
         
            -
            - .document
         
     | 
| 
       38 
     | 
    
         
            -
            - .gitignore
         
     | 
| 
       39 
     | 
    
         
            -
            - .yardopts
         
     | 
| 
      
 37 
     | 
    
         
            +
            - ".document"
         
     | 
| 
      
 38 
     | 
    
         
            +
            - ".gitignore"
         
     | 
| 
      
 39 
     | 
    
         
            +
            - ".yardopts"
         
     | 
| 
       40 
40 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       41 
41 
     | 
    
         
             
            - Rakefile
         
     | 
| 
       42 
42 
     | 
    
         
             
            - lib/padrino-support.rb
         
     | 
| 
         @@ -77,17 +77,17 @@ licenses: 
     | 
|
| 
       77 
77 
     | 
    
         
             
            metadata: {}
         
     | 
| 
       78 
78 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       79 
79 
     | 
    
         
             
            rdoc_options:
         
     | 
| 
       80 
     | 
    
         
            -
            - --charset=UTF-8
         
     | 
| 
      
 80 
     | 
    
         
            +
            - "--charset=UTF-8"
         
     | 
| 
       81 
81 
     | 
    
         
             
            require_paths:
         
     | 
| 
       82 
82 
     | 
    
         
             
            - lib
         
     | 
| 
       83 
83 
     | 
    
         
             
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
       84 
84 
     | 
    
         
             
              requirements:
         
     | 
| 
       85 
     | 
    
         
            -
              - -  
     | 
| 
      
 85 
     | 
    
         
            +
              - - ">="
         
     | 
| 
       86 
86 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       87 
87 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       88 
88 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       89 
89 
     | 
    
         
             
              requirements:
         
     | 
| 
       90 
     | 
    
         
            -
              - -  
     | 
| 
      
 90 
     | 
    
         
            +
              - - ">="
         
     | 
| 
       91 
91 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       92 
92 
     | 
    
         
             
                  version: 1.3.6
         
     | 
| 
       93 
93 
     | 
    
         
             
            requirements: []
         
     |