arturo 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +3 -4
- data/lib/arturo/engine.rb +0 -10
- data/lib/arturo/version.rb +1 -1
- data/lib/arturo.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6138f865d2ad2920842d7f713a0fbaa324ee411c432e38a6899182efab5d84a4
|
4
|
+
data.tar.gz: f0900376dac8609f086d53cf20f4cd764d0ea0905e23b5398be011d3a18d81f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f663092021badfa29ae7d18872a6b6c99831aaa6c824093758b94f99aafeec8894bb6637a44383f31d10f9d93475d9061466dc00deccbd3da2102b934ed557d2
|
7
|
+
data.tar.gz: 506348698d8c25335de9177f5cc8c85abf1de13c573013fd425641e9c20eba52a23149114c21dc85ab6bf9bcb488398e9518157a1d00fce396c64faa72cac1a7
|
data/CHANGELOG.md
CHANGED
@@ -1,14 +1,23 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
+
## v4.0.1
|
4
|
+
|
5
|
+
Fixes loading issues for apps not using the Rails engine.
|
6
|
+
|
3
7
|
## v4.0.0
|
8
|
+
|
4
9
|
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`.
|
10
|
+
|
5
11
|
Adds support for Ruby 3.3.
|
12
|
+
|
6
13
|
Returns false immediately for `feature_enabled_for?` calls with `nil` recipients.
|
7
14
|
|
8
15
|
## v3.0.0
|
9
16
|
|
10
17
|
Converts the Feature model into a mixin that should be used by services via a model generator.
|
18
|
+
|
11
19
|
Brings back the `warm_cache!` method.
|
20
|
+
|
12
21
|
Adds support for Rails 7.1.
|
13
22
|
|
14
23
|
## 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 = []
|
data/lib/arturo/version.rb
CHANGED
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.
|
4
|
+
version: 4.0.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-
|
11
|
+
date: 2024-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|