Skip to content

Use $XDG_CONFIG_HOME to load config#119

Open
kamilachludzinska-dev wants to merge 8 commits into
svenfuchs:masterfrom
kamilachludzinska-dev:master
Open

Use $XDG_CONFIG_HOME to load config#119
kamilachludzinska-dev wants to merge 8 commits into
svenfuchs:masterfrom
kamilachludzinska-dev:master

Conversation

@kamilachludzinska-dev

Copy link
Copy Markdown

Config::Files was only using hardcoded paths from a constant PATHS.
XDG Base Directory standard suggests that user-specific configuration should be written to $XDG_CONFIG_HOME.
Use $XDG_CONFIG_HOME, so that user can store files where they prefer (under version control etc.).

@PikachuEXE

Copy link
Copy Markdown
Collaborator

I am just a helper so it requires @svenfuchs to approve this change
But let's get those spec fixed first

Comment thread .gitignore
@kamilachludzinska-dev

Copy link
Copy Markdown
Author

Hi @PikachuEXE,

I think I fixed the issue. I also added info in README.md. Can you please run CI again?

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 94.025% (+0.04%) from 93.988% — kamilachludzinska-dev:master into svenfuchs:master

@coveralls

coveralls commented May 9, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 94.025% (+0.04%) from 93.988% — kamilachludzinska-dev:master into svenfuchs:master

@PikachuEXE PikachuEXE left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also spec fail in some ruby versions?

Comment thread README.md.erb Outdated
Comment on lines 48 to 53
* `~/.gem_release/config.yml`
* `~/.gem_release.yml`
* `$XDG_CONFIG_HOME/.gem_release/config.yml`
* `$XDG_CONFIG_HOME/.gem_release.yml`
* `./.gem_release/config.yml`
* `./.gem_release.yml`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be a good time to specify the order (local > XDG > global
Not sure how to word it exactly but since we have 3 places now better to spell it out

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PikachuEXE, I changed the hardcoded list of config file locations to code execution. Let me know what you think.

Could you also run tests again, please? I find it hard to reproduce locally. Ruby 2.3 is ancient by now. ;)

@PikachuEXE

Copy link
Copy Markdown
Collaborator

Yup I don't know which part of the code is wrong

@PikachuEXE

Copy link
Copy Markdown
Collaborator

Some tests failed, fix them when you are available~

@kamilachludzinska-dev

Copy link
Copy Markdown
Author

I should have time this weekend to look into this, but so far I don't have local repro. :(

I'll let you know when I have something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants