trinkets 0.2.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: 7b68e75535021ee65a9f04019645b52a4ef1a76f1c2dfa2d5d625790bef4823a
4
- data.tar.gz: dedc7394900033d803cc47fd212cf1601ea89c874b328963719f500beea9127e
3
+ metadata.gz: cb82b9c6f72cce48f7d303e989870bc05e77429508c17f266428d15bc0821628
4
+ data.tar.gz: 1dc0a8334a869e8be5b4e397caeed6be9ff16b495514425e184938d538b0b2e1
5
5
  SHA512:
6
- metadata.gz: 947b91b9cd3497dce4fe4fa89d840424cb5cc7bde7e69812a84726127f1b650aae25ea6c83b36df1bce27c1b2c85c93decdf7d54512104b411f4ad0924637174
7
- data.tar.gz: a0d74ade3287d9bdc31a43556f148a7c82356da2a0c2e82f03d38d27ad9abc7fdf5165424a676cfba20e808c5e8f0ea6076b5e0098ebc9c6a45fc150ce226dda
6
+ metadata.gz: 4b57aecbcc07de7c710804302accad6fe49d610c133fabf74040a0cca376129258dc064eb967c0ff50570d72b46d641160fda6485222d29f47f06117b57db55c
7
+ data.tar.gz: 7714dbbd7e295d87d9f6c98aac8d6aade0d6a57d86e69368c039e8022824511f897f1a2d8f90f5f70b1fb598741b4bfbfdbb5308a164f40dc2fcb6da01491148
data/CHANGELOG.md CHANGED
@@ -0,0 +1,13 @@
1
+
2
+ ### [0.3.1](https://github.com/SilverPhoenix99/trinkets/tree/v0.3.1)
3
+ * Fixed repeated arguments in `Class::init`.
4
+
5
+ ### [0.3.0](https://github.com/SilverPhoenix99/trinkets/tree/v0.3.0)
6
+ * Restructured folders to default to `/refine/`.
7
+ * Added `Enumerable#each_with_hash`/`Enumerator#with_hash`.
8
+
9
+ ### [0.2.0](https://github.com/SilverPhoenix99/trinkets/tree/v0.2.0)
10
+ * Added `attr: :none` as an option for `Class::init`.
11
+
12
+ ### [0.1.0](https://github.com/SilverPhoenix99/trinkets/tree/v0.1.0)
13
+ * Added `Class::init`.
data/README.md CHANGED
@@ -1,53 +1,97 @@
1
- # Trinkets
2
-
3
- It's the bootleg [facets](https://github.com/rubyworks/facets?tab=readme-ov-file#ruby-facets).
4
-
5
- ## Installation
6
-
7
- ```
8
- gem install trinkets
9
- ```
10
-
11
- ## Usage
12
-
13
- There are 3 ways to load trinkets:
14
- * As refinements;
15
- * As explicit `include` or `extend`;
16
- * As implicit `include` or `extend`, a.k.a. monkey-patching.
17
-
18
- ### Refinement
19
-
20
- ```ruby
21
- require 'trinkets/refine/class/init'
22
-
23
- using ::Trinkets::Class::Init
24
- ```
25
-
26
- ### Extend
27
-
28
- ```ruby
29
- require 'trinkets/extend/class/init'
30
-
31
- class Test
32
- extend ::Trinkets::Class::Init
33
- end
34
- ```
35
-
36
- ### Mokey Patching
37
-
38
- ```ruby
39
- require 'trinkets/patch/class/init'
40
- ```
41
-
42
- ## Available modules
43
-
44
- |Trinket|
45
- |---|
46
- |[class/init](doc/class/init.md)|
47
-
48
- [//]: # (TODO: Development)
49
- [//]: # (TODO: Contributing)
50
-
51
- ## License
52
-
53
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
1
+ # Trinkets
2
+
3
+ It's the bootleg [facets](https://github.com/rubyworks/facets?tab=readme-ov-file#ruby-facets).
4
+
5
+ ## Installation
6
+
7
+ ### RubyGems
8
+ ```
9
+ gem install trinkets
10
+ ```
11
+
12
+ ### Bundler
13
+ ```ruby
14
+ gem 'trinkets', require: false
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ The trinkets are loaded with the following structure:
20
+ ```ruby
21
+ require 'trinkets/{how-to-patch}/{class}/{method}'
22
+ ```
23
+
24
+ There are 3 ways to load trinkets, which are represented by the `{how-to-patch}` portion in the requires:
25
+ * `refine` : As refinements;
26
+ * `extend`/`include` : As explicit `extend` or `include`;
27
+ * `patch` : As implicit `include` or `extend`, a.k.a. monkey-patching.
28
+
29
+ ### Refinement
30
+
31
+ ```ruby
32
+ require 'trinkets/class/init'
33
+
34
+ using ::Trinkets::Class::Init
35
+ ```
36
+
37
+ The `refine` subdirectory is the default, and it can be omitted from `require`. The above is the same as:
38
+
39
+ ```ruby
40
+ require 'trinkets/refine/class/init'
41
+ ```
42
+
43
+ ### Extend / Include
44
+
45
+ ```ruby
46
+ require 'trinkets/extend/class/init'
47
+
48
+ class Test
49
+ extend ::Trinkets::Class::Init
50
+ end
51
+ ```
52
+
53
+ ```ruby
54
+ require 'trinkets/include/enumerable/each_with_hash'
55
+
56
+ class Test
57
+ include Enumerable
58
+ include ::Trinkets::Enumerable::WithHash
59
+ end
60
+ ```
61
+
62
+ ### Mokey Patching
63
+
64
+ ```ruby
65
+ require 'trinkets/patch/class/init'
66
+ ```
67
+
68
+ ## Available modules
69
+
70
+ |Trinket|
71
+ |---|
72
+ |[class/init](doc/class/init.md)|
73
+ |[enumerable/each_with_hash](doc/enumerable/each_with_hash.md)|
74
+
75
+ ## Versioning
76
+
77
+ Versions follow semantic versioning: `major.minor.patch`
78
+ * `major`: breaking changes.
79
+ * `minor`: improvements and new features that are backwards compatible.
80
+ * `patch`: backwards compatible fixes to existing features, or documentation improvements.
81
+
82
+ [//]: # (TODO: Development)
83
+
84
+ ## Contributing
85
+
86
+ Steps to include when developing the feature/fix:
87
+ * Add or change the appropriate RSpec tests.
88
+ * Document the feature.
89
+ * Might not apply to fixes if the feature didn't change.
90
+ * Bump the [version](lib/trinkets/version.rb).
91
+ * Update the Changelog.
92
+
93
+ [//]: # (TODO: Contributing)
94
+
95
+ ## License
96
+
97
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/doc/class/init.md CHANGED
@@ -1,130 +1,181 @@
1
- # Description
2
-
3
- It allows generating simple `#initialize` methods.
4
-
5
- To use it define a class and call `::init` like you would call `::attr` methods:
6
- * pass the name of the arguments as symbols
7
- * pass options at the end:
8
- * `attr` : what getters and/or setters to define
9
- * can be `:accessor`, `:reader`, `:writer` or `:none`
10
- * defaults to `:accessor`
11
- * `kw` : if arguments are to be set as keyword arguments
12
- * defaults to `false`
13
-
14
- The same options can be used per individual argument
15
-
16
- # Examples
17
-
18
- ## Simple Initialize
19
- ```ruby
20
- class Test
21
- init :a, :b
22
- end
23
-
24
- # would be the same as
25
- class Test
26
- attr_accessor :a, :b
27
- def initialize(a, b)
28
- @a = a
29
- @b = b
30
- end
31
- end
32
-
33
- test = Test.new(1, 2)
34
- test.a
35
- # 1
36
-
37
- test.b
38
- # 2
39
-
40
- test.a = 3
41
- test.a
42
- # 3
43
- ```
44
-
45
- ## Read only access to instance variables
46
- ```ruby
47
- class TestAttr
48
- init :a, :b, attr: :reader
49
- end
50
-
51
- # would be the same as
52
- class Test
53
- attr_reader :a, :b
54
- def initialize(a, b)
55
- @a = a
56
- @b = b
57
- end
58
- end
59
-
60
- test = Test.new(1, 2)
61
- test.a
62
- # 1
63
-
64
- test.b
65
- # 2
66
-
67
- test.a = 3
68
- # => raises NoMethodError
69
- ```
70
-
71
- ## Initialize uses keyword arguments
72
- ```ruby
73
- class TestKW
74
- init :a, :b, kw: :true
75
- end
76
-
77
- # would be the same as
78
- class Test
79
- attr_accessor :a, :b
80
- def initialize(a:, b:)
81
- @a = a
82
- @b = b
83
- end
84
- end
85
-
86
- test = Test.new(a: 1, b: 2)
87
- test.a
88
- # 1
89
-
90
- test.b
91
- # 2
92
- ```
93
-
94
- ## Individual argument options
95
- ```ruby
96
- class TestIndividualArgsOptions
97
- init [:a, kw: true, attr: :reader],
98
- :b,
99
- [:c, kw: true],
100
- [:d, attr: :none]
101
- end
102
-
103
- # would be the same as
104
- class Test
105
- attr_reader :a
106
- attr_accessor :b, :c
107
- def initialize(b, d, a:, c:)
108
- @a = a
109
- @b = b
110
- @c = c
111
- @d = d
112
- end
113
- end
114
-
115
- test = Test.new(2, 4, a: 1, c: 3)
116
- test.a
117
- # 1
118
-
119
- test.b
120
- # 2
121
-
122
- test.c
123
- # 3
124
-
125
- test.d
126
- # => raises NoMethodError
127
-
128
- test.a = 5
129
- # => raises NoMethodError
130
- ```
1
+ # Description
2
+
3
+ It allows generating simple `#initialize` methods.
4
+
5
+ To use it, define a class and call `::init` like you would call `::attr` methods:
6
+ * pass the name of the arguments as symbols
7
+ * pass options at the end:
8
+ * `attr` : what getters and/or setters to define
9
+ * can be `:accessor`, `:reader`, `:writer` or `:none`
10
+ * defaults to `:accessor`
11
+ * `kw` : if arguments are to be set as keyword arguments
12
+ * defaults to `false`
13
+
14
+ The same options can be used per individual argument.
15
+
16
+ # Requiring
17
+
18
+ ```ruby
19
+ # As a refinement
20
+ require 'trinkets/class/init' # implicit
21
+ # or
22
+ require 'trinkets/refine/class/init' # explicit
23
+
24
+ # As extend
25
+ require 'trinkets/extend/class/init'
26
+
27
+ # As monkey-patch
28
+ require 'trinkets/patch/class/init'
29
+ ```
30
+
31
+ # Examples
32
+
33
+ ## Simple Initialize
34
+ ```ruby
35
+ class Test
36
+ init :a, :b
37
+ end
38
+
39
+ # would be the same as
40
+ class Test
41
+ attr_accessor :a, :b
42
+ def initialize(a, b)
43
+ @a = a
44
+ @b = b
45
+ end
46
+ end
47
+
48
+ test = Test.new(1, 2)
49
+
50
+ test.a
51
+ # 1
52
+
53
+ test.b
54
+ # 2
55
+
56
+ test.a = 3
57
+ # 3
58
+ ```
59
+
60
+ ## Read only access to instance variables
61
+ ```ruby
62
+ class TestAttr
63
+ init :a, :b, attr: :reader
64
+ end
65
+
66
+ # would be the same as
67
+ class TestAttr
68
+ attr_reader :a, :b
69
+ def initialize(a, b)
70
+ @a = a
71
+ @b = b
72
+ end
73
+ end
74
+
75
+ test = TestAttr.new(1, 2)
76
+
77
+ test.a
78
+ # 1
79
+
80
+ test.b
81
+ # 2
82
+
83
+ test.a = 3
84
+ # => raises NoMethodError
85
+ ```
86
+
87
+ ## Initialize uses keyword arguments
88
+ ```ruby
89
+ class TestKW
90
+ init :a, :b, kw: :true
91
+ end
92
+
93
+ # would be the same as
94
+ class TestKW
95
+ attr_accessor :a, :b
96
+ def initialize(a:, b:)
97
+ @a = a
98
+ @b = b
99
+ end
100
+ end
101
+
102
+ test = TestKW.new(a: 1, b: 2)
103
+
104
+ test.a
105
+ # 1
106
+
107
+ test.b
108
+ # 2
109
+ ```
110
+
111
+ ## Individual attribute options
112
+ ```ruby
113
+ class TestAttrOptions
114
+ init [:a, kw: true, attr: :reader],
115
+ :b,
116
+ [:c, kw: true],
117
+ [:d, attr: :none]
118
+ end
119
+
120
+ # would be the same as
121
+ class TestAttrOptions
122
+ attr_reader :a
123
+ attr_accessor :b, :c
124
+ def initialize(b, d, a:, c:)
125
+ @a = a
126
+ @b = b
127
+ @c = c
128
+ @d = d
129
+ end
130
+ end
131
+
132
+ test = TestAttrOptions.new(2, 4, a: 1, c: 3)
133
+
134
+ test.a
135
+ # 1
136
+
137
+ test.b
138
+ # 2
139
+
140
+ test.c
141
+ # 3
142
+
143
+ test.d
144
+ # => raises NoMethodError
145
+
146
+ test.a = 5
147
+ # => raises NoMethodError
148
+ ```
149
+
150
+ ## Mixed together
151
+ ```ruby
152
+ class TestMixed
153
+ init [:a, attr: :reader],
154
+ :b,
155
+ kw: true
156
+ end
157
+
158
+ # would be the same as
159
+ class TestMixed
160
+ attr_reader :a
161
+ attr_accessor :b
162
+ def initialize(a:, b:)
163
+ @a = a
164
+ @b = b
165
+ end
166
+ end
167
+
168
+ test = TestMixed.new(1, 2)
169
+
170
+ test.a
171
+ # 1
172
+
173
+ test.b
174
+ # 2
175
+
176
+ test.b = 3
177
+ # 3
178
+
179
+ test.a = 4
180
+ # => raises NoMethodError
181
+ ```
@@ -0,0 +1,47 @@
1
+ # Description
2
+
3
+ It defines `Enumerable#each_with_hash`, which is a simple wrapper for `Enumerable#each_with_object({})`.
4
+
5
+ It also includes the alias `Enumerator#with_hash(&)`.
6
+
7
+ # Requiring
8
+
9
+ ```ruby
10
+ # As a refinement
11
+ require 'trinkets/enumerable/each_with_hash' # implicit
12
+ # or
13
+ require 'trinkets/refine/enumerable/each_with_hash' # explicit
14
+
15
+ # As include
16
+ require 'trinkets/include/enumerable/each_with_hash'
17
+
18
+ # As monkey-patch
19
+ require 'trinkets/patch/enumerable/each_with_hash'
20
+ ```
21
+
22
+ # Examples
23
+
24
+ These examples are all equivalent.
25
+
26
+ ```ruby
27
+ [2, 3, 4, 5].each_with_hash { |value, hash| hash[value] = value * value }
28
+ # => {2=>4, 3=>9, 4=>16, 5=>25}
29
+
30
+ [2, 3, 4, 5].each_with_hash
31
+ # => #<Enumerator: [2, 3, 4, 5]:each_with_object({})>
32
+ ```
33
+
34
+ ```ruby
35
+ [2, 3, 4, 5].each
36
+ .with_hash { |value, hash| hash[value] = value * value }
37
+
38
+ # => {2=>4, 3=>9, 4=>16, 5=>25}
39
+ ```
40
+
41
+ ```ruby
42
+ [2, 3, 4, 5].each
43
+ .with_hash
44
+ .each { |value, hash| hash[value] = value * value }
45
+
46
+ # => {2=>4, 3=>9, 4=>16, 5=>25}
47
+ ```
@@ -11,16 +11,7 @@ module Trinkets
11
11
 
12
12
  default_attr_options = { attr: attr, kw: kw }
13
13
 
14
- # Normalize attrs into a hash: { :name => **options }
15
- # @type [Hash[Symbol, Hash]]
16
- attrs = attrs.map { |a| [*a] }
17
- .map { |a| a.size == 1 ? a << {} : a }
18
- .each_with_object({}) do |(name, opts), h|
19
- # name, opts = a
20
- name = name.to_s.sub(/^@/, '').to_sym
21
- opts = default_attr_options.merge(opts)
22
- h[name] = opts
23
- end
14
+ attrs = ::Trinkets::Class.send(:sanitize_attrs, attrs, default_attr_options)
24
15
 
25
16
  attr_methods = (ATTR - [:none])
26
17
  .each_with_object({}) do |name, h|
@@ -43,12 +34,32 @@ module Trinkets
43
34
  .partition { |_, kw_opt| kw_opt }
44
35
  .map(&:to_h)
45
36
 
46
- init_method = ::Trinkets::Class.send :define_initialize, attrs, kw_attrs
37
+ init_method = ::Trinkets::Class.send(:define_initialize, attrs, kw_attrs)
47
38
  define_method :initialize, init_method
48
39
  end
49
40
  end
50
41
 
51
42
  class << self
43
+ private def sanitize_attrs(attrs, default_attr_options)
44
+ # Normalize attrs into an array: [[:name, **options], ...]
45
+ # @type [Array[Array[Symbol, Hash]]]
46
+ attrs = attrs.map do |a|
47
+ name, opts = [*a]
48
+ name = name.to_s.sub(/^@/, '').to_sym
49
+ opts = default_attr_options.merge(opts || {})
50
+ [name, opts]
51
+ end
52
+
53
+ repeated_attrs = attrs.map(&:first)
54
+ .tally
55
+ .select { |_, count| count > 1 }
56
+ .keys
57
+
58
+ raise ArgumentError, "duplicated argument names: #{repeated_attrs.join(', ')}" if repeated_attrs.any?
59
+
60
+ attrs.to_h
61
+ end
62
+
52
63
  # @param [Hash[Symbol Boolean]] attrs
53
64
  # @param [Hash[Symbol Boolean]] kw_attrs
54
65
  private def define_initialize(attrs, kw_attrs)
@@ -0,0 +1,14 @@
1
+ module Trinkets
2
+
3
+ module Enumerable
4
+ module WithHash
5
+ def each_with_hash(&) = each_with_object({}, &)
6
+ end
7
+ end
8
+
9
+ module Enumerator
10
+ module WithHash
11
+ def with_hash(&) = each_with_hash(&)
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,9 @@
1
+ require_relative '../../include/enumerable/each_with_hash'
2
+
3
+ module ::Enumerable
4
+ include ::Trinkets::Enumerable::WithHash
5
+ end
6
+
7
+ class ::Enumerator
8
+ include ::Trinkets::Enumerator::WithHash
9
+ end
@@ -0,0 +1,15 @@
1
+ require_relative '../../include/enumerable/each_with_hash'
2
+
3
+ module Trinkets
4
+ module Enumerable
5
+ module WithHash
6
+ refine ::Enumerable do
7
+ import_methods ::Trinkets::Enumerable::WithHash
8
+ end
9
+
10
+ refine ::Enumerator do
11
+ import_methods ::Trinkets::Enumerator::WithHash
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1 @@
1
+ require_relative '../../../explicit/trinkets/refine/class/init'
@@ -0,0 +1 @@
1
+ require_relative '../../../explicit/trinkets/refine/enumerable/each_with_hash'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Trinkets
4
- VERSION = "0.2.0"
4
+ VERSION = '0.3.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trinkets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - SilverPhoenix99
@@ -9,9 +9,37 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-01-28 00:00:00.000000000 Z
13
- dependencies: []
14
- description: Truly outrageous trinkets.
12
+ date: 2024-02-11 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '3.0'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '3.0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: simplecov
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: 0.22.0
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: 0.22.0
42
+ description: Truly outrageous bootleg facets in your trinkets box.
15
43
  email:
16
44
  - antoniopedrosilvapinto@gmail.com
17
45
  - pedro.at.miranda@gmail.com
@@ -19,40 +47,48 @@ executables: []
19
47
  extensions: []
20
48
  extra_rdoc_files: []
21
49
  files:
22
- - ".rspec"
23
50
  - CHANGELOG.md
24
51
  - LICENSE.txt
25
52
  - README.md
26
- - Rakefile
27
53
  - doc/class/init.md
28
- - lib/trinkets.rb
29
- - lib/trinkets/extend/class/init.rb
30
- - lib/trinkets/patch/class/init.rb
31
- - lib/trinkets/refine/class/init.rb
54
+ - doc/enumerable/each_with_hash.md
55
+ - lib/explicit/trinkets/extend/class/init.rb
56
+ - lib/explicit/trinkets/include/enumerable/each_with_hash.rb
57
+ - lib/explicit/trinkets/patch/class/init.rb
58
+ - lib/explicit/trinkets/patch/enumerable/each_with_hash.rb
59
+ - lib/explicit/trinkets/refine/class/init.rb
60
+ - lib/explicit/trinkets/refine/enumerable/each_with_hash.rb
61
+ - lib/implicit/trinkets/class/init.rb
62
+ - lib/implicit/trinkets/enumerable/each_with_hash.rb
32
63
  - lib/trinkets/version.rb
33
- - trinkets.gemspec
34
- homepage: http://nowhere.example.com
64
+ homepage: https://github.com/SilverPhoenix99/trinkets
35
65
  licenses:
36
66
  - MIT
37
67
  metadata:
38
- homepage_uri: http://nowhere.example.com
68
+ homepage_uri: https://github.com/SilverPhoenix99/trinkets
69
+ source_code_uri: https://github.com/SilverPhoenix99/trinkets
70
+ changelog_uri: https://github.com/SilverPhoenix99/trinkets/blob/master/CHANGELOG.md
71
+ bug_tracker_uri: https://github.com/SilverPhoenix99/trinkets/issues
72
+ documentation_uri: https://github.com/SilverPhoenix99/trinkets/blob/master/README.md
39
73
  post_install_message:
40
74
  rdoc_options: []
41
75
  require_paths:
42
- - lib
76
+ - lib/explicit
77
+ - lib/implicit
78
+ - lib/trinkets
43
79
  required_ruby_version: !ruby/object:Gem::Requirement
44
80
  requirements:
45
81
  - - ">="
46
82
  - !ruby/object:Gem::Version
47
- version: 3.2.0
83
+ version: 3.1.0
48
84
  required_rubygems_version: !ruby/object:Gem::Requirement
49
85
  requirements:
50
86
  - - ">="
51
87
  - !ruby/object:Gem::Version
52
88
  version: '0'
53
89
  requirements: []
54
- rubygems_version: 3.5.3
90
+ rubygems_version: 3.5.5
55
91
  signing_key:
56
92
  specification_version: 4
57
- summary: Trinkets in your box.
93
+ summary: Bootleg facets, with new trinkets.
58
94
  test_files: []
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task default: :spec
data/lib/trinkets.rb DELETED
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'trinkets/version'
data/trinkets.gemspec DELETED
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'lib/trinkets/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'trinkets'
7
- spec.version = Trinkets::VERSION
8
- spec.authors = %w[SilverPhoenix99 P3t3rU5]
9
- spec.email = %w[antoniopedrosilvapinto@gmail.com pedro.at.miranda@gmail.com]
10
-
11
- spec.summary = 'Trinkets in your box.'
12
- spec.description = 'Truly outrageous trinkets.'
13
- spec.homepage = 'http://nowhere.example.com'
14
- spec.license = 'MIT'
15
- spec.required_ruby_version = '>= 3.2.0'
16
-
17
- # spec.metadata['allowed_push_host'] = 'TODO: Set to your gem server "https://example.com"'
18
-
19
- spec.metadata['homepage_uri'] = spec.homepage
20
- # spec.metadata['source_code_uri'] = "TODO: Put your gem's public repo URL here."
21
- # spec.metadata['changelog_uri'] = "TODO: Put your gem's CHANGELOG.md URL here."
22
-
23
- # Specify which files should be added to the gem when it is released.
24
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
- spec.files = Dir.chdir(__dir__) do
26
- `git ls-files -z`.split("\x0").reject do |f|
27
- (File.expand_path(f) == __FILE__) ||
28
- f.start_with?(*%w[bin/ test/ spec/ features/ .git appveyor Gemfile])
29
- end
30
- end
31
- spec.require_paths = ['lib']
32
- end