reality-generators 1.9.0 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e76ea1052bc46ab01b49553d2836611c6da83c1b
4
- data.tar.gz: d5e6e663a5580a87a61ace92b2836e440620187f
3
+ metadata.gz: 6322e54d0c9bacedc3edb469578c543d94dadebd
4
+ data.tar.gz: 7fb99a4f8c009f5bcd3be891caf512cc93788765
5
5
  SHA512:
6
- metadata.gz: 9c88db3db21c9c4c81c604043edd85df6681244cee76d95916d02767949a6c4cfbc9732d5ee6187935114bf1615aa31ac33c7fd75e7817528e548504f2a4273e
7
- data.tar.gz: 3b038a2cf2b0b66c936e9ba4f862cca89bf8eb93b5571d4e9b3a09e86271a092562fefe678607d60081e3b7fc3645edd651c2d3aee667f329bb7ff96575594cd
6
+ metadata.gz: 8ad82eca218ba25ceb6eae4d8febc07e97cac46e28d51cd3346268c8189de32997956d6957a878f5ca2a878c8228f0a0b08ddf41227dfb79d55c9a684d5ed8d7
7
+ data.tar.gz: 9be8bca65a4dd993d484368e47c0dab6e3b309a5a92eb7d070136681867fbe4123323036cc9e3f2c885d358d2c273cf16d36a3bc8970ee512ddba83b4ac37c8f
@@ -37,6 +37,7 @@ module Reality #nodoc
37
37
  # traverses all elements that are contained transitively by the root element.
38
38
  # The templates then generate files from traversed elements.
39
39
  def generate(element_type, element, directory, templates, filter)
40
+ templates = load_templates_from_template_sets(templates) if templates.any? {|t| t.is_a?(Symbol)}
40
41
  unprocessed_files = (Dir["#{directory}/**/*.*"] + Dir["#{directory}/**/*"]).uniq
41
42
 
42
43
  Generators.debug "Templates to process: #{templates.collect { |t| t.name }.inspect}"
@@ -79,13 +79,12 @@ module Reality #nodoc
79
79
  @generator_keys = generator_keys
80
80
  @namespace_key = self.default_namespace_key
81
81
  @filter = nil
82
- @template_map = {}
83
82
  # Turn on verbose messages if buildr is turned on tracing
84
83
  @verbose = trace?
85
84
  @target_dir = target_dir
86
85
  yield self if block_given?
87
86
  define
88
- @templates = self.generator_container.generator.load_templates_from_template_sets(generator_keys)
87
+ @templates = self.template_set_container.generator.load_templates_from_template_sets(generator_keys)
89
88
  Reality::Generators::Buildr.configure_buildr_project(buildr_project, task_name, @templates, target_dir)
90
89
  end
91
90
 
@@ -95,8 +94,8 @@ module Reality #nodoc
95
94
  Generators.error('default_namespace_key should be implemented')
96
95
  end
97
96
 
98
- def generator_container
99
- Generators.error('generator_container should be implemented')
97
+ def template_set_container
98
+ Generators.error('template_set_container should be implemented')
100
99
  end
101
100
 
102
101
  def root_element_type
@@ -160,7 +159,7 @@ module Reality #nodoc
160
159
  Reality::Generators::Logger,
161
160
  Reality::Facets::Logger) do
162
161
  self.log_container.info "Generator started: Generating #{self.generator_keys.inspect}"
163
- self.generator_container.generator.
162
+ self.template_set_container.generator.
164
163
  generate(self.root_element_type, self.root_element, self.target_dir, @templates, self.filter)
165
164
  end
166
165
  rescue Reality::Generators::GeneratorError => e
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{reality-generators}
5
- s.version = '1.9.0'
5
+ s.version = '1.10.0'
6
6
  s.platform = Gem::Platform::RUBY
7
7
 
8
8
  s.authors = ['Peter Donald']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reality-generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Donald
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-08 00:00:00.000000000 Z
11
+ date: 2017-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reality-core