black_and_white 0.1.4 → 0.1.5

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: e750b7cb803ff4df4d3d720e72c2b6334a480202
4
- data.tar.gz: ba46e75692f5ddb5a926a92212b8ca3252158234
3
+ metadata.gz: 579a1f71214e978a74e7a8f43c02cb3220c33fe0
4
+ data.tar.gz: 422a80af8edca9d2168bd2dc0a324639618bf2c9
5
5
  SHA512:
6
- metadata.gz: 06b610793aec57424575d98bd1f68b8a31375af915f66ce2d693179c7e1972b1ae6217c3ef4425944bb8eccf43ce5dcdc6c4ed1945931288fb60ae2585b09260
7
- data.tar.gz: 5cff78100f770c21721ba814d23c2efcbb45de4965973424420454ac769e1f088c659b386597be8a3b9892413c25b962d1b4882596d8a1578eb6d551bc36c9fb
6
+ metadata.gz: 6fdd44ff52bcde3a8247bca43ccbc75bbaaf855d7565a28a6ece023f8f8e1c5c1b2d425db98e0ea6e914228b9f9de4ac1d9e2931b8afaac15d9584bb3386a534
7
+ data.tar.gz: 7642b27356e3a2664c028a99fe3ac8edef07dc8ef81a976332c7ac38f7fcf324c49d7046d12c98b990fda923772b6aa6abce5c6afde512c8e898859be214837d
data/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  Add this line to your application's Gemfile:
11
11
 
12
12
  ```ruby
13
- gem 'black_and_white', '~> 0.1.4'
13
+ gem 'black_and_white', '~> 0.1.5'
14
14
  ```
15
15
 
16
16
  And then execute:
@@ -33,7 +33,7 @@ this will create a `black_and_white.rb` config file in
33
33
  BlackAndWhite.configure do |config|
34
34
  config.bw_class = 'User'
35
35
  config.bw_class_table = :users
36
- config.bw_main_table = :ab_test
36
+ config.bw_main_table = :ab_tests
37
37
  config.bw_join_table = :ab_tests_users
38
38
  end
39
39
 
@@ -15,8 +15,8 @@ RUBY
15
15
 
16
16
  def bw_relations_table_data
17
17
  <<RUBY
18
- t.references :#{bw_tests_class_table}, index: true
19
- t.references :#{bw_tests_table_name}, index: true
18
+ t.references :#{bw_tests_class_table_singularize}, index: true
19
+ t.references :#{bw_tests_table_name_singularize}, index: true
20
20
  RUBY
21
21
  end
22
22
 
@@ -25,6 +25,10 @@ RUBY
25
25
  end
26
26
 
27
27
  def bw_tests_table_name
28
+ BlackAndWhite.config.bw_main_table
29
+ end
30
+
31
+ def bw_tests_table_name_singularize
28
32
  BlackAndWhite.config.bw_main_table.to_s.singularize
29
33
  end
30
34
 
@@ -33,6 +37,10 @@ RUBY
33
37
  end
34
38
 
35
39
  def bw_tests_class_table
40
+ BlackAndWhite.config.bw_class_table
41
+ end
42
+
43
+ def bw_tests_class_table_singularize
36
44
  BlackAndWhite.config.bw_class_table.to_s.singularize
37
45
  end
38
46
 
@@ -1,3 +1,3 @@
1
1
  module BlackAndWhite
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: black_and_white
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Slaveykov