toggly-rails 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/toggly/rails/testing.rb +4 -4
- data/lib/toggly/rails/version.rb +1 -1
- data/lib/toggly/rails/view_helpers.rb +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8fa5554933362a0a77ee8e4e8b0c4bde482d54b2ce9bd10043f812686038e4f1
|
|
4
|
+
data.tar.gz: 196f1858dbdb236167733278e892108ce52e1ca0aa924b13a06e2f931224ff91
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: df689c50b7a0c3ac24a8cb7428170d57a2253d920cc0f448d2feef89a9eac5eade12427d7a4d41acf7fc384d6672d27b849daa1af20ee358cf73ebd541176bfe
|
|
7
|
+
data.tar.gz: 4ab11ab58002af13ad50212146434d1b0509f580f3709e724da89463c1128e4d4a38e4ac3c5946b6e8af6d20b7d0aa045e0cdb99d17b18c55d6ba748136f6052
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.1] - 2026-09-03
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Raise required Ruby version to 3.2+ (matches Gemfile.lock Bundler and CI).
|
|
13
|
+
- Use anonymous block forwarding in Rails testing and view helpers (RuboCop for Ruby 3.2+).
|
|
14
|
+
|
|
8
15
|
## [0.2.0] - 2026-08-21
|
|
9
16
|
|
|
10
17
|
### Added
|
data/lib/toggly/rails/testing.rb
CHANGED
|
@@ -82,16 +82,16 @@ module Toggly
|
|
|
82
82
|
#
|
|
83
83
|
# @param feature_key [String, Symbol] Feature key
|
|
84
84
|
# @yield Block during which the feature is enabled
|
|
85
|
-
def enable_feature(feature_key, &
|
|
86
|
-
with_feature(feature_key, enabled: true, &
|
|
85
|
+
def enable_feature(feature_key, &)
|
|
86
|
+
with_feature(feature_key, enabled: true, &)
|
|
87
87
|
end
|
|
88
88
|
|
|
89
89
|
# Disable a feature for the duration of a block
|
|
90
90
|
#
|
|
91
91
|
# @param feature_key [String, Symbol] Feature key
|
|
92
92
|
# @yield Block during which the feature is disabled
|
|
93
|
-
def disable_feature(feature_key, &
|
|
94
|
-
with_feature(feature_key, enabled: false, &
|
|
93
|
+
def disable_feature(feature_key, &)
|
|
94
|
+
with_feature(feature_key, enabled: false, &)
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
# RSpec helpers
|
data/lib/toggly/rails/version.rb
CHANGED
|
@@ -36,10 +36,10 @@ module Toggly
|
|
|
36
36
|
# @param context [Toggly::Context, nil] Optional override context
|
|
37
37
|
# @yield Content to render when enabled
|
|
38
38
|
# @return [String, nil]
|
|
39
|
-
def when_feature_enabled(feature_key, context: nil, &
|
|
39
|
+
def when_feature_enabled(feature_key, context: nil, &)
|
|
40
40
|
return unless feature_enabled?(feature_key, context: context)
|
|
41
41
|
|
|
42
|
-
capture(&
|
|
42
|
+
capture(&) if block_given?
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
# Render content only if feature is disabled
|
|
@@ -48,10 +48,10 @@ module Toggly
|
|
|
48
48
|
# @param context [Toggly::Context, nil] Optional override context
|
|
49
49
|
# @yield Content to render when disabled
|
|
50
50
|
# @return [String, nil]
|
|
51
|
-
def when_feature_disabled(feature_key, context: nil, &
|
|
51
|
+
def when_feature_disabled(feature_key, context: nil, &)
|
|
52
52
|
return if feature_enabled?(feature_key, context: context)
|
|
53
53
|
|
|
54
|
-
capture(&
|
|
54
|
+
capture(&) if block_given?
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
# Render enabled or disabled content based on feature state
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: toggly-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ops.ai
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-09-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|
|
@@ -79,7 +79,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
79
79
|
requirements:
|
|
80
80
|
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: 3.
|
|
82
|
+
version: 3.2.0
|
|
83
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
requirements:
|
|
85
85
|
- - ">="
|