Skip to content

Commit

Permalink
Fix issue with upgrading gems breaking Opal compilation in Rails appl…
Browse files Browse the repository at this point in the history
…ications due to incorrect Sprockets caching
  • Loading branch information
AndyObtiva committed Aug 4, 2024
1 parent ad505ec commit 277bdd2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [1.0.4](https://github.com/opal/opal-sprockets/compare/v1.0.3...v1.0.4)

*3 August 2024*

- Fix issue with upgrading gems breaking Opal compilation in Rails applications due to incorrect Sprockets caching

## [1.0.3](https://github.com/opal/opal-sprockets/compare/v1.0.2...v1.0.3)

*24 December 2024*

- Supporting Ruby 3.1

## [1.0.2](https://github.com/opal/opal-sprockets/compare/v1.0.1...v1.0.2)

*24 August 2021*
Expand Down
3 changes: 2 additions & 1 deletion lib/opal/sprockets/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
class Opal::Sprockets::Processor
@@cache_key = nil
def self.cache_key
@@cache_key ||= ['Opal', Opal::VERSION, Opal::Config.config].to_json.freeze
gem_config = Gem.loaded_specs.map {|gem_key, gem_spec| [gem_spec.name, gem_spec.version.to_s] }
@@cache_key ||= ['Opal', Opal::VERSION, Opal::Config.config, gem_config].to_json.freeze
end

def self.reset_cache_key!
Expand Down
2 changes: 1 addition & 1 deletion lib/opal/sprockets/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Opal
module Sprockets
VERSION = '1.0.3'
VERSION = '1.0.4'
end
end
2 changes: 1 addition & 1 deletion opal-sprockets.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require_relative 'lib/opal/sprockets/version'
Gem::Specification.new do |spec|
spec.name = 'opal-sprockets'
spec.version = Opal::Sprockets::VERSION
spec.authors = ['Elia Schito', 'Adam Beynon']
spec.authors = ['Elia Schito', 'Adam Beynon', 'Andy Maleh']
spec.email = '[email protected]'

spec.summary = 'Sprockets support for Opal.'
Expand Down

0 comments on commit 277bdd2

Please sign in to comment.