nanoc-fuel 0.0.6 → 0.0.7
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/CHANGELOG.md +3 -0
- data/README.md +28 -16
- data/lib/nanoc-fuel.rb +1 -1
- data/lib/nanoc-fuel/helpers/templates/facebook/fb_init.haml +12 -9
- data/lib/nanoc-fuel/version.rb +1 -1
- data/nanoc-fuel.gemspec +2 -2
- data/test/test_helper.rb +1 -1
- metadata +40 -45
    
        data/CHANGELOG.md
    ADDED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -1,46 +1,58 @@ | |
| 1 1 | 
             
            Nanoc Fuel
         | 
| 2 | 
            -
             | 
| 2 | 
            +
            ==========
         | 
| 3 3 |  | 
| 4 | 
            -
             | 
| 4 | 
            +
            [](http://travis-ci.org/kamui/nanoc-fuel)
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            Nanoc Fuel is a [nanoc](http://nanoc.stoneship.org/) gem that adds helpers for Facebook (like init, button, comments) and Google (analytics).
         | 
| 5 7 |  | 
| 6 8 | 
             
            Installation
         | 
| 7 9 | 
             
            ------------
         | 
| 8 10 |  | 
| 9 | 
            -
            - You need Nanoc 3. | 
| 10 | 
            -
            - This gem requires haml 3.1 | 
| 11 | 
            +
            - You need Nanoc 3.2 or above, works with Nanoc 3.3
         | 
| 12 | 
            +
            - This gem requires haml 3.1 or above
         | 
| 11 13 |  | 
| 12 14 | 
             
            If you're using bundler, just add this to your Gemfile:
         | 
| 13 15 |  | 
| 14 | 
            -
             | 
| 16 | 
            +
            ```ruby
         | 
| 17 | 
            +
            gem 'nanoc-fuel'
         | 
| 18 | 
            +
            ```
         | 
| 15 19 |  | 
| 16 20 | 
             
            Otherwise, you can just install the gem manually:
         | 
| 17 21 |  | 
| 18 | 
            -
             | 
| 22 | 
            +
            ```ruby
         | 
| 23 | 
            +
            gem install nanoc-fuel
         | 
| 24 | 
            +
            ```
         | 
| 19 25 |  | 
| 20 26 | 
             
            and then in your nanoc project, put this in lib/default.rb:
         | 
| 21 27 |  | 
| 22 | 
            -
             | 
| 28 | 
            +
            ```ruby
         | 
| 29 | 
            +
            require 'nanoc-fuel/tasks'
         | 
| 30 | 
            +
            ```
         | 
| 23 31 |  | 
| 24 32 | 
             
            Usage
         | 
| 25 | 
            -
             | 
| 33 | 
            +
            -----
         | 
| 26 34 |  | 
| 27 35 | 
             
            For the Facebook/Google helpers:
         | 
| 28 36 |  | 
| 29 | 
            -
            In your nanoc project's lib/helpers.rb file, include one of the helpers:
         | 
| 37 | 
            +
            In your nanoc project's `lib/helpers.rb` file, include one of the helpers:
         | 
| 30 38 |  | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 39 | 
            +
            ```ruby
         | 
| 40 | 
            +
            include NanocFuel::Helpers::Facebook
         | 
| 41 | 
            +
            include NanocFuel::Helpers::Google
         | 
| 42 | 
            +
            ```
         | 
| 33 43 |  | 
| 34 44 | 
             
            Then, in your layout add any of these:
         | 
| 35 45 |  | 
| 36 | 
            -
             | 
| 46 | 
            +
            ```ruby
         | 
| 47 | 
            +
            fb_init("FB APP ID HERE")
         | 
| 37 48 |  | 
| 38 | 
            -
             | 
| 49 | 
            +
            fb_comments("url", "num_posts", "width")
         | 
| 39 50 |  | 
| 40 | 
            -
             | 
| 51 | 
            +
            fb_like_btn("standard", "450", "true", "true")
         | 
| 41 52 |  | 
| 42 | 
            -
             | 
| 53 | 
            +
            ga_tracking("UA-XXXXX")
         | 
| 54 | 
            +
            ```
         | 
| 43 55 |  | 
| 44 56 | 
             
            Contact
         | 
| 45 | 
            -
             | 
| 57 | 
            +
            -------
         | 
| 46 58 | 
             
            You can reach me at <jack@jackchu.com>.
         | 
    
        data/lib/nanoc-fuel.rb
    CHANGED
    
    
| @@ -1,19 +1,22 @@ | |
| 1 1 | 
             
            #fb-root
         | 
| 2 2 | 
             
            :javascript
         | 
| 3 3 | 
             
              window.fbAsyncInit = function() {
         | 
| 4 | 
            -
                FB.init({ | 
| 4 | 
            +
                FB.init({
         | 
| 5 | 
            +
                  appId: '#{app_id}',
         | 
| 6 | 
            +
                  status: true,
         | 
| 7 | 
            +
                  cookie: true,
         | 
| 8 | 
            +
                  xfbml: true
         | 
| 9 | 
            +
                });
         | 
| 5 10 | 
             
                fbInitHook();
         | 
| 6 | 
            -
                FB.Canvas.setSize();
         | 
| 7 11 | 
             
              };
         | 
| 8 12 |  | 
| 9 | 
            -
              function fbInitHook() {}
         | 
| 10 | 
            -
             | 
| 11 13 | 
             
              function sizeChangeCallback() {
         | 
| 12 14 | 
             
                FB.Canvas.setSize();
         | 
| 13 15 | 
             
              }
         | 
| 14 16 |  | 
| 15 | 
            -
              (function() | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 17 | 
            +
              (function(d){
         | 
| 18 | 
            +
                 var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
         | 
| 19 | 
            +
                 js = d.createElement('script'); js.id = id; js.async = true;
         | 
| 20 | 
            +
                 js.src = "//connect.facebook.net/en_US/all.js";
         | 
| 21 | 
            +
                 d.getElementsByTagName('head')[0].appendChild(js);
         | 
| 22 | 
            +
               }(document));
         | 
    
        data/lib/nanoc-fuel/version.rb
    CHANGED
    
    
    
        data/nanoc-fuel.gemspec
    CHANGED
    
    | @@ -19,6 +19,6 @@ Gem::Specification.new do |s| | |
| 19 19 | 
             
              s.executables   = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
         | 
| 20 20 | 
             
              s.require_paths = ["lib"]
         | 
| 21 21 |  | 
| 22 | 
            -
              s.add_runtime_dependency('nanoc', ' | 
| 23 | 
            -
              s.add_runtime_dependency('haml', ' | 
| 22 | 
            +
              s.add_runtime_dependency('nanoc', '~> 3.1')
         | 
| 23 | 
            +
              s.add_runtime_dependency('haml', '~> 3.1')
         | 
| 24 24 | 
             
            end
         | 
    
        data/test/test_helper.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,54 +1,51 @@ | |
| 1 | 
            -
            --- !ruby/object:Gem::Specification | 
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: nanoc-fuel
         | 
| 3 | 
            -
            version: !ruby/object:Gem::Version | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 0.0.7
         | 
| 4 5 | 
             
              prerelease: 
         | 
| 5 | 
            -
              version: 0.0.6
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 | 
            -
            authors: | 
| 7 | 
            +
            authors:
         | 
| 8 8 | 
             
            - Jack Chu
         | 
| 9 9 | 
             
            - Bob Whitney
         | 
| 10 10 | 
             
            - Winter Lee
         | 
| 11 11 | 
             
            autorequire: 
         | 
| 12 12 | 
             
            bindir: bin
         | 
| 13 13 | 
             
            cert_chain: []
         | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 14 | 
            +
            date: 2012-02-15 00:00:00.000000000 Z
         | 
| 15 | 
            +
            dependencies:
         | 
| 16 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 18 17 | 
             
              name: nanoc
         | 
| 19 | 
            -
               | 
| 20 | 
            -
              requirement: &id001 !ruby/object:Gem::Requirement 
         | 
| 18 | 
            +
              requirement: &2170484580 !ruby/object:Gem::Requirement
         | 
| 21 19 | 
             
                none: false
         | 
| 22 | 
            -
                requirements: | 
| 23 | 
            -
                - -  | 
| 24 | 
            -
                  - !ruby/object:Gem::Version | 
| 25 | 
            -
                    version: 3.1 | 
| 20 | 
            +
                requirements:
         | 
| 21 | 
            +
                - - ~>
         | 
| 22 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 23 | 
            +
                    version: '3.1'
         | 
| 26 24 | 
             
              type: :runtime
         | 
| 27 | 
            -
              version_requirements: *id001
         | 
| 28 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 29 | 
            -
              name: haml
         | 
| 30 25 | 
             
              prerelease: false
         | 
| 31 | 
            -
               | 
| 26 | 
            +
              version_requirements: *2170484580
         | 
| 27 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 28 | 
            +
              name: haml
         | 
| 29 | 
            +
              requirement: &2170484100 !ruby/object:Gem::Requirement
         | 
| 32 30 | 
             
                none: false
         | 
| 33 | 
            -
                requirements: | 
| 34 | 
            -
                - -  | 
| 35 | 
            -
                  - !ruby/object:Gem::Version | 
| 36 | 
            -
                    version: 3.1 | 
| 31 | 
            +
                requirements:
         | 
| 32 | 
            +
                - - ~>
         | 
| 33 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 34 | 
            +
                    version: '3.1'
         | 
| 37 35 | 
             
              type: :runtime
         | 
| 38 | 
            -
               | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 36 | 
            +
              prerelease: false
         | 
| 37 | 
            +
              version_requirements: *2170484100
         | 
| 38 | 
            +
            description: ''
         | 
| 39 | 
            +
            email:
         | 
| 41 40 | 
             
            - jack@jackchu.com
         | 
| 42 41 | 
             
            - robertj.whitney@gmail.com
         | 
| 43 42 | 
             
            - wintafay@gmail.com
         | 
| 44 43 | 
             
            executables: []
         | 
| 45 | 
            -
             | 
| 46 44 | 
             
            extensions: []
         | 
| 47 | 
            -
             | 
| 48 45 | 
             
            extra_rdoc_files: []
         | 
| 49 | 
            -
             | 
| 50 | 
            -
            files: 
         | 
| 46 | 
            +
            files:
         | 
| 51 47 | 
             
            - .gitignore
         | 
| 48 | 
            +
            - CHANGELOG.md
         | 
| 52 49 | 
             
            - Gemfile
         | 
| 53 50 | 
             
            - Gemfile.lock
         | 
| 54 51 | 
             
            - LICENSE
         | 
| @@ -76,32 +73,30 @@ files: | |
| 76 73 | 
             
            - test/test_helper.rb
         | 
| 77 74 | 
             
            homepage: https://github.com/kamui/nanoc-fuel
         | 
| 78 75 | 
             
            licenses: []
         | 
| 79 | 
            -
             | 
| 80 76 | 
             
            post_install_message: 
         | 
| 81 77 | 
             
            rdoc_options: []
         | 
| 82 | 
            -
             | 
| 83 | 
            -
            require_paths: 
         | 
| 78 | 
            +
            require_paths:
         | 
| 84 79 | 
             
            - lib
         | 
| 85 | 
            -
            required_ruby_version: !ruby/object:Gem::Requirement | 
| 80 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 86 81 | 
             
              none: false
         | 
| 87 | 
            -
              requirements: | 
| 88 | 
            -
              - -  | 
| 89 | 
            -
                - !ruby/object:Gem::Version | 
| 90 | 
            -
                  version:  | 
| 91 | 
            -
            required_rubygems_version: !ruby/object:Gem::Requirement | 
| 82 | 
            +
              requirements:
         | 
| 83 | 
            +
              - - ! '>='
         | 
| 84 | 
            +
                - !ruby/object:Gem::Version
         | 
| 85 | 
            +
                  version: '0'
         | 
| 86 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 92 87 | 
             
              none: false
         | 
| 93 | 
            -
              requirements: | 
| 94 | 
            -
              - -  | 
| 95 | 
            -
                - !ruby/object:Gem::Version | 
| 96 | 
            -
                  version:  | 
| 88 | 
            +
              requirements:
         | 
| 89 | 
            +
              - - ! '>='
         | 
| 90 | 
            +
                - !ruby/object:Gem::Version
         | 
| 91 | 
            +
                  version: '0'
         | 
| 97 92 | 
             
            requirements: []
         | 
| 98 | 
            -
             | 
| 99 93 | 
             
            rubyforge_project: nanoc-fuel
         | 
| 100 | 
            -
            rubygems_version: 1.8. | 
| 94 | 
            +
            rubygems_version: 1.8.15
         | 
| 101 95 | 
             
            signing_key: 
         | 
| 102 96 | 
             
            specification_version: 3
         | 
| 103 97 | 
             
            summary: nanoc extension that adds useful helpers (facebook, google analytics, etc).
         | 
| 104 | 
            -
            test_files: | 
| 98 | 
            +
            test_files:
         | 
| 105 99 | 
             
            - test/helpers/facebook_test.rb
         | 
| 106 100 | 
             
            - test/helpers/google_test.rb
         | 
| 107 101 | 
             
            - test/test_helper.rb
         | 
| 102 | 
            +
            has_rdoc: 
         |