rggen-core 0.35.0 → 0.35.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad164f2506fbd5c91ea5a9340bc69e6fd492b628b38e12a87de290bea0ab6596
4
- data.tar.gz: a57b33a6aff4642c98397bbcf6cf1d680cf899cfe83d0eca0dc552b085771ada
3
+ metadata.gz: 127a46276088a42e18ba57a8ec17490022272fae9fba417d9e6f78ec16f7c098
4
+ data.tar.gz: 5b0717f63bc0b99204774b3ad6a999ca06dc5fdd7f13e6bbe21d70d3db174e61
5
5
  SHA512:
6
- metadata.gz: a6829f31ec7048843959afa0a84ef5980cc9a4bb8c4d792b631c658ea782ce8433fe46b9cc0cb76310c61b0a5aeaeb44757c845e87ed8a541f75033ba915d27f
7
- data.tar.gz: f204f714996fac3302b7638bbdc7e7f83a3a4921e13ebec6c195a09dfdcddc9e1dcfb73cb9b310e092b6c26773de04ffdd3cd61a2b70c2750175412be88e1fd5
6
+ metadata.gz: 7813bd44c864085a417757ae18ef84c4213c5ddb3363bc82f27eed34df43202416547347b6a9c42cac8b11f595992f76f511b2919163e2861be5029a29c54dbd
7
+ data.tar.gz: 1767cf1b967b54979f82529c2bef9b3dda5d4ce62b2981bcd60a6b5be0f5819c210928ca36f641f9630a2e3d5de8db255de1883594edcd912f6724942b452bc8
@@ -141,8 +141,10 @@ module RgGen
141
141
  end
142
142
 
143
143
  def list_feature?(list_name, feature_name)
144
- @feature_entries[list_name]&.match_entry_type?(:list) &&
145
- @feature_entries[list_name]&.feature?(feature_name) || false
144
+ entry = @feature_entries[list_name]
145
+ return false unless entry
146
+
147
+ entry.match_entry_type?(:list) && entry.feature?(feature_name)
146
148
  end
147
149
  end
148
150
  end
@@ -137,9 +137,12 @@ module RgGen
137
137
  end
138
138
 
139
139
  def find_gemspec_by_name(name, version)
140
- Gem::Specification
141
- .find_all_by_name(name, version)
142
- .find { |s| !s.has_conflicts? }
140
+ specs = Gem::Specification.find_all_by_name(name, version)
141
+
142
+ spec = specs.find(&:activated?)
143
+ return spec if spec
144
+
145
+ specs.find { |spec| !spec.has_conflicts? }
143
146
  end
144
147
 
145
148
  def find_gemspec_by_path(path)
@@ -167,10 +170,12 @@ module RgGen
167
170
  end
168
171
 
169
172
  def plugins_from_env
173
+ return unless ENV.key?('RGGEN_PLUGINS')
174
+
170
175
  ENV['RGGEN_PLUGINS']
171
- &.split(':')
172
- &.reject(&:blank?)
173
- &.map { |entry| entry.split(',', 2) }
176
+ .split(':')
177
+ .reject(&:blank?)
178
+ .map { |entry| entry.split(',', 2) }
174
179
  end
175
180
 
176
181
  def do_normal_activation
@@ -17,8 +17,8 @@ module RgGen
17
17
  private
18
18
 
19
19
  def template(path)
20
- @templates ||= {}
21
- (@templates[path] ||= parse_template(path))
20
+ @templates ||= Hash.new { |h, k| h[k] = parse_template(k) }
21
+ @templates[path]
22
22
  end
23
23
  end
24
24
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module RgGen
4
4
  module Core
5
- VERSION = '0.35.0'
5
+ VERSION = '0.35.1'
6
6
  MAJOR, MINOR, PATCH = VERSION.split('.').map(&:to_i)
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rggen-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.35.0
4
+ version: 0.35.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taichi Ishitani
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-02-19 00:00:00.000000000 Z
10
+ date: 2025-07-21 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: docile
@@ -207,5 +207,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  requirements: []
208
208
  rubygems_version: 3.6.2
209
209
  specification_version: 4
210
- summary: rggen-core-0.35.0
210
+ summary: rggen-core-0.35.1
211
211
  test_files: []