twitter-bootstrap-components-rails 0.2.5 → 0.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/app/components/twitter/bootstrap/components/v3/responsive_embed.rb +38 -0
 - data/app/helpers/twitter/bootstrap/components/rails/v3/components_helper.rb +4 -0
 - data/app/views/twitter/bootstrap/components/v3/_responsive_embed.html.haml +2 -0
 - data/lib/twitter/bootstrap/components/rails/version.rb +1 -1
 - metadata +5 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: e89c84677d6c6b601dece0e5f97866b3deee9f55
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 762479eefa90cbd162ba34dd412a8be19ddeabd4
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 7e4b163ce6f3021792bd4c2db461c4c93aaa4edff8ca8fe8130a2a1d351c3c2273e0b3e730366e30810702923559d8bf5f595e6b89062007914617387aead3f6
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 85a1583bbaf1c8742732fffc925f21fa5deb36a5c06f98cd034858c15220fc4fc0cc42788530618a32a0ac9444cbc81f8700dd22062b0cf59a253b2b687dd810
         
     | 
| 
         @@ -0,0 +1,38 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Twitter
         
     | 
| 
      
 2 
     | 
    
         
            +
              module Bootstrap
         
     | 
| 
      
 3 
     | 
    
         
            +
                module Components
         
     | 
| 
      
 4 
     | 
    
         
            +
                  module V3
         
     | 
| 
      
 5 
     | 
    
         
            +
                    class ResponsiveEmbed < Base
         
     | 
| 
      
 6 
     | 
    
         
            +
                      ALLOWED_ASPECT_RATIOS = [:'16by9', :'4by3']
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                      private
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                      def view_locals
         
     | 
| 
      
 11 
     | 
    
         
            +
                        { 
         
     | 
| 
      
 12 
     | 
    
         
            +
                          block_output:       @block_output,
         
     | 
| 
      
 13 
     | 
    
         
            +
                          context:            context,
         
     | 
| 
      
 14 
     | 
    
         
            +
                          source_url:         @options[:source_url],
         
     | 
| 
      
 15 
     | 
    
         
            +
                          aspect_ratio:       aspect_ratio
         
     | 
| 
      
 16 
     | 
    
         
            +
                        }
         
     | 
| 
      
 17 
     | 
    
         
            +
                      end
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                      def context
         
     | 
| 
      
 20 
     | 
    
         
            +
                        @options[:context]
         
     | 
| 
      
 21 
     | 
    
         
            +
                      end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                      def aspect_ratio
         
     | 
| 
      
 24 
     | 
    
         
            +
                        @options[:aspect_ratio]
         
     | 
| 
      
 25 
     | 
    
         
            +
                      end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                      def aspect_ratio
         
     | 
| 
      
 28 
     | 
    
         
            +
                        @aspect_ratio = @options[:aspect_ratio] || :'16by9'
         
     | 
| 
      
 29 
     | 
    
         
            +
                        unless ALLOWED_ASPECT_RATIOS.include?(@aspect_ratio)
         
     | 
| 
      
 30 
     | 
    
         
            +
                          raise "aspect_ratio must be one of (#{ALLOWED_ASPECT_RATIOS}). #{@aspect_ratio} was given."
         
     | 
| 
      
 31 
     | 
    
         
            +
                        end
         
     | 
| 
      
 32 
     | 
    
         
            +
                        @aspect_ratio
         
     | 
| 
      
 33 
     | 
    
         
            +
                      end
         
     | 
| 
      
 34 
     | 
    
         
            +
                    end
         
     | 
| 
      
 35 
     | 
    
         
            +
                  end
         
     | 
| 
      
 36 
     | 
    
         
            +
                end
         
     | 
| 
      
 37 
     | 
    
         
            +
              end
         
     | 
| 
      
 38 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -32,6 +32,10 @@ module Twitter 
     | 
|
| 
       32 
32 
     | 
    
         
             
                          Twitter::Bootstrap::Components::V3::Thumbnail.new(self, options, &block).perform
         
     | 
| 
       33 
33 
     | 
    
         
             
                        end
         
     | 
| 
       34 
34 
     | 
    
         | 
| 
      
 35 
     | 
    
         
            +
                        def bootstrap_responsive_embed(options = {}, &block)
         
     | 
| 
      
 36 
     | 
    
         
            +
                          Twitter::Bootstrap::Components::V3::ResponsiveEmbed.new(self, options, &block).perform
         
     | 
| 
      
 37 
     | 
    
         
            +
                        end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
       35 
39 
     | 
    
         
             
                        # add ons
         
     | 
| 
       36 
40 
     | 
    
         
             
                        def bootstrap_form_for(object, *args, &block)
         
     | 
| 
       37 
41 
     | 
    
         
             
                          simple_form_for(object, *args, &block)
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: twitter-bootstrap-components-rails
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.3.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Roberto Vasquez Angel
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2017- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2017-11-05 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rails
         
     | 
| 
         @@ -143,6 +143,7 @@ files: 
     | 
|
| 
       143 
143 
     | 
    
         
             
            - app/components/twitter/bootstrap/components/v3/button.rb
         
     | 
| 
       144 
144 
     | 
    
         
             
            - app/components/twitter/bootstrap/components/v3/button_group.rb
         
     | 
| 
       145 
145 
     | 
    
         
             
            - app/components/twitter/bootstrap/components/v3/media_object.rb
         
     | 
| 
      
 146 
     | 
    
         
            +
            - app/components/twitter/bootstrap/components/v3/responsive_embed.rb
         
     | 
| 
       146 
147 
     | 
    
         
             
            - app/components/twitter/bootstrap/components/v3/responsive_media_object.rb
         
     | 
| 
       147 
148 
     | 
    
         
             
            - app/components/twitter/bootstrap/components/v3/thumbnail.rb
         
     | 
| 
       148 
149 
     | 
    
         
             
            - app/components/twitter/bootstrap/components/v4/alert.rb
         
     | 
| 
         @@ -169,6 +170,7 @@ files: 
     | 
|
| 
       169 
170 
     | 
    
         
             
            - app/views/twitter/bootstrap/components/v3/_button.haml
         
     | 
| 
       170 
171 
     | 
    
         
             
            - app/views/twitter/bootstrap/components/v3/_button_group.html.haml
         
     | 
| 
       171 
172 
     | 
    
         
             
            - app/views/twitter/bootstrap/components/v3/_media_object.html.haml
         
     | 
| 
      
 173 
     | 
    
         
            +
            - app/views/twitter/bootstrap/components/v3/_responsive_embed.html.haml
         
     | 
| 
       172 
174 
     | 
    
         
             
            - app/views/twitter/bootstrap/components/v3/_responsive_media_object.html.haml
         
     | 
| 
       173 
175 
     | 
    
         
             
            - app/views/twitter/bootstrap/components/v3/_thumbnail.html.haml
         
     | 
| 
       174 
176 
     | 
    
         
             
            - app/views/twitter/bootstrap/components/v4/_alert.html.haml
         
     | 
| 
         @@ -211,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       211 
213 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       212 
214 
     | 
    
         
             
            requirements: []
         
     | 
| 
       213 
215 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       214 
     | 
    
         
            -
            rubygems_version: 2. 
     | 
| 
      
 216 
     | 
    
         
            +
            rubygems_version: 2.6.11
         
     | 
| 
       215 
217 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       216 
218 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       217 
219 
     | 
    
         
             
            summary: Twitter Bootstrap Components for Rails.
         
     |