arturo 4.0.0 → 4.0.1.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: d10fff2eec2850ddf264d8c718160e17d05a1d04c2c0b62cab1c4fb6f6cecf0d
4
- data.tar.gz: d10b0bcbd89d7e63c3e27c6ae679d44ebae9f6287174f078205bd44e6fb402b2
3
+ metadata.gz: 2160421d60721a0fb8fc39b31e193e8e51556583aa4341e82dc0e405f8bac22b
4
+ data.tar.gz: 1197299acf6e683d51f5a1954bd4aaca239e99f04a25b1c68cee04ad430f6156
5
5
  SHA512:
6
- metadata.gz: 3e1d5c33c1fd71d8e1d927db48fbf8a68d3479736752c78ff057255e32c29886c2ef511797520b1ce6d22272e470ac97c60edc6519ec95b3a1a300344a2f388f
7
- data.tar.gz: f2f7a5ed46507f91872d5ac798cbf2811e460f795a57f11acd71d367e9545479934b885300584976641aa2474777e8a5310be90b04ad1f474aea2d7b9f0d7bd7
6
+ metadata.gz: 3c8d7f4a91e9992c459349882106f6bdd80af29f8673304213271ec67ce39251501687914f11e75bf0f4815b29001eb27ed293f150456093d7bb1bf0d1d1f32e
7
+ data.tar.gz: d4608e30f757160d31c7622b3b8018acfdf19899beddc88883ba3c0e5b14de08e0bb0a27295beadbdaf90a56408409ecab81703f0749ded5bcd46081c45cb29d
data/CHANGELOG.md CHANGED
@@ -1,14 +1,19 @@
1
1
  ## Unreleased
2
2
 
3
3
  ## v4.0.0
4
+
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
+
5
7
  Adds support for Ruby 3.3.
8
+
6
9
  Returns false immediately for `feature_enabled_for?` calls with `nil` recipients.
7
10
 
8
11
  ## v3.0.0
9
12
 
10
13
  Converts the Feature model into a mixin that should be used by services via a model generator.
14
+
11
15
  Brings back the `warm_cache!` method.
16
+
12
17
  Adds support for Rails 7.1.
13
18
 
14
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
@@ -1,19 +1,9 @@
1
1
  # frozen_string_literal: true
2
- require 'arturo/controller_filters'
3
2
  require 'arturo/middleware'
4
3
  require 'rails/engine'
5
4
 
6
5
  module Arturo
7
6
  class Engine < ::Rails::Engine
8
- ActiveSupport.on_load(:action_controller) do
9
- include Arturo::FeatureAvailability
10
- include Arturo::ControllerFilters
11
- if respond_to?(:helper)
12
- helper Arturo::FeatureAvailability
13
- helper Arturo::FeatureManagement
14
- end
15
- end
16
-
17
7
  root = File.expand_path("../../..", __FILE__)
18
8
  config.autoload_paths = ["#{root}/app/helpers", "#{root}/app/controllers"]
19
9
  config.eager_load_paths = []
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Arturo
3
- VERSION = '4.0.0'
3
+ VERSION = '4.0.1.pre.1'
4
4
  end
data/lib/arturo.rb CHANGED
@@ -6,6 +6,7 @@ require_relative 'arturo/feature_methods'
6
6
  require_relative 'arturo/feature_availability'
7
7
  require_relative 'arturo/feature_management'
8
8
  require_relative 'arturo/feature_caching'
9
+ require_relative 'arturo/controller_filters'
9
10
 
10
11
  module Arturo
11
12
  class << self
@@ -29,3 +30,12 @@ module Arturo
29
30
  end
30
31
  end
31
32
  end
33
+
34
+ ActiveSupport.on_load(:action_controller) do
35
+ include Arturo::FeatureAvailability
36
+ include Arturo::ControllerFilters
37
+ if respond_to?(:helper)
38
+ helper Arturo::FeatureAvailability
39
+ helper Arturo::FeatureManagement
40
+ end
41
+ 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: 4.0.0
4
+ version: 4.0.1.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: 2024-04-12 00:00:00.000000000 Z
11
+ date: 2024-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord