Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rails/sprockets-rails
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.5.1
Choose a base ref
...
head repository: rails/sprockets-rails
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.5.2
Choose a head ref
  • 11 commits
  • 6 files changed
  • 3 contributors

Commits on Jun 10, 2024

  1. Remove warnings about tests without assertions

    etiennebarrie committed Jun 10, 2024
    Copy the full SHA
    9737832 View commit details
  2. Prevent regressions with requiring sprockets/railtie

    Some applications or gems don't require sprockets/rails, instead they
    load sprockets/railtie.
    
    This change catches this issue when running tests.
    etiennebarrie committed Jun 10, 2024
    Copy the full SHA
    1d44fdc View commit details

Commits on Jun 22, 2024

  1. Add changelog_uri to gemspec

    fynsta authored Jun 22, 2024
    Copy the full SHA
    600b6e5 View commit details

Commits on Jul 31, 2024

  1. Merge pull request #530 from fynsta/patch-1

    Add changelog_uri to gemspec
    rafaelfranca authored Jul 31, 2024
    Copy the full SHA
    e152b64 View commit details
  2. Merge pull request #528 from etiennebarrie/remove-warnings

    Remove warnings about tests without assertions
    rafaelfranca authored Jul 31, 2024
    Copy the full SHA
    90daf9c View commit details
  3. Merge pull request #527 from etiennebarrie/prevent-regression-for-spr…

    …ockets-railtie
    
    Prevent regressions with requiring sprockets/railtie
    rafaelfranca authored Jul 31, 2024
    Copy the full SHA
    5b0c81d View commit details
  4. Add devcontainer configuration

    rafaelfranca committed Jul 31, 2024
    Copy the full SHA
    aa0cf7c View commit details
  5. Fix deprecation warning in Rails 8.0

    Use the keyword argument `at:` instead of the positional argument
    for mounting the assets in the Rails application.
    rafaelfranca committed Jul 31, 2024
    Copy the full SHA
    eaba64d View commit details
  6. Remove deprecations in Rails applications

    rafaelfranca committed Jul 31, 2024
    Copy the full SHA
    6245157 View commit details
  7. Merge pull request #535 from rails/rm-fix-deprecations

    Fix deprecations
    rafaelfranca authored Jul 31, 2024
    Copy the full SHA
    550bce4 View commit details
  8. Prepare for 3.5.2

    rafaelfranca committed Jul 31, 2024
    Copy the full SHA
    2c04236 View commit details
Showing with 38 additions and 6 deletions.
  1. +26 −0 .devcontainer/devcontainer.json
  2. +1 −1 lib/sprockets/rails/version.rb
  3. +1 −1 lib/sprockets/railtie.rb
  4. +4 −0 sprockets-rails.gemspec
  5. +5 −4 test/test_helper.rb
  6. +1 −0 test/test_quiet_assets.rb
26 changes: 26 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby
{
"name": "sprockets-rails",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "ghcr.io/rails/devcontainer/images/ruby:3.2.5",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "latest"
}
}

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "ruby --version",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
2 changes: 1 addition & 1 deletion lib/sprockets/rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Sprockets
module Rails
VERSION = "3.5.1"
VERSION = "3.5.2"
end
end
2 changes: 1 addition & 1 deletion lib/sprockets/railtie.rb
Original file line number Diff line number Diff line change
@@ -222,7 +222,7 @@ def self.build_manifest(app)
if config.assets.compile
app.assets = self.build_environment(app, true)
app.routes.prepend do
mount app.assets => config.assets.prefix
mount app.assets, at: config.assets.prefix
end
end

4 changes: 4 additions & 0 deletions sprockets-rails.gemspec
Original file line number Diff line number Diff line change
@@ -9,6 +9,10 @@ Gem::Specification.new do |s|
s.summary = "Sprockets Rails integration"
s.license = "MIT"

s.metadata = {
"changelog_uri" => "#{s.homepage}/releases/tag/v#{s.version}"
}

s.files = Dir["README.md", "lib/**/*.rb", "MIT-LICENSE"]

s.required_ruby_version = '>= 2.5'
9 changes: 5 additions & 4 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -2,7 +2,9 @@

require 'action_view'
require 'sprockets'
require 'sprockets/rails'
# Apps generated before Rails 7.0 without rails/all require sprockets/railtie, not sprockets/rails
# Same with other reverse dependencies like sassc-rails
require 'sprockets/railtie'
require 'sprockets/rails/context'
require 'sprockets/rails/helper'
require 'rails/version'
@@ -91,9 +93,6 @@ def using_sprockets4?
Gem::Version.new(Sprockets::VERSION) >= Gem::Version.new('4.x')
end

def test_truth
end

def test_foo_and_bar_different_digests
refute_equal @foo_js_digest, @bar_js_digest
refute_equal @foo_css_digest, @bar_css_digest
@@ -802,9 +801,11 @@ def setup
end

def test_javascript_include_tag_integrity
pass
end

def test_stylesheet_link_tag_integrity
pass
end
end

1 change: 1 addition & 0 deletions test/test_quiet_assets.rb
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ def setup
@app = Class.new(Rails::Application)
@app.config.eager_load = false
@app.config.logger = ActiveSupport::Logger.new("/dev/null")
@app.config.active_support.to_time_preserves_timezone = :zone

FileUtils.mkdir_p(ASSET_PATH)
File.open(ASSET_PATH.join("manifest.js"), "w") { |f| f << "" }