coactive 0.5.0 → 0.5.2
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 +4 -4
- data/.github/workflows/ci.yml +18 -4
- data/CHANGELOG.md +10 -0
- data/gemfiles/rails60.gemfile +1 -0
- data/gemfiles/rails61.gemfile +1 -0
- data/gemfiles/rails70.gemfile +1 -0
- data/gemfiles/rails71.gemfile +6 -0
- data/lib/coactive/contexts/inspector.rb +14 -3
- data/lib/coactive/version.rb +1 -1
- data/lib/coactive.rb +2 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 947921155ded7f486743447e61abf8274b0d4cbc174e7f7f3d394e3b9ce11f65
|
4
|
+
data.tar.gz: 00625fcccb57c5643e3f0580c3dd94a2159ddcdc5accde3e81f87fdbaf0efd36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 629ce46d9b1817a04e1c74a7d20d7764ec89ba7e1930f937b4495d60c0eaa96e1c98b752b29f863860a4440ef53edecaeaf706b88b81d1409a79f0381491fe3d
|
7
|
+
data.tar.gz: 9f116e4e9cb323fc79d3db488619364dddebd2064d75d1652a9032a587fbc9bdf404a932f8fac14f58b725d473a61a00d0f4d7196f7daa8b6e9fad0bbe73c760
|
data/.github/workflows/ci.yml
CHANGED
@@ -4,12 +4,12 @@ on: [push, pull_request]
|
|
4
4
|
|
5
5
|
jobs:
|
6
6
|
test:
|
7
|
-
runs-on: ubuntu-
|
7
|
+
runs-on: ubuntu-22.04
|
8
8
|
strategy:
|
9
9
|
fail-fast: false
|
10
10
|
matrix:
|
11
|
-
ruby: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2]
|
12
|
-
gemfile: ['rails50', 'rails51', 'rails52', 'rails60', 'rails61', 'rails70']
|
11
|
+
ruby: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, 3.3]
|
12
|
+
gemfile: ['rails50', 'rails51', 'rails52', 'rails60', 'rails61', 'rails70', 'rails71']
|
13
13
|
exclude:
|
14
14
|
- ruby: 2.3
|
15
15
|
gemfile: rails60
|
@@ -17,16 +17,24 @@ jobs:
|
|
17
17
|
gemfile: rails61
|
18
18
|
- ruby: 2.3
|
19
19
|
gemfile: rails70
|
20
|
+
- ruby: 2.3
|
21
|
+
gemfile: rails71
|
20
22
|
- ruby: 2.4
|
21
23
|
gemfile: rails60
|
22
24
|
- ruby: 2.4
|
23
25
|
gemfile: rails61
|
24
26
|
- ruby: 2.4
|
25
27
|
gemfile: rails70
|
28
|
+
- ruby: 2.4
|
29
|
+
gemfile: rails71
|
26
30
|
- ruby: 2.5
|
27
31
|
gemfile: rails70
|
32
|
+
- ruby: 2.5
|
33
|
+
gemfile: rails71
|
28
34
|
- ruby: 2.6
|
29
35
|
gemfile: rails70
|
36
|
+
- ruby: 2.6
|
37
|
+
gemfile: rails71
|
30
38
|
- ruby: 3.0
|
31
39
|
gemfile: rails50
|
32
40
|
- ruby: 3.0
|
@@ -45,6 +53,12 @@ jobs:
|
|
45
53
|
gemfile: rails51
|
46
54
|
- ruby: 3.2
|
47
55
|
gemfile: rails52
|
56
|
+
- ruby: 3.3
|
57
|
+
gemfile: rails50
|
58
|
+
- ruby: 3.3
|
59
|
+
gemfile: rails51
|
60
|
+
- ruby: 3.3
|
61
|
+
gemfile: rails52
|
48
62
|
|
49
63
|
name: ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}
|
50
64
|
|
@@ -52,7 +66,7 @@ jobs:
|
|
52
66
|
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
53
67
|
|
54
68
|
steps:
|
55
|
-
- uses: actions/checkout@
|
69
|
+
- uses: actions/checkout@v4
|
56
70
|
- uses: ruby/setup-ruby@v1
|
57
71
|
with:
|
58
72
|
ruby-version: ${{ matrix.ruby }}
|
data/CHANGELOG.md
CHANGED
data/gemfiles/rails60.gemfile
CHANGED
data/gemfiles/rails61.gemfile
CHANGED
data/gemfiles/rails70.gemfile
CHANGED
@@ -7,7 +7,7 @@ module Coactive
|
|
7
7
|
class_attribute :max_num, :max_length, :basic_classes
|
8
8
|
self.max_num = 3
|
9
9
|
self.max_length = 100
|
10
|
-
self.basic_classes = [Module, Symbol, String, Numeric, TrueClass, FalseClass, Regexp]
|
10
|
+
self.basic_classes = [Module, Symbol, String, Numeric, TrueClass, FalseClass, NilClass, Regexp]
|
11
11
|
|
12
12
|
def call(data)
|
13
13
|
if data.is_a?(Array)
|
@@ -36,11 +36,22 @@ module Coactive
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def inspect_basic(data)
|
39
|
-
data.inspect
|
39
|
+
inspected = data.inspect
|
40
|
+
if inspected.length > max_length
|
41
|
+
inspected[0..max_length] + '...'
|
42
|
+
else
|
43
|
+
inspected
|
44
|
+
end
|
40
45
|
end
|
41
46
|
|
42
47
|
def inspect_object(data)
|
43
|
-
|
48
|
+
if data.respond_to?(:id)
|
49
|
+
"#<#{data.class}/#{data.id}>"
|
50
|
+
elsif data.respond_to?(:attributes) && (attributes = data.attributes).is_a?(Hash)
|
51
|
+
"#<#{data.class} #{inspect_hash(attributes)}>"
|
52
|
+
else
|
53
|
+
"#<#{data.class}:#{data.object_id}>"
|
54
|
+
end
|
44
55
|
end
|
45
56
|
end
|
46
57
|
end
|
data/lib/coactive/version.rb
CHANGED
data/lib/coactive.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coactive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshikazu Kaneta
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- gemfiles/rails60.gemfile
|
119
119
|
- gemfiles/rails61.gemfile
|
120
120
|
- gemfiles/rails70.gemfile
|
121
|
+
- gemfiles/rails71.gemfile
|
121
122
|
- lib/coactive.rb
|
122
123
|
- lib/coactive/base.rb
|
123
124
|
- lib/coactive/coactants.rb
|
@@ -145,7 +146,7 @@ files:
|
|
145
146
|
homepage: https://github.com/kanety/coactive
|
146
147
|
licenses: []
|
147
148
|
metadata: {}
|
148
|
-
post_install_message:
|
149
|
+
post_install_message:
|
149
150
|
rdoc_options: []
|
150
151
|
require_paths:
|
151
152
|
- lib
|
@@ -161,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
162
|
version: '0'
|
162
163
|
requirements: []
|
163
164
|
rubygems_version: 3.3.3
|
164
|
-
signing_key:
|
165
|
+
signing_key:
|
165
166
|
specification_version: 4
|
166
167
|
summary: Make classes coactive
|
167
168
|
test_files: []
|