tablesalt 0.25.7 → 0.26.0.4

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: 6707e03b2c3bec23be0bda83f7e162aaec7669b3c379f25b628bae84ea901691
4
- data.tar.gz: 6ced5b921832b3d3777c437ef54a8626b2d1b6d66b7ed97fe3ef1c05800dea52
3
+ metadata.gz: d9734463d5faeecc30bc70bfa5e36078c7854bff1cadac30121eacfc74f6c588
4
+ data.tar.gz: 964b8af5135b89ed291683fa9e1060edc63d2f1fa1e7208f65d43d14178abbc1
5
5
  SHA512:
6
- metadata.gz: 94e2656b44bfa99667a56e913a13cd1724bad2095a222fa54bde1f920b13457b6b58f325db66262e92fc45701883780438ee7a82a44aaf36a77916a436c102c5
7
- data.tar.gz: f10b9a449d4f4656a57162ba44db98ed95e555e5d6e7636304877b777e9d3fb3c60ba8df0858f6729d0d1b4c5dd6f346efbc8ac0912d4949cda4ed78ae80b50e
6
+ metadata.gz: c3e259d04b5587176c3c5dd69274b0dfcd09b1ac6213a60d5cad67b9b1e5123a7a68e59ab3be0e26d54f34ae8427780c62f40c617400756d896a1b66bff71ae2
7
+ data.tar.gz: 3d022dfc81459e6009c3fe9497337f33152e1002efedb1577ade4d160280bf2d331bb7dc746b14ad84c23fb61c805313bece1ec90d1d535bc68f3867699f15e6
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.7"
5
+ VERSION = "0.26.0.4"
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.7
4
+ version: 0.26.0.4
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-04-09 00:00:00.000000000 Z
11
+ date: 2021-05-17 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.7
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.4
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.2.17
87
88
  signing_key:
88
89
  specification_version: 4
89
90
  summary: Miscellaneous helper modules, POROs, and more, that standardize common behavior