scientist 1.3.0 → 1.4.0

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: b2c73b090777600d31576b815584cba175ba2061ef223b5ec6775038b03828ee
4
- data.tar.gz: 0336cebef463c2c7b92246d7124a395f7351a75452071595ec3c7edac63050f8
3
+ metadata.gz: 49ab4f74d43836220fbadd4692445a3cc61a13387cf87f533f39db9c58ba8544
4
+ data.tar.gz: d1648b2e74411130e36ddcac2f9e9bece7c7db3d65ca37deb1d7d6cf7a28096e
5
5
  SHA512:
6
- metadata.gz: e97b6ba1d1f6a07d518b8d86b1b60dbfc0a978e3ef77e95490f733e290fcdef7a42c73728b7f17657a379706bfbfb5ff2d8dbc24334fdb0f7847069c46c5629f
7
- data.tar.gz: 3c2b414b032e96eebf4fe476078dc170384efaf67622a32f24db44a52b1dec1c0c4da2706151d06a9dbd3e30da1655ad06d4add6db0af25dd9d85f540014452a
6
+ metadata.gz: 67f99e2906499d736c4ab002273d0bf9dbea07a3413b387c12a239afbdc65a542d658f7f1d087cdf482a261698e02c439ecb673a73a6497ca2ce4e07940e1a25
7
+ data.tar.gz: 60479759bc916ae2b0d1c1b9bf575de872fbb5adfda098ee6fea4802384ceeed30caee4973583e751de9c5b3dce686acc1602aa7f6fade034d22b4f3ae5e7180
data/README.md CHANGED
@@ -524,6 +524,10 @@ end
524
524
 
525
525
  Be on a Unixy box. Make sure a modern Bundler is available. `script/test` runs the unit tests. All development dependencies are installed automatically. Scientist requires Ruby 2.3 or newer.
526
526
 
527
+ ## Wrappers
528
+
529
+ - [RealGeeks/lab_tech](https://github.com/RealGeeks/lab_tech) is a Rails engine for using this library by controlling, storing, and analyzing experiment results with ActiveRecord.
530
+
527
531
  ## Alternatives
528
532
 
529
533
  - [daylerees/scientist](https://github.com/daylerees/scientist) (PHP)
@@ -543,7 +547,6 @@ Be on a Unixy box. Make sure a modern Bundler is available. `script/test` runs t
543
547
  - [spoptchev/scientist](https://github.com/spoptchev/scientist) (Kotlin / Java)
544
548
  - [junkpiano/scientist](https://github.com/junkpiano/scientist) (Swift)
545
549
 
546
-
547
550
  ## Maintainers
548
551
 
549
552
  [@jbarnette](https://github.com/jbarnette),
@@ -18,7 +18,7 @@ module Scientist::Experiment
18
18
  end
19
19
 
20
20
  # A mismatch, raised when raise_on_mismatches is enabled.
21
- class MismatchError < StandardError
21
+ class MismatchError < Exception
22
22
  attr_reader :name, :result
23
23
 
24
24
  def initialize(name, result)
@@ -1,3 +1,3 @@
1
1
  module Scientist
2
- VERSION = "1.3.0"
2
+ VERSION = "1.4.0"
3
3
  end
@@ -444,6 +444,20 @@ describe Scientist::Experiment do
444
444
  assert_raises(Scientist::Experiment::MismatchError) { @ex.run }
445
445
  end
446
446
 
447
+ it "allows MismatchError to bubble up through bare rescues" do
448
+ Fake.raise_on_mismatches = true
449
+ @ex.use { "control" }
450
+ @ex.try { "candidate" }
451
+ runner = -> {
452
+ begin
453
+ @ex.run
454
+ rescue
455
+ # StandardError handled
456
+ end
457
+ }
458
+ assert_raises(Scientist::Experiment::MismatchError) { runner.call }
459
+ end
460
+
447
461
  describe "#raise_on_mismatches?" do
448
462
  it "raises when there is a mismatch if the experiment instance's raise on mismatches is enabled" do
449
463
  Fake.raise_on_mismatches = false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scientist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2019-04-02 00:00:00.000000000 Z
15
+ date: 2019-09-20 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: minitest