spaced 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2da420b63a66615b4f9227fb1064c16e443b120ac506b1ebaeb820ddfb80216
4
- data.tar.gz: 0b52d7dd0de000a0895a98f42d1cac4e1a5fb426b1865eb48c923fecc40c4654
3
+ metadata.gz: de61b3e87ec85ff4891a034a0d75fd51c3f9cf2e2084ecd5ad6da538d2c05c5a
4
+ data.tar.gz: e7a182e85a619b15576208934038428fa6f5faf46b0fa7ab0352753db0ba8cc0
5
5
  SHA512:
6
- metadata.gz: e5c2ebb06e5298dcdfb3e9d4654fb3397e5d91c32cfd7a2bac1f2426f23d7f256fba70f948a7ccc5adcbb9dd5728db76acec16b05b7803f07f18f33a997d8326
7
- data.tar.gz: 5e745b116152c80528a3f3c2c585a826925edff33458a368188d992ba3f86883950f2016c53d5fb9e8cf1d7e47d222d5ccda0c8910545562e1c3436263e9ba57
6
+ metadata.gz: c39cd159a4d8ab8ceba3e0166ff894ad9a64d1224109330df87a71efe1326f5ba1af7feaeb82d41306d0e4ee21ee43e3e9ffbbec2c0aad1b48191afb9060dac3
7
+ data.tar.gz: '025450092956b818c9e5f703b47aa27652937a584d8ad9c6bf0a31bd507c811256ceca4b92d8ebecb73dd78eabcff45b5c4274a2da8a40c4c7228797fcce117c'
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 3.1.0
2
+ TargetRubyVersion: 3.2.0
3
3
  NewCops: enable
4
4
 
5
5
  Style/StringLiterals:
@@ -18,4 +18,4 @@ Metrics/BlockLength:
18
18
  Exclude:
19
19
  - test/**/*
20
20
  Style/Documentation:
21
- Enabled: false
21
+ Enabled: false
data/Gemfile CHANGED
@@ -5,8 +5,9 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in spaced.gemspec
6
6
  gemspec
7
7
 
8
- gem "rake", "~> 13.0"
9
- gem "rubocop", "~> 1.21"
10
- gem "rubocop-minitest"
11
- gem "rubocop-rake"
8
+ group :development do
9
+ gem "rubocop"
10
+ gem "rubocop-minitest"
11
+ end
12
+
12
13
  gem "sus", group: :test
data/Gemfile.lock CHANGED
@@ -1,55 +1,54 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spaced (0.4.0)
4
+ spaced (0.6.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  ast (2.4.2)
10
- json (2.7.1)
10
+ json (2.9.1)
11
11
  language_server-protocol (3.17.0.3)
12
- parallel (1.23.0)
13
- parser (3.2.2.4)
12
+ parallel (1.26.3)
13
+ parser (3.3.6.0)
14
14
  ast (~> 2.4.1)
15
15
  racc
16
- racc (1.7.3)
16
+ racc (1.8.1)
17
17
  rainbow (3.1.1)
18
- rake (13.1.0)
19
- regexp_parser (2.8.3)
20
- rexml (3.2.6)
21
- rubocop (1.58.0)
18
+ regexp_parser (2.10.0)
19
+ rubocop (1.70.0)
22
20
  json (~> 2.3)
23
21
  language_server-protocol (>= 3.17.0)
24
22
  parallel (~> 1.10)
25
- parser (>= 3.2.2.4)
23
+ parser (>= 3.3.0.2)
26
24
  rainbow (>= 2.2.2, < 4.0)
27
- regexp_parser (>= 1.8, < 3.0)
28
- rexml (>= 3.2.5, < 4.0)
29
- rubocop-ast (>= 1.30.0, < 2.0)
25
+ regexp_parser (>= 2.9.3, < 3.0)
26
+ rubocop-ast (>= 1.36.2, < 2.0)
30
27
  ruby-progressbar (~> 1.7)
31
- unicode-display_width (>= 2.4.0, < 3.0)
32
- rubocop-ast (1.30.0)
33
- parser (>= 3.2.1.0)
34
- rubocop-minitest (0.33.0)
35
- rubocop (>= 1.39, < 2.0)
36
- rubocop-rake (0.6.0)
37
- rubocop (~> 1.0)
28
+ unicode-display_width (>= 2.4.0, < 4.0)
29
+ rubocop-ast (1.37.0)
30
+ 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)
38
34
  ruby-progressbar (1.13.0)
39
- sus (0.24.0)
40
- unicode-display_width (2.5.0)
35
+ sus (0.32.0)
36
+ unicode-display_width (3.1.4)
37
+ unicode-emoji (~> 4.0, >= 4.0.4)
38
+ unicode-emoji (4.0.4)
41
39
 
42
40
  PLATFORMS
43
41
  arm64-darwin-21
44
42
  arm64-darwin-22
43
+ arm64-darwin-23
44
+ arm64-darwin-24
45
+ x86_64-linux
45
46
 
46
47
  DEPENDENCIES
47
- rake (~> 13.0)
48
- rubocop (~> 1.21)
48
+ rubocop
49
49
  rubocop-minitest
50
- rubocop-rake
51
50
  spaced!
52
51
  sus
53
52
 
54
53
  BUNDLED WITH
55
- 2.3.7
54
+ 2.6.2
data/README.md CHANGED
@@ -8,7 +8,7 @@ Spaced is a super simple and convenient way to isolate and namespace a collectio
8
8
  class User
9
9
  include Spaced
10
10
 
11
- # Pass a black with a bunch of methods.
11
+ # Pass a block with a bunch of methods.
12
12
  namespace :twitter do
13
13
  def create(msg)
14
14
  api.create_tweet msg
data/fixtures/user.rb CHANGED
@@ -35,7 +35,7 @@ class User
35
35
  "Lesley Moss#{append}"
36
36
  end
37
37
 
38
- def _?
38
+ def _?(*, **)
39
39
  true
40
40
  end
41
41
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spaced
4
- VERSION = "0.4.0"
4
+ VERSION = "0.6.0"
5
5
  end
data/lib/spaced.rb CHANGED
@@ -14,13 +14,13 @@ module Spaced
14
14
  end
15
15
 
16
16
  module ClassMethods
17
- def namespace(name, klass = nil, &) # rubocop:disable Metrics/*
17
+ def namespace(name, klass = nil, &block) # rubocop:disable Metrics,Naming/BlockForwarding,Lint/UnusedMethodArgument
18
18
  if klass
19
19
  raise "#{klass} must be a subclass of Spaced::Base" unless klass < Spaced::Base
20
20
  else
21
21
  class_name = name.to_s.split("_").collect(&:capitalize).join
22
22
  klass = module_eval <<-RUBY, __FILE__, __LINE__ + 1
23
- #{self}::#{class_name} = Class.new(Base, &) # Parent::Namespace = Class.new(Base, &)
23
+ #{self}::#{class_name} = Class.new(Base, &block) # Parent::Namespace = Class.new(Base, &block)
24
24
  RUBY
25
25
  end
26
26
 
@@ -61,15 +61,15 @@ module Spaced
61
61
 
62
62
  if methods.include?(:_?)
63
63
  module_eval <<-RUBY, __FILE__, __LINE__ + 1
64
- def #{name}?; #{name}._?; end # def user?; user._?; end
64
+ def #{name}?(...); #{name}._?(...); end # def user?; user._?; end
65
65
  RUBY
66
66
  elsif methods.include?(:"#{name}?")
67
67
  module_eval <<-RUBY, __FILE__, __LINE__ + 1
68
- def #{name}?; #{name}.#{name}?; end # def user?; user.user?; end
68
+ def #{name}?(...); #{name}.#{name}?(...); end # def user?; user.user?; end
69
69
  RUBY
70
70
  elsif methods.include?(:predicate) # DEPRECATED
71
71
  module_eval <<-RUBY, __FILE__, __LINE__ + 1
72
- def #{name}?; #{name}.predicate; end # def user?; user.predicate; end
72
+ def #{name}?(...); #{name}.predicate(...); end # def user?; user.predicate; end
73
73
  RUBY
74
74
  else
75
75
  define_method :"#{name}?" do
metadata CHANGED
@@ -1,16 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spaced
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Moss
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2023-12-06 00:00:00.000000000 Z
10
+ date: 2025-01-15 00:00:00.000000000 Z
12
11
  dependencies: []
13
- description:
14
12
  email:
15
13
  - joel@developwithstyle.com
16
14
  executables: []
@@ -23,7 +21,6 @@ files:
23
21
  - Gemfile.lock
24
22
  - LICENSE.txt
25
23
  - README.md
26
- - Rakefile
27
24
  - fixtures/daddy.rb
28
25
  - fixtures/test_helper.rb
29
26
  - fixtures/user.rb
@@ -38,7 +35,6 @@ metadata:
38
35
  source_code_uri: https://github.com/joelmoss/spaced
39
36
  changelog_uri: https://github.com/joelmoss/proscenium/releases
40
37
  rubygems_mfa_required: 'true'
41
- post_install_message:
42
38
  rdoc_options: []
43
39
  require_paths:
44
40
  - lib
@@ -46,15 +42,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
46
42
  requirements:
47
43
  - - ">="
48
44
  - !ruby/object:Gem::Version
49
- version: 3.1.0
45
+ version: 3.2.0
50
46
  required_rubygems_version: !ruby/object:Gem::Requirement
51
47
  requirements:
52
48
  - - ">="
53
49
  - !ruby/object:Gem::Version
54
50
  version: '0'
55
51
  requirements: []
56
- rubygems_version: 3.4.22
57
- signing_key:
52
+ rubygems_version: 3.6.2
58
53
  specification_version: 4
59
54
  summary: Super simple and convenient way to isolate and namespace a collection of
60
55
  related methods
data/Rakefile DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rubocop/rake_task"
5
-
6
- task :test do
7
- sh "bundle exec sus"
8
- end
9
-
10
- RuboCop::RakeTask.new
11
-
12
- task default: %i[test rubocop]