act_with_booleans 0.0.8 → 1.0.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: ec48ceccb3d811bce5c09af4297f8ed9f27ea7c95bb3af5a12ee8bd701a19779
4
- data.tar.gz: 9625a3ab89f06cf9c3df8d69c76d1d73d1a3bace24f121df96d07b473654f7d4
3
+ metadata.gz: 0d7d5c53e8e13c88202c890be9910de8722ae49e3b91b998f35698ad24e83816
4
+ data.tar.gz: 157b80ceebb626c7ed68c0061d0233517f3ebff6fbd1db937e63c07867ce9b59
5
5
  SHA512:
6
- metadata.gz: 6fd21b9c73f1ddb18b5f845b4d0751f0fb1ebb8eeb67a82cc7f44f0882a55f7560357423598d062cab09fd8685aac90daf18607e7efa65b5832dae2fefa3f30b
7
- data.tar.gz: 2bd94c351acb16c557c6f4f3d55d4aa807c596f1345ad6100cd78cd066d0ac6953584da354eb3c21b58ff5be9260091598e5774b617d810309b73bf9dda6b198
6
+ metadata.gz: 33f527dfac3453840f975868af5c88240ef4480e753747d3e38b72d70508e74751793e1f6ba564a2f6914bb7a9e1f537155e8425c79b38c8b76d09c8d33585e6
7
+ data.tar.gz: 49e7090fc8665abb6500c8f278cd57f7005a7dcdfdafbfe7b5d804d7cb2fe864588230980c44656a916ad4a512f1e855fd430776c933ee09fb0cd68430b4c882
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
 
14
14
  steps:
15
- - uses: actions/checkout@v4
15
+ - uses: actions/checkout@v6
16
16
  - name: Set up Ruby
17
17
  uses: ruby/setup-ruby@v1
18
18
  with:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-4.0.2
1
+ ruby-4.0.5
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  class ActWithBooleans::Admin
4
2
  attr_reader :model
5
3
  attr_accessor :origin
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  class ActWithBooleans::Admin
4
2
  Location = Struct.new(:model, :origin, :position)
5
3
 
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  class ActWithBooleans::Admin
4
2
  def add_accessors(accessor, origin, mask)
5
3
  unless model.method_defined?(:act_with_booleans)
@@ -36,6 +34,10 @@ class ActWithBooleans::Admin
36
34
  end
37
35
 
38
36
  def remove_accessors(accessor)
39
- my_undef model, accessor, "#{accessor}?", "#{accessor}="
37
+ my_undef accessor, "#{accessor}?", "#{accessor}="
38
+ end
39
+
40
+ def my_undef(*names)
41
+ names.each { |name| model.undef_method(name) }
40
42
  end
41
43
  end
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  class ActWithBooleans::Admin
4
2
  def to_s
5
3
  res = []
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  class ActWithBooleans::Admin
4
2
  def add_flag(name, pos)
5
3
  accessor = name.to_sym
@@ -54,15 +52,4 @@ class ActWithBooleans::Admin
54
52
  raise "redefining #{acc} rejected" if model.method_defined?(acc)
55
53
  }
56
54
  end
57
-
58
- def my_undef(*names)
59
- names.each { |name|
60
- model.class_eval %(
61
- begin
62
- undef #{name}
63
- rescue
64
- end
65
- ), __FILE__, __LINE__ - 5
66
- }
67
- end
68
55
  end
@@ -1,7 +1,7 @@
1
- # frozen_string_literal: true
2
-
3
1
  module ActWithBooleans
4
- VERSION = "0.0.8" # 2026-03-31
2
+ VERSION = "1.0.1" # 2026-07-12
3
+ # VERSION = "1.0.0" # 2026-07-07
4
+ # VERSION = "0.0.8" # 2026-03-31
5
5
  # VERSION = "0.0.7" # 2025-12-31
6
6
  # VERSION = "0.0.6" # 2025-06-18
7
7
  # VERSION = "0.0.5" # 2024-10-19
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  # Principles:
4
2
  # POLA
5
3
  # KISS
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: act_with_booleans
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dittmar Krall
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  requirements: []
110
- rubygems_version: 4.0.6
110
+ rubygems_version: 4.0.14
111
111
  specification_version: 4
112
112
  summary: Ruby gem act_with_booleans
113
113
  test_files: []