bmc 1.4.0 → 1.4.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/app/helpers/bmc/bootstrap_helper.rb +6 -0
- data/app/helpers/bmc/form_helper.rb +2 -2
- data/app/libs/bmc/mini_model_serializer/serialize.rb +4 -4
- data/app/sorters/bmc/sorter.rb +4 -4
- data/app/views/bmc/search/_form.html.slim +1 -1
- data/app/views/bmc/search/_form_bs3.html.slim +1 -1
- data/app/views/bmc/search/_form_bs4.html.slim +1 -1
- data/app/views/bmc/search/_form_bs5.html.slim +1 -1
- data/lib/bmc/version.rb +1 -1
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 76fecfb84df0ecc80387ef64b76d6042594473fd93bce1ad0a9dfdcb3530574b
         | 
| 4 | 
            +
              data.tar.gz: bc953b87c09e7b152e609398a53cc4893ca8b748805d84a05020ed5afa0b900f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: f78df23115e0bb884a5a3d255022f7b17cc1a052b8de20ff03200f894235615b8e3c94b317e293e77a0aa067e07a8c95a442492e87b633e51e0ff0d864e67cba
         | 
| 7 | 
            +
              data.tar.gz: 8f8c25277438fa515c0b219eaf089365404ae3f788bbd62f2531ab96bbbf8dee5c01a52a9995d0f832bdadf01f48d1a594b60940272bdee3833f30ca1b105ff4
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
| @@ -8,8 +8,8 @@ module BMC::FormHelper | |
| 8 8 | 
             
                tag.input(type: "submit", class: "hidden-submit", style: css)
         | 
| 9 9 | 
             
              end
         | 
| 10 10 |  | 
| 11 | 
            -
              def search_form(action: request.fullpath)
         | 
| 12 | 
            -
                render "bmc/search/form", action: action
         | 
| 11 | 
            +
              def search_form(action: request.fullpath, placeholder: ta(:search))
         | 
| 12 | 
            +
                render "bmc/search/form", action: action, placeholder: placeholder
         | 
| 13 13 | 
             
              end
         | 
| 14 14 |  | 
| 15 15 | 
             
              def hidden_inputs_for_get_form(url, except: nil, only: nil)
         | 
| @@ -1,6 +1,10 @@ | |
| 1 1 | 
             
            class BMC::MiniModelSerializer::Serialize
         | 
| 2 2 | 
             
              attr_reader :object, :options
         | 
| 3 3 |  | 
| 4 | 
            +
              def self.call(...)
         | 
| 5 | 
            +
                new(...).call
         | 
| 6 | 
            +
              end
         | 
| 7 | 
            +
             | 
| 4 8 | 
             
              def initialize(object, options = {})
         | 
| 5 9 | 
             
                @object  = object
         | 
| 6 10 | 
             
                @options = options
         | 
| @@ -18,10 +22,6 @@ class BMC::MiniModelSerializer::Serialize | |
| 18 22 | 
             
                end
         | 
| 19 23 | 
             
              end
         | 
| 20 24 |  | 
| 21 | 
            -
              def self.call(...)
         | 
| 22 | 
            -
                new(...).call
         | 
| 23 | 
            -
              end
         | 
| 24 | 
            -
             | 
| 25 25 | 
             
              private
         | 
| 26 26 |  | 
| 27 27 | 
             
              def serialize(object)
         | 
    
        data/app/sorters/bmc/sorter.rb
    CHANGED
    
    | @@ -3,6 +3,10 @@ class BMC::Sorter | |
| 3 3 |  | 
| 4 4 | 
             
              attr_reader :collection, :sort_param, :column, :direction
         | 
| 5 5 |  | 
| 6 | 
            +
              def self.call(...)
         | 
| 7 | 
            +
                new(...).call
         | 
| 8 | 
            +
              end
         | 
| 9 | 
            +
             | 
| 6 10 | 
             
              def initialize(collection, sort_param = nil)
         | 
| 7 11 | 
             
                @collection         = collection
         | 
| 8 12 | 
             
                @sort_param         = sort_param
         | 
| @@ -20,10 +24,6 @@ class BMC::Sorter | |
| 20 24 | 
             
                collection.reorder(order)
         | 
| 21 25 | 
             
              end
         | 
| 22 26 |  | 
| 23 | 
            -
              def self.call(...)
         | 
| 24 | 
            -
                new(...).call
         | 
| 25 | 
            -
              end
         | 
| 26 | 
            -
             | 
| 27 27 | 
             
              private
         | 
| 28 28 |  | 
| 29 29 | 
             
              def inverted_direction
         | 
| @@ -1 +1 @@ | |
| 1 | 
            -
            = render "bmc/search/form_bs#{ | 
| 1 | 
            +
            = render "bmc/search/form_bs#{BMC::BootstrapHelper.bootstrap_version}", action: action, placeholder: placeholder
         | 
| @@ -3,7 +3,7 @@ form.search.bs3 method="get" action=action | |
| 3 3 | 
             
              = form_hidden_submit
         | 
| 4 4 |  | 
| 5 5 | 
             
              p.input-group.search
         | 
| 6 | 
            -
                input.form-control name="q" placeholder= | 
| 6 | 
            +
                input.form-control name="q" placeholder=placeholder size=25 value=params[:q]
         | 
| 7 7 |  | 
| 8 8 | 
             
                span.input-group-btn
         | 
| 9 9 | 
             
                  button.btn.btn-default.search-reset.reset type="submit"
         | 
| @@ -3,7 +3,7 @@ form.search.bs4 method="get" action=action | |
| 3 3 | 
             
              = form_hidden_submit
         | 
| 4 4 |  | 
| 5 5 | 
             
              .input-group.search
         | 
| 6 | 
            -
                input.form-control.form-control-sm type="text" name="q" placeholder= | 
| 6 | 
            +
                input.form-control.form-control-sm type="text" name="q" placeholder=placeholder value=params[:q]
         | 
| 7 7 | 
             
                span.input-group-append
         | 
| 8 8 | 
             
                  button.btn.btn-sm.bg-light.border.search-reset.reset type="submit" = fa_s(:times)
         | 
| 9 9 | 
             
                  button.btn.btn-sm.bg-light.border.search-submit type="submit" = fa_s(:search)
         | 
| @@ -3,6 +3,6 @@ form.search.bs5.mb-3 method="get" action=action | |
| 3 3 | 
             
              = form_hidden_submit
         | 
| 4 4 |  | 
| 5 5 | 
             
              .input-group.search
         | 
| 6 | 
            -
                input.form-control.form-control-sm type="text" name="q" placeholder= | 
| 6 | 
            +
                input.form-control.form-control-sm type="text" name="q" placeholder=placeholder value=params[:q]
         | 
| 7 7 | 
             
                button.btn.btn-sm.bg-light.border.search-reset.reset type="submit" = fa_s(:times)
         | 
| 8 8 | 
             
                button.btn.btn-sm.bg-light.border.search-submit type="submit" = fa_s(:search)
         | 
    
        data/lib/bmc/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: bmc
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.4. | 
| 4 | 
            +
              version: 1.4.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Benoit MARTIN-CHAVE
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2023-11-01 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails-i18n
         | 
| @@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 230 230 | 
             
                - !ruby/object:Gem::Version
         | 
| 231 231 | 
             
                  version: '0'
         | 
| 232 232 | 
             
            requirements: []
         | 
| 233 | 
            -
            rubygems_version: 3. | 
| 233 | 
            +
            rubygems_version: 3.4.10
         | 
| 234 234 | 
             
            signing_key:
         | 
| 235 235 | 
             
            specification_version: 4
         | 
| 236 236 | 
             
            summary: BMC
         |