init_copy 0.3.0 → 0.3.1

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: f2ea381fdf2b5c0bec710f2b219f87e2f897e8bba17246591982617e02a5024c
4
- data.tar.gz: c33f202bb2301400918c86fc49a8acf0a43be8f82f5e7e2df1dc6ca9935fc4c4
3
+ metadata.gz: ae95968b85aaaf5b99b3f6a6baa656c507c929c3b131a4033dc70aa53da771a1
4
+ data.tar.gz: 0ab5144c33d40065472d34d7f518d1d6b22d62f84673e5535b505c9897208a53
5
5
  SHA512:
6
- metadata.gz: 36b93091f59641bf0ea2fc2a7c520815f285e24aa5136d7e03c1e837811084f2b62e6040f82e98a1facd9e6b0930834558f7df7783cfe01a60a17b20d99152c9
7
- data.tar.gz: fb2e3f6d74272af1061f73794814874bdb7d76f16c7998fdd9cfd41d1c5d17a7eda9985a0e0724be9fa16e1a55ba64f557ae431d93eff9a2637fc6bffab1312f
6
+ metadata.gz: ad48b02c42b4e53b2cd39c7e79cfd8eb1cc7d9dee97c48109d8dc6e5177f382ca31b3ff82610b35951429212957e2fa695c00064e1551527e9d22a4b8c28c05f
7
+ data.tar.gz: e9c728cdfc1ae494f18ff570f02787a4e6cabc264255eaf4b7d943410ce381b99dffcc05c3745f6b08af3fdd667e8229bb244eae62689987f3e0b4ca75a462ef
data/Gemfile CHANGED
@@ -5,12 +5,13 @@ source 'https://rubygems.org'
5
5
 
6
6
  gemspec
7
7
 
8
- group :development,:test do
9
- gem 'bundler' ,'~> 2.6 '
10
- gem 'rake' ,'~> 13.3 '
11
- gem 'rdoc' ,'~> 6.14'
8
+ group(:development,:test) do
9
+ gem 'bundler','~> 2.6'
10
+ gem 'rake','~> 13.3.0'
11
+
12
+ gem 'rdoc','~> 6.14.0' # Doc.
12
13
  end
13
14
 
14
- group :test do
15
- gem 'minitest','~> 5.25'
15
+ group(:test) do
16
+ gem 'minitest','~> 5.25.0' # Tests.
16
17
  end
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ require 'rake/clean'
8
8
  require 'rake/testtask'
9
9
  require 'rdoc/task'
10
10
 
11
- CLEAN.exclude('.git/','.github/','.idea/','stock/')
11
+ CLEAN.exclude('{.git,.github,.idea,stock}/**/*')
12
12
  CLOBBER.include('doc/')
13
13
 
14
14
  task default: %i[test]
data/init_copy.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
 
16
16
  spec.metadata = {
17
17
  'rubygems_mfa_required' => 'true',
18
- 'homepage_uri' => 'https://github.com/esotericpig/init_copy',
18
+ 'homepage_uri' => spec.homepage,
19
19
  'source_code_uri' => 'https://github.com/esotericpig/init_copy',
20
20
  'bug_tracker_uri' => 'https://github.com/esotericpig/init_copy/issues',
21
21
  'changelog_uri' => 'https://github.com/esotericpig/init_copy/blob/main/CHANGELOG.md',
@@ -30,6 +30,8 @@ Gem::Specification.new do |spec|
30
30
  spec.extra_rdoc_files = %w[LICENSE.txt README.md]
31
31
  spec.rdoc_options = [
32
32
  %w[--embed-mixins --hyperlink-all --line-numbers --show-hash],
33
+ '--encoding','UTF-8',
34
+ '--markup','markdown',
33
35
  '--main','README.md',
34
36
  '--title',"InitCopy v#{InitCopy::VERSION}",
35
37
  ].flatten
@@ -9,5 +9,5 @@
9
9
  #++
10
10
 
11
11
  module InitCopy
12
- VERSION = '0.3.0'
12
+ VERSION = '0.3.1'
13
13
  end
@@ -13,11 +13,11 @@ require 'minitest/autorun'
13
13
  require 'init_copy'
14
14
 
15
15
  describe InitCopy do
16
- it 'has a correct version' do
16
+ it 'has the version' do
17
17
  _(InitCopy::VERSION).must_match(/\d+\.\d+\.\d+(-[0-9A-Za-z\-.]+)?(\+[0-9A-Za-z\-.]+)?/)
18
18
  end
19
19
 
20
- def self.add_basic_copy_tests
20
+ def self.it_does_a_shallow_copy
21
21
  it 'is not the same as the copies' do
22
22
  _(@sut).wont_be_same_as(@sut_clone)
23
23
  _(@sut).wont_be_same_as(@sut_dup)
@@ -30,7 +30,7 @@ describe InitCopy do
30
30
  end
31
31
  end
32
32
 
33
- def self.add_deep_copy_tests(is_frozen: false)
33
+ def self.it_does_a_deep_copy(is_frozen: false)
34
34
  it 'has the correct original' do
35
35
  _(@sut.orig).must_be_nil
36
36
  _(@sut_clone.orig).must_be_same_as(@sut)
@@ -66,7 +66,7 @@ describe InitCopy do
66
66
  @sut_dup = @sut.dup
67
67
  end
68
68
 
69
- add_basic_copy_tests
69
+ it_does_a_shallow_copy
70
70
 
71
71
  it 'has no original' do
72
72
  _(@sut.orig).must_be_nil
@@ -103,8 +103,8 @@ describe InitCopy do
103
103
  @sut_dup = @sut.dup
104
104
  end
105
105
 
106
- add_basic_copy_tests
107
- add_deep_copy_tests
106
+ it_does_a_shallow_copy
107
+ it_does_a_deep_copy
108
108
  end
109
109
 
110
110
  describe 'with copy and internal state' do
@@ -124,8 +124,8 @@ describe InitCopy do
124
124
  @sut_dup = @sut.dup
125
125
  end
126
126
 
127
- add_basic_copy_tests
128
- add_deep_copy_tests(is_frozen: true)
127
+ it_does_a_shallow_copy
128
+ it_does_a_deep_copy(is_frozen: true)
129
129
 
130
130
  it 'has the correct bonus extension' do
131
131
  _(@sut.nums).must_respond_to(:bonus,'SUT should have the nums bonus extension')
@@ -152,8 +152,8 @@ describe InitCopy do
152
152
  @sut_dup = @sut.dup
153
153
  end
154
154
 
155
- add_basic_copy_tests
156
- add_deep_copy_tests
155
+ it_does_a_shallow_copy
156
+ it_does_a_deep_copy
157
157
 
158
158
  it 'does a deep copy of the strs' do
159
159
  _(@sut.strs).wont_be_same_as(@sut_clone.strs)
@@ -177,6 +177,8 @@ describe InitCopy do
177
177
  it 'does not do a deep copy of the unsafe var' do
178
178
  _(@sut.unsafe).wont_respond_to(:clone)
179
179
  _(@sut.unsafe).wont_respond_to(:dup)
180
+ expect { @sut.unsafe.clone }.must_raise(NoMethodError)
181
+ expect { @sut.unsafe.dup }.must_raise(NoMethodError)
180
182
 
181
183
  _(@sut.unsafe).must_be_same_as(@sut_clone.unsafe)
182
184
  _(@sut.unsafe).must_be_same_as(@sut_dup.unsafe)
@@ -228,6 +230,8 @@ class TestBagChildWithCopyAndUnsafe < TestBagWithCopy
228
230
  end.new
229
231
  end
230
232
 
233
+ protected
234
+
231
235
  def init_copy(*)
232
236
  super
233
237
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: init_copy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bradley Whited
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-06-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: Easily use the correct clone or dup method in initialize_copy.
14
13
  email:
@@ -37,16 +36,19 @@ metadata:
37
36
  source_code_uri: https://github.com/esotericpig/init_copy
38
37
  bug_tracker_uri: https://github.com/esotericpig/init_copy/issues
39
38
  changelog_uri: https://github.com/esotericpig/init_copy/blob/main/CHANGELOG.md
40
- post_install_message:
41
39
  rdoc_options:
42
40
  - "--embed-mixins"
43
41
  - "--hyperlink-all"
44
42
  - "--line-numbers"
45
43
  - "--show-hash"
44
+ - "--encoding"
45
+ - UTF-8
46
+ - "--markup"
47
+ - markdown
46
48
  - "--main"
47
49
  - README.md
48
50
  - "--title"
49
- - InitCopy v0.3.0
51
+ - InitCopy v0.3.1
50
52
  require_paths:
51
53
  - lib
52
54
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -60,8 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
62
  - !ruby/object:Gem::Version
61
63
  version: '0'
62
64
  requirements: []
63
- rubygems_version: 3.5.21
64
- signing_key:
65
+ rubygems_version: 3.7.1
65
66
  specification_version: 4
66
67
  summary: Easily use the correct clone or dup method in initialize_copy.
67
68
  test_files: []