tablesalt 0.25.8.1 → 0.26.0.2

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: 7adb9f5fe863c49503ea7276b466330d669e10ad599d748dde1b92772bcd00c3
4
- data.tar.gz: 4a8728d323d315d22599742f1b7f8aad4e5f62e4b97ffe5609d45cec0b525080
3
+ metadata.gz: b5a2ac1d35f932b3a53828157c6d1bcaa4d5fd43659ef216b2b4db1dc6c8d414
4
+ data.tar.gz: a41494e1189416e3f6a79dee3bd7c9f91d96c1c996ec3cf391df3c30322b714b
5
5
  SHA512:
6
- metadata.gz: 435a597f3fb4f5cff4d1b2125fa0574eb6530d0e32d9e1696426a79b4aaa62ec3f55b1ef44e48418e43af7fd1102bd25f704ff56d59a82c27a63b82016edaefd
7
- data.tar.gz: 701954e7942ac7b8aa22ec4d33a52d441a448df136b19c72e4dc6be069c72e5ad5cf37f82ceb21167612b7d903143c1ecb45602e01668076ac09c4ea443d5697
6
+ metadata.gz: c0330a1d4a2504237b30be4ed6c4acf585e24a5918ed7ccd0284aba02652cb78c92fd2a0966ed92b2e477acc01b5d17c1b229b215b748482024ed302c98bda59
7
+ data.tar.gz: 022a6d37cfd878368676f61c50adcbbb6d9c49835c8a5e913af2257caee0c030f23316e6692d119abd6f346d67eb9beb61fdf0e2b2488d0a36ff2c3f96d35cc3
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)
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(method)
30
+ else
31
+ new(*args, **attrs).public_send(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.8.1"
5
+ VERSION = "0.26.0.2"
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.8.1
4
+ version: 0.26.0.2
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-13 00:00:00.000000000 Z
11
+ date: 2021-04-28 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.8.1
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.2
71
72
  post_install_message:
72
73
  rdoc_options: []
73
74
  require_paths: