avo 4.0.0.beta.28 → 4.0.0.beta.29

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: abf5e94956b35c41aff661c8e0a8e8014fda3543f6606722f1f6af9e926f54e2
4
- data.tar.gz: ccf3bbee484bb670f56b76b2bd33aff94b926fdbf57b8cf7b7d04df502e7fa42
3
+ metadata.gz: 8a1a5c19c70ef8b77daa3b3637c476ac93503afa04b76b1dbda103fe92e13124
4
+ data.tar.gz: d0013add4d995da4df46810876314782006c5a078e6c55c8650f9d144960d97a
5
5
  SHA512:
6
- metadata.gz: 0be66defb73417fe37f84464172e3e7c1d96ad97ccc2a2107acb97fa1e8a108f1389b4166d174dccc1a137186f5daca08a53671b69f167c6e397ed0a5eeb1dba
7
- data.tar.gz: e960021cb67e4df7d1013903de67835ecd6835cc25d7a1512f6742f2e2fc68137d6b6f76c85b19742ac06be7f13fba851048a80c3354ec3314171310c4057834
6
+ metadata.gz: f9e856c1e1d37d95bc956000dc0754150753c020d942bfb9bf9c6f5352cbc3581fb0e6dd60367f87ee86bcb5e8aed28b2d759c12013b735a859f4faa46a710a3
7
+ data.tar.gz: 5a4c2f9ba469285a911174228444123bf32e65da9f3c58f1b00e5a406a818e26eef033e86231d52611a1bee3aa0e1765206321d9687ac0782aa573a8c247f4ae
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (4.0.0.beta.28)
4
+ avo (4.0.0.beta.29)
5
5
  actionview (>= 6.1)
6
6
  active_link_to
7
7
  activerecord (>= 6.1)
@@ -75,7 +75,7 @@ module Avo
75
75
  lines = []
76
76
 
77
77
  # Include Avo itself (the core engine) in Tailwind's scan paths.
78
- lines << %(@source "#{relative_to_tmp(Avo::Engine.root)}";)
78
+ lines << %(@source "#{tailwind_path(Avo::Engine.root)}";)
79
79
  append_engine_stylesheets(lines, Avo::Engine.root)
80
80
 
81
81
  append_plugin_engine_tailwind_sources(lines)
@@ -90,7 +90,7 @@ module Avo
90
90
 
91
91
  def append_host_tailwind_sources(lines)
92
92
  resolved_host_content_source_paths.each do |path|
93
- lines << %(@source "#{relative_to_tmp(path)}";)
93
+ lines << %(@source "#{tailwind_path(path)}";)
94
94
  end
95
95
  end
96
96
 
@@ -110,7 +110,7 @@ module Avo
110
110
  root = entry[:klass].root
111
111
  next unless root&.directory?
112
112
 
113
- lines << %(@source "#{relative_to_tmp(root)}";)
113
+ lines << %(@source "#{tailwind_path(root)}";)
114
114
  append_engine_stylesheets(lines, root)
115
115
  end
116
116
  end
@@ -121,19 +121,22 @@ module Avo
121
121
 
122
122
  # Some engines ship `app/assets/stylesheets/application.css` directly (no namespace folder).
123
123
  root_application = stylesheets_root.join("application.css")
124
- lines << %(@import "#{relative_to_tmp(root_application)}";) if root_application.exist?
124
+ lines << %(@import "#{tailwind_path(root_application)}";) if root_application.exist?
125
125
 
126
126
  # Most engines namespace their assets under `app/assets/stylesheets/<namespace>/application.css`.
127
127
  Dir.children(stylesheets_root).sort.each do |entry|
128
128
  next if entry.start_with?(".")
129
129
 
130
130
  namespaced_application = stylesheets_root.join(entry, "application.css")
131
- lines << %(@import "#{relative_to_tmp(namespaced_application)}";) if namespaced_application.exist?
131
+ lines << %(@import "#{tailwind_path(namespaced_application)}";) if namespaced_application.exist?
132
132
  end
133
133
  end
134
134
 
135
- def relative_to_tmp(absolute)
136
- Pathname.new(absolute).expand_path.relative_path_from(tmp_input_dir.expand_path).to_s.tr("\\", "/")
135
+ # Always emit absolute paths for @source / @import. Relative paths from tmp/avo are wrong on
136
+ # Capistrano-style deploys: Rails.root may be releases/... while the input file is opened via
137
+ # current/... symlinks, so ".." counts differ and resolvers miss gem trees under shared/bundle.
138
+ def tailwind_path(absolute)
139
+ Pathname.new(absolute).expand_path.to_s.tr("\\", "/")
137
140
  end
138
141
 
139
142
  def collect_host_avo_stylesheets
@@ -144,7 +147,7 @@ module Avo
144
147
  .glob(base.join("**", "*.css"))
145
148
  .select { |path| File.file?(path) }
146
149
  .sort
147
- .map { |path| relative_to_tmp(path) }
150
+ .map { |path| tailwind_path(path) }
148
151
  end
149
152
 
150
153
  def run_tailwindcss(*tailwind_args)
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "4.0.0.beta.28" unless const_defined?(:VERSION)
2
+ VERSION = "4.0.0.beta.29" unless const_defined?(:VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avo
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.beta.28
4
+ version: 4.0.0.beta.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin