mixins 0.1.0.pre.20250529105050 → 0.1.0
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
- checksums.yaml.gz.sig +0 -0
- data/History.md +2 -2
- data/README.md +1 -1
- data/lib/mixins/datadir.rb +1 -1
- data/lib/mixins/inspection.rb +3 -5
- data/lib/mixins.rb +1 -1
- data/spec/mixins/datadir_spec.rb +1 -1
- data/spec/mixins/inspection_spec.rb +19 -1
- data.tar.gz.sig +5 -3
- metadata +7 -7
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcf3c9472d6c1277ab2a4d1a78952074b07541119264cfde1843fe0cb50d29d1
|
4
|
+
data.tar.gz: 98d7c111b74b1e6d86b32dc71c92560ce819cecfd0f5d3a50c21a00f81564b86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a71863fb45814be58cc2066492c0a76ca3655133deb276d92757ae2893896890bb67ae1295c53ec68187e0d6633e8453a4712dd2779d25b550192a1719dd98b3
|
7
|
+
data.tar.gz: 7bed4e7fce7f9260cfb227c4da88db4e53083d2e54f9647514b424893d8991982e679de3edc33acef50a94d918ebba439a69b01698dd6b7ddec480da081bf972
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/History.md
CHANGED
data/README.md
CHANGED
data/lib/mixins/datadir.rb
CHANGED
@@ -67,7 +67,7 @@ module Mixins::Datadir
|
|
67
67
|
Pathname( loaded_gemspec.datadir )
|
68
68
|
else
|
69
69
|
caller_path = caller_locations( 2, 1 ).first.absolute_path
|
70
|
-
Pathname( caller_path ).dirname.parent
|
70
|
+
Pathname( caller_path ).dirname.parent + "data/#{gemname}"
|
71
71
|
end
|
72
72
|
|
73
73
|
return dir
|
data/lib/mixins/inspection.rb
CHANGED
@@ -17,11 +17,9 @@ module Mixins::Inspection
|
|
17
17
|
details = self.inspect_details
|
18
18
|
details = ' ' + details unless details.empty? || details.start_with?( ' ' )
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
details,
|
24
|
-
]
|
20
|
+
default = super
|
21
|
+
|
22
|
+
return default.sub( /\s.*\z/, details << '>' )
|
25
23
|
end
|
26
24
|
|
27
25
|
|
data/lib/mixins.rb
CHANGED
data/spec/mixins/datadir_spec.rb
CHANGED
@@ -64,7 +64,7 @@ RSpec.describe( Mixins::Datadir ) do
|
|
64
64
|
end
|
65
65
|
target_class.extend( described_class )
|
66
66
|
|
67
|
-
local_datadir = Pathname( __FILE__ ).parent.parent
|
67
|
+
local_datadir = Pathname( __FILE__ ).parent.parent / 'data' / 'panda'
|
68
68
|
|
69
69
|
expect( target_class.data_dir ).to eq( local_datadir )
|
70
70
|
end
|
@@ -16,7 +16,7 @@ RSpec.describe( Mixins::Inspection ) do
|
|
16
16
|
oclass.include( described_class )
|
17
17
|
instance = oclass.new( 11 )
|
18
18
|
|
19
|
-
expect( instance.inspect ).to match( /#<#{oclass.inspect}
|
19
|
+
expect( instance.inspect ).to match( /#<#{oclass.inspect}:0x\h+/ )
|
20
20
|
end
|
21
21
|
|
22
22
|
|
@@ -37,5 +37,23 @@ RSpec.describe( Mixins::Inspection ) do
|
|
37
37
|
expect( instance.inspect ).to match( /#<\S+ serial: 13>/ )
|
38
38
|
end
|
39
39
|
|
40
|
+
|
41
|
+
it "doesn't add a separator space if the details already being with a space" do
|
42
|
+
oclass = Class.new do
|
43
|
+
def initialize( serial )
|
44
|
+
@serial = serial
|
45
|
+
end
|
46
|
+
attr_reader :serial
|
47
|
+
def inspect_details
|
48
|
+
return " serial: %d" % [ self.serial ]
|
49
|
+
end
|
50
|
+
end
|
51
|
+
oclass.include( described_class )
|
52
|
+
|
53
|
+
instance = oclass.new( 13 )
|
54
|
+
|
55
|
+
expect( instance.inspect ).not_to match( /[ ]{2}/ )
|
56
|
+
end
|
57
|
+
|
40
58
|
end
|
41
59
|
|
data.tar.gz.sig
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
��4\���̲���s�䓏�g^��$���v�ll�~2Ph�V�-3Y��x��L4}$Q�
|
2
|
+
L���O�V�]M�5�L,�
|
3
|
+
���A�a�5�(��
|
4
|
+
����i�)������z)ʃ�I�o�#.�$���X�C�W�Vw��6��G��V߫�L�\.*����B�����OC�3
|
5
|
+
��1(�&��8@-y�����J�YP��V�c��6�:��:ζm�[4N{e�S���@N0��/�_�+������`cNNXl3��;S������,t��z�M���H/��ż�
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mixins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
8qAqdfV+4u6Huu1KzAuDQCheyEyISsLST37sU/irV3czV6BiFipWag1XiJciRT3A
|
36
36
|
wZqCfTNVHTdtsCbfdA1DsA3RdG2iEH3TOHzv1Rqzqh4=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2025-
|
38
|
+
date: 2025-07-12 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: rake-deveiate
|
@@ -83,11 +83,11 @@ homepage: https://hg.sr.ht/~ged/Mixins
|
|
83
83
|
licenses:
|
84
84
|
- BSD-3-Clause
|
85
85
|
metadata:
|
86
|
-
bug_tracker_uri: https://todo.sr.ht/~ged/Mixins
|
87
|
-
changelog_uri: https://deveiate.org/code/mixins/History_md.html
|
88
|
-
documentation_uri: https://deveiate.org/code/mixins
|
89
86
|
homepage_uri: https://hg.sr.ht/~ged/Mixins
|
90
|
-
|
87
|
+
documentation_uri: https://deveiate.org/code/mixins
|
88
|
+
changelog_uri: https://deveiate.org/code/mixins/History_md.html
|
89
|
+
source_uri: https://hg.sr.ht/~ged/Mixins/browse
|
90
|
+
bug_tracker_uri: https://todo.sr.ht/~ged/Mixins/browse
|
91
91
|
rdoc_options: []
|
92
92
|
require_paths:
|
93
93
|
- lib
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
|
-
rubygems_version: 3.6.
|
105
|
+
rubygems_version: 3.6.9
|
106
106
|
specification_version: 4
|
107
107
|
summary: This is a collection of zero-dependency mixins.
|
108
108
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|