simple_form-bootstrap 1.2.0 → 1.3.0
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/.gitignore +34 -34
- data/.rspec +2 -2
- data/CHANGELOG.md +10 -0
- data/Gemfile +3 -3
- data/LICENSE +22 -22
- data/README.md +14 -0
- data/Rakefile +12 -12
- data/app/assets/javascripts/simple_form-bootstrap.js +30 -24
- data/app/assets/javascripts/simple_form-bootstrap/select_input.js +12 -12
- data/app/assets/javascripts/simple_form-bootstrap/token_input.js +170 -0
- data/lib/simple_form/bootstrap.rb +26 -26
- data/lib/simple_form/bootstrap/engine.rb +2 -2
- data/lib/simple_form/bootstrap/form_builders.rb +9 -9
- data/lib/simple_form/bootstrap/form_builders/date_time.rb +26 -26
- data/lib/simple_form/bootstrap/form_builders/token.rb +3 -0
- data/lib/simple_form/bootstrap/inputs.rb +8 -7
- data/lib/simple_form/bootstrap/inputs/date_time_input.rb +135 -135
- data/lib/simple_form/bootstrap/inputs/token_input.rb +10 -0
- data/lib/simple_form/bootstrap/railtie.rb +5 -5
- data/lib/simple_form/bootstrap/setup.rb +189 -189
- data/lib/simple_form/bootstrap/version.rb +1 -1
- data/spec/coverage_helper.rb +63 -63
- data/spec/rails_helper.rb +45 -45
- data/spec/simple_form/bootstrap/form_builders/token_spec.rb +39 -0
- data/spec/simple_form/simple_form_spec.rb +14 -14
- data/spec/spec_helper.rb +90 -90
- data/spec/support/action_controller.rb +5 -5
- data/spec/support/mock_controller.rb +39 -39
- data/spec/support/rspec_html_matchers.rb +3 -3
- data/spec/support/simple_form.rb +10 -10
- metadata +7 -3
| @@ -1,5 +1,5 @@ | |
| 1 | 
            -
            RSpec.configure do
         | 
| 2 | 
            -
              ActionView::RoutingUrlFor.class_eval do
         | 
| 3 | 
            -
                include ActionDispatch::Routing::UrlFor
         | 
| 4 | 
            -
              end
         | 
| 5 | 
            -
            end
         | 
| 1 | 
            +
            RSpec.configure do
         | 
| 2 | 
            +
              ActionView::RoutingUrlFor.class_eval do
         | 
| 3 | 
            +
                include ActionDispatch::Routing::UrlFor
         | 
| 4 | 
            +
              end
         | 
| 5 | 
            +
            end
         | 
| @@ -1,39 +1,39 @@ | |
| 1 | 
            -
            # Adapted from SimpleForm's mock controller
         | 
| 2 | 
            -
            class MockController
         | 
| 3 | 
            -
              attr_writer :action_name
         | 
| 4 | 
            -
             | 
| 5 | 
            -
              def _routes
         | 
| 6 | 
            -
                self
         | 
| 7 | 
            -
              end
         | 
| 8 | 
            -
             | 
| 9 | 
            -
              def action_name
         | 
| 10 | 
            -
                defined?(@action_name) ? @action_name : "edit"
         | 
| 11 | 
            -
              end
         | 
| 12 | 
            -
             | 
| 13 | 
            -
              def named_routes
         | 
| 14 | 
            -
                self
         | 
| 15 | 
            -
              end
         | 
| 16 | 
            -
              def route_defined?(selector)
         | 
| 17 | 
            -
                false
         | 
| 18 | 
            -
              end
         | 
| 19 | 
            -
              def mounted_helpers
         | 
| 20 | 
            -
                self
         | 
| 21 | 
            -
              end
         | 
| 22 | 
            -
              def method_defined?(selector)
         | 
| 23 | 
            -
                false
         | 
| 24 | 
            -
              end
         | 
| 25 | 
            -
            end
         | 
| 26 | 
            -
             | 
| 27 | 
            -
            module MockControllerAdditions
         | 
| 28 | 
            -
              def self.included(module_)
         | 
| 29 | 
            -
                module_.setup :set_controller
         | 
| 30 | 
            -
              end
         | 
| 31 | 
            -
             | 
| 32 | 
            -
              def set_controller
         | 
| 33 | 
            -
                @controller = MockController.new
         | 
| 34 | 
            -
              end
         | 
| 35 | 
            -
            end
         | 
| 36 | 
            -
             | 
| 37 | 
            -
            RSpec.configure do |config|
         | 
| 38 | 
            -
              config.include MockControllerAdditions, type: :view
         | 
| 39 | 
            -
            end
         | 
| 1 | 
            +
            # Adapted from SimpleForm's mock controller
         | 
| 2 | 
            +
            class MockController
         | 
| 3 | 
            +
              attr_writer :action_name
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              def _routes
         | 
| 6 | 
            +
                self
         | 
| 7 | 
            +
              end
         | 
| 8 | 
            +
             | 
| 9 | 
            +
              def action_name
         | 
| 10 | 
            +
                defined?(@action_name) ? @action_name : "edit"
         | 
| 11 | 
            +
              end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
              def named_routes
         | 
| 14 | 
            +
                self
         | 
| 15 | 
            +
              end
         | 
| 16 | 
            +
              def route_defined?(selector)
         | 
| 17 | 
            +
                false
         | 
| 18 | 
            +
              end
         | 
| 19 | 
            +
              def mounted_helpers
         | 
| 20 | 
            +
                self
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
              def method_defined?(selector)
         | 
| 23 | 
            +
                false
         | 
| 24 | 
            +
              end
         | 
| 25 | 
            +
            end
         | 
| 26 | 
            +
             | 
| 27 | 
            +
            module MockControllerAdditions
         | 
| 28 | 
            +
              def self.included(module_)
         | 
| 29 | 
            +
                module_.setup :set_controller
         | 
| 30 | 
            +
              end
         | 
| 31 | 
            +
             | 
| 32 | 
            +
              def set_controller
         | 
| 33 | 
            +
                @controller = MockController.new
         | 
| 34 | 
            +
              end
         | 
| 35 | 
            +
            end
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            RSpec.configure do |config|
         | 
| 38 | 
            +
              config.include MockControllerAdditions, type: :view
         | 
| 39 | 
            +
            end
         | 
| @@ -1,3 +1,3 @@ | |
| 1 | 
            -
            RSpec.configure do |config|
         | 
| 2 | 
            -
              config.include RSpecHtmlMatchers
         | 
| 3 | 
            -
            end
         | 
| 1 | 
            +
            RSpec.configure do |config|
         | 
| 2 | 
            +
              config.include RSpecHtmlMatchers
         | 
| 3 | 
            +
            end
         | 
    
        data/spec/support/simple_form.rb
    CHANGED
    
    | @@ -1,10 +1,10 @@ | |
| 1 | 
            -
            module MockViewAdditions
         | 
| 2 | 
            -
              def simple_form_for(*args, &proc)
         | 
| 3 | 
            -
                concat super(*args, &proc)
         | 
| 4 | 
            -
              end
         | 
| 5 | 
            -
            end
         | 
| 6 | 
            -
             | 
| 7 | 
            -
            RSpec.configure do |config|
         | 
| 8 | 
            -
              config.include SimpleForm::ActionViewExtensions::FormHelper, type: :view
         | 
| 9 | 
            -
              config.include MockViewAdditions, type: :view
         | 
| 10 | 
            -
            end
         | 
| 1 | 
            +
            module MockViewAdditions
         | 
| 2 | 
            +
              def simple_form_for(*args, &proc)
         | 
| 3 | 
            +
                concat super(*args, &proc)
         | 
| 4 | 
            +
              end
         | 
| 5 | 
            +
            end
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            RSpec.configure do |config|
         | 
| 8 | 
            +
              config.include SimpleForm::ActionViewExtensions::FormHelper, type: :view
         | 
| 9 | 
            +
              config.include MockViewAdditions, type: :view
         | 
| 10 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: simple_form-bootstrap
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1. | 
| 4 | 
            +
              version: 1.3.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Joel Low
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2016-02-23 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bootstrap-sass
         | 
| @@ -168,13 +168,16 @@ files: | |
| 168 168 | 
             
            - app/assets/javascripts/simple_form-bootstrap.js
         | 
| 169 169 | 
             
            - app/assets/javascripts/simple_form-bootstrap/date_time_input.js
         | 
| 170 170 | 
             
            - app/assets/javascripts/simple_form-bootstrap/select_input.js
         | 
| 171 | 
            +
            - app/assets/javascripts/simple_form-bootstrap/token_input.js
         | 
| 171 172 | 
             
            - lib/simple_form/bootstrap.rb
         | 
| 172 173 | 
             
            - lib/simple_form/bootstrap/engine.rb
         | 
| 173 174 | 
             
            - lib/simple_form/bootstrap/form_builders.rb
         | 
| 174 175 | 
             
            - lib/simple_form/bootstrap/form_builders/button.rb
         | 
| 175 176 | 
             
            - lib/simple_form/bootstrap/form_builders/date_time.rb
         | 
| 177 | 
            +
            - lib/simple_form/bootstrap/form_builders/token.rb
         | 
| 176 178 | 
             
            - lib/simple_form/bootstrap/inputs.rb
         | 
| 177 179 | 
             
            - lib/simple_form/bootstrap/inputs/date_time_input.rb
         | 
| 180 | 
            +
            - lib/simple_form/bootstrap/inputs/token_input.rb
         | 
| 178 181 | 
             
            - lib/simple_form/bootstrap/railtie.rb
         | 
| 179 182 | 
             
            - lib/simple_form/bootstrap/setup.rb
         | 
| 180 183 | 
             
            - lib/simple_form/bootstrap/version.rb
         | 
| @@ -183,6 +186,7 @@ files: | |
| 183 186 | 
             
            - spec/rails_helper.rb
         | 
| 184 187 | 
             
            - spec/simple_form/bootstrap/form_builders/button_spec.rb
         | 
| 185 188 | 
             
            - spec/simple_form/bootstrap/form_builders/date_time_spec.rb
         | 
| 189 | 
            +
            - spec/simple_form/bootstrap/form_builders/token_spec.rb
         | 
| 186 190 | 
             
            - spec/simple_form/simple_form_spec.rb
         | 
| 187 191 | 
             
            - spec/spec_helper.rb
         | 
| 188 192 | 
             
            - spec/support/action_controller.rb
         | 
| @@ -209,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 209 213 | 
             
                  version: '0'
         | 
| 210 214 | 
             
            requirements: []
         | 
| 211 215 | 
             
            rubyforge_project: 
         | 
| 212 | 
            -
            rubygems_version: 2. | 
| 216 | 
            +
            rubygems_version: 2.5.1
         | 
| 213 217 | 
             
            signing_key: 
         | 
| 214 218 | 
             
            specification_version: 4
         | 
| 215 219 | 
             
            summary: Initialises Simple Form to automatically produce Bootstrap 3-friendly markup.
         |