arturo 3.0.1 → 3.0.2.pre.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
  SHA256:
3
- metadata.gz: 414a786d1d81cd18b31b5d54bc7df6b9c820d13106dcf471721d7383c28e75e8
4
- data.tar.gz: b42410fd7c9df45c1875958f335e5434a856e154c322b88819dfa20f4eb22877
3
+ metadata.gz: d5db87fac2ac4219ff44405090a37c086cee7ac6654c7cb5dec0bcac3efc1f5b
4
+ data.tar.gz: 5525f0dc96a7853bce80fe80c30db5a9b6fa26e8b97c2782765e2f4189d00e8e
5
5
  SHA512:
6
- metadata.gz: 3044307df2f849112c60bb859ab52b2151634ff891442b1e93328f270ad4adb1ddbb8e1da63e5317ad3b5d365d6c3de3761024e585216f5c7a8a20de5af0aa2a
7
- data.tar.gz: 592a564c1af2f63d80523f9a41c412bb882dabc14195dc3a1dd73d88220b2e74e1d17c5b4edc444d4a9f3f74b0650e6d5f3bb7e4244765fcbf073a1be2f6dfc3
6
+ metadata.gz: 18e7730ea35912a921a69bb9e81c88ce9df285e93277634eb0532290e03a56af0243578cba73ff9fec7c9fc4ce42426bc622fa2d91231500296bd84495f67a85
7
+ data.tar.gz: b3ebee900920249c7cdbc2e1a444930554c6ca1d9f0935aef4063d1095f3d252354e89c917667374101f3ffa29711af52169a4f0a8b6531128f1fc7cd097a29b
data/CHANGELOG.md CHANGED
@@ -1,9 +1,19 @@
1
1
  ## Unreleased
2
2
 
3
+ ## v4.0.0
4
+
5
+ Stops loading the Rails engine automatically. If you are using the engine, you need to require it explicitly by adding `require 'arturo/engine'` to `application.rb`.
6
+
7
+ Adds support for Ruby 3.3.
8
+
9
+ Returns false immediately for `feature_enabled_for?` calls with `nil` recipients.
10
+
3
11
  ## v3.0.0
4
12
 
5
13
  Converts the Feature model into a mixin that should be used by services via a model generator.
14
+
6
15
  Brings back the `warm_cache!` method.
16
+
7
17
  Adds support for Rails 7.1.
8
18
 
9
19
  ## v2.8.0
data/README.md CHANGED
@@ -43,7 +43,7 @@ $(function() {
43
43
  updatePostingsList();
44
44
  }
45
45
  });
46
- ````
46
+ ```
47
47
 
48
48
  Trish uses Arturo's Controller filters to control who has access to
49
49
  the feature:
@@ -70,7 +70,6 @@ feature and deploy it to all users.
70
70
 
71
71
  ## Installation
72
72
 
73
-
74
73
  ```Ruby
75
74
  gem 'arturo'
76
75
  ```
@@ -101,7 +100,7 @@ rake db:migrate
101
100
 
102
101
  #### Edit the Feature model
103
102
 
104
- By default, the generated model `Arturo::Feature` inherits from `ActiveRecord::Base`. However, if you’re using multiple databases your models should inherit from an abstract class that specifies a database connection, not directly from `ActiveRecord::Base`. Update the generated model in `app/models/arturo/feature.rb` to make it use a correct database.
103
+ By default, the generated model `Arturo::Feature` inherits from `ActiveRecord::Base`. However, if you’re using multiple databases your models should inherit from an abstract class that specifies a database connection, not directly from `ActiveRecord::Base`. Update the generated model in `app/models/arturo/feature.rb` to make it use a correct database.
105
104
 
106
105
  ##### Initializer
107
106
 
@@ -320,7 +319,7 @@ initializer:
320
319
  ```Ruby
321
320
  Arturo::Feature.extend(Arturo::FeatureCaching)
322
321
  Arturo::Feature.cache_ttl = 10.minutes
323
- ````
322
+ ```
324
323
 
325
324
  You can also warm the cache on startup:
326
325
 
data/lib/arturo/engine.rb CHANGED
@@ -13,9 +13,5 @@ module Arturo
13
13
  helper Arturo::FeatureManagement
14
14
  end
15
15
  end
16
-
17
- root = File.expand_path("../../..", __FILE__)
18
- config.autoload_paths = ["#{root}/app/helpers", "#{root}/app/controllers"]
19
- config.eager_load_paths = []
20
16
  end
21
17
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Arturo
3
- VERSION = '3.0.1'
3
+ VERSION = '3.0.2.pre.1'
4
4
  end
data/lib/arturo.rb CHANGED
@@ -15,6 +15,8 @@ module Arturo
15
15
  # @param [#id] recipient
16
16
  # @return [true,false] whether the feature exists and is enabled for the recipient
17
17
  def feature_enabled_for?(feature_name, recipient)
18
+ return false if recipient.nil?
19
+
18
20
  f = self::Feature.to_feature(feature_name)
19
21
  f && f.enabled_for?(recipient)
20
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arturo
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2.pre.1
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: 2023-11-03 00:00:00.000000000 Z
11
+ date: 2024-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  requirements: []
189
- rubygems_version: 3.0.3.1
189
+ rubygems_version: 3.5.3
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: Feature sliders, wrapped up in an engine