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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: db110ace31f8a0679597105e5c39b515e81dfa5b
4
- data.tar.gz: 70cd828d3282e53ee84a111d888317b9f3426a1f
2
+ SHA256:
3
+ metadata.gz: acd8a4936db77dd749853e4acafb77c085a1dcc850fc2f05765f81a3b5062c47
4
+ data.tar.gz: 0c4eec47b3067dfc911819a8f0d73b883ea6dfa28882c3abecdba01f577bb095
5
5
  SHA512:
6
- metadata.gz: 32363bef14842d8f60428757684cc25d4fa8242d2d2407f47426e250a8c99498111bdc3506e94770f62ff886f7a372abff5c64de5358152dda74f7bac1590534
7
- data.tar.gz: 1f0319322958462d6203e2cb5673b91e58f5c1d7f890b4db3a27095204f2c71d5b9a6568d3fa420de25ce2e7ebe1e3ead299ed15396eb5878885e3359b6e70bf
6
+ metadata.gz: fd269c773287b32e7420552b595134d5405c0d7954377fc23e76bada75b61308de2f801369f12a70197add6a40346c41ec0f50ce5fcc37a4336d4334028423a5
7
+ data.tar.gz: 77e1e1c98b11647d59647369576b9c72713bf39ce03cbb21c28bccb1cf3e62217f3af7722e79c75c1c0431ee80a011461b2b67504c46ff829a33b7953d5bf342
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.1
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.3.1
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://secure.travis-ci.org/realityforge/reality-generators.svg?branch=master)](http://travis-ci.org/realityforge/reality-generators)
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
- Generators.debug "Removing #{file} as no longer generated"
70
- FileUtils.rm_f file
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
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{reality-generators}
5
- s.version = '1.15.0'
5
+ s.version = '1.16.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.15.0
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: 2019-05-06 00:00:00.000000000 Z
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
- rubyforge_project:
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.