package_json 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3f527631df066948ba8540040c1979df5555cf1493a2c9e9b2b27bb07fcab8b6
4
+ data.tar.gz: cad2ae8ff9ec1502d0c9674416a036740394e61a834887b8abdebb038ade2cd0
5
+ SHA512:
6
+ metadata.gz: 1528327c30b61584871ced376ee3d2baf656c7a5d46b053f901e66bc296cfeee432145b24fafc5c92c4cac17c16111594a834aac4e54520796362992c42a842d
7
+ data.tar.gz: 624ca23fea5c8afd0758f3240677630a2f4c28bc432a26242d23a990e3efa58d6a5727f7f521c171644fbd6effa41483a79e217bfb2608de9700009bc4ace60c
data/.editorconfig ADDED
@@ -0,0 +1,13 @@
1
+ # EditorConfig helps developers define and maintain consistent
2
+ # coding styles between different editors and IDEs
3
+ # editorconfig.org
4
+
5
+ root = true
6
+
7
+ [*]
8
+ end_of_line = lf
9
+ charset = utf-8
10
+ trim_trailing_whitespace = true
11
+ insert_final_newline = true
12
+ indent_style = space
13
+ indent_size = 2
data/.prettierignore ADDED
@@ -0,0 +1,6 @@
1
+ /.bundle/
2
+ /coverage/
3
+
4
+ .idea/
5
+ .vscode/
6
+ /vendor/
data/.prettierrc.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/prettierrc",
3
+ "semi": true,
4
+ "useTabs": false,
5
+ "singleQuote": true,
6
+ "bracketSpacing": true,
7
+ "bracketSameLine": false,
8
+ "jsxSingleQuote": false,
9
+ "quoteProps": "consistent",
10
+ "proseWrap": "always",
11
+ "endOfLine": "lf",
12
+ "arrowParens": "avoid",
13
+ "trailingComma": "none",
14
+ "htmlWhitespaceSensitivity": "ignore"
15
+ }
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,243 @@
1
+ ---
2
+ require:
3
+ - rubocop-performance
4
+ - rubocop-rspec
5
+
6
+ # Built-in config:
7
+ # https://github.com/bbatsov/rubocop/blob/master/config/default.yml
8
+
9
+ # We do not typically use/need class documentation
10
+ Style/Documentation:
11
+ Enabled: false
12
+
13
+ AllCops:
14
+ NewCops: enable
15
+ DisplayCopNames: true
16
+ DisplayStyleGuide: true
17
+ TargetRubyVersion: 2.6
18
+ SuggestExtensions: false
19
+ Exclude:
20
+ - 'bin/*'
21
+ - 'node_modules/**/*'
22
+ - 'bower_components/**/*'
23
+ - 'tmp/**/*'
24
+ - 'vendor/**/*'
25
+ - 'bin/**/*'
26
+ - 'doc/**/*'
27
+
28
+ Layout/LineLength:
29
+ Max: 120
30
+
31
+ Metrics/ModuleLength:
32
+ Exclude:
33
+ - 'spec/**/*_spec.rb'
34
+
35
+ Metrics/BlockLength:
36
+ Exclude:
37
+ - 'spec/**/*.rb'
38
+
39
+ # We generally don't want methods longer than 20 lines, except in migrations where it's probably okay.
40
+ Metrics/MethodLength:
41
+ Max: 20
42
+ Exclude:
43
+ - 'db/migrate/**/*.rb'
44
+ - 'spec/**/*'
45
+
46
+ # This cop complains when you have variables named things like:
47
+ # address_line_1
48
+ # address_line_2
49
+ # etc.
50
+ Naming/VariableNumber:
51
+ Enabled: false
52
+
53
+ # Just always use `raise` and stop thinking about it.
54
+ Style/SignalException:
55
+ EnforcedStyle: only_raise
56
+
57
+ # We think that:
58
+ # array = [
59
+ # :value
60
+ # ]
61
+ # and_in_a_method_call([
62
+ # :value
63
+ # ])
64
+ # Looks better than:
65
+ # value = [
66
+ # :value
67
+ # ]
68
+ # but_in_a_method_call([
69
+ # :its_like_this
70
+ # ])
71
+ Layout/FirstArrayElementIndentation:
72
+ EnforcedStyle: consistent
73
+
74
+ # We think that:
75
+ # hash = {
76
+ # key: :value
77
+ # }
78
+ # and_in_a_method_call({
79
+ # no: :difference
80
+ # })
81
+ # Looks better than:
82
+ # hash = {
83
+ # key: :value
84
+ # }
85
+ # but_in_a_method_call({
86
+ # its_like: :this
87
+ # })
88
+ Layout/FirstHashElementIndentation:
89
+ EnforcedStyle: consistent
90
+
91
+ # We think that:
92
+ # {
93
+ # foo: :bar
94
+ # baz: :bip
95
+ # }
96
+ # Looks better than:
97
+ # { foo: :bar
98
+ # baz: :bip }
99
+ Layout/MultilineHashBraceLayout:
100
+ Enabled: false
101
+
102
+ # We think that:
103
+ # foo(
104
+ # bar: :baz,
105
+ # bip: :whizz
106
+ # )
107
+ # Looks better than:
108
+ # foo(bar: baz,
109
+ # bip: :whizz)
110
+ Layout/MultilineMethodCallBraceLayout:
111
+ Enabled: false
112
+
113
+ # Just always use double quotes and stop thinking about it.
114
+ Style/StringLiterals:
115
+ EnforcedStyle: double_quotes
116
+
117
+ Style/StringLiteralsInInterpolation:
118
+ EnforcedStyle: double_quotes
119
+
120
+ # Ruby 2.4+ has a magic comment that makes all strings frozen and Rubocop wants to put it
121
+ # at the top of every. single. file. We decided we didn't want that - for now.
122
+ Style/FrozenStringLiteralComment:
123
+ Enabled: false
124
+
125
+ # We usually don't want you to use semicolons in Ruby, except in specs where brevity is
126
+ # often more valued than readability.
127
+ Style/Semicolon:
128
+ AllowAsExpressionSeparator: true
129
+ Exclude:
130
+ - 'spec/**/*.rb'
131
+
132
+ # Single line method definitions are totally fine, and often more readable, consider:
133
+ # class WidgetsPolicy
134
+ # def create?; false; end
135
+ # def index?; true; end
136
+ # def show?; true; end
137
+ # def update?; false; end
138
+ # def delete?; false; end
139
+ # end
140
+ Style/SingleLineMethods:
141
+ Enabled: false
142
+
143
+ # We want you to put a blank line between method definitions, the only exception being
144
+ # if you're defining a bunch of single-line methods as above.
145
+ Layout/EmptyLineBetweenDefs:
146
+ AllowAdjacentOneLineDefs: true
147
+
148
+ Naming/FileName:
149
+ Exclude:
150
+ - '**/Gemfile'
151
+ - '**/Rakefile'
152
+ - '**/Berksfile'
153
+
154
+ # Disable preference for Ruby's new safe navigation operator `&.` because it
155
+ # usually comes at the cost of expressiveness in the simple case:
156
+ #
157
+ # - coupon_usage.destroy if coupon_usage
158
+ # + coupon_usage&.destroy
159
+ #
160
+ # And guides you towards Law of Demeter violations in the extreme case:
161
+ #
162
+ # result&.data&.attributes&.payments&.first&.payment_token
163
+ #
164
+ # Disabling this cop doesn't stop you from using it, but be prepared to defend
165
+ # it in code review if you do.
166
+ Style/SafeNavigation:
167
+ Enabled: false
168
+
169
+ # Ruby supports two styles of string template formatting.
170
+ # "annotated" - format("%<greeting>s", greeting: "Hello")
171
+ # "template" - format("%{greeting}", greeting: "Hello")
172
+ #
173
+ # While the annotated format is more descriptive, it also comes in a style that is
174
+ # significantly harder for a developer to parse. The template style is easy to read, understand,
175
+ # and is consistent with formatting with (for example), interpolation (#{}).
176
+ Style/FormatStringToken:
177
+ EnforcedStyle: template
178
+
179
+ # This syntax is a deliberate idiom in rspec
180
+ # bbatsov endorses disabling it for rspec
181
+ # https://github.com/bbatsov/rubocop/issues/4222#issuecomment-290722962
182
+ Lint/AmbiguousBlockAssociation:
183
+ Exclude:
184
+ - 'spec/**/*'
185
+
186
+ # https://rubocop.readthedocs.io/en/latest/cops_style/
187
+ Style/HashTransformKeys:
188
+ Enabled: false
189
+
190
+ # https://rubocop.readthedocs.io/en/latest/cops_style/
191
+ Style/HashTransformValues:
192
+ Enabled: false
193
+
194
+ Metrics/AbcSize:
195
+ Max: 18
196
+ Exclude:
197
+ - 'spec/**/*'
198
+
199
+ Metrics/ClassLength:
200
+ Exclude:
201
+ - 'spec/**/*'
202
+
203
+ Naming/MemoizedInstanceVariableName:
204
+ EnforcedStyleForLeadingUnderscores: optional
205
+
206
+ Performance/Casecmp:
207
+ Enabled: false
208
+
209
+ Style/BarePercentLiterals:
210
+ EnforcedStyle: percent_q
211
+
212
+ Style/ClassAndModuleChildren:
213
+ Enabled: false
214
+
215
+ Style/DoubleNegation:
216
+ Enabled: false
217
+
218
+ Style/EmptyMethod:
219
+ Enabled: false
220
+
221
+ Style/NumericPredicate:
222
+ Enabled: false
223
+
224
+ Style/TrivialAccessors:
225
+ AllowPredicates: true
226
+
227
+ RSpec:
228
+ Language:
229
+ Expectations:
230
+ - assert_match
231
+
232
+ RSpec/MultipleExpectations:
233
+ Max: 10
234
+
235
+ RSpec/ExampleLength:
236
+ Max: 30
237
+
238
+ RSpec/RepeatedExample:
239
+ Exclude:
240
+ - 'spec/policies/**'
241
+
242
+ RSpec/MultipleMemoizedHelpers:
243
+ Max: 10
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.1.4
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-09-15
4
+
5
+ - Initial release
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ - Demonstrating empathy and kindness toward other people
21
+ - Being respectful of differing opinions, viewpoints, and experiences
22
+ - Giving and gracefully accepting constructive feedback
23
+ - Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ - Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ - The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ - Trolling, insulting or derogatory comments, and personal or political attacks
33
+ - Public or private harassment
34
+ - Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ - Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ jones258@gmail.com. All complaints will be reviewed and investigated promptly
64
+ and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in package_json.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+ gem "rspec", "~> 3.0"
10
+ gem "rubocop", "< 1.51" # TODO: this version dropped support for Ruby 2.6
11
+ gem "rubocop-performance", "< 1.18.0" # TODO: this version dropped support for Ruby 2.6
12
+ gem "rubocop-rspec", "< 2.21.0" # TODO: this version dropped support for Ruby 2.6
13
+ gem "simplecov", require: false
data/Gemfile.lock ADDED
@@ -0,0 +1,82 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ package_json (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.2)
10
+ diff-lcs (1.5.0)
11
+ docile (1.4.0)
12
+ json (2.6.3)
13
+ parallel (1.23.0)
14
+ parser (3.2.2.3)
15
+ ast (~> 2.4.1)
16
+ racc
17
+ racc (1.7.1)
18
+ rainbow (3.1.1)
19
+ rake (13.0.6)
20
+ regexp_parser (2.8.1)
21
+ rexml (3.2.6)
22
+ rspec (3.12.0)
23
+ rspec-core (~> 3.12.0)
24
+ rspec-expectations (~> 3.12.0)
25
+ rspec-mocks (~> 3.12.0)
26
+ rspec-core (3.12.2)
27
+ rspec-support (~> 3.12.0)
28
+ rspec-expectations (3.12.3)
29
+ diff-lcs (>= 1.2.0, < 2.0)
30
+ rspec-support (~> 3.12.0)
31
+ rspec-mocks (3.12.6)
32
+ diff-lcs (>= 1.2.0, < 2.0)
33
+ rspec-support (~> 3.12.0)
34
+ rspec-support (3.12.1)
35
+ rubocop (1.50.2)
36
+ json (~> 2.3)
37
+ parallel (~> 1.10)
38
+ parser (>= 3.2.0.0)
39
+ rainbow (>= 2.2.2, < 4.0)
40
+ regexp_parser (>= 1.8, < 3.0)
41
+ rexml (>= 3.2.5, < 4.0)
42
+ rubocop-ast (>= 1.28.0, < 2.0)
43
+ ruby-progressbar (~> 1.7)
44
+ unicode-display_width (>= 2.4.0, < 3.0)
45
+ rubocop-ast (1.29.0)
46
+ parser (>= 3.2.1.0)
47
+ rubocop-capybara (2.18.0)
48
+ rubocop (~> 1.41)
49
+ rubocop-performance (1.17.1)
50
+ rubocop (>= 1.7.0, < 2.0)
51
+ rubocop-ast (>= 0.4.0)
52
+ rubocop-rspec (2.20.0)
53
+ rubocop (~> 1.33)
54
+ rubocop-capybara (~> 2.17)
55
+ ruby-progressbar (1.13.0)
56
+ simplecov (0.22.0)
57
+ docile (~> 1.1)
58
+ simplecov-html (~> 0.11)
59
+ simplecov_json_formatter (~> 0.1)
60
+ simplecov-html (0.12.3)
61
+ simplecov_json_formatter (0.1.4)
62
+ unicode-display_width (2.4.2)
63
+
64
+ PLATFORMS
65
+ arm64-darwin-21
66
+ x64-mingw-ucrt
67
+ x64-mingw32
68
+ x86_64-darwin-19
69
+ x86_64-darwin-20
70
+ x86_64-linux
71
+
72
+ DEPENDENCIES
73
+ package_json!
74
+ rake (~> 13.0)
75
+ rspec (~> 3.0)
76
+ rubocop (< 1.51)
77
+ rubocop-performance (< 1.18.0)
78
+ rubocop-rspec (< 2.21.0)
79
+ simplecov
80
+
81
+ BUNDLED WITH
82
+ 2.4.17
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Gareth Jones
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.