scientist 1.1.2 → 1.2.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: 7a444eefb69bf453db50912ba9a629edd0845f1b2591c36809f4329862188b82
4
- data.tar.gz: 28895c2df468c46c10d4b474ee9aa58b448514bb856c6f059112ad48d09bb97b
3
+ metadata.gz: 768eab788fd168ba799412e106ec5b386a15c6f020cf6590873245262049481f
4
+ data.tar.gz: 2dffdf57ed21e9684024cc09920721faf1525d129c4b985957e04b657451942b
5
5
  SHA512:
6
- metadata.gz: 40c3e14294c377e70c86e03b50ac121da94b8e79e0b5f14a6844343a4f5b56b6fa340f66caa4671498e303978eea9ebd331ad7633aebd6b5901d970321f71342
7
- data.tar.gz: '092d3a37710ea538580205e284b31314eb298b5d10d910d2a36cff0b334ecbbd01c2b9311b35769eec7f308549f954c1a27084306f60232cd18bae24fd59e96d'
6
+ metadata.gz: 871dbc71c6795365321f2b4265c6c121a11a11dd6a440b3779eb93c4a30737419f573005d100fa8920bcdfa5f77730acf0906f19aaac58d0a4be42c0703f6228
7
+ data.tar.gz: 52471d998257836b26e3b61a181426e3bab90a12eeaa73999e115edb95116f3730a0547588293ca26676b021eb977bda10cb1c07fcaf5d70d95c36abc0c65742
@@ -3,12 +3,11 @@ language: ruby
3
3
  cache: bundler
4
4
  script: script/test
5
5
  rvm:
6
- - 1.9.3
7
- - 2.0.0
8
- - 2.1.8
9
- - 2.2.4
10
- - 2.3.0
11
- - 2.4.0
6
+ - 2.1.10
7
+ - 2.2.9
8
+ - 2.3.7
9
+ - 2.4.4
10
+ - 2.5.1
12
11
  before_install: gem install bundler
13
12
  addons:
14
13
  apt:
data/README.md CHANGED
@@ -327,7 +327,7 @@ class MyExperiment
327
327
  }
328
328
  else
329
329
  {
330
- # see "Keeping it clean" below
330
+ # see "Keeping it clean" above
331
331
  :value => observation.cleaned_value
332
332
  }
333
333
  end
@@ -504,7 +504,7 @@ end
504
504
 
505
505
  ## Hacking
506
506
 
507
- Be on a Unixy box. Make sure a modern Bundler is available. `script/test` runs the unit tests. All development dependencies are installed automatically. Science requires Ruby 1.9 or newer.
507
+ 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.1 or newer.
508
508
 
509
509
  ## Alternatives
510
510
 
@@ -1,5 +1,21 @@
1
1
  # Changes
2
2
 
3
+ ## v1.2.0 (5 July 2018)
4
+
5
+ - New: Use monotonic clock for duration calculations
6
+ - New: Drop support for ruby <2.1 to support monotonic clock
7
+ - New: Run CI on Ruby 2.5
8
+
9
+ ## v1.1.2 (9 May 2018)
10
+
11
+ - New: Add `raise_with` option to allow for custom mismatch errors to be raised
12
+
13
+ ## v1.1.1 (6 February 2018)
14
+
15
+ - Fix: default experiment no longer runs all `try` paths
16
+ - New: Add `Scientist.run` module method for running experiments when an included module isn't available
17
+ - New: Add [Noise and error rates](https://github.com/github/scientist#noise-and-error-rates) to `README.md`
18
+
3
19
  ## v1.1.0 (29 August 2017)
4
20
 
5
21
  - New: [Specify which exception types to rescue](https://github.com/github/scientist#in-candidate-code)
@@ -28,13 +28,14 @@ class Scientist::Observation
28
28
  @experiment = experiment
29
29
  @now = Time.now
30
30
 
31
+ starting = Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_second)
31
32
  begin
32
33
  @value = block.call
33
34
  rescue *RESCUES => e
34
35
  @exception = e
35
36
  end
36
37
 
37
- @duration = (Time.now - @now).to_f
38
+ @duration = Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_second) - starting
38
39
 
39
40
  freeze
40
41
  end
@@ -1,3 +1,3 @@
1
1
  module Scientist
2
- VERSION = "1.1.2"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -10,6 +10,8 @@ Gem::Specification.new do |gem|
10
10
  gem.homepage = "https://github.com/github/scientist"
11
11
  gem.license = "MIT"
12
12
 
13
+ gem.required_ruby_version = '>= 2.1'
14
+
13
15
  gem.files = `git ls-files`.split($/)
14
16
  gem.executables = []
15
17
  gem.test_files = gem.files.grep(/^test/)
@@ -33,6 +33,7 @@ git fetch -t origin
33
33
  }
34
34
 
35
35
  # Tag it and bag it.
36
+ echo TAG $tag
36
37
 
37
- gem push scientist-*.gem && git tag "$tag" &&
38
- git push origin master && git push origin "$tag"
38
+ gem push scientist-*.gem && git tag "$tag" # &&
39
+ # git push origin master && git push origin "$tag"
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.1.2
4
+ version: 1.2.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: 2018-05-09 00:00:00.000000000 Z
15
+ date: 2018-07-05 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: minitest
@@ -88,7 +88,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - ">="
90
90
  - !ruby/object:Gem::Version
91
- version: '0'
91
+ version: '2.1'
92
92
  required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="