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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f41070619ee42e4f9de3554fc4510a4801a65bc70c2a223a1547a2f46f6df746
4
- data.tar.gz: c320a4ea5aaa7bb0a90894c721d4ff72cc83ae19aab47ddf9dce209bfc5be867
3
+ metadata.gz: ff8a56490563255cb68662a1f669ddaa9a0d07071c0216d24e650705f8a76f81
4
+ data.tar.gz: 8e5a5d304686fd37bdd09fb55906a407642279648ec9c7f582623bcfa6691314
5
5
  SHA512:
6
- metadata.gz: 7ed84dbd16eb5310e4d04c5a6cfa770c3dcbf4c217eb4647e8bde45108b8ffb32a2846e964a1d68ab74b85ee8132006f05d0b6e0bbf1bcf8bec1a5dddeb39ca6
7
- data.tar.gz: 6b876207ceb2d4f40c7a02439ff50f127b0d81bf740816f71c00c253400c062170c6ccf99230fd213817c7871045c50f89a8ad70d24eea6bd8068e06bea2b51b
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rails
4
4
  module Diff
5
- VERSION = "0.8.0"
5
+ VERSION = "0.8.1"
6
6
  end
7
7
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-diff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matheus Richard