propshaft 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71dd5dd984322f62b1950474875ee4245d22a06cf1198795947800a4a3181028
4
- data.tar.gz: 91b2f410527265b3d018fb72672159b131a265d5b63a74ee437cf985caa30631
3
+ metadata.gz: f19afc9fd39d03a8c6b7f61648fbb580a4c9ff8f4bf21d88abb8a802229ca90e
4
+ data.tar.gz: ce49361ff29ab1abe61b933d94bc35d13d6a1527b8f40e38ac0abbcf501f97ff
5
5
  SHA512:
6
- metadata.gz: 73ed781f69ffcfa27c17edf82ac2e8dcb7ea9a95e203853e9fda1cb4a44b776589db87c9660f253217445a8431a5b91adae4a6d2f19c074cac4818d9b877a61f
7
- data.tar.gz: 32eebdb77da0aeac97c93970170bb44d1797ea6887cb9b126e4b4550c46c3df023e209590b950e350bf0d54fb06f34e75d5faa78be172fa2b301dd51f1981159
6
+ metadata.gz: '05899de72dc909ea7f71eabf3cce43a1125ead5ee4cdee7485fbc0b328595e7a602489227204a7a4f482f1a86f91a3acdfa17fbe65e3ad5a8516ec5582e3b4e5'
7
+ data.tar.gz: 6f270d85b2b2aedc3e3fa8145c4ebe7837c569a9ffabed578cb357071264563ed4d0b9caf6cf40e5b05a5a72bb5e1d07b72b9d3f5729c43fc533a541d12d5f62
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require "rake/testtask"
5
5
  Rake::TestTask.new do |test|
6
6
  test.libs << "test"
7
7
  test.test_files = FileList["test/**/*_test.rb"]
8
- test.warning = false
8
+ test.warning = true
9
9
  end
10
10
 
11
11
  task default: :test
@@ -2,15 +2,6 @@ require "rails"
2
2
  require "rails/railtie"
3
3
  require "active_support/ordered_options"
4
4
 
5
- # FIXME: There's gotta be a better way than this hack?
6
- class Rails::Engine < Rails::Railtie
7
- initializer "propshaft.append_assets_path", group: :all do |app|
8
- app.config.assets.paths.unshift(*paths["vendor/assets"].existent_directories)
9
- app.config.assets.paths.unshift(*paths["lib/assets"].existent_directories)
10
- app.config.assets.paths.unshift(*paths["app/assets"].existent_directories)
11
- end
12
- end
13
-
14
5
  module Propshaft
15
6
  class Railtie < ::Rails::Railtie
16
7
  config.assets = ActiveSupport::OrderedOptions.new
@@ -44,32 +35,18 @@ module Propshaft
44
35
  end
45
36
  end
46
37
 
38
+ initializer "propshaft.append_assets_path" do |app|
39
+ app.config.assets.paths.unshift(*paths["vendor/assets"].existent_directories)
40
+ app.config.assets.paths.unshift(*paths["lib/assets"].existent_directories)
41
+ app.config.assets.paths.unshift(*paths["app/assets"].existent_directories)
42
+ end
43
+
47
44
  initializer "propshaft.logger" do
48
45
  Propshaft.logger = config.assets.logger || Rails.logger
49
46
  end
50
47
 
51
- rake_tasks do |app|
52
- namespace :assets do
53
- desc "Compile all the assets from config.assets.paths"
54
- task precompile: :environment do
55
- Rails.application.assets.processor.process
56
- end
57
-
58
- desc "Remove config.assets.output_path"
59
- task clobber: :environment do
60
- Rails.application.assets.processor.clobber
61
- end
62
-
63
- desc "Removes old files in config.assets.output_path"
64
- task clean: :environment do
65
- Rails.application.assets.processor.clean
66
- end
67
-
68
- desc "Print all the assets available in config.assets.paths"
69
- task reveal: :environment do
70
- Rails.application.assets.reveal
71
- end
72
- end
48
+ rake_tasks do
49
+ load "propshaft/railties/assets.rake"
73
50
  end
74
51
 
75
52
  # Compatibility shiming (need to provide log warnings when used)
@@ -0,0 +1,21 @@
1
+ namespace :assets do
2
+ desc "Compile all the assets from config.assets.paths"
3
+ task precompile: :environment do
4
+ Rails.application.assets.processor.process
5
+ end
6
+
7
+ desc "Remove config.assets.output_path"
8
+ task clobber: :environment do
9
+ Rails.application.assets.processor.clobber
10
+ end
11
+
12
+ desc "Removes old files in config.assets.output_path"
13
+ task clean: :environment do
14
+ Rails.application.assets.processor.clean
15
+ end
16
+
17
+ desc "Print all the assets available in config.assets.paths"
18
+ task reveal: :environment do
19
+ Rails.application.assets.reveal
20
+ end
21
+ end
@@ -27,6 +27,10 @@ class Propshaft::Server
27
27
  end
28
28
  end
29
29
 
30
+ def inspect
31
+ self.class.inspect
32
+ end
33
+
30
34
  private
31
35
  def extract_path_and_digest(env)
32
36
  full_path = Rack::Utils.unescape(env["PATH_INFO"].to_s.sub(/^\//, ""))
@@ -1,3 +1,3 @@
1
1
  module Propshaft
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: propshaft
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-28 00:00:00.000000000 Z
11
+ date: 2021-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -24,7 +24,35 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 7.0.0.alpha2
27
- description:
27
+ - !ruby/object:Gem::Dependency
28
+ name: railties
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 7.0.0.alpha2
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 7.0.0.alpha2
41
+ - !ruby/object:Gem::Dependency
42
+ name: rack
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description:
28
56
  email: dhh@hey.com
29
57
  executables: []
30
58
  extensions: []
@@ -45,6 +73,7 @@ files:
45
73
  - lib/propshaft/output_path.rb
46
74
  - lib/propshaft/processor.rb
47
75
  - lib/propshaft/railtie.rb
76
+ - lib/propshaft/railties/assets.rake
48
77
  - lib/propshaft/resolver/dynamic.rb
49
78
  - lib/propshaft/resolver/static.rb
50
79
  - lib/propshaft/server.rb
@@ -52,8 +81,9 @@ files:
52
81
  homepage: https://github.com/rails/propshaft
53
82
  licenses:
54
83
  - MIT
55
- metadata: {}
56
- post_install_message:
84
+ metadata:
85
+ rubygems_mfa_required: 'true'
86
+ post_install_message:
57
87
  rdoc_options: []
58
88
  require_paths:
59
89
  - lib
@@ -68,8 +98,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
98
  - !ruby/object:Gem::Version
69
99
  version: '0'
70
100
  requirements: []
71
- rubygems_version: 3.2.22
72
- signing_key:
101
+ rubygems_version: 3.2.32
102
+ signing_key:
73
103
  specification_version: 4
74
104
  summary: Deliver assets for Rails.
75
105
  test_files: []