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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8d468b9f510429b469f221020f9cd8d3067d7245a64eb6a69b23177cedc5930
4
- data.tar.gz: 9a366fe266b0ca94fa6f2b73ba87126b054f02014d874fea68777298dc756172
3
+ metadata.gz: 8fa5554933362a0a77ee8e4e8b0c4bde482d54b2ce9bd10043f812686038e4f1
4
+ data.tar.gz: 196f1858dbdb236167733278e892108ce52e1ca0aa924b13a06e2f931224ff91
5
5
  SHA512:
6
- metadata.gz: 6781f2fa1f330cd89d6dab223294a6a5aa5f86cb6a9c3cdb830bdad6ed2eeb519a93cb963dfcd10ce731df2babbc6e227ae0ed967f11fe2bab0306ec7826215a
7
- data.tar.gz: a28620a28aa9ea49e37632aa2de01e17f132932e14d4f4f02d1a7bead02536c03690b0b38eb769b6cbff186bafb9f7c248f357d5b429bd9b407c74a88c252033
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
@@ -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, &block)
86
- with_feature(feature_key, enabled: true, &block)
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, &block)
94
- with_feature(feature_key, enabled: false, &block)
93
+ def disable_feature(feature_key, &)
94
+ with_feature(feature_key, enabled: false, &)
95
95
  end
96
96
 
97
97
  # RSpec helpers
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Toggly
4
4
  module Rails
5
- VERSION = "0.2.0"
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
@@ -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, &block)
39
+ def when_feature_enabled(feature_key, context: nil, &)
40
40
  return unless feature_enabled?(feature_key, context: context)
41
41
 
42
- capture(&block) if block_given?
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, &block)
51
+ def when_feature_disabled(feature_key, context: nil, &)
52
52
  return if feature_enabled?(feature_key, context: context)
53
53
 
54
- capture(&block) if block_given?
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.0
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-08-24 00:00:00.000000000 Z
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.0.0
82
+ version: 3.2.0
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - ">="