arturo 2.5.1 → 2.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/README.md +9 -8
- data/app/controllers/arturo/features_controller.rb +2 -2
- data/lib/arturo/engine.rb +1 -0
- data/lib/arturo/feature.rb +0 -1
- data/lib/arturo/test_support.rb +2 -4
- data/lib/arturo/version.rb +1 -1
- data/lib/arturo.rb +1 -1
- metadata +14 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ceaf568b4219c17d2daafbaf7221ab121e9cdf29d7d6189f81d99154e78e642b
|
4
|
+
data.tar.gz: 2ed07d8ebba4efeddf7b35711aca46ed89f0caa7c043f6ac15b10a1803f0b716
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f89ce73cf2a3a3ccd4652c8e469ea1eb884da3d6c5d436ae9afc3dae828bad36cca805189784c082d09a56af1d3e642103e4cd0097f2a868238ff80d597d34f4
|
7
|
+
data.tar.gz: 3384b7619074ad58df2232e1a210ecbe1008f68d11918a37bc6ed78156df2fc5065dceb73c624f9894f2bd7a90811107b4fd254bd7f09c6d1d8c89d8408699e3
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
## Unreleased
|
2
|
+
|
3
|
+
## v2.5.4
|
4
|
+
|
5
|
+
Bug fix: Explicitly require rails engine to avoid errors that ::Rails::Engine cannot be found.
|
6
|
+
|
7
|
+
## v2.5.3
|
8
|
+
|
9
|
+
Bug fix: Allow using Arturo with ActiveRecord, but without all of Rails.
|
10
|
+
|
11
|
+
## v2.5.2
|
12
|
+
|
13
|
+
Drop support for Rails 3.2.
|
14
|
+
|
15
|
+
Add support for Rails 6.1.
|
16
|
+
|
17
|
+
Switch CI from Travis to GitHub Actions.
|
18
|
+
|
1
19
|
## v2.2.0
|
2
20
|
|
3
21
|
Bug fix: making a feature-update request that fails strict params checks now returns a sensible error instead of throwing an exception
|
data/README.md
CHANGED
@@ -2,13 +2,14 @@
|
|
2
2
|
|
3
3
|
Arturo provides feature sliders for Rails. It lets you turn features on and off
|
4
4
|
just like
|
5
|
-
[feature flippers](
|
5
|
+
[feature flippers](https://code.flickr.net/2009/12/02/flipping-out/),
|
6
6
|
but offers more fine-grained control. It supports deploying features only for
|
7
|
-
a given
|
7
|
+
a given percentage of your users and whitelisting and blacklisting users based
|
8
8
|
on any criteria you can express in Ruby.
|
9
9
|
|
10
10
|
The selection is deterministic. So if a user has a feature on Monday, the
|
11
|
-
user will still have it on Tuesday (unless
|
11
|
+
user will still have it on Tuesday (unless you *decrease* the feature's
|
12
|
+
deployment percentage or change its white- or blacklist settings).
|
12
13
|
|
13
14
|
### A quick example
|
14
15
|
|
@@ -71,7 +72,7 @@ feature and deploy it to all users.
|
|
71
72
|
|
72
73
|
|
73
74
|
```Ruby
|
74
|
-
gem 'arturo'
|
75
|
+
gem 'arturo'
|
75
76
|
```
|
76
77
|
|
77
78
|
## Configuration
|
@@ -113,16 +114,16 @@ There are configuration options for the following:
|
|
113
114
|
|
114
115
|
##### CSS
|
115
116
|
|
116
|
-
Open up the newly-generated `public/
|
117
|
+
Open up the newly-generated `public/stylesheets/arturo_customizations.css`.
|
117
118
|
You can add any overrides you like to the feature configuration page styles
|
118
|
-
here. **Do not** edit `public/
|
119
|
+
here. **Do not** edit `public/stylesheets/arturo.css` as that file may be
|
119
120
|
overwritten in future updates to Arturo.
|
120
121
|
|
121
122
|
### In other frameworks
|
122
123
|
|
123
124
|
Arturo is a Rails engine. I want to promote reuse on other frameworks by
|
124
125
|
extracting key pieces into mixins, though this isn't done yet. Open an
|
125
|
-
[issue](http://github.com/
|
126
|
+
[issue](http://github.com/zendesk/arturo/issues) and I'll be happy to
|
126
127
|
work with you on support for your favorite framework.
|
127
128
|
|
128
129
|
## Deep-Dive
|
@@ -346,6 +347,6 @@ on [Sliders](http://en.wikipedia.org/wiki/Sliders).
|
|
346
347
|
|
347
348
|
## Quality Metrics
|
348
349
|
|
349
|
-
[![Build Status](https://
|
350
|
+
[![Build Status](https://github.com/zendesk/arturo/workflows/CI/badge.svg)](https://github.com/zendesk/arturo/actions?query=workflow%3ACI)
|
350
351
|
|
351
352
|
[![Code Quality](https://codeclimate.com/github/zendesk/arturo.png)](https://codeclimate.com/github/zendesk/arturo)
|
@@ -37,7 +37,7 @@ module Arturo
|
|
37
37
|
feature = Arturo::Feature.find_by_id(id)
|
38
38
|
if feature.blank?
|
39
39
|
errors << t('arturo.features.flash.no_such_feature', :id => id)
|
40
|
-
elsif feature.
|
40
|
+
elsif feature.update(attributes)
|
41
41
|
updated_count += 1
|
42
42
|
else
|
43
43
|
errors << t('arturo.features.flash.error_updating', :id => id, :errors => feature.errors.full_messages.to_sentence)
|
@@ -76,7 +76,7 @@ module Arturo
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def update
|
79
|
-
if @feature.
|
79
|
+
if @feature.update(feature_params)
|
80
80
|
flash[:notice] = t('arturo.features.flash.updated', :name => @feature.to_s)
|
81
81
|
redirect_to arturo_engine.feature_path(@feature)
|
82
82
|
else
|
data/lib/arturo/engine.rb
CHANGED
data/lib/arturo/feature.rb
CHANGED
@@ -11,7 +11,6 @@ module Arturo
|
|
11
11
|
Arturo::Feature::SYMBOL_REGEX = /^[a-zA-z][a-zA-Z0-9_]*$/
|
12
12
|
DEFAULT_ATTRIBUTES = { :deployment_percentage => 0 }.with_indifferent_access
|
13
13
|
|
14
|
-
attr_accessible :symbol, :deployment_percentage if ActiveRecord::VERSION::MAJOR < 4
|
15
14
|
attr_readonly :symbol
|
16
15
|
|
17
16
|
validates_presence_of :symbol, :deployment_percentage
|
data/lib/arturo/test_support.rb
CHANGED
@@ -10,8 +10,7 @@ Arturo.instance_eval do
|
|
10
10
|
def enable_feature!(name)
|
11
11
|
if feature = Arturo::Feature.find_feature(name)
|
12
12
|
feature = feature.class.find(feature.id) if feature.frozen?
|
13
|
-
|
14
|
-
feature.send(update_method, :deployment_percentage => 100)
|
13
|
+
feature.update(:deployment_percentage => 100)
|
15
14
|
else
|
16
15
|
Arturo::Feature.create!(:symbol => name, :deployment_percentage => 100)
|
17
16
|
end
|
@@ -26,8 +25,7 @@ Arturo.instance_eval do
|
|
26
25
|
def disable_feature!(name)
|
27
26
|
if feature = Arturo::Feature.find_feature(name)
|
28
27
|
feature = feature.class.find(feature.id) if feature.frozen?
|
29
|
-
|
30
|
-
feature.send(update_method, :deployment_percentage => 0)
|
28
|
+
feature.update(:deployment_percentage => 0)
|
31
29
|
end
|
32
30
|
end
|
33
31
|
|
data/lib/arturo/version.rb
CHANGED
data/lib/arturo.rb
CHANGED
@@ -5,7 +5,7 @@ module Arturo
|
|
5
5
|
require 'arturo/feature_availability'
|
6
6
|
require 'arturo/feature_management'
|
7
7
|
require 'arturo/feature_caching'
|
8
|
-
require 'arturo/engine' if defined?(Rails
|
8
|
+
require 'arturo/engine' if defined?(Rails)
|
9
9
|
|
10
10
|
class << self
|
11
11
|
# Quick check for whether a feature is enabled for a recipient.
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arturo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James A. Rosen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4.2'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '6.
|
22
|
+
version: '6.2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - "
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '4.2'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '6.
|
32
|
+
version: '6.2'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rails
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "
|
37
|
+
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '4.2'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '6.
|
42
|
+
version: '6.2'
|
43
43
|
type: :development
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - "
|
47
|
+
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
49
|
+
version: '4.2'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '6.
|
52
|
+
version: '6.2'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: sqlite3
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,20 +106,6 @@ dependencies:
|
|
106
106
|
- - ">="
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
|
-
name: wwtd
|
111
|
-
requirement: !ruby/object:Gem::Requirement
|
112
|
-
requirements:
|
113
|
-
- - ">="
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: '0'
|
116
|
-
type: :development
|
117
|
-
prerelease: false
|
118
|
-
version_requirements: !ruby/object:Gem::Requirement
|
119
|
-
requirements:
|
120
|
-
- - ">="
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: '0'
|
123
109
|
- !ruby/object:Gem::Dependency
|
124
110
|
name: bump
|
125
111
|
requirement: !ruby/object:Gem::Requirement
|