bozo-scripts 0.4.0 → 0.4.1

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
- NjA3NmRhYmIwYmI5ZWI0MjZlMTUwNGE4ZWFjM2QzYzVmMzkxZWNiZA==
4
+ ZTdmZmM2NWE5NGQ4NzhkMDkwNDFhNTllOTEyZjU0MTVmYmIwNDA1ZQ==
5
5
  data.tar.gz: !binary |-
6
- ZDA5ODczMWQ3M2Y2ZDcwMjQ2ZWU1MGU1YzgyNjIzZDZhNTRiMjRhYg==
6
+ NmJlMDJiYzgzZTEyYTQxZjg0NTI1NjJmODExOTEyMTJjYWMxYTIwNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NThiY2FmMzZmOTI1OTU4ZmQwMGFlNGQxNzdjM2E3NGY5ZDI0MjkyZjFlZDU3
10
- ZDlkZjMyODljOTUxYmFjM2RiY2RhMmFkOTljNzk5OGQ2MDg5OTg4MmIyMGJh
11
- Zjc1M2IyMDVkOGUxMWMxNGJjZTlkOWNiN2Q2MTQ2MmI3NTIxYmI=
9
+ OWJhOWQyMzJlZTViZDZlNDlkZTJhYzZkMjQ1NjQ1MTk3YTZhZGFiMWNiMzYz
10
+ OTcxZTAxOTIwNWVlMDg5NWIyNmZiZmVlZjgwZjc5N2VhMDY4OTQ5YWJiM2U4
11
+ OTAxYTkyNzc0YTZiYzNiOTU0NTIxYjAxOTM0NjA1MjE3MDFkZjU=
12
12
  data.tar.gz: !binary |-
13
- MDZlMzNkOTg3ZGVlMGZjYmQzNGVjY2Q3MmY4ZGI5MzdkYWUzYzE3N2NhMzdh
14
- OTg1MWJjNjEwMmVjZWEyYmY2Zjk3YTI1MGFiNjg1ZWEwYzRkOTM0OWFkNzE0
15
- YWFiNGQxNjgxYWI3NGRkYjE3ZGExZGY3NmNhNmM1NTg3MGI4OTk=
13
+ N2MxMjY1NmMzZTA0MDE3MjZhYTU1MTc3Mzc5ZGY3ZjU1MjlkN2NhY2RjNWY1
14
+ OWQxNTY2OTViNjBmYTQ1ZjJiYTVhMTdjMzI5MzgyMjBlZTlmMmU0MjU1YjMy
15
+ ZGJkMTdlMTMxMmEzM2I5ZTAzZTIxYjY1YjE4NTI2YzA5ODZkZTQ=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -22,6 +22,7 @@ module Bozo::Preparers
22
22
  # t.config_path 'somewhere' # defaults to 'config' if not specified
23
23
  # t.config_file 'my/specific/file.rb' # must be a specific file
24
24
  # t.template_files 'src/**/*.config.template' # can use glob format
25
+ # t.exclude_files 'src/**/obj/*' # can exclude specific files
25
26
  # end
26
27
  #
27
28
  # Source files are expected to have an additional extension compared to the
@@ -69,6 +70,7 @@ module Bozo::Preparers
69
70
  @config_path = 'config'
70
71
  @template_globs = []
71
72
  @config_files = []
73
+ @exclude_globs = []
72
74
  end
73
75
 
74
76
  # Sets the path of the directory within which the preparer should look for
@@ -97,6 +99,15 @@ module Bozo::Preparers
97
99
  @template_globs << glob
98
100
  end
99
101
 
102
+ # Adds a set of templates files from which to exclude from templating.
103
+ #
104
+ # @param [String] glob
105
+ # A glob that points to a set of files that should be excluded from
106
+ # the templating engine.
107
+ def exclude_files(glob)
108
+ @exclude_globs << glob
109
+ end
110
+
100
111
  # Generate all the files matching the configuration.
101
112
  def execute
102
113
  log_info '' # formatting
@@ -142,8 +153,12 @@ module Bozo::Preparers
142
153
 
143
154
  # Adds the templates to the templating coordinator.
144
155
  def add_templates(coordinator)
156
+ exclude = @exclude_globs.map { |glob| Dir[glob] }.flatten
157
+
145
158
  @template_globs.each do |glob|
146
- coordinator.template_files glob
159
+ Dir[glob].each do |file|
160
+ coordinator.template_file file unless exclude.include?(file)
161
+ end
147
162
  end
148
163
  end
149
164
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bozo-scripts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garry Shutler