dispatcher-rails 0.0.1 → 0.0.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.
- data/README.md +2 -2
 - data/app/helpers/dispatcher/rails/application_helper.rb +6 -1
 - data/dispatcher-rails.gemspec +2 -1
 - data/lib/dispatcher-rails/version.rb +1 -1
 - data/spec/spec_helper.rb +3 -0
 - metadata +18 -8
 
    
        data/README.md
    CHANGED
    
    | 
         @@ -20,7 +20,7 @@ The dispatcher file will be added to the asset pipeline and available for you to 
     | 
|
| 
       20 
20 
     | 
    
         
             
            //= require dispatcher
         
     | 
| 
       21 
21 
     | 
    
         
             
            ```
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
     | 
    
         
            -
            Use the  
     | 
| 
      
 23 
     | 
    
         
            +
            Use the helpers:
         
     | 
| 
       24 
24 
     | 
    
         | 
| 
       25 
25 
     | 
    
         
             
            ``` erb
         
     | 
| 
       26 
26 
     | 
    
         
             
            <%= dispatcher_tag %>
         
     | 
| 
         @@ -29,7 +29,7 @@ Use the helper: 
     | 
|
| 
       29 
29 
     | 
    
         
             
            to generate a metatag:
         
     | 
| 
       30 
30 
     | 
    
         | 
| 
       31 
31 
     | 
    
         
             
            ``` html
         
     | 
| 
       32 
     | 
    
         
            -
            <meta content="projects#index" name="page" 
     | 
| 
      
 32 
     | 
    
         
            +
            <meta content="projects#index" name="page">
         
     | 
| 
       33 
33 
     | 
    
         
             
            ```
         
     | 
| 
       34 
34 
     | 
    
         | 
| 
       35 
35 
     | 
    
         
             
            ## Contributing
         
     | 
| 
         @@ -2,11 +2,16 @@ module Dispatcher 
     | 
|
| 
       2 
2 
     | 
    
         
             
              module Rails
         
     | 
| 
       3 
3 
     | 
    
         
             
                module ApplicationHelper
         
     | 
| 
       4 
4 
     | 
    
         
             
                  def dispatcher_tag
         
     | 
| 
      
 5 
     | 
    
         
            +
                    tag :meta, name: 'page', content: controller_action_string
         
     | 
| 
      
 6 
     | 
    
         
            +
                  end
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                private
         
     | 
| 
      
 9 
     | 
    
         
            +
                  def controller_action_string
         
     | 
| 
       5 
10 
     | 
    
         
             
                    controller_name = controller.class.name.underscore
         
     | 
| 
       6 
11 
     | 
    
         
             
                    controller_name.gsub!(/\//, "_")
         
     | 
| 
       7 
12 
     | 
    
         
             
                    controller_name.gsub!(/_controller$/, "")
         
     | 
| 
       8 
13 
     | 
    
         | 
| 
       9 
     | 
    
         
            -
                     
     | 
| 
      
 14 
     | 
    
         
            +
                    "#{controller_name}##{controller.action_name}"
         
     | 
| 
       10 
15 
     | 
    
         
             
                  end
         
     | 
| 
       11 
16 
     | 
    
         
             
                end
         
     | 
| 
       12 
17 
     | 
    
         
             
              end
         
     | 
    
        data/dispatcher-rails.gemspec
    CHANGED
    
    | 
         @@ -14,7 +14,8 @@ Gem::Specification.new do |gem| 
     | 
|
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
              gem.add_dependency 'rails', '~> 3.2.0'
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
     | 
    
         
            -
              gem.add_development_dependency 'rspec-rails', '~> 2.11.0'
         
     | 
| 
      
 17 
     | 
    
         
            +
              gem.add_development_dependency 'rspec-rails', '~> 2.11.0'  
         
     | 
| 
      
 18 
     | 
    
         
            +
              gem.add_development_dependency 'simplecov',   '~> 0.7.0'
         
     | 
| 
       18 
19 
     | 
    
         | 
| 
       19 
20 
     | 
    
         
             
              gem.files         = `git ls-files`.split($/)
         
     | 
| 
       20 
21 
     | 
    
         
             
              gem.executables   = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
         
     | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: dispatcher-rails
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.2
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors:
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2012- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2012-11-12 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: rails
         
     | 
| 
         @@ -43,6 +43,22 @@ dependencies: 
     | 
|
| 
       43 
43 
     | 
    
         
             
                - - ~>
         
     | 
| 
       44 
44 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       45 
45 
     | 
    
         
             
                    version: 2.11.0
         
     | 
| 
      
 46 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 47 
     | 
    
         
            +
              name: simplecov
         
     | 
| 
      
 48 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 49 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 50 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 51 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 52 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 53 
     | 
    
         
            +
                    version: 0.7.0
         
     | 
| 
      
 54 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 55 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 56 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 57 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 58 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 59 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 60 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 61 
     | 
    
         
            +
                    version: 0.7.0
         
     | 
| 
       46 
62 
     | 
    
         
             
            description: Use fnando/dispatcher-js with assets-pipeline
         
     | 
| 
       47 
63 
     | 
    
         
             
            email:
         
     | 
| 
       48 
64 
     | 
    
         
             
            - tiagogodinho3@gmail.com
         
     | 
| 
         @@ -108,18 +124,12 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       108 
124 
     | 
    
         
             
              - - ! '>='
         
     | 
| 
       109 
125 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       110 
126 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       111 
     | 
    
         
            -
                  segments:
         
     | 
| 
       112 
     | 
    
         
            -
                  - 0
         
     | 
| 
       113 
     | 
    
         
            -
                  hash: -1758168395182194647
         
     | 
| 
       114 
127 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       115 
128 
     | 
    
         
             
              none: false
         
     | 
| 
       116 
129 
     | 
    
         
             
              requirements:
         
     | 
| 
       117 
130 
     | 
    
         
             
              - - ! '>='
         
     | 
| 
       118 
131 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       119 
132 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       120 
     | 
    
         
            -
                  segments:
         
     | 
| 
       121 
     | 
    
         
            -
                  - 0
         
     | 
| 
       122 
     | 
    
         
            -
                  hash: -1758168395182194647
         
     | 
| 
       123 
133 
     | 
    
         
             
            requirements: []
         
     | 
| 
       124 
134 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       125 
135 
     | 
    
         
             
            rubygems_version: 1.8.24
         
     |