reality-generators 1.20.0 → 1.22.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca1b20beebe092fd1966b84a2446b31aa22eb5531dee6976906a022930a1dc9c
|
4
|
+
data.tar.gz: 2b61fadb43193f400dd8e25db27f64836f5e29c76f3220de7f01dd4344beeb87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa60f23b7ecffca2c87e8ac5f7328974c44738c18ae47d06ff6edda7283286617ae4713936e84bcc91db0a794511ca8dd992542c54a228441dc4df17f6440d68
|
7
|
+
data.tar.gz: 12d9ac6d0c823ebd82c809bc4ba529d54e5e571b22c8c42a18baed97fa1daff559aa2043d0a257b2748bf1ad1ed69da6c23136b34b61359a1568f58be5467a83
|
@@ -19,13 +19,17 @@ module Reality #nodoc
|
|
19
19
|
# This method is called from a Rake or Buildr task to configure the Buildr
|
20
20
|
# project so that it knows the location of all the generated artifacts and
|
21
21
|
# adds them to the appropriate compile paths etc.
|
22
|
-
def configure_buildr_project(buildr_project, generator_task, templates, target_dir, mark_as_generated_in_ide)
|
22
|
+
def configure_buildr_project(buildr_project, generator_task, templates, target_dir, mark_as_generated_in_ide, clean_files = true)
|
23
23
|
if buildr_project.nil?
|
24
|
-
|
25
|
-
|
24
|
+
if clean_files
|
25
|
+
task('clean') do
|
26
|
+
rm_rf target_dir
|
27
|
+
end
|
26
28
|
end
|
27
29
|
else
|
28
|
-
|
30
|
+
if clean_files
|
31
|
+
buildr_project.clean { rm_rf target_dir }
|
32
|
+
end
|
29
33
|
file(File.expand_path(target_dir) => [generator_task])
|
30
34
|
|
31
35
|
# Is there java source generated in project?
|
@@ -49,6 +49,8 @@ module Reality #nodoc
|
|
49
49
|
if target_dir.nil? && !buildr_project.nil?
|
50
50
|
if clean_generated_files
|
51
51
|
target_dir = buildr_project._(:target, :generated, self.generated_type_path_prefix, build_key)
|
52
|
+
elsif buildr_project.inline_generated_source?
|
53
|
+
target_dir = buildr_project._('src')
|
52
54
|
else
|
53
55
|
target_dir = buildr_project._(:srcgen, self.generated_type_path_prefix, build_key)
|
54
56
|
end
|
@@ -64,7 +66,7 @@ module Reality #nodoc
|
|
64
66
|
buildr_project.clean { rm_rf target_dir }
|
65
67
|
end
|
66
68
|
|
67
|
-
self.const_get(:GenerateTask).new(element_key, build_key, generator_keys, target_dir, buildr_project, &block)
|
69
|
+
self.const_get(:GenerateTask).new(element_key, build_key, generator_keys, target_dir, buildr_project, clean_generated_files, &block)
|
68
70
|
end
|
69
71
|
end
|
70
72
|
|
@@ -83,7 +85,7 @@ module Reality #nodoc
|
|
83
85
|
|
84
86
|
attr_reader :task_name
|
85
87
|
|
86
|
-
def initialize(root_element_key, key, generator_keys, target_dir, buildr_project = nil)
|
88
|
+
def initialize(root_element_key, key, generator_keys, target_dir, buildr_project = nil, clean_generated_files = true)
|
87
89
|
@root_element_key = root_element_key
|
88
90
|
@key = key
|
89
91
|
@generator_keys = generator_keys
|
@@ -92,11 +94,12 @@ module Reality #nodoc
|
|
92
94
|
# Turn on verbose messages if buildr is turned on tracing
|
93
95
|
@verbose = trace?
|
94
96
|
@mark_as_generated_in_ide = true
|
97
|
+
@clean_generated_files = clean_generated_files
|
95
98
|
@target_dir = target_dir
|
96
99
|
yield self if block_given?
|
97
100
|
define
|
98
101
|
@templates = self.template_set_container.generator.load_templates_from_template_sets(generator_keys)
|
99
|
-
Reality::Generators::Buildr.configure_buildr_project(buildr_project, task_name, @templates, target_dir, mark_as_generated_in_ide?)
|
102
|
+
Reality::Generators::Buildr.configure_buildr_project(buildr_project, task_name, @templates, target_dir, mark_as_generated_in_ide?, clean_generated_files?)
|
100
103
|
end
|
101
104
|
|
102
105
|
protected
|
@@ -155,6 +158,10 @@ module Reality #nodoc
|
|
155
158
|
!!@mark_as_generated_in_ide
|
156
159
|
end
|
157
160
|
|
161
|
+
def clean_generated_files?
|
162
|
+
!!@clean_generated_files
|
163
|
+
end
|
164
|
+
|
158
165
|
def verbose?
|
159
166
|
!!@verbose
|
160
167
|
end
|
data/reality-generators.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{reality-generators}
|
5
|
-
s.version = '1.
|
5
|
+
s.version = '1.22.0'
|
6
6
|
s.platform = Gem::Platform::RUBY
|
7
7
|
|
8
8
|
s.authors = ['Peter Donald']
|
@@ -19,8 +19,8 @@ Gem::Specification.new do |s|
|
|
19
19
|
|
20
20
|
s.rdoc_options = %w(--line-numbers --inline-source --title reality-generators)
|
21
21
|
|
22
|
-
s.add_dependency 'reality-core', '>= 1.
|
23
|
-
s.add_dependency 'reality-naming', '>= 1.
|
22
|
+
s.add_dependency 'reality-core', '>= 1.8.0'
|
23
|
+
s.add_dependency 'reality-naming', '>= 1.13.0'
|
24
24
|
|
25
25
|
s.add_development_dependency(%q<minitest>, ['= 5.9.1'])
|
26
26
|
s.add_development_dependency(%q<test-unit>, ['= 3.1.5'])
|
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.
|
4
|
+
version: 1.22.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:
|
11
|
+
date: 2024-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: reality-core
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.8.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.8.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: reality-naming
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.13.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.13.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|