experimental 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1cbc23d7d4d559525acef4a4a02acc8f6129dddc
4
- data.tar.gz: c90758e9493e4c965af09a9d0dc98c58d7fb4e53
3
+ metadata.gz: 5971835dc6a436120c342849f251fd6833819f07
4
+ data.tar.gz: 1a0c5fe0f8465ebf62ad31bb1000e32952420488
5
5
  SHA512:
6
- metadata.gz: 8915404bdb3ce651853d2002598b113612561a87414062f97b8a3ef177beeac52cf6d203509c18d0af1ba2ba0506221a9468397f769362a647e9ebe3e1451e3e
7
- data.tar.gz: 539a9ba09dc190a9983e1c558efff665f88759badd8e727a767154448f625e4b9d6d04c40597755c1cc44565f1a92ada9cc2ca897f8561ab3452b0622bfdd67f
6
+ metadata.gz: 5a6fd63702f780be58b0c3582d7b66985fcce57643fec71f95df4800396d6c41f485d73a76aa5dc7cd7dad2f0bff60006cf9857a247999ead024326c78215a24
7
+ data.tar.gz: e7b1b7467c78ccc8fb77ac50c3d2f8551e1fce7887ffa2c56993d378db3784f8031f8b323176ed5c8aa3d7f7ca4019fbdb3fba75b1cee66337a84b59d3bca291
@@ -3,7 +3,9 @@ module Experimental
3
3
  initializer "experimental.initialize" do
4
4
  config_path = "#{Rails.root}/config/experimental.yml"
5
5
  if File.exist?(config_path)
6
- full = YAML.load_file(config_path)
6
+ erb = File.read(config_path)
7
+ yaml = ERB.new(erb).result(TOPLEVEL_BINDING)
8
+ full = YAML.load(yaml)
7
9
  configuration = full[Rails.env] || {}
8
10
  configuration.update(full.slice('experiments'))
9
11
  Experimental.configure(configuration)
@@ -6,8 +6,7 @@ module Experimental
6
6
  obj ||= user
7
7
  name ||= experiment_name
8
8
 
9
- obj.should_receive(:in_experiment?).any_number_of_times.
10
- with(name).and_return(val)
9
+ obj.stub(:in_experiment?).with(name).and_return(val)
11
10
  end
12
11
 
13
12
  def is_not_in_experiment(name = nil, obj = nil)
@@ -21,8 +20,7 @@ module Experimental
21
20
  obj ||= user
22
21
  name ||= experiment_name
23
22
 
24
- obj.should_receive(:experiment_bucket).any_number_of_times.
25
- with(name).and_return(bucket)
23
+ obj.stub(:experiment_bucket).with(name).and_return(bucket)
26
24
  end
27
25
  end
28
26
 
@@ -34,5 +34,9 @@ module Experimental
34
34
  def set_experimental_bucket(subject, experiment_name, bucket)
35
35
  Experimental.overrides[subject, experiment_name] = bucket
36
36
  end
37
+
38
+ autoload :Cucumber, 'experimental/test/cucumber'
39
+ autoload :RSpec, 'experimental/test/rspec'
40
+ autoload :Unit, 'experimental/test/unit'
37
41
  end
38
42
  end
@@ -1,5 +1,5 @@
1
1
  module Experimental
2
- VERSION = [0, 3, 0]
2
+ VERSION = [0, 4, 0]
3
3
 
4
4
  class << VERSION
5
5
  include Comparable
metadata CHANGED
@@ -1,30 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: experimental
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - HowAboutWe.com
8
8
  - Rebecca Miller-Webster
9
9
  - Bryan Woods
10
10
  - Andrew Watkins
11
+ - George Ogata
11
12
  autorequire:
12
13
  bindir: bin
13
14
  cert_chain: []
14
- date: 2014-04-08 00:00:00.000000000 Z
15
+ date: 2014-06-02 00:00:00.000000000 Z
15
16
  dependencies:
16
17
  - !ruby/object:Gem::Dependency
17
18
  name: rails
18
19
  requirement: !ruby/object:Gem::Requirement
19
20
  requirements:
20
- - - "<="
21
+ - - "<"
21
22
  - !ruby/object:Gem::Version
22
23
  version: '5.0'
23
24
  type: :runtime
24
25
  prerelease: false
25
26
  version_requirements: !ruby/object:Gem::Requirement
26
27
  requirements:
27
- - - "<="
28
+ - - "<"
28
29
  - !ruby/object:Gem::Version
29
30
  version: '5.0'
30
31
  - !ruby/object:Gem::Dependency
@@ -109,3 +110,4 @@ signing_key:
109
110
  specification_version: 4
110
111
  summary: Adds support for database-backed AB tests in Rails apps
111
112
  test_files: []
113
+ has_rdoc: