rails-diff 0.8.0 → 0.8.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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/rails/diff/version.rb +1 -1
- data/lib/rails/diff.rb +9 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ff8a56490563255cb68662a1f669ddaa9a0d07071c0216d24e650705f8a76f81
|
|
4
|
+
data.tar.gz: 8e5a5d304686fd37bdd09fb55906a407642279648ec9c7f582623bcfa6691314
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3bf5a8ac6e8e6c44141f0e7fdd510e8a5d2a34f4325731341b2311a5f01ffe37ae3983f88b5542bc5638396036bb3046269c4e8da60997e76480b0ca1aca7bc9
|
|
7
|
+
data.tar.gz: 46584a9a3a70f9bbbdbfc1e19727fbc5b56c7de39644d2585efe08edb420e4de89c6b75b1c2092af9af93da4be9b64916446049acb08e9515a28cdecac4514b4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.8.1] - 2026-06-16
|
|
4
|
+
|
|
5
|
+
- Respect the XDG Base Directory spec for the cache location. Cache now lives at `$XDG_CACHE_HOME/rails-diff` (defaulting to `~/.cache/rails-diff`) instead of `~/.rails-diff/cache`. The old cache directory is no longer used and can be removed (PR #37).
|
|
6
|
+
|
|
3
7
|
## [0.8.0] - 2026-03-26
|
|
4
8
|
|
|
5
9
|
- `--ref` now accepts `rails --version` output (e.g., `--ref "Rails 7.2.3"` is converted to `v7.2.3`).
|
|
@@ -80,6 +84,7 @@ M## [0.1.1] - 2025-02-21
|
|
|
80
84
|
|
|
81
85
|
- Initial release
|
|
82
86
|
|
|
87
|
+
[0.8.1]: https://github.com/matheusrich/rails-diff/releases/tag/v0.8.1
|
|
83
88
|
[0.8.0]: https://github.com/matheusrich/rails-diff/releases/tag/v0.8.0
|
|
84
89
|
[0.7.0]: https://github.com/matheusrich/rails-diff/releases/tag/v0.7.0
|
|
85
90
|
[0.6.0]: https://github.com/matheusrich/rails-diff/releases/tag/v0.6.0
|
data/lib/rails/diff/version.rb
CHANGED
data/lib/rails/diff.rb
CHANGED
|
@@ -13,9 +13,14 @@ require_relative "diff/version"
|
|
|
13
13
|
|
|
14
14
|
module Rails
|
|
15
15
|
module Diff
|
|
16
|
-
CACHE_DIR = File.expand_path("#{ENV["HOME"]}/.rails-diff/cache")
|
|
17
|
-
|
|
18
16
|
class << self
|
|
17
|
+
def cache_dir
|
|
18
|
+
xdg = ENV["XDG_CACHE_HOME"]
|
|
19
|
+
base = (xdg && File.absolute_path?(xdg)) ? xdg : File.join(Dir.home, ".cache")
|
|
20
|
+
|
|
21
|
+
File.join(base, "rails-diff")
|
|
22
|
+
end
|
|
23
|
+
|
|
19
24
|
def file(*files, no_cache: false, ref: nil, new_app_options: nil, app_generator: RailsAppGenerator.new(ref:, new_app_options:, no_cache:), differ_class: Difftastic::Differ)
|
|
20
25
|
app_generator.create_template_app
|
|
21
26
|
|
|
@@ -71,5 +76,7 @@ module Rails
|
|
|
71
76
|
differ.diff_files(rails_file, repo_file).chomp
|
|
72
77
|
end
|
|
73
78
|
end
|
|
79
|
+
|
|
80
|
+
CACHE_DIR = cache_dir
|
|
74
81
|
end
|
|
75
82
|
end
|