gonfic 0.7.0 → 0.7.2

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: 5540b5acbed6a77e6822f0aea120d20cac396ec86c7011edf7b665fe82e2f96b
4
- data.tar.gz: e27a4fa9e41ae1696a14192835c5e31290a146dd3719708cf1bee481747c5c26
3
+ metadata.gz: 8f9ed08a92eaed71218c33c3e5fa10256d9db9e984abd4244adddb7a5cbb9928
4
+ data.tar.gz: e8c9c7f7e11a2babfe8cc2da87043ca33013a064b5e364f331964d7d3dad037c
5
5
  SHA512:
6
- metadata.gz: f5310196e4f2681a3f1b931101f7349782700b8b57666b517fc21625808f00272a41bf42a03f84692a4ca5caf0a1b05a58da249362bab242b14dad2565141b6e
7
- data.tar.gz: 70f3c1f5fe26fd365657b9480265cf8efbe5f9ff7f4a6eb9959cab6d95355d1312bd7dd88a5ede693f0539ff1b0a7b35be59bbfb1532fe0c49f1c09369819dc0
6
+ metadata.gz: 910e44d9e5b19c6868bf0d34ad4d3395307987d316b70b2f20de27f97ed6e794cdd3860458af50f4397a131d1441cc1c03693393d72c218a56d9678ddbd191b9
7
+ data.tar.gz: ddd57eeb63957aca9017ae1ac578516095d5fbe4ede40686a8d2790495cbb613be3718176f6d26e3a216119ea90e2eabf0ed0faa0d66ced70ef6ed310ac7985b
data/README.md CHANGED
@@ -124,6 +124,18 @@ You can also run `bin/console` for an interactive prompt that will allow you to
124
124
 
125
125
  To install this gem onto your local machine from sources, run `bundle exec rake install`.
126
126
 
127
+ ### Version bump
128
+
129
+ In `fish` syntax, even if you are on Windows:
130
+ ```sh
131
+ gem bump -v patch # or `minor`, or `major`; requires https://github.com/svenfuchs/gem-release
132
+ dos2unix (fd version.rb) # if you are using MinGW on Windows and suffer from CRLF
133
+ bundle install # to bump the version in Gemfile.lock
134
+ git commit -a --amend # add Gemfile.lock to the version bump
135
+ bundle exec rake # last minute sanity check
136
+ bundle exec rake release # push to RubyGems
137
+ ```
138
+
127
139
  ## Contributing
128
140
 
129
141
  Bug reports and merge requests are welcome on GitLab at https://gitlab.com/tanstaafl/gonfic.
@@ -1,3 +1,3 @@
1
1
  module Gonfic
2
- VERSION = '0.7.0'.freeze
2
+ VERSION = '0.7.2'.freeze
3
3
  end
data/lib/gonfic.rb CHANGED
@@ -7,7 +7,7 @@ require_relative 'gonfic/directories'
7
7
 
8
8
  # external interface to creating a Config with data loaded from files
9
9
  module Gonfic
10
- YAML_FILE_LOADER = ->(filename){ YAML.safe_load(File.read(filename)) }
10
+ YAML_FILE_LOADER = ->(filename){ YAML.safe_load(File.read(filename)) || {} }
11
11
 
12
12
  def self.new( # rubocop:disable Metrics/ParameterLists
13
13
  defaults: {}, file_loader: YAML_FILE_LOADER,
@@ -29,7 +29,7 @@ module Gonfic
29
29
  def self.join_into_paths(directories, filename)
30
30
  return [] unless directories && filename
31
31
 
32
- directories.map{ |directory| File.expand_path(File.join(directory, filename)) }
32
+ directories.map{ |directory| File.join(directory, filename) }
33
33
  end
34
34
 
35
35
  def self.configs_from_files(file_loader:, file_paths:)
@@ -41,6 +41,7 @@ module Gonfic
41
41
  end
42
42
 
43
43
  def self.load_configuration_file(filename, file_loader)
44
+ filename = File.expand_path(filename)
44
45
  return {} unless File.exist?(filename)
45
46
 
46
47
  file_loader.call(filename)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gonfic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Chludziński
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-04-07 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: hashie
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  requirements: []
64
- rubygems_version: 3.6.2
64
+ rubygems_version: 3.6.7
65
65
  specification_version: 4
66
66
  summary: Gonfic - merge config from ~/, ./, ENV, and OptionParser - access as Hashie::Mash.
67
67
  test_files: []