Skip to content

Commit

Permalink
Merge pull request #34 from AndyObtiva/fix-issue-with-upgrading-gems-…
Browse files Browse the repository at this point in the history
…breaking-opal-sprockets-cache

Fix issue with upgrading gems breaking Opal compilation in Rails applications due to incorrect Sprockets caching
  • Loading branch information
hmdne authored Aug 8, 2024
2 parents ad505ec + 277bdd2 commit a56f8b5
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 = 'elia@schito.me'

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

0 comments on commit a56f8b5

Please sign in to comment.