middleman-navtree 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODU2MWQ2MmQ1OGFjNzcyOGJlOGM5MmIyODE1MWYxMDFhNTBjMTk2YQ==
4
+ ZTNhZGU3MjU2YmRkZmMzMWNkMGI2N2Q2NDNhYjFlZmJkYjhhYjQxZA==
5
5
  data.tar.gz: !binary |-
6
- OTBjMzgwM2Q2MDY0NDFiMzM2YmQ0YjQ2NmQ5ZDUyNzY0YmFiOWMwMg==
6
+ MGNlNTYxYTg1MzZkN2FjZmE3NDEyM2NlNDUxZTViMjU2MzgzOGMxNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDFiODRlYWEyZGRkMjliOTNkN2E3NzcxZDcwOWM4ZGEyZjYxOWM3MTc3ODhi
10
- MzZhYTdiYmU0MDljMjJlMjhhNjNmMGYxNjljOTI3ZDBkOTEwYTEwNGZmYzY4
11
- YzIxMGM0YzIwNzM3MWJkNWRhNTQwMWNkYmVmMWZmZDE4MzQwMDA=
9
+ MzViNmVhMDU1NmY2OWU4MzFiMzJkZjg1YTFiYTgyYTM4ZGY1NDUzMDQxNWYx
10
+ YzM2OTcwNTc0NjEwZmY4ZTUyZTgzNWJlMTg4ZDRjOWE2ZWZhNWVkOTE0MDc1
11
+ N2UzMDRlOWZjNjQ3YzM1NzZhZGRhM2JjYTllYmEwZjUyMmE3MzI=
12
12
  data.tar.gz: !binary |-
13
- NDk0MThlOGNiOGRmM2YzOTgyY2QyZTRiMDliNGJiYjQyMDNkYmYxZTM0Y2Yw
14
- MDQ4NGI5YjQyYjcwNGM1ZjQwMzIxYTQ3MmNhMTQzMzE4Y2I1NTgyMzBkN2Yx
15
- NjdkNjFiMWM3YTY5NGQ2OWJiYWUyNDg4NTE4YTJiZDg1NjllODE=
13
+ MmJmNjQyZTMzMGJhNjRmYmMzMzFkZDY1MmQ5OGY1ZmVkZDk0YzY5YmQzODYz
14
+ YTczZmViYzQ2MmU2YWM0OTE1ZjA4ZDBjZjNjZDM4MmYwODgxZDYwNzAyNTE4
15
+ YzkzMzM2MGIzM2JhMmY1NDE5OWQzOGU1OGYwOWZjYzdlNWQ5N2E=
data/README.md CHANGED
@@ -20,6 +20,7 @@ Alternatively, you can specify the options you want. Here's an example showing t
20
20
 
21
21
  activate :navtree do |options|
22
22
  options.data_file = 'tree.yml' # The data file where our navtree is stored.
23
+ options.automatic_tree_updates = true # The tree.yml file will be updated automatically when source files are changed.
23
24
  options.source_dir = 'source' # The `source` directory we want to represent in our nav tree.
24
25
  options.ignore_files = ['sitemap.xml', 'robots.txt'] # An array of files we want to ignore when building our tree.
25
26
  options.ignore_dir = ['assets'] # An array of directories we want to ignore when building our tree.
@@ -10,6 +10,7 @@ module Middleman
10
10
  # All the options for this extension
11
11
  option :source_dir, 'source', 'The directory our tree will begin at.'
12
12
  option :data_file, 'tree.yml', 'The file we will write our directory tree to.'
13
+ option :automatic_tree_updates, true, 'The tree.yml file will be updated automatically when source files are changed.'
13
14
  option :ignore_files, ['sitemap.xml', 'robots.txt'], 'A list of filenames we want to ignore when building our tree.'
14
15
  option :ignore_dir, ['assets'], 'A list of directory names we want to ignore when building our tree.'
15
16
  option :home_title, 'Home', 'The default link title of the home page (located at "/"), if otherwise not detected.'
@@ -51,8 +52,10 @@ module Middleman
51
52
  # Write our directory tree to file as YAML.
52
53
  # @todo: This step doesn't rebuild during live-reload, which causes errors if you move files
53
54
  # around during development. It may not be that hard to set up. Low priority though.
54
- data_path = app.settings.data_dir + '/' + options.data_file
55
- IO.write(data_path, YAML::dump(tree_hash))
55
+ if options.automatic_tree_updates
56
+ data_path = app.settings.data_dir + '/' + options.data_file
57
+ IO.write(data_path, YAML::dump(tree_hash))
58
+ end
56
59
  end
57
60
 
58
61
 
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module NavTree
3
- VERSION = "0.1.8"
3
+ VERSION = "0.1.9"
4
4
  end
5
5
  end
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "middleman-navtree"
6
- s.version = "0.1.8"
6
+ s.version = "0.1.9"
7
7
  s.licenses = ['MIT']
8
8
  s.date = Date.today.to_s
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-navtree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Braun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-19 00:00:00.000000000 Z
11
+ date: 2015-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core