scientist 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 613a01313617522a1af4515a526d8272c0f6cb77
4
- data.tar.gz: eedb1a19d72a5833a088df4c971fdda221d03dfa
3
+ metadata.gz: 78972aec5f81213b70c0d80841e4608ab6f933c4
4
+ data.tar.gz: bcdb905245beab4a89e6a2ffe63da983197ddc26
5
5
  SHA512:
6
- metadata.gz: 57f63ef2a49baba246d1b1fa0e7b378ff590a4a5a764aa23754e103c7f73f09ec7cc89f4ffaa07bfebc04da91f0c0215d8bf5d7eef1f8d18e19213a0ccad9078
7
- data.tar.gz: 8790f2ccee4042604dad41e5dac7d0471629e8013af69458e7898c77628ba73dbcd93b76cd7a15a7ae5203fa02d3561dcab92fec3654c1f9ad3fc9f3766ed9a7
6
+ metadata.gz: 9428bf617e6c74d85b44b55b5a4e826177cf34dca77f1de80eb25143e13ee78f849873619d1d9362d65d79eb26939686062d4ea34531faa61ff152e70a343e62
7
+ data.tar.gz: 8a9fdcdf0cb10bc41b65cea0c725450f508890829c60249e0effdc5d09c15ca420f37db31f3968b64d5fe27a76290266b1f90baa1f79cec015c78ddac72e609d
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ language: ruby
3
+ cache: bundler
4
+ script: script/test
5
+ rvm:
6
+ - 1.9.3
7
+ - 2.1.5
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Scientist!
2
2
 
3
- A Ruby library for carefully refactoring critical paths.
3
+ A Ruby library for carefully refactoring critical paths. [![Build Status](https://travis-ci.org/github/scientist.svg?branch=master)](https://travis-ci.org/github/scientist)
4
4
 
5
5
  ## How do I do science?
6
6
 
@@ -1,3 +1,3 @@
1
1
  module Scientist
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/scientist.rb CHANGED
@@ -21,7 +21,7 @@ module Scientist
21
21
 
22
22
  yield experiment
23
23
 
24
- test = Hash(opts)[:run]
24
+ test = opts[:run] if opts
25
25
  experiment.run(test)
26
26
  end
27
27
 
@@ -56,4 +56,18 @@ describe Scientist do
56
56
 
57
57
  assert_equal true, result
58
58
  end
59
+
60
+ it "runs control when there is a nil named test" do
61
+ obj = Object.new
62
+ obj.extend(Scientist)
63
+
64
+ result = obj.science "test", nil do |e|
65
+ experiment = e
66
+
67
+ e.use { true }
68
+ e.try("second-way") { true }
69
+ end
70
+
71
+ assert_equal true, result
72
+ end
59
73
  end
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: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Barnette
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-20 00:00:00.000000000 Z
12
+ date: 2014-12-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
@@ -34,6 +34,7 @@ extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
36
  - ".gitignore"
37
+ - ".travis.yml"
37
38
  - CLA.md
38
39
  - CONTRIBUTING.md
39
40
  - Gemfile