spaced 0.6.0 → 0.7.0

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: de61b3e87ec85ff4891a034a0d75fd51c3f9cf2e2084ecd5ad6da538d2c05c5a
4
- data.tar.gz: e7a182e85a619b15576208934038428fa6f5faf46b0fa7ab0352753db0ba8cc0
3
+ metadata.gz: 17355ae1e24bb61da083670a4aad50adb43741ea7377e7e24962a62682e08b60
4
+ data.tar.gz: 76b84092099827aa147e9721cae029bd65bdebbdc5237e75c338e70b4a0d3378
5
5
  SHA512:
6
- metadata.gz: c39cd159a4d8ab8ceba3e0166ff894ad9a64d1224109330df87a71efe1326f5ba1af7feaeb82d41306d0e4ee21ee43e3e9ffbbec2c0aad1b48191afb9060dac3
7
- data.tar.gz: '025450092956b818c9e5f703b47aa27652937a584d8ad9c6bf0a31bd507c811256ceca4b92d8ebecb73dd78eabcff45b5c4274a2da8a40c4c7228797fcce117c'
6
+ metadata.gz: f96f78165b425b1643878a39929bfbd7d8baf8a5217539068c3a45231b6e3b3cd979720eed19ef7f4e9a7a46fd7c77872471d6ed9999fb174f3ae41cfe0df3c6
7
+ data.tar.gz: cdf6a7824daf41d205fdc8c41c6ce7f040ce7194eda90885421e0c6a7859a5f97ea379cc9b2aa21a35f87b00cdf3b73067375fd6931eb7c84da3485531236e57
data/Gemfile.lock CHANGED
@@ -1,36 +1,39 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spaced (0.6.0)
4
+ spaced (0.7.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  ast (2.4.2)
10
- json (2.9.1)
11
- language_server-protocol (3.17.0.3)
10
+ json (2.10.1)
11
+ language_server-protocol (3.17.0.4)
12
+ lint_roller (1.1.0)
12
13
  parallel (1.26.3)
13
- parser (3.3.6.0)
14
+ parser (3.3.7.1)
14
15
  ast (~> 2.4.1)
15
16
  racc
16
17
  racc (1.8.1)
17
18
  rainbow (3.1.1)
18
19
  regexp_parser (2.10.0)
19
- rubocop (1.70.0)
20
+ rubocop (1.72.1)
20
21
  json (~> 2.3)
21
- language_server-protocol (>= 3.17.0)
22
+ language_server-protocol (~> 3.17.0.2)
23
+ lint_roller (~> 1.1.0)
22
24
  parallel (~> 1.10)
23
25
  parser (>= 3.3.0.2)
24
26
  rainbow (>= 2.2.2, < 4.0)
25
27
  regexp_parser (>= 2.9.3, < 3.0)
26
- rubocop-ast (>= 1.36.2, < 2.0)
28
+ rubocop-ast (>= 1.38.0, < 2.0)
27
29
  ruby-progressbar (~> 1.7)
28
30
  unicode-display_width (>= 2.4.0, < 4.0)
29
- rubocop-ast (1.37.0)
31
+ rubocop-ast (1.38.0)
30
32
  parser (>= 3.3.1.0)
31
- rubocop-minitest (0.36.0)
32
- rubocop (>= 1.61, < 2.0)
33
- rubocop-ast (>= 1.31.1, < 2.0)
33
+ rubocop-minitest (0.37.1)
34
+ lint_roller (~> 1.1)
35
+ rubocop (>= 1.72.1, < 2.0)
36
+ rubocop-ast (>= 1.38.0, < 2.0)
34
37
  ruby-progressbar (1.13.0)
35
38
  sus (0.32.0)
36
39
  unicode-display_width (3.1.4)
data/README.md CHANGED
@@ -38,7 +38,7 @@ In the example above, `namespace` creates and initializes a new class `Twitter`
38
38
 
39
39
  ## Magic bang and predicate methods
40
40
 
41
- If you define a `#_!` or `#call` method in your namespaced class, you can then conveniently call that with a bang method:
41
+ If you define a `#_!` method in your namespaced class, you can then conveniently call that with a bang method:
42
42
 
43
43
  ```ruby
44
44
  class User
@@ -64,7 +64,7 @@ namespace :tweet do
64
64
  end
65
65
  end
66
66
  user = User.new
67
- user.tweet? # Will call the `#predicate` method.
67
+ user.tweet? # Will call the `#_?` method.
68
68
  ```
69
69
 
70
70
  Both bang and predicate methods can be defined using identically named methods:
data/fixtures/user.rb CHANGED
@@ -10,15 +10,6 @@ class User
10
10
  end
11
11
 
12
12
  namespace :dad, Daddy
13
- namespace :brother do
14
- def call(append = nil)
15
- "Andy Moss#{append}"
16
- end
17
-
18
- def predicate
19
- true
20
- end
21
- end
22
13
 
23
14
  namespace :sister do
24
15
  def sister!(append = nil)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spaced
4
- VERSION = "0.6.0"
4
+ VERSION = "0.7.0"
5
5
  end
data/lib/spaced.rb CHANGED
@@ -48,10 +48,6 @@ module Spaced
48
48
  module_eval <<-RUBY, __FILE__, __LINE__ + 1
49
49
  def #{name}!(...); #{name}.#{name}!(...); end # def user!; user.user!; end
50
50
  RUBY
51
- elsif methods.include?(:call) # DEPRECATED
52
- module_eval <<-RUBY, __FILE__, __LINE__ + 1
53
- def #{name}!(...); #{name}.call(...); end # def user!(...); user.call(...); end
54
- RUBY
55
51
  else
56
52
  define_method :"#{name}!" do
57
53
  raise NoMethodError,
@@ -67,10 +63,6 @@ module Spaced
67
63
  module_eval <<-RUBY, __FILE__, __LINE__ + 1
68
64
  def #{name}?(...); #{name}.#{name}?(...); end # def user?; user.user?; end
69
65
  RUBY
70
- elsif methods.include?(:predicate) # DEPRECATED
71
- module_eval <<-RUBY, __FILE__, __LINE__ + 1
72
- def #{name}?(...); #{name}.predicate(...); end # def user?; user.predicate; end
73
- RUBY
74
66
  else
75
67
  define_method :"#{name}?" do
76
68
  raise NoMethodError,
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spaced
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Moss
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-01-15 00:00:00.000000000 Z
10
+ date: 2025-02-17 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  email:
13
13
  - joel@developwithstyle.com
@@ -49,7 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
49
  - !ruby/object:Gem::Version
50
50
  version: '0'
51
51
  requirements: []
52
- rubygems_version: 3.6.2
52
+ rubygems_version: 3.6.3
53
53
  specification_version: 4
54
54
  summary: Super simple and convenient way to isolate and namespace a collection of
55
55
  related methods