active_hashcash 0.6.1 → 0.6.2

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: abcb93cb16e4d2dd9dd6b7ac7706f4aa9ad03543828c2a67490f3cdba49d5c1c
4
- data.tar.gz: f004201911b2a75db4bbcaf002a697c4c55e8e139a51c348a28b845d65f3f22a
3
+ metadata.gz: d5e43f6be8372678e15c9a19647a195a37d52a2b1fe8de8f3bf51847dfd513b6
4
+ data.tar.gz: c54df83ac36629327f1bf23b125c1726133cc652c32e271e216e53a57ff4fbe9
5
5
  SHA512:
6
- metadata.gz: 7a156de1587f52cc2f4f03ac10dae94146d3dc10f2da06aba6663931b00c6789b20c04897ed78f43dda2cfeb89153e6222f18080cb26adfa423552cb2203db8c
7
- data.tar.gz: cd56b11ebd6fc83f647a292969bda59e9806afae9b5502adaf95d5bdf1f8b62a22ea74206d98714cfca0ddbbd0ba1a6fff2112467af028c5b82261dcbaf718e9
6
+ metadata.gz: 42ff8c4e0ad05d8675c2f8e48b5ca234c230657725488fbfa0abecf43e6d81d7d66210ac285b5b0baa5d2f2f25b0a86e0cd54f2816b50a86b37a63333ded9cff
7
+ data.tar.gz: d964f60754e9b823ec7e54b577498f9245fbb855aa1c2b33db0a97236faac73895b1f38c11a9420c78236ab0b8f4b69e79c50cb6d9a2fe30bfbd459aa74a4154
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog of ActiveHashcash
2
2
 
3
+ ## 0.6.2 (2026-11-13)
4
+
5
+ - Fix #25 Stop adding lib/ to asset paths so Propshaft doesn't publish Ruby sources (@Spone)
6
+ - Fix #24 Web Worker breaking when hashcash.js is minified by renaming the outer `self` variable so worker `self` stays a free reference (@Spone)
7
+
3
8
  ## 0.6.1 (2026-11-11)
4
9
 
5
10
  - Reject non-canonical stamps so one proof of work cannot be spent multiple times (@schmijos)
@@ -150,7 +150,7 @@ Hashcash.Stamp.prototype.stopClock = function() {
150
150
  // because it avoids the per-call Promise/microtask overhead entirely.
151
151
  Hashcash.Stamp.prototype.work = function(callback) {
152
152
  this.startClock()
153
- var self = this
153
+ var stamp = this
154
154
 
155
155
  var workerCode = function() {
156
156
  // SHA-256 round constants (FIPS 180-4 §4.2.2)
@@ -297,11 +297,11 @@ Hashcash.Stamp.prototype.work = function(callback) {
297
297
  if (e.data.found) {
298
298
  Hashcash._worker = null
299
299
  Hashcash._workerUrl = null
300
- self.counter = e.data.counter
301
- self.stopClock()
300
+ stamp.counter = e.data.counter
301
+ stamp.stopClock()
302
302
  worker.terminate()
303
303
  URL.revokeObjectURL(workerUrl)
304
- callback(self)
304
+ callback(stamp)
305
305
  }
306
306
  }
307
307
 
@@ -1,7 +1,5 @@
1
1
  module ActiveHashcash
2
2
  class Engine < ::Rails::Engine # :nodoc:
3
- config.assets.paths << File.expand_path("../..", __FILE__) if config.respond_to?(:assets)
4
-
5
3
  isolate_namespace ActiveHashcash
6
4
 
7
5
  initializer "active_hashcash.inflections" do
@@ -1,3 +1,3 @@
1
1
  module ActiveHashcash
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_hashcash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexis Bernard