stibium-bundled 0.0.4 → 0.0.5
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 +4 -4
- data/README.md +9 -3
- data/lib/stibium/bundled/bundle/config/reader.rb +5 -1
- data/lib/stibium/bundled/version.yml +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07b95bed1d5e25b2e7643cd39dad69c98b29d7c890ef4d8438e9f1d2464b97dc
|
4
|
+
data.tar.gz: c88884879dc4c99f53616d7cc37c8549b0fde70bd746c29c30ff215a6fb41206
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31d41d66a2011c50a70d2b0e6bf48661456bb5207a02ee31bf9e2c07afb91126e4158cbf736b8502945bcbae549206fe60bc5caee0655a20fb2658efffd1308f
|
7
|
+
data.tar.gz: 2cb77bc217b3b140f589374e27e7b3068058412b1e6bf978855ff8bc50a8bd3ad0fb46f1b143fd9de994eda5b5330e71f0612cf0761850281ff3ecbee47096c9
|
data/README.md
CHANGED
@@ -68,13 +68,19 @@ locate it:
|
|
68
68
|
```ruby
|
69
69
|
# file: lib/awesome_gem.rb
|
70
70
|
|
71
|
+
autoload(:Pathname, 'pathname')
|
72
|
+
autoload(:RbConfig, 'rbconfig')
|
73
|
+
|
71
74
|
module AwesomeGem
|
72
|
-
Pathname.new("#{__dir__}/..").expand_path.
|
75
|
+
Pathname.new("#{__dir__}/..").expand_path.yield_self do |basedir|
|
73
76
|
begin
|
74
77
|
require 'stibium/bundled'
|
75
78
|
rescue LoadError
|
76
|
-
|
77
|
-
|
79
|
+
[
|
80
|
+
[RUBY_ENGINE, RbConfig::CONFIG.fetch('ruby_version'), 'bundler/gems/*/stibium-bundled.gemspec'],
|
81
|
+
[RUBY_ENGINE, RbConfig::CONFIG.fetch('ruby_version'), 'gems/stibium-bundled-*/lib/'],
|
82
|
+
].map { |parts| basedir.join(*['{**/,}bundle'].concat(parts)) }.yield_self do |patterns|
|
83
|
+
Pathname.glob(patterns).first&.dirname.tap { |gem_dir| require gem_dir.join('lib/stibium/bundled') }
|
78
84
|
end
|
79
85
|
end
|
80
86
|
|
@@ -41,12 +41,16 @@ class Stibium::Bundled::Bundle::Config::Reader
|
|
41
41
|
#
|
42
42
|
# @param file [Pathname]
|
43
43
|
#
|
44
|
+
# @raise [RuntimeError]
|
44
45
|
# @return [Hash{String => Object}]
|
45
46
|
def scrutinize(file)
|
46
47
|
return {} if ignore_config?
|
47
48
|
|
48
49
|
return {} unless file.file? and file.readable?
|
49
50
|
|
50
|
-
file.read
|
51
|
+
file.read
|
52
|
+
.yield_self { |content| YAML.safe_load(content) }
|
53
|
+
.yield_self { |result| result.nil? ? {} : result }
|
54
|
+
.tap { |result| raise RuntimeError, "Hash expected, got #{result.class}" unless result.is_a?(Hash) }
|
51
55
|
end
|
52
56
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
---
|
2
2
|
major: 0
|
3
3
|
minor: 0
|
4
|
-
patch:
|
4
|
+
patch: 5
|
5
5
|
authors: ['Dimitri Arrigoni']
|
6
6
|
email: 'dimitri@arrigoni.me'
|
7
|
-
date: '2021-02-
|
7
|
+
date: '2021-02-09'
|
8
8
|
summary: 'Denote bundle state'
|
9
9
|
description: 'Denote bundle state and (optionally) load bundler/setup according to the configuration.'
|
10
10
|
homepage: 'https://github.com/SwagDevOps/stibium-bundled'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stibium-bundled
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitri Arrigoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Denote bundle state and (optionally) load bundler/setup according to
|
14
14
|
the configuration.
|