puppet-syntax 1.2.3 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ 2014-08-07 Release 1.3.0
2
+ - Add the ability to pass hieradata_paths array of globs to check
3
+ - Check hieradata in modules ('**/data/**/*.yaml') by default
4
+
1
5
  2014-08-05 Release 1.2.3
2
6
  - Fix puppetlabs_spec_helper warning on Ruby 1.8
3
7
 
data/README.md CHANGED
@@ -61,6 +61,9 @@ When you are using a Puppet version greater then 3.2, you can select the future
61
61
 
62
62
  PuppetSyntax.future_parser = true
63
63
 
64
+ If you are using some form of hiera data inside your module, you can configure where the `syntax:hiera:yaml` task looks for data with:
65
+
66
+ PuppetSyntax.hieradata_paths = ["**/data/**/*.yaml", "hieradata/**/*.yaml", "hiera*.yaml"]
64
67
 
65
68
  ## Installation
66
69
 
@@ -5,7 +5,7 @@ require "puppet-syntax/hiera"
5
5
 
6
6
  module PuppetSyntax
7
7
  class << self
8
- attr_accessor :exclude_paths, :future_parser
8
+ attr_accessor :exclude_paths, :future_parser, :hieradata_paths
9
9
 
10
10
  def exclude_paths
11
11
  @exclude_paths || []
@@ -14,5 +14,9 @@ module PuppetSyntax
14
14
  def future_parser
15
15
  @future_parser || false
16
16
  end
17
+
18
+ def hieradata_paths
19
+ @hieradata_paths || ["**/data/**/*.yaml", "hieradata/**/*.yaml", "hiera*.yaml"]
20
+ end
17
21
  end
18
22
  end
@@ -60,7 +60,7 @@ to puppetlabs_spec_helper >= 0.8.0 which now uses puppet-syntax.
60
60
  namespace :hiera do
61
61
  task :yaml do |t|
62
62
  $stderr.puts "---> #{t.name}"
63
- files = FileList["hieradata/**/*.yaml", "hiera*.yaml"]
63
+ files = FileList.new(PuppetSyntax.hieradata_paths)
64
64
  files.reject! { |f| File.directory?(f) }
65
65
  files = files.exclude(*PuppetSyntax.exclude_paths)
66
66
 
@@ -1,3 +1,3 @@
1
1
  module PuppetSyntax
2
- VERSION = "1.2.3"
2
+ VERSION = "1.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-syntax
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.3.0
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: 2014-08-06 00:00:00.000000000 Z
12
+ date: 2014-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -115,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
115
  version: '0'
116
116
  segments:
117
117
  - 0
118
- hash: 4509301081168867953
118
+ hash: 2583985716201075116
119
119
  required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  none: false
121
121
  requirements:
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  version: '0'
125
125
  segments:
126
126
  - 0
127
- hash: 4509301081168867953
127
+ hash: 2583985716201075116
128
128
  requirements: []
129
129
  rubyforge_project:
130
130
  rubygems_version: 1.8.23