rb_gemspec 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 88abf3b2cf42434abc805e655339ccb88abdb734
4
+ data.tar.gz: 38f59ab024971e5c98a2115f663f01aac67e82d0
5
+ SHA512:
6
+ metadata.gz: 5e1c5601e519ab0171494fa4b31d7205f0b1ae0418622ccb3f57e0ae8ed90f3db9ecf82410493b7baae5703d38c562683fc9d7c9e2c548cb8d0982e98ac52a76
7
+ data.tar.gz: f8424543244cf39efb433645a0dc3218b5798d18fb444ddb0dc1c105b6ef744aa5c026fd3f443f65ed3699d6e9594d14d79b6336b6798c1a11c5b600411c8357
@@ -0,0 +1,23 @@
1
+ module Gemspec
2
+ class Metadata
3
+ # @param lib_name [String]
4
+ def initialize(lib_name)
5
+ @lib_name = lib_name
6
+ end
7
+
8
+ # @return [Hash]
9
+ def read
10
+ @_read ||= (
11
+ path = "#{__dir__}/../../#{@lib_name}.gemspec"
12
+
13
+ # Development.
14
+ if File.exist?(path)
15
+ Gem::Specification::load(path)
16
+ # Production.
17
+ else
18
+ Gem::Specification::find_by_name(@lib_name) rescue nil
19
+ end
20
+ )
21
+ end
22
+ end
23
+ end
data/src/rb_gemspec.rb ADDED
@@ -0,0 +1,4 @@
1
+ Dir.glob(
2
+ File.join(__dir__, "gemspec", "*.rb"),
3
+ &method(:require)
4
+ )
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rb_gemspec
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Aurélien Delogu
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-01-06 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email: aurelien.delogu@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - src/gemspec/metadata.rb
20
+ - src/rb_gemspec.rb
21
+ homepage:
22
+ licenses: []
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - src
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.6.14.4
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Gemspec helper
44
+ test_files: []