test_track_rails_client 4.0.0.alpha14 → 4.0.0.alpha15

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: 78829ab3aa1352782eb7777f07ac0c66c2b4a21a
4
- data.tar.gz: 807fb0fd4539fa956a0047c2e878863e0221a664
3
+ metadata.gz: 311dca90ae394a21fa196ecbc900bf1e4df627de
4
+ data.tar.gz: 08d435d85ddfda7ba25798e202489fa3b58e5e8c
5
5
  SHA512:
6
- metadata.gz: bca371e700670448a29d2e73436147804fcd07715694b9b8e2b45d10a2a04552eb11418d711cd166e3889aa0b22595f219cbbeee3ff463df8271d1409e87f2d4
7
- data.tar.gz: 6265f59eb1c76d43743b937ef56ded1da37c5d5f87212efefca97558ab8ce58ebfbf9253f11719aa686770b1d7c1d34ac7b6e5748e13e8bccb3fffff2b227922
6
+ metadata.gz: 46871402a1023fcf4dfdbf1702d8c43c8bae3bd24eca1dd73882688d68efe0e0c426221117720183d8f1e56b59575a7d5466c1b9f7eab5ed05a03e6861a31e93
7
+ data.tar.gz: 7689a88ba49e1815bbbe503ed051c9425befae367da28e4d9741069ba55fb1c55662011cdbf8a638650e513394a43e17004804658831b951514a6b660f4e16e4
@@ -9,6 +9,16 @@ module TestTrack::Controller
9
9
  around_action :manage_test_track_session
10
10
  end
11
11
 
12
+ class_methods do
13
+ def require_feature_flag(feature_flag, *args)
14
+ before_action(*args) do
15
+ unless test_track_visitor.ab(feature_flag, context: self.class.name.underscore)
16
+ raise ActionController::RoutingError, 'Not Found'
17
+ end
18
+ end
19
+ end
20
+ end
21
+
12
22
  private
13
23
 
14
24
  def test_track_session
@@ -1,3 +1,3 @@
1
1
  module TestTrackRailsClient
2
- VERSION = "4.0.0.alpha14" # rubocop:disable Style/MutableConstant
2
+ VERSION = "4.0.0.alpha15" # rubocop:disable Style/MutableConstant
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_track_rails_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.alpha14
4
+ version: 4.0.0.alpha15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan O'Neill
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2018-11-09 00:00:00.000000000 Z
16
+ date: 2019-02-03 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: airbrake