guard-nanoc 2.1.9 → 2.1.10
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/LICENSE +1 -1
 - data/NEWS.md +4 -0
 - data/README.md +1 -44
 - data/guard-nanoc.gemspec +8 -2
 - data/lib/guard/nanoc/live_command.rb +4 -4
 - data/lib/guard/nanoc/version.rb +1 -1
 - data/lib/guard/nanoc.rb +3 -3
 - metadata +8 -9
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 72939e1ebc1529a4c5d8a6c5a4cb8f6ac66ce0851ceef5c0219a48ad0be66d80
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: b6980e497646e70458d9896c7ddf7d0b1976253f690536731e7c1fd11db5aa3b
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 1447d6422f85c53c1c9cddc4736fef574b8d7c91f484458590b33c4ac45208d35b4348ddb11dc03e9671d58f7d354589b3472578d1bd3281bea852e6cff71b2c
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 878ef1e65d17145b6420676f0acc28c69431e64666f646a81cccb1864ba6ed74daaaf60bd62b7179ba76c7648fac093b4168be193d69b2b69d709a78d44a8417
         
     | 
    
        data/LICENSE
    CHANGED
    
    
    
        data/NEWS.md
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,46 +1,3 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # Guard::Nanoc
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            This is  
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            `Guard` is a framework for listening to filesystem changes and acting upon them. `Guard::Nanoc` is a plugin for Guard that recompiles Nanoc sites on changes.
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            ## Installation
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
            Add the `guard-nanoc` gem inside the `nanoc` group to your application's Gemfile:
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
                group :nanoc do
         
     | 
| 
       12 
     | 
    
         
            -
                  gem 'guard-nanoc'
         
     | 
| 
       13 
     | 
    
         
            -
                end
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            Unless your Gemfile already specifies a web server, you'll need one as well:
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
                gem 'adsf'
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
            Lastly, ensure that Nanoc is at least version 4.3:
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
                gem 'nanoc', '~> 4.3'
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
            And then execute:
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
                $ bundle
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
            ## Usage
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
            Enter the Nanoc site directory for which you want to use guard-nanoc. Create a Guardfile using `guard init`:
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
                $ bundle exec guard init nanoc
         
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
            Then run:
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
                $ bundle exec nanoc live
         
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
            This will start a web server, like `nanoc view` would, and watch for changes
         
     | 
| 
       38 
     | 
    
         
            -
            to the site in the background, like `guard start` would. Whenever you change
         
     | 
| 
       39 
     | 
    
         
            -
            a file in the Nanoc site directory now, the site will be recompiled!
         
     | 
| 
       40 
     | 
    
         
            -
            Visit `http://localhost:3000` in browser to see it. (In some cases, the port
         
     | 
| 
       41 
     | 
    
         
            -
            number might not be `3000`; check what `nanoc live` prints to find out
         
     | 
| 
       42 
     | 
    
         
            -
            the actual port number.)
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
            After editing and saving a file, `nanoc live` will recompile the site, but it
         
     | 
| 
       45 
     | 
    
         
            -
            is necessary to reload the page in the browser in order to see the new content
         
     | 
| 
       46 
     | 
    
         
            -
            that is served by `nanoc live`.
         
     | 
| 
      
 3 
     | 
    
         
            +
            This project is deprecated in favor of [Nanoc’s built-in live recompilation](https://nanoc.app/doc/sites/#live-recompilation).
         
     | 
    
        data/guard-nanoc.gemspec
    CHANGED
    
    | 
         @@ -1,11 +1,11 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            require_relative ' 
     | 
| 
      
 3 
     | 
    
         
            +
            require_relative 'lib/guard/nanoc/version'
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       6 
6 
     | 
    
         
             
              s.name          = 'guard-nanoc'
         
     | 
| 
       7 
7 
     | 
    
         
             
              s.version       = Guard::GUARD_NANOC_VERSION
         
     | 
| 
       8 
     | 
    
         
            -
              s.homepage      = 'https://nanoc. 
     | 
| 
      
 8 
     | 
    
         
            +
              s.homepage      = 'https://nanoc.app/'
         
     | 
| 
       9 
9 
     | 
    
         
             
              s.summary       = 'guard gem for Nanoc'
         
     | 
| 
       10 
10 
     | 
    
         
             
              s.description   = 'Automatically rebuilds Nanoc sites'
         
     | 
| 
       11 
11 
     | 
    
         
             
              s.license       = 'MIT'
         
     | 
| 
         @@ -13,6 +13,8 @@ Gem::Specification.new do |s| 
     | 
|
| 
       13 
13 
     | 
    
         
             
              s.author        = 'Denis Defreyne'
         
     | 
| 
       14 
14 
     | 
    
         
             
              s.email         = 'denis.defreyne@stoneship.org'
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
      
 16 
     | 
    
         
            +
              s.required_ruby_version = '>= 3.2'
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
       16 
18 
     | 
    
         
             
              s.add_dependency 'guard', '~> 2.8'
         
     | 
| 
       17 
19 
     | 
    
         
             
              s.add_dependency 'guard-compat', '~> 1.0'
         
     | 
| 
       18 
20 
     | 
    
         
             
              s.add_dependency 'nanoc-cli', '~> 4.11', '>= 4.11.14'
         
     | 
| 
         @@ -20,4 +22,8 @@ Gem::Specification.new do |s| 
     | 
|
| 
       20 
22 
     | 
    
         | 
| 
       21 
23 
     | 
    
         
             
              s.files         = Dir['[A-Z]*'] + Dir['lib/**/*'] + ['guard-nanoc.gemspec']
         
     | 
| 
       22 
24 
     | 
    
         
             
              s.require_paths = ['lib']
         
     | 
| 
      
 25 
     | 
    
         
            +
              s.metadata = {
         
     | 
| 
      
 26 
     | 
    
         
            +
                'rubygems_mfa_required' => 'true',
         
     | 
| 
      
 27 
     | 
    
         
            +
                'source_code_uri' => "https://github.com/nanoc/nanoc/tree/#{s.name}-v#{s.version}/#{s.name}",
         
     | 
| 
      
 28 
     | 
    
         
            +
              }
         
     | 
| 
       23 
29 
     | 
    
         
             
            end
         
     | 
| 
         @@ -8,10 +8,10 @@ description <<~EOS 
     | 
|
| 
       8 
8 
     | 
    
         
             
              two commands for details. The options are forwarded to `nanoc view` only.
         
     | 
| 
       9 
9 
     | 
    
         
             
            EOS
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
            flag 
     | 
| 
      
 11 
     | 
    
         
            +
            option :H, :handler,       'specify the handler to use (webrick/puma/...)', argument: :required
         
     | 
| 
      
 12 
     | 
    
         
            +
            option :o, :host,          'specify the host to listen on', default: '127.0.0.1', argument: :required
         
     | 
| 
      
 13 
     | 
    
         
            +
            option :p, :port,          'specify the port to listen on', transform: Nanoc::CLI::Transform::Port, default: 3000, argument: :required
         
     | 
| 
      
 14 
     | 
    
         
            +
            flag   :L, :'live-reload', 'reload on changes'
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
            module Guard
         
     | 
| 
       17 
17 
     | 
    
         
             
              class Nanoc
         
     | 
    
        data/lib/guard/nanoc/version.rb
    CHANGED
    
    
    
        data/lib/guard/nanoc.rb
    CHANGED
    
    | 
         @@ -57,7 +57,7 @@ module Guard 
     | 
|
| 
       57 
57 
     | 
    
         | 
| 
       58 
58 
     | 
    
         
             
                def recompile
         
     | 
| 
       59 
59 
     | 
    
         
             
                  # Necessary, because forking and threading don’t work together.
         
     | 
| 
       60 
     | 
    
         
            -
                  ::Nanoc::Core::NotificationCenter. 
     | 
| 
      
 60 
     | 
    
         
            +
                  ::Nanoc::Core::NotificationCenter.reset
         
     | 
| 
       61 
61 
     | 
    
         | 
| 
       62 
62 
     | 
    
         
             
                  Dir.chdir(@dir) do
         
     | 
| 
       63 
63 
     | 
    
         
             
                    site = ::Nanoc::Core::SiteLoader.new.new_from_cwd
         
     | 
| 
         @@ -81,6 +81,6 @@ module Guard 
     | 
|
| 
       81 
81 
     | 
    
         
             
              end
         
     | 
| 
       82 
82 
     | 
    
         
             
            end
         
     | 
| 
       83 
83 
     | 
    
         | 
| 
       84 
     | 
    
         
            -
             
     | 
| 
       85 
     | 
    
         
            -
               
     | 
| 
      
 84 
     | 
    
         
            +
            Nanoc::CLI.after_setup do
         
     | 
| 
      
 85 
     | 
    
         
            +
              Nanoc::CLI.add_command(Guard::Nanoc.live_cmd)
         
     | 
| 
       86 
86 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: guard-nanoc
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.1.10
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Denis Defreyne
         
     | 
| 
       8 
     | 
    
         
            -
            autorequire: 
         
     | 
| 
       9 
8 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
9 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 10 
     | 
    
         
            +
            date: 1980-01-02 00:00:00.000000000 Z
         
     | 
| 
       12 
11 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
12 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
13 
     | 
    
         
             
              name: guard
         
     | 
| 
         @@ -94,11 +93,12 @@ files: 
     | 
|
| 
       94 
93 
     | 
    
         
             
            - lib/guard/nanoc/live_command.rb
         
     | 
| 
       95 
94 
     | 
    
         
             
            - lib/guard/nanoc/templates/Guardfile
         
     | 
| 
       96 
95 
     | 
    
         
             
            - lib/guard/nanoc/version.rb
         
     | 
| 
       97 
     | 
    
         
            -
            homepage: https://nanoc. 
     | 
| 
      
 96 
     | 
    
         
            +
            homepage: https://nanoc.app/
         
     | 
| 
       98 
97 
     | 
    
         
             
            licenses:
         
     | 
| 
       99 
98 
     | 
    
         
             
            - MIT
         
     | 
| 
       100 
     | 
    
         
            -
            metadata: 
     | 
| 
       101 
     | 
    
         
            -
             
     | 
| 
      
 99 
     | 
    
         
            +
            metadata:
         
     | 
| 
      
 100 
     | 
    
         
            +
              rubygems_mfa_required: 'true'
         
     | 
| 
      
 101 
     | 
    
         
            +
              source_code_uri: https://github.com/nanoc/nanoc/tree/guard-nanoc-v2.1.10/guard-nanoc
         
     | 
| 
       102 
102 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       103 
103 
     | 
    
         
             
            require_paths:
         
     | 
| 
       104 
104 
     | 
    
         
             
            - lib
         
     | 
| 
         @@ -106,15 +106,14 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       106 
106 
     | 
    
         
             
              requirements:
         
     | 
| 
       107 
107 
     | 
    
         
             
              - - ">="
         
     | 
| 
       108 
108 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       109 
     | 
    
         
            -
                  version: ' 
     | 
| 
      
 109 
     | 
    
         
            +
                  version: '3.2'
         
     | 
| 
       110 
110 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       111 
111 
     | 
    
         
             
              requirements:
         
     | 
| 
       112 
112 
     | 
    
         
             
              - - ">="
         
     | 
| 
       113 
113 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       114 
114 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       115 
115 
     | 
    
         
             
            requirements: []
         
     | 
| 
       116 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
       117 
     | 
    
         
            -
            signing_key: 
         
     | 
| 
      
 116 
     | 
    
         
            +
            rubygems_version: 3.7.2
         
     | 
| 
       118 
117 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       119 
118 
     | 
    
         
             
            summary: guard gem for Nanoc
         
     | 
| 
       120 
119 
     | 
    
         
             
            test_files: []
         
     |