laboratory 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/laboratory/config.rb +0 -1
- data/lib/laboratory/experiment.rb +4 -4
- data/lib/laboratory/version.rb +1 -1
- data/lib/laboratory.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e669860caa60d09934a3c3dc228de8c37315d38cbc954c27146187d8052f9c4b
|
4
|
+
data.tar.gz: 057b73763f3c9a27416ccf71ab44326f32a2c4b859272bca37fd608f83a8ce22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82b0763c658512eda404843648e7b3e3d3cc6200dd98bf2c90d7b710cf9e6a7979d8d1ea2bce94d59088174c7e4aa72bc4dbdf95a692f14402c3bc357971b4ad
|
7
|
+
data.tar.gz: 22dcdc22ee4afc615a296474636478212a2495eb9ebf089526bb431c36c24fd0b62c7811af2c1588eb17cf9c2a90d503e52f8e3900d4584b80d0864d4caf6ebb
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -49,7 +49,7 @@ Or install it yourself as:
|
|
49
49
|
In an initializer (`app/config/initializers/laboratory.rb`), define the adapter you are going to use with Laboratory. Laboratory supports Redis out of the box, as it the recommended adapter:
|
50
50
|
|
51
51
|
```ruby
|
52
|
-
Laboratory.
|
52
|
+
Laboratory.adapter = Laboratory::Adapters::RedisAdapter.new(url: 'redis://localhost:6789') # Adjust to your redis URL.
|
53
53
|
```
|
54
54
|
|
55
55
|
### Defining your current_user_id & actor
|
data/lib/laboratory/config.rb
CHANGED
@@ -56,7 +56,7 @@ module Laboratory
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def self.all
|
59
|
-
Laboratory.
|
59
|
+
Laboratory.adapter.read_all
|
60
60
|
end
|
61
61
|
|
62
62
|
def self.create(id:, variants:, algorithm: Algorithms::Random)
|
@@ -73,7 +73,7 @@ module Laboratory
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def self.find(id)
|
76
|
-
Laboratory.
|
76
|
+
Laboratory.adapter.read(id)
|
77
77
|
end
|
78
78
|
|
79
79
|
def self.find_or_create(id:, variants:, algorithm: Algorithms::Random)
|
@@ -81,7 +81,7 @@ module Laboratory
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def delete
|
84
|
-
Laboratory.
|
84
|
+
Laboratory.adapter.delete(id)
|
85
85
|
nil
|
86
86
|
end
|
87
87
|
|
@@ -169,7 +169,7 @@ module Laboratory
|
|
169
169
|
|
170
170
|
@changelog << changelog_item
|
171
171
|
end
|
172
|
-
Laboratory.
|
172
|
+
Laboratory.adapter.write(self)
|
173
173
|
end
|
174
174
|
|
175
175
|
def valid? # rubocop:disable Metrics/AbcSize
|
data/lib/laboratory/version.rb
CHANGED
data/lib/laboratory.rb
CHANGED