reality-generators 1.15.0 → 1.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/.travis.yml +5 -1
- data/README.md +1 -1
- data/lib/reality/generators/generator.rb +7 -3
- data/reality-generators.gemspec +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: acd8a4936db77dd749853e4acafb77c085a1dcc850fc2f05765f81a3b5062c47
|
4
|
+
data.tar.gz: 0c4eec47b3067dfc911819a8f0d73b883ea6dfa28882c3abecdba01f577bb095
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd269c773287b32e7420552b595134d5405c0d7954377fc23e76bada75b61308de2f801369f12a70197add6a40346c41ec0f50ce5fcc37a4336d4334028423a5
|
7
|
+
data.tar.gz: 77e1e1c98b11647d59647369576b9c72713bf39ce03cbb21c28bccb1cf3e62217f3af7722e79c75c1c0431ee80a011461b2b67504c46ff829a33b7953d5bf342
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7.2
|
data/.travis.yml
CHANGED
@@ -1,10 +1,14 @@
|
|
1
|
+
# Lock down dist to ensure that builds run on a distribution that supports oraclejdk8
|
2
|
+
dist: trusty
|
1
3
|
language: ruby
|
2
4
|
rvm:
|
3
|
-
- 2.
|
5
|
+
- 2.7.2
|
4
6
|
- jruby-19mode
|
5
7
|
jdk:
|
6
8
|
- oraclejdk8
|
7
9
|
git:
|
8
10
|
depth: 10
|
9
11
|
before_install:
|
12
|
+
- rvm install ruby-2.7.2
|
13
|
+
- rvm use 2.7.2
|
10
14
|
- gem update bundler
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# reality-generators
|
2
2
|
|
3
|
-
[![Build Status](https://
|
3
|
+
[![Build Status](https://api.travis-ci.com/realityforge/reality-generators.svg?branch=master)](http://travis-ci.com/realityforge/reality-generators)
|
4
4
|
|
5
5
|
A basic toolkit for abstracting the generation of files from model objects. These classes
|
6
6
|
were extracted from several existing toolkits, primarily [Domgen](https://github.com/realityforge/domgen).
|
@@ -36,7 +36,7 @@ module Reality #nodoc
|
|
36
36
|
# The traversal starts from a root element of specified element_type and
|
37
37
|
# traverses all elements that are contained transitively by the root element.
|
38
38
|
# The templates then generate files from traversed elements.
|
39
|
-
def generate(element_type, element, directory, templates, filter)
|
39
|
+
def generate(element_type, element, directory, templates, filter, keep_filter = nil)
|
40
40
|
templates = load_templates_from_template_sets(templates) if templates.any? {|t| t.is_a?(Symbol) || t.is_a?(String)}
|
41
41
|
unprocessed_files = (Dir["#{directory}/**/*.*"] + Dir["#{directory}/**/*"]).uniq
|
42
42
|
|
@@ -66,8 +66,12 @@ module Reality #nodoc
|
|
66
66
|
FileUtils.rmdir file
|
67
67
|
end
|
68
68
|
else
|
69
|
-
|
70
|
-
|
69
|
+
if keep_filter && keep_filter.call(file)
|
70
|
+
Generators.debug "Keeping #{file} that is not generated as it matches the keep filter"
|
71
|
+
else
|
72
|
+
Generators.debug "Removing #{file} as no longer generated"
|
73
|
+
FileUtils.rm_f file
|
74
|
+
end
|
71
75
|
end
|
72
76
|
end
|
73
77
|
|
data/reality-generators.gemspec
CHANGED
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.16.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: 2023-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: reality-core
|
@@ -137,8 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|
140
|
-
|
141
|
-
rubygems_version: 2.5.1
|
140
|
+
rubygems_version: 3.1.4
|
142
141
|
signing_key:
|
143
142
|
specification_version: 4
|
144
143
|
summary: A basic toolkit for abstracting the generation of files from model objects.
|