browser_review_gate 0.5.6 → 0.5.7

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: 8759d99de8d5c82de155090d1be6400ce5d2f2ce8a19c2a253de93caadd3b76d
4
- data.tar.gz: aed60aa7c9ce8ca01ecb231018c8ce5074e259fc370c9fd1f4350cf0aaa64883
3
+ metadata.gz: 0b2af284e2c18316fda05c544c9ac48e449bd2f437889cafb35fc3f87e5d8daf
4
+ data.tar.gz: 446778283b56f4e20414950e2630fc0dac57860e8a73d00ba82feee330fcc5dc
5
5
  SHA512:
6
- metadata.gz: 1dcdb7437b204d497a3f4b02939e49196a90089d21c5f21d7e73b8efd968b5824f2a92eadf87def9c7e25aaa0fcdc14491c4e9dc6cd7202713a5f90ee2598d99
7
- data.tar.gz: 97686fa29af1d22d5ed66c08572bef27b1ade05eeb6bc7ab0494a1230e912420a55e442704fb38f70809d6626ddb27ea81c2dec72f62e3909d26a649203914ad
6
+ metadata.gz: ea4c28b00ced0d23e6d8da77cbaf81702d4e2a9837f841dec8aa996a667ac18d12378124c8fa90692906c63075863e9bbbb0d1945c5adf263ac7292b8e048008
7
+ data.tar.gz: 920f904ef1cd723082eaf8dcd31eca3e3d0494bfca3a3c84a0be74e3d620cf98e7da8242d07ce3e6a83ceec6fc30d0338923de0735eaf0523327223014bd698d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.7
4
+
5
+ - The revision check before a run reads the header as the trace check does: a short SHA names the
6
+ same commit, and a value that is not a SHA (a version number) is not a revision. 0.5.6 compared the
7
+ value exactly, so an app sending a short SHA or a version was always refused.
8
+
3
9
  ## 0.5.6
4
10
 
5
11
  - `verify` and `status` read the app's revision header before a run. When the app serves another
@@ -127,10 +127,11 @@ module BrowserReviewGate
127
127
  details
128
128
  end
129
129
 
130
- # An app that sends no revision header is taken at its word, as before the header existed.
130
+ # Read as TraceCheck reads it: a short SHA counts, and a value that is not a SHA is not a revision.
131
+ # An app that sends none is taken at its word, as before the header existed.
131
132
  def other_revision?(result)
132
- served = result["environment"]["served_revision"].to_s
133
- !served.empty? && served != result["local_head"]
133
+ served = result["environment"]["served_revision"].to_s.strip.downcase[/\A\h{7,40}\z/]
134
+ served && !result["local_head"].start_with?(served)
134
135
  end
135
136
 
136
137
  def report_instructions
@@ -1,3 +1,3 @@
1
1
  module BrowserReviewGate
2
- VERSION = "0.5.6"
2
+ VERSION = "0.5.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: browser_review_gate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Islam Gagiev