flipflop 2.3.0 → 2.3.1

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: 0a2273ae05773bcf363232d55a5220c8da41f39a
4
- data.tar.gz: 8fd2d51b80011ef69c993b389e15170f29f9d5eb
3
+ metadata.gz: 79ce3ddc4c05be4f6b655519b73fc592b749177a
4
+ data.tar.gz: 9de114a7fa334e5689d9bb49e6b2c0e0189b59b4
5
5
  SHA512:
6
- metadata.gz: 5aaab9397951347310618fce6c9e3223a4b0435f7bcbf9f34ce51785465d6d6bdbb0060c60563e4ef9bf6abf560c437551644a2eb9077c62b58746c451deac1d
7
- data.tar.gz: c7c18fcb35fb1eb5adcd55ca6ae1c5c8fad679a1aa9a2612774f6ef27b969a2d784b0a3784cf9e1f6d5a3ac98f8d5013a0f860093afde5c1e7a911728bc2fc86
6
+ metadata.gz: d89175f3cdf7c36f31fa22ec6b3174bf3d69399ec2ad58d1c1c68bbb5e239456b85c3386144414e5e40ce87d4c504f49cdbc54293aa5b9659dedcba237b94e9c
7
+ data.tar.gz: d5a233ec2f53cdfb4d1aacd6afda3b385618887cfb524a6f7fc6de5eb0ad2ad05b949080a34e8e48eab5f4c18fd6dae571affee63ca576533ebf6277f153360c
data/.travis.yml CHANGED
@@ -32,10 +32,6 @@ matrix:
32
32
  - rvm: jruby-9.1.2.0
33
33
  - rvm: ruby-head
34
34
  - rvm: jruby-head
35
- notifications:
36
- email: false
37
- slack:
38
- secure: crOO1QGnFn9T1DpVgxkukTSiN8lQq09X8WF8oi1Eoa7Liex4gzWq7f8wlIXPrRFAsNjU47fSrz+L1C6Eg068Vd2df9pkqjW0pLNeqUViJ35TzpYISTtzJrX+x3nvCQLlvS4leP6lkijlsvlu1IN0xnXadW5cmcMoEcPo4Yma1RUklwlreSRIEmJiutYKVFRw3gIZA9vsnXNEcD408mvSY/8Kuw+hmRQupODUalXDpZo1q3HH+ZPQq+/rGuJ7XRf9sBtxjpUF0G4FJZQhVP4CrLNYVBE/83rHJ6HSf6u3SlYVIMiautq0nWpVLPHUrkOPJVeVh6EPtoFeI/cehH1NyoAVvL5a39wFRBlJ4jVPWUrrnihJT/6+P6GM9PSnYogxtIoTsdrYES2FgtWGgwG5uLyw8U6bW7G7rCzQwBP7enVHWVCbDgdSSjE1Mg1I9qhRuL6pHs5des4VKk6pfD3p+BRqLmOZR2jx4v8MFwakSFqQWOMxaD0U1lfxecqSx9OkwWEhCFSnHeXeHInEhY6qKCdZZzT+beYn0xppUMPJGMTqe5+po8gL+5MxQwI8Xs/5hSve5frfmuS7UQf5BnFMOzwoThQrXCFRz58wXvcZTD9eTdVBV44Hsi5OLdYn9K58sNUhgcxGfRgdE7Gy9P7DD4fHPGakD/Tz++HuCmCUXNs=
39
35
  before_deploy: rake assets:compile
40
36
  deploy:
41
37
  provider: rubygems
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.3.1
2
+
3
+ * Fixed backwards compatibility of strategies controller. The incompatibility was introduced in 2.3.0. (@jcoyne)
4
+
1
5
  ## 2.3.0
2
6
 
3
7
  * Support for Rails API only apps.
data/LICENSE CHANGED
@@ -1,7 +1,7 @@
1
1
  The MIT License
2
2
 
3
3
  Copyright (c) 2011-2013 Learnable Pty Ltd
4
- Copyright (c) 2016 Voormedia
4
+ Copyright (c) 2016-2017 Voormedia
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -285,6 +285,15 @@ class MyEngine < Rails::Engine
285
285
  end
286
286
  ```
287
287
 
288
+ ## Internationalization
289
+
290
+ The dashboard is translatable. Make sure `I18n.locale` is set to the correct
291
+ value in your `ApplicationController` or alternatively in
292
+ `dashboard_access_filter`.
293
+
294
+ Take a look at [the English translations](config/locales/en.yml) to see which
295
+ keys should be present and translated in your locale file.
296
+
288
297
  ## Testing
289
298
 
290
299
  In your test environment, you typically want to keep your features. But to make
@@ -14,8 +14,13 @@ module Flipflop
14
14
 
15
15
  private
16
16
 
17
+ # Modeled after ActiveModel::Type::Boolean, but only returns boolean values
18
+ # (never nil) and checks for true values, because that's what earlier
19
+ # versions of Flipflop did.
20
+ ENABLE_VALUES = %w(1 on ON t T).to_set.freeze
21
+
17
22
  def enable?
18
- params[:commit].to_s == "1"
23
+ ENABLE_VALUES.include?(params[:commit])
19
24
  end
20
25
 
21
26
  def feature_key
@@ -1,3 +1,3 @@
1
1
  module Flipflop
2
- VERSION = "2.3.0"
2
+ VERSION = "2.3.1"
3
3
  end
@@ -0,0 +1,29 @@
1
+ require File.expand_path("../../test_helper", __FILE__)
2
+
3
+ describe "Flipflop::StrategiesController" do
4
+ subject do
5
+ Flipflop::StrategiesController.new
6
+ end
7
+
8
+ describe "enable?" do
9
+ it "should return false when commit is empty" do
10
+ subject.params = ActionController::Parameters.new(commit: "")
11
+ assert_same subject.send(:enable?), false
12
+ end
13
+
14
+ it "should return false when commit is nil" do
15
+ subject.params = ActionController::Parameters.new
16
+ assert_same subject.send(:enable?), false
17
+ end
18
+
19
+ it "should return true when commit is on" do
20
+ subject.params = ActionController::Parameters.new(commit: "on")
21
+ assert_same subject.send(:enable?), true
22
+ end
23
+
24
+ it "should return true when commit is 1" do
25
+ subject.params = ActionController::Parameters.new(commit: "1")
26
+ assert_same subject.send(:enable?), true
27
+ end
28
+ end
29
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipflop
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Annesley
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-02-28 00:00:00.000000000 Z
13
+ date: 2017-03-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -109,6 +109,7 @@ files:
109
109
  - test/unit/strategies/redis_strategy_test.rb
110
110
  - test/unit/strategies/session_strategy_test.rb
111
111
  - test/unit/strategies/test_strategy_test.rb
112
+ - test/unit/strategies_controller_test.rb
112
113
  homepage: https://github.com/voormedia/flipflop
113
114
  licenses:
114
115
  - MIT