tablesalt 0.25.6 → 0.26.0.3

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: 9a9f37d22c63dc897c9d3a13f17a8f1f5027a40be14c780515ebf0941becd91a
4
- data.tar.gz: eab3fb91565b445902144abd1b4d526980e959aa514b0fb6099f8dfa2be2df52
3
+ metadata.gz: 972b46f29c22433210be9d6db5001fdfba0095a798ae37f5cce7014a0736c544
4
+ data.tar.gz: 8cfe81e79cbf17603d36f64925d6570814e7626fb62919b2974366f7455caa0c
5
5
  SHA512:
6
- metadata.gz: 2123e3de5a1b5a99c8aca806c12baf91118faa94273ccba5cdf742117a9d511963056487c4fe8c16e5224055866dc8b9823c8deeba7b2c0a22b1a0c32724bd29
7
- data.tar.gz: c6ffa2742b8217c5b551d721b0bda6ebe3a4329311ef6adf7502f57e53ebb9fcfdefd20d16dd8e111118acfbf68a3bc496df260c399ce9efe10cb6442b4efef8
6
+ metadata.gz: ab361765fbe182c07b65a22b534be7117f8a1871328f8157defbcf35a8fada289e6df0a8a22c4641585b85abb9c66ade58537c4354313d46b6e9f889d486ce37
7
+ data.tar.gz: 2027ad3b826b4a22aa62c2d5b3087e94a2eceed617feec6c84d0295890e73ac59bc45806ce210368795df8cf00fee74dfe82b7f0c85eb4f5b77ab136a03e6489
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  A package of helpers that introduce some conventions and convenience for common behaviors.
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/tablesalt.svg)](https://badge.fury.io/rb/tablesalt)
6
- [![Build Status](https://semaphoreci.com/api/v1/freshly/spicerack/branches/master/badge.svg)](https://semaphoreci.com/freshly/spicerack)
6
+ [![Build Status](https://semaphoreci.com/api/v1/freshly/spicerack/branches/main/badge.svg)](https://semaphoreci.com/freshly/spicerack)
7
7
  [![Maintainability](https://api.codeclimate.com/v1/badges/7e089c2617c530a85b17/maintainability)](https://codeclimate.com/github/Freshly/spicerack/maintainability)
8
8
  [![Test Coverage](https://api.codeclimate.com/v1/badges/7e089c2617c530a85b17/test_coverage)](https://codeclimate.com/github/Freshly/spicerack/test_coverage)
9
9
 
data/lib/tablesalt.rb CHANGED
@@ -5,6 +5,7 @@ require "short_circu_it"
5
5
 
6
6
  require "tablesalt/version"
7
7
 
8
+ require "tablesalt/class_pass"
8
9
  require "tablesalt/dsl_accessor"
9
10
  require "tablesalt/isolation"
10
11
  require "tablesalt/stringable_object"
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support/concern"
4
+
5
+ module Tablesalt
6
+ module ClassPass
7
+ extend ActiveSupport::Concern
8
+
9
+ included do
10
+ class_attribute :_class_pass_methods, instance_writer: false, default: []
11
+ end
12
+
13
+ class_methods do
14
+ def inherited(base)
15
+ base._class_pass_methods = _class_pass_methods.dup
16
+ super
17
+ end
18
+
19
+ private
20
+
21
+ def class_pass_method(*methods, to: nil)
22
+ methods.each do |method|
23
+ next if _class_pass_methods.include?(method)
24
+
25
+ _class_pass_methods << method
26
+
27
+ define_singleton_method method do |*args, **attrs|
28
+ if RUBY_VERSION < "2.7.0" && attrs.empty?
29
+ new(*args).public_send(to || method)
30
+ else
31
+ new(*args, **attrs).public_send(to || method)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "active_support/concern"
3
4
  require "active_support/core_ext/module/attr_internal"
4
5
 
5
6
  # Utility for creating DSL class variables - great for base classes with many child classes.
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "active_support/concern"
4
+
3
5
  module Tablesalt
4
6
  module StringableObject
5
7
  extend ActiveSupport::Concern
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "active_support/concern"
4
+
3
5
  module Tablesalt
4
6
  module ThreadAccessor
5
7
  extend ActiveSupport::Concern
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "active_support/concern"
4
+
3
5
  module Tablesalt
4
6
  module UsesHashForEquality
5
7
  extend ActiveSupport::Concern
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Tablesalt
4
4
  # This constant is managed by spicerack
5
- VERSION = "0.25.6"
5
+ VERSION = "0.26.0.3"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tablesalt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.6
4
+ version: 0.26.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Minneti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-24 00:00:00.000000000 Z
11
+ date: 2021-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -50,6 +50,7 @@ files:
50
50
  - LICENSE.txt
51
51
  - README.md
52
52
  - lib/tablesalt.rb
53
+ - lib/tablesalt/class_pass.rb
53
54
  - lib/tablesalt/dsl_accessor.rb
54
55
  - lib/tablesalt/isolation.rb
55
56
  - lib/tablesalt/rspec/custom_matchers.rb
@@ -60,14 +61,14 @@ files:
60
61
  - lib/tablesalt/thread_accessor.rb
61
62
  - lib/tablesalt/uses_hash_for_equality.rb
62
63
  - lib/tablesalt/version.rb
63
- homepage: https://github.com/Freshly/spicerack/tree/master/tablesalt
64
+ homepage: https://github.com/Freshly/spicerack/tree/main/tablesalt
64
65
  licenses:
65
66
  - MIT
66
67
  metadata:
67
- homepage_uri: https://github.com/Freshly/spicerack/tree/master/tablesalt
68
- source_code_uri: https://github.com/Freshly/spicerack/tree/master/tablesalt
69
- changelog_uri: https://github.com/Freshly/spicerack/blob/master/tablesalt/CHANGELOG.md
70
- documentation_uri: https://www.rubydoc.info/gems/tablesalt/0.25.6
68
+ homepage_uri: https://github.com/Freshly/spicerack/tree/main/tablesalt
69
+ source_code_uri: https://github.com/Freshly/spicerack/tree/main/tablesalt
70
+ changelog_uri: https://github.com/Freshly/spicerack/blob/main/tablesalt/CHANGELOG.md
71
+ documentation_uri: https://www.rubydoc.info/gems/tablesalt/0.26.0.3
71
72
  post_install_message:
72
73
  rdoc_options: []
73
74
  require_paths:
@@ -83,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
84
  - !ruby/object:Gem::Version
84
85
  version: '0'
85
86
  requirements: []
86
- rubygems_version: 3.1.4
87
+ rubygems_version: 3.1.6
87
88
  signing_key:
88
89
  specification_version: 4
89
90
  summary: Miscellaneous helper modules, POROs, and more, that standardize common behavior