pennyworth 11.2.2 → 12.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 903c4fca3a422a92c5f588e9179038c48ef4d356b1906421949e89b1304d61ea
4
- data.tar.gz: 90cd215659947df025550061538b330301aaec26f53d81306bb3519613604fea
3
+ metadata.gz: 5308544c010334be8f3011e133802dfaf97ac83d45ec55cf55a212a44233fab8
4
+ data.tar.gz: 78c2d3c5b9ccee38a9f3d6218dc9922656cb0fa01c59bcc65a46cb1943a291e1
5
5
  SHA512:
6
- metadata.gz: b4cdeb0f874f65d6ad8fd7c5b56e8f538845e70ae67a0285f90dfc7b61a1d843a6921ae6449848f8293d0d2d28cc119ee525a23e494c3fb3c48b424f61ee1754
7
- data.tar.gz: 398603a24c0cde29a88cef50eb44bec73da085f6f9ba73b166be899e6879ca027be57448e0583a00ccac56165804f194029f155f36f0d7e32aa5d50ee046237c
6
+ metadata.gz: 4c7e9b3317c0a32d7ced3377c7a4f203165ccd4359f3606909f07d48f5bfc3f7ad2cb93b867ea1487042a604dc8c65c0bbffd5ca88028cf218f4200541f34eed
7
+ data.tar.gz: 56d86a52b6d1577d86086160a11c59e1f95a20d3ce0206910314ba1ceeaf2897c2c3d466eecd27dc2fa76b3ac09e410ba7599659d8577432cca21138e867265c
checksums.yaml.gz.sig CHANGED
Binary file
data/LICENSE.adoc CHANGED
@@ -1,162 +1,214 @@
1
- = Apache License
1
+ = HIPPOCRATIC LICENSE
2
2
 
3
- Version 2.0, January 2004
4
-
5
- http://www.apache.org/licenses
6
-
7
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
-
9
- == 1. Definitions
3
+ *Version 3.0, October 2021*
10
4
 
11
- "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by
12
- Sections 1 through 9 of this document.
13
-
14
- "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is
15
- granting the License.
16
-
17
- "Legal Entity" shall mean the union of the acting entity and all other entities that control, are
18
- controlled by, or are under common control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the direction or management of such
20
- entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
5
+ https://firstdonoharm.dev
22
6
 
23
- "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this
24
- License.
7
+ *TERMS AND CONDITIONS*
25
8
 
26
- "Source" form shall mean the preferred form for making modifications, including but not limited to
27
- software source code, documentation source, and configuration files.
28
-
29
- "Object" form shall mean any form resulting from mechanical transformation or translation of a
30
- Source form, including but not limited to compiled object code, generated documentation, and
31
- conversions to other media types.
9
+ TERMS AND CONDITIONS FOR USE, COPY, MODIFICATION, PREPARATION OF DERIVATIVE WORK, REPRODUCTION, AND DISTRIBUTION:
32
10
 
33
- "Work" shall mean the work of authorship, whether in Source or Object form, made available under the
34
- License, as indicated by a copyright notice that is included in or attached to the work (an example
35
- is provided in the Appendix below).
36
-
37
- "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or
38
- derived from) the Work and for which the editorial revisions, annotations, elaborations, or other
39
- modifications represent, as a whole, an original work of authorship. For the purposes of this
40
- License, Derivative Works shall not include works that remain separable from, or merely link (or
41
- bind by name) to the interfaces of, the Work and Derivative Works thereof.
11
+ == 1. DEFINITIONS
42
12
 
43
- "Contribution" shall mean any work of authorship, including the original version of the Work and any
44
- modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted
45
- to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity
46
- authorized to submit on behalf of the copyright owner. For the purposes of this definition,
47
- "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or
48
- its representatives, including but not limited to communication on electronic mailing lists, source
49
- code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor
50
- for the purpose of discussing and improving the Work, but excluding communication that is
51
- conspicuously marked or otherwise designated in writing by the copyright owner as "Not a
52
- Contribution."
53
-
54
- "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a
55
- Contribution has been received by Licensor and subsequently incorporated within the Work.
56
-
57
- == 2. Grant of Copyright License
13
+ _This section defines certain terms used throughout this license agreement._
58
14
 
59
- Subject to the terms and conditions of this License, each Contributor hereby grants to You a
60
- perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to
61
- reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and
62
- distribute the Work and such Derivative Works in Source or Object form.
63
-
64
- == 3. Grant of Patent License
65
-
66
- Subject to the terms and conditions of this License, each Contributor hereby grants to You a
67
- perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
68
- section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer
69
- the Work, where such license applies only to those patent claims licensable by such Contributor that
70
- are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s)
71
- with the Work to which such Contribution(s) was submitted. If You institute patent litigation
72
- against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or
73
- a Contribution incorporated within the Work constitutes direct or contributory patent infringement,
74
- then any patent licenses granted to You under this License for that Work shall terminate as of the
75
- date such litigation is filed.
76
-
77
- == 4. Redistribution
78
-
79
- You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with
80
- or without modifications, and in Source or Object form, provided that You meet the following
81
- conditions:
82
-
83
- . You must give any other recipients of the Work or Derivative Works a copy of this License; and
84
-
85
- . You must cause any modified files to carry prominent notices stating that You changed the files;
86
- and
87
-
88
- . You must retain, in the Source form of any Derivative Works that You distribute, all copyright,
89
- patent, trademark, and attribution notices from the Source form of the Work, excluding those
90
- notices that do not pertain to any part of the Derivative Works; and
91
-
92
- . If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works
93
- that You distribute must include a readable copy of the attribution notices contained within such
94
- NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in
95
- at least one of the following places: within a NOTICE text file distributed as part of the
96
- Derivative Works; within the Source form or documentation, if provided along with the Derivative
97
- Works; or, within a display generated by the Derivative Works, if and wherever such third-party
98
- notices normally appear. The contents of the NOTICE file are for informational purposes only and
99
- do not modify the License. You may add Your own attribution notices within Derivative Works that
100
- You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such
101
- additional attribution notices cannot be construed as modifying the License.
102
-
103
- You may add Your own copyright statement to Your modifications and may provide additional or
104
- different license terms and conditions for use, reproduction, or distribution of Your modifications,
105
- or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of
106
- the Work otherwise complies with the conditions stated in this License.
107
-
108
- == 5. Submission of Contributions
109
-
110
- Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the
111
- Work by You to the Licensor shall be under the terms and conditions of this License, without any
112
- additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify
113
- the terms of any separate license agreement you may have executed with Licensor regarding such
114
- Contributions.
115
-
116
- == 6. Trademarks
117
-
118
- This License does not grant permission to use the trade names, trademarks, service marks, or product
119
- names of the Licensor, except as required for reasonable and customary use in describing the origin
120
- of the Work and reproducing the content of the NOTICE file.
121
-
122
- == 7. Disclaimer of Warranty
123
-
124
- Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each
125
- Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
126
- KIND, either express or implied, including, without limitation, any warranties or conditions of
127
- TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
128
- responsible for determining the appropriateness of using or redistributing the Work and assume any
129
- risks associated with Your exercise of permissions under this License.
130
-
131
- == 8. Limitation of Liability
132
-
133
- In no event and under no legal theory, whether in tort (including negligence), contract, or
134
- otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or
135
- agreed to in writing, shall any Contributor be liable to You for damages, including any direct,
136
- indirect, special, incidental, or consequential damages of any character arising as a result of this
137
- License or out of the use or inability to use the Work (including but not limited to damages for
138
- loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial
139
- damages or losses), even if such Contributor has been advised of the possibility of such damages.
140
-
141
- == 9. Accepting Warranty or Additional Liability
142
-
143
- While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee
144
- for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights
145
- consistent with this License. However, in accepting such obligations, You may act only on Your own
146
- behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You
147
- agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or
148
- claims asserted against, such Contributor by reason of your accepting any such warranty or
149
- additional liability.
150
-
151
- END OF TERMS AND CONDITIONS
152
-
153
- Copyright 2012 link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
154
-
155
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
156
- compliance with the License. You may obtain a link:https://www.apache.org/licenses/LICENSE-2.0[copy]
157
- of the License.
158
-
159
- Unless required by applicable law or agreed to in writing, software distributed under the License is
160
- distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
161
- implied. See the License for the specific language governing permissions and limitations under the
162
- License.
15
+ 1.1. "License" means the terms and conditions, as stated herein, for use, copy, modification, preparation of derivative work, reproduction, and distribution of Software (as defined below).
16
+
17
+ 1.2. "Licensor" means the copyright and/or patent owner or entity authorized by the copyright and/or patent owner that is granting the License.
18
+
19
+ 1.3. "Licensee" means the individual or entity exercising permissions granted by this License, including the use, copy, modification, preparation of derivative work, reproduction, and distribution of Software (as defined below).
20
+
21
+ 1.4. "Software" means any copyrighted work, including but not limited to software code, authored by Licensor and made available under this License.
22
+
23
+ 1.5. "Supply Chain" means the sequence of processes involved in the production and/or distribution of a commodity, good, or service offered by the Licensee.
24
+
25
+ 1.6. "Supply Chain Impacted Party" or "Supply Chain Impacted Parties" means any person(s) directly impacted by any of Licensee’s Supply Chain, including the practices of all persons or entities within the Supply Chain prior to a good or service reaching the Licensee.
26
+
27
+ 1.7. "Duty of Care" is defined by its use in tort law, delict law, and/or similar bodies of law closely related to tort and/or delict law, including without limitation, a requirement to act with the watchfulness, attention, caution, and prudence that a reasonable person in the same or similar circumstances would use towards any Supply Chain Impacted Party.
28
+
29
+ 1.8. "Worker" is defined to include any and all permanent, temporary, and agency workers, as well as piece-rate, salaried, hourly paid, legal young (minors), part-time, night, and migrant workers.
30
+
31
+ == 2. INTELLECTUAL PROPERTY GRANTS
32
+
33
+ _This section identifies intellectual property rights granted to a Licensee_.
34
+
35
+ 2.1. _Grant of Copyright License_: Subject to the terms and conditions of this License, Licensor hereby grants to Licensee a worldwide, non-exclusive, no-charge, royalty-free copyright license to use, copy, modify, prepare derivative work, reproduce, or distribute the Software, Licensor authored modified software, or other work derived from the Software.
36
+
37
+ 2.2 _Grant of Patent License_: Subject to the terms and conditions of this License, Licensor hereby grants Licensee a worldwide, non-exclusive, no-charge, royalty-free patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer Software.
38
+
39
+ == 3. ETHICAL STANDARDS
40
+
41
+ _This section lists conditions the Licensee must comply with in order to have rights under this License._
42
+
43
+ The rights granted to the Licensee by this License are expressly made subject to the Licensee’s ongoing compliance with the following conditions:
44
+
45
+ 3.1. The Licensee SHALL NOT, whether directly or indirectly, through agents or assigns:
46
+
47
+ 3.1.1. Infringe upon any person’s right to life or security of person, engage in extrajudicial killings, or commit murder, without lawful cause +
48
+ (See Article 3, _United Nations Universal Declaration of Human Rights_; Article 6, _International Covenant on Civil and Political Rights_)
49
+
50
+ 3.1.2. Hold any person in slavery, servitude, or forced labor +
51
+ (See Article 4, _United Nations Universal Declaration of Human Rights_; Article 8, _International Covenant on Civil and Political Rights_);
52
+
53
+ 3.1.3. Contribute to the institution of slavery, slave trading, forced labor, or unlawful child labor +
54
+ (See Article 4, _United Nations Universal Declaration of Human Rights_; Article 8, _International Covenant on Civil and Political Rights_);
55
+
56
+ 3.1.4. Torture or subject any person to cruel, inhumane, or degrading treatment or punishment +
57
+ (See Article 5, _United Nations Universal Declaration of Human Rights_; Article 7, _International Covenant on Civil and Political Rights_);
58
+
59
+ 3.1.5. Discriminate on the basis of sex, gender, sexual orientation, race, ethnicity, nationality, religion, caste, age, medical disability or impairment, and/or any other like circumstances +
60
+ (See Article 7, _United Nations Universal Declaration of Human Rights_; Article 2, _International Covenant on Economic, Social and Cultural Rights_; Article 26, _International Covenant on Civil and Political Rights_);
61
+
62
+ 3.1.6. Prevent any person from exercising his/her/their right to seek an effective remedy by a competent court or national tribunal (including domestic judicial systems, international courts, arbitration bodies, and other adjudicating bodies) for actions violating the fundamental rights granted to him/her/them by applicable constitutions, applicable laws, or by this License +
63
+ (See Article 8, _United Nations Universal Declaration of Human Rights_; Articles 9 and 14, _International Covenant on Civil and Political Rights_);
64
+
65
+ 3.1.7. Subject any person to arbitrary arrest, detention, or exile +
66
+ (See Article 9, _United Nations Universal Declaration of Human Rights_; Article 9, _International Covenant on Civil and Political Rights_);
67
+
68
+ 3.1.8. Subject any person to arbitrary interference with a person’s privacy, family, home, or correspondence without the express written consent of the person +
69
+ (See Article 12, _United Nations Universal Declaration of Human Rights_; Article 17, _International Covenant on Civil and Political Rights_);
70
+
71
+ 3.1.9. Arbitrarily deprive any person of his/her/their property +
72
+ (See Article 17, _United Nations Universal Declaration of Human Rights_);
73
+
74
+ 3.1.10. Forcibly remove indigenous peoples from their lands or territories or take any action with the aim or effect of dispossessing indigenous peoples from their lands, territories, or resources, including without limitation the intellectual property or traditional knowledge of indigenous peoples, without the free, prior, and informed consent of indigenous peoples concerned +
75
+ (See Articles 8 and 10, _United Nations Declaration on the Rights of Indigenous Peoples_);
76
+
77
+ 3.1.11. Be an individual or entity, or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, on the FFI Solutions Carbon Underground 200 list;
78
+
79
+ 3.1.12. Commit ecocide:
80
+
81
+ 3.1.12.1 For the purpose of this section, "ecocide" means unlawful or wanton acts committed with knowledge that there is a substantial likelihood of severe and either widespread or long-term damage to the environment being caused by those acts;
82
+
83
+ 3.1.12.2 For the purpose of further defining ecocide and the terms contained in the previous paragraph:
84
+
85
+ 3.1.12.2.1. "Wanton" means with reckless disregard for damage which would be clearly excessive in relation to the social and economic benefits anticipated;
86
+
87
+ 3.1.12.2.2. "Severe" means damage which involves very serious adverse changes, disruption, or harm to any element of the environment, including grave impacts on human life or natural, cultural, or economic resources;
88
+
89
+ 3.1.12.2.3. "Widespread" means damage which extends beyond a limited geographic area, crosses state boundaries, or is suffered by an entire ecosystem or species or a large number of human beings;
90
+
91
+ 3.1.12.2.4. "Long-term" means damage which is irreversible or which cannot be redressed through natural recovery within a reasonable period of time; and
92
+
93
+ 3.1.12.2.5. "Environment" means the earth, its biosphere, cryosphere, lithosphere, hydrosphere, and atmosphere, as well as outer space
94
+
95
+ (See Section II, _Independent Expert Panel for the Legal Definition of Ecocide_, Stop Ecocide Foundation and the Promise Institute for Human Rights at UCLA School of Law, June 2021);
96
+
97
+ 3.1.13. Be an individual or entity, or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, that engages in fossil fuel or mineral exploration, extraction, development, or sale;
98
+
99
+ 3.1.14. Be an individual or entity, or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, identified by the Boycott, Divestment, Sanctions ("BDS") movement on its website (https://bdsmovement.net/ and https://bdsmovement.net/get-involved/what-to-boycott) as a target for boycott;
100
+
101
+ 3.1.15. Be an individual or entity that:
102
+
103
+ 3.1.15.1. engages in any commercial transactions with the Taliban; or
104
+
105
+ 3.1.15.2. is a representative, agent, affiliate, successor, attorney, or assign of the Taliban;
106
+
107
+ 3.1.16. Be an individual or entity that:
108
+
109
+ 3.1.16.1. engages in any commercial transactions with the Myanmar/Burmese military junta; or
110
+
111
+ 3.1.16.2. is a representative, agent, affiliate, successor, attorney, or assign of the Myanmar/Burmese government;
112
+
113
+ 3.1.17. Be an individual or entity, or a representative, agent, affiliate, successor, attorney, or assign of any individual or entity, that does business in, purchases goods from, or otherwise benefits from goods produced in the Xinjiang Uygur Autonomous Region of China;
114
+
115
+ 3.1.18. Be an individual or entity:
116
+
117
+ 3.1.18.1. which U.S. Customs and Border Protection (CBP) has currently issued a Withhold Release Order (WRO) or finding against based on reasonable suspicion of forced labor; or
118
+
119
+ 3.1.18.2. that is a representative, agent, affiliate, successor, attorney, or assign of an individual or entity that does business with an individual or entity which currently has a WRO or finding from CBP issued against it based on reasonable suspicion of forced labor;
120
+
121
+ 3.1.19. Be a government agency or multinational corporation, or a representative, agent, affiliate, successor, attorney, or assign of a government or multinational corporation, which participates in mass surveillance programs;
122
+
123
+ 3.1.20. Be an entity or a representative, agent, affiliate, successor, attorney, or assign of an entity which conducts military activities;
124
+
125
+ 3.1.21. Be an individual or entity, or a or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, that provides good or services to, or otherwise enters into any commercial contracts with, any local, state, or federal law enforcement agency;
126
+
127
+ 3.1.22. Be an individual or entity, or a or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, that broadcasts messages promoting killing, torture, or other forms of extreme violence;
128
+
129
+ 3.1.23. Interfere with Workers’ free exercise of the right to organize and associate +
130
+ (See Article 20, United Nations Universal Declaration of Human Rights; C087 - Freedom of Association and Protection of the Right to Organise Convention, 1948 (No. 87), International Labour Organization; Article 8, International Covenant on Economic, Social and Cultural Rights); and
131
+
132
+ 3.1.24. Harm the environment in a manner inconsistent with local, state, national, or international law.
133
+
134
+ 3.2. The Licensee SHALL:
135
+
136
+ 3.2.1. Only use social auditing mechanisms that adhere to Worker-Driven Social Responsibility Network’s Statement of Principles (https://wsr-network.org/what-is-wsr/statement-of-principles/) over traditional social auditing mechanisms, to the extent the Licensee uses any social auditing mechanisms at all;
137
+
138
+ 3.2.2. Ensure that if the Licensee has a Board of Directors, 30% of Licensee’s board seats are held by Workers paid no more than 200% of the compensation of the lowest paid Worker of the Licensee;
139
+
140
+ 3.2.3. Provide clear, accessible supply chain data to the public in accordance with the following conditions:
141
+
142
+ 3.2.3.1. All data will be on Licensee’s website and/or, to the extent Licensee is a representative, agent, affiliate, successor, attorney, subsidiary, or assign, on Licensee’s principal’s or parent’s website or some other online platform accessible to the public via an internet search on a common internet search engine; and
143
+
144
+ 3.2.3.2. Data published will include, where applicable, manufacturers, top tier suppliers, subcontractors, cooperatives, component parts producers, and farms;
145
+
146
+ 3.2.4. Provide equal pay for equal work where the performance of such work requires equal skill, effort, and responsibility, and which are performed under similar working conditions, except where such payment is made pursuant to:
147
+
148
+ 3.2.4.1. A seniority system;
149
+
150
+ 3.2.4.2. A merit system;
151
+
152
+ 3.2.4.3. A system which measures earnings by quantity or quality of production; or
153
+
154
+ 3.2.4.4. A differential based on any other factor other than sex, gender, sexual orientation, race, ethnicity, nationality, religion, caste, age, medical disability or impairment, and/or any other like circumstances +
155
+ (See 29 U.S.C.A. § 206(d)(1); Article 23, _United Nations Universal Declaration of Human Rights_; Article 7, _International Covenant on Economic, Social and Cultural Rights_; Article 26, _International Covenant on Civil and Political Rights_); and
156
+
157
+ 3.2.5. Allow for reasonable limitation of working hours and periodic holidays with pay +
158
+ (See Article 24, _United Nations Universal Declaration of Human Rights_; Article 7, _International Covenant on Economic, Social and Cultural Rights_).
159
+
160
+ == 4. SUPPLY CHAIN IMPACTED PARTIES
161
+
162
+ _This section identifies additional individuals or entities that a Licensee could harm as a result of violating the Ethical Standards section, the condition that the Licensee must voluntarily accept a Duty of Care for those individuals or entities, and the right to a private right of action that those individuals or entities possess as a result of violations of the Ethical Standards section._
163
+
164
+ 4.1. In addition to the above Ethical Standards, Licensee voluntarily accepts a Duty of Care for Supply Chain Impacted Parties of this License, including individuals and communities impacted by violations of the Ethical Standards. The Duty of Care is breached when a provision within the Ethical Standards section is violated by a Licensee, one of its successors or assigns, or by an individual or entity that exists within the Supply Chain prior to a good or service reaching the Licensee.
165
+
166
+ 4.2. Breaches of the Duty of Care, as stated within this section, shall create a private right of action, allowing any Supply Chain Impacted Party harmed by the Licensee to take legal action against the Licensee in accordance with applicable negligence laws, whether they be in tort law, delict law, and/or similar bodies of law closely related to tort and/or delict law, regardless if Licensee is directly responsible for the harms suffered by a Supply Chain Impacted Party. Nothing in this section shall be interpreted to include acts committed by individuals outside of the scope of his/her/their employment.
167
+
168
+ == 5. NOTICE
169
+
170
+ _This section explains when a Licensee must notify others of the License._
171
+
172
+ 5.1. _Distribution of Notice_: Licensee must ensure that everyone who receives a copy of or uses any part of Software from Licensee, with or without changes, also receives the License and the copyright notice included with Software (and if included by the Licensor, patent, trademark, and attribution notice). Licensee must ensure that License is prominently displayed so that any individual or entity seeking to download, copy, use, or otherwise receive any part of Software from Licensee is notified of this License and its terms and conditions. Licensee must cause any modified versions of the Software to carry prominent notices stating that Licensee changed the Software.
173
+
174
+ 5.2. _Modified Software_: Licensee is free to create modifications of the Software and distribute only the modified portion created by Licensee, however, any derivative work stemming from the Software or its code must be distributed pursuant to this License, including this Notice provision.
175
+
176
+ 5.3. _Recipients as Licensees_: Any individual or entity that uses, copies, modifies, reproduces, distributes, or prepares derivative work based upon the Software, all or part of the Software’s code, or a derivative work developed by using the Software, including a portion of its code, is a Licensee as defined above and is subject to the terms and conditions of this License.
177
+
178
+ == 6. REPRESENTATIONS AND WARRANTIES
179
+
180
+ 6.1. _Disclaimer of Warranty_: TO THE FULL EXTENT ALLOWED BY LAW, THIS SOFTWARE COMES "AS IS," WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED, AND LICENSOR SHALL NOT BE LIABLE TO ANY PERSON OR ENTITY FOR ANY DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THIS LICENSE, UNDER ANY LEGAL CLAIM.
181
+
182
+ 6.2. _Limitation of Liability_: LICENSEE SHALL HOLD LICENSOR HARMLESS AGAINST ANY AND ALL CLAIMS, DEBTS, DUES, LIABILITIES, LIENS, CAUSES OF ACTION, DEMANDS, OBLIGATIONS, DISPUTES, DAMAGES, LOSSES, EXPENSES, ATTORNEYS’ FEES, COSTS, LIABILITIES, AND ALL OTHER CLAIMS OF EVERY KIND AND NATURE WHATSOEVER, WHETHER KNOWN OR UNKNOWN, ANTICIPATED OR UNANTICIPATED, FORESEEN OR UNFORESEEN, ACCRUED OR UNACCRUED, DISCLOSED OR UNDISCLOSED, ARISING OUT OF OR RELATING TO LICENSEE’S USE OF THE SOFTWARE. NOTHING IN THIS SECTION SHOULD BE INTERPRETED TO REQUIRE LICENSEE TO INDEMNIFY LICENSOR, NOR REQUIRE LICENSOR TO INDEMNIFY LICENSEE.
183
+
184
+ == 7. TERMINATION
185
+
186
+ 7.1. _Violations of Ethical Standards or Breaching Duty of Care_: If Licensee violates the Ethical Standards section or Licensee, or any other person or entity within the Supply Chain prior to a good or service reaching the Licensee, breaches its Duty of Care to Supply Chain Impacted Parties, Licensee must remedy the violation or harm caused by Licensee within 30 days of being notified of the violation or harm. If Licensee fails to remedy the violation or harm within 30 days, all rights in the Software granted to Licensee by License will be null and void as between Licensor and Licensee.
187
+
188
+ 7.2. _Failure of Notice_: If any person or entity notifies Licensee in writing that Licensee has not complied with the Notice section of this License, Licensee can keep this License by taking all practical steps to comply within 30 days after the notice of noncompliance. If Licensee does not do so, Licensee’s License (and all rights licensed hereunder) will end immediately.
189
+
190
+ 7.3. _Judicial Findings_: In the event Licensee is found by a civil, criminal, administrative, or other court of competent jurisdiction, or some other adjudicating body with legal authority, to have committed actions which are in violation of the Ethical Standards or Supply Chain Impacted Party sections of this License, all rights granted to Licensee by this License will terminate immediately.
191
+
192
+ 7.4. _Patent Litigation_: If Licensee institutes patent litigation against any entity (including a cross-claim or counterclaim in a suit) alleging that the Software, all or part of the Software’s code, or a derivative work developed using the Software, including a portion of its code, constitutes direct or contributory patent infringement, then any patent license, along with all other rights, granted to Licensee under this License will terminate as of the date such litigation is filed.
193
+
194
+ 7.5. _Additional Remedies_: Termination of the License by failing to remedy harms in no way prevents Licensor or Supply Chain Impacted Party from seeking appropriate remedies at law or in equity.
195
+
196
+ == 8. MISCELLANEOUS
197
+
198
+ 8.1. _Conditions_: Sections 3, 4.1, 5.1, 5.2, 7.1, 7.2, 7.3, and 7.4 are conditions of the rights granted to Licensee in the License.
199
+
200
+ 8.2. _Equitable Relief_: Licensor and any Supply Chain Impacted Party shall be entitled to equitable relief, including injunctive relief or specific performance of the terms hereof, in addition to any other remedy to which they are entitled at law or in equity.
201
+
202
+ 8.3. _Copyleft_: Modified software, source code, or other derivative work must be licensed, in its entirety, under the exact same conditions as this License.
203
+
204
+ 8.4. _Severability_: If any term or provision of this License is determined to be invalid, illegal, or unenforceable by a court of competent jurisdiction, any such determination of invalidity, illegality, or unenforceability shall not affect any other term or provision of this License or invalidate or render unenforceable such term or provision in any other jurisdiction. If the determination of invalidity, illegality, or unenforceability by a court of competent jurisdiction pertains to the terms or provisions contained in the Ethical Standards section of this License, all rights in the Software granted to Licensee shall be deemed null and void as between Licensor and Licensee.
205
+
206
+ 8.5. _Section Titles_: Section titles are solely written for organizational purposes and should not be used to interpret the language within each section.
207
+
208
+ 8.6. _Citations_: Citations are solely written to provide context for the source of the provisions in the Ethical Standards.
209
+
210
+ 8.7. _Section Summaries_: Some sections have a brief _italicized description_ which is provided for the sole purpose of briefly describing the section and should not be used to interpret the terms of the License.
211
+
212
+ 8.8. _Entire License_: This is the entire License between the Licensor and Licensee with respect to the claims released herein and that the consideration stated herein is the only consideration or compensation to be paid or exchanged between them for this License. This License cannot be modified or amended except in a writing signed by Licensor and Licensee.
213
+
214
+ 8.9. _Successors and Assigns_: This License shall be binding upon and inure to the benefit of the Licensor’s and Licensee’s respective heirs, successors, and assigns.
data/README.adoc CHANGED
@@ -241,7 +241,7 @@ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/alchemist
241
241
 
242
242
  The official link:https://www.alchemists.io[Alchemists] workflow for site navigation.
243
243
 
244
- 1. link:https://www.alchemists.io/public/aflred/workflows/alchemists.alfredworkflow[Download] and
244
+ 1. link:https://www.alchemists.io/public/alfred/workflows/alchemists.alfredworkflow[Download] and
245
245
  double click to install.
246
246
  2. Type `ax` to activate.
247
247
 
@@ -254,7 +254,7 @@ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/dry-gems.
254
254
 
255
255
  A link:https://dry-rb.org[Dry RB] workflow for navigating all of the Dry RB site.
256
256
 
257
- 1. link:https://www.alchemists.io/public/aflred/workflows/dry.alfredworkflow[Download] and double
257
+ 1. link:https://www.alchemists.io/public/alfred/workflows/dry.alfredworkflow[Download] and double
258
258
  click to install.
259
259
  2. Type `dry` to activate general information and `dryx` for project list.
260
260
 
@@ -268,7 +268,7 @@ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/rubocop-p
268
268
  A link:https://docs.rubocop.org/rubocop[Rubocop] workflow for quick access to documentation,
269
269
  learning about project changes, viewing source code, etc.
270
270
 
271
- 1. link:https://www.alchemists.io/public/aflred/workflows/rubocop.alfredworkflow[Download] and
271
+ 1. link:https://www.alchemists.io/public/alfred/workflows/rubocop.alfredworkflow[Download] and
272
272
  double click to install.
273
273
  2. Type `cop` to activate.
274
274
 
@@ -278,7 +278,7 @@ view issues.
278
278
  ==== Ruby
279
279
 
280
280
  This workflow is feature packed and only requires a
281
- link:https://www.alchemists.io/public/aflred/workflows/ruby.alfredworkflow[single download]. Once
281
+ link:https://www.alchemists.io/public/alfred/workflows/ruby.alfredworkflow[single download]. Once
282
282
  downloaded, double click to install, and then continue reading to learn all of the
283
283
  capabilities this single workflow provides.
284
284
 
@@ -417,7 +417,7 @@ they are of interest/aid to your own productivity.
417
417
  Expands acronyms so you can think and type in terms of an acronym but appear as if you typed out the
418
418
  full definition each time.
419
419
 
420
- 1. link:https://www.alchemists.io/public/aflred/workflows/acronyms.alfredworkflow[Download] and
420
+ 1. link:https://www.alchemists.io/public/alfred/workflows/acronyms.alfredworkflow[Download] and
421
421
  double click to install.
422
422
  2. Use any of the macros provided by the workflow to expand acronyms for legibility.
423
423
 
@@ -427,7 +427,7 @@ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/alpine.pn
427
427
 
428
428
  Provides link:https://www.alpinelinux.org[Alpine Linux] resources.
429
429
 
430
- 1. link:https://www.alchemists.io/public/aflred/workflows/alpine.alfredworkflow[Download] and double
430
+ 1. link:https://www.alchemists.io/public/alfred/workflows/alpine.alfredworkflow[Download] and double
431
431
  click to install.
432
432
  2. Type `al` to activate.
433
433
 
@@ -439,7 +439,7 @@ Launches development environment but can be tweaked for your preferences. Using
439
439
  manner ensures your machine boots or restarts quickly and gives you more control over what is
440
440
  launched.
441
441
 
442
- 1. link:https://www.alchemists.io/public/aflred/workflows/applications.alfredworkflow[Download] and
442
+ 1. link:https://www.alchemists.io/public/alfred/workflows/applications.alfredworkflow[Download] and
443
443
  double click to install.
444
444
  2. Type `work` to activate.
445
445
 
@@ -449,7 +449,7 @@ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/browsers.
449
449
 
450
450
  Provides browser related utilities.
451
451
 
452
- 1. link:https://www.alchemists.io/public/aflred/workflows/browsers.alfredworkflow[Download] and
452
+ 1. link:https://www.alchemists.io/public/alfred/workflows/browsers.alfredworkflow[Download] and
453
453
  double click to install.
454
454
  2. Type `open` to activate.
455
455
 
@@ -459,7 +459,7 @@ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/bundler.p
459
459
 
460
460
  Provides quick access to link:https://bundler.io[Bundler] related resources.
461
461
 
462
- 1. link:https://www.alchemists.io/public/aflred/workflows/bundler.alfredworkflow[Download] and
462
+ 1. link:https://www.alchemists.io/public/alfred/workflows/bundler.alfredworkflow[Download] and
463
463
  double click to install.
464
464
  2. Type `bundler` to activate.
465
465
 
@@ -469,7 +469,7 @@ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/elm.png[E
469
469
 
470
470
  A link:https://elm-lang.org[Elm] workflow for quick access to Elm resources.
471
471
 
472
- 1. link:https://www.alchemists.io/public/aflred/workflows/elm.alfredworkflow[Download] and double
472
+ 1. link:https://www.alchemists.io/public/alfred/workflows/elm.alfredworkflow[Download] and double
473
473
  click to install.
474
474
  2. Type `elm` to view general information, arrow keys to navigate, and `ENTER` to view information.
475
475
 
@@ -479,7 +479,7 @@ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/hanami.pn
479
479
 
480
480
  Provides link:https://hanamirb.org[Hanami] resources.
481
481
 
482
- 1. link:https://www.alchemists.io/public/aflred/workflows/hanami.alfredworkflow[Download] and
482
+ 1. link:https://www.alchemists.io/public/alfred/workflows/hanami.alfredworkflow[Download] and
483
483
  double click to install.
484
484
  2. Type `h` to activate.
485
485
 
@@ -489,7 +489,7 @@ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/chili.png
489
489
 
490
490
  Shortens URLs using link:https://chl.li[chl.li].
491
491
 
492
- 1. link:https://www.alchemists.io/public/aflred/workflows/chlli.alfredworkflow[Download] and
492
+ 1. link:https://www.alchemists.io/public/alfred/workflows/chlli.alfredworkflow[Download] and
493
493
  double click to install.
494
494
  2. Type `surl` to activate.
495
495
 
@@ -499,7 +499,7 @@ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/docker.pn
499
499
 
500
500
  Provides link:https://www.docker.com[Docker] resources.
501
501
 
502
- 1. link:https://www.alchemists.io/public/aflred/workflows/docker.alfredworkflow[Download] and
502
+ 1. link:https://www.alchemists.io/public/alfred/workflows/docker.alfredworkflow[Download] and
503
503
  double click to install.
504
504
  2. Type `dr` to activate.
505
505
 
@@ -507,7 +507,7 @@ Provides link:https://www.docker.com[Docker] resources.
507
507
 
508
508
  Provides macOS utilities.
509
509
 
510
- 1. link:https://www.alchemists.io/public/aflred/workflows/mac_os.alfredworkflow[Download] and
510
+ 1. link:https://www.alchemists.io/public/alfred/workflows/mac_os.alfredworkflow[Download] and
511
511
  double click to install.
512
512
  2. Open the workflow to see all available keywords.
513
513
 
@@ -517,7 +517,7 @@ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/terraform
517
517
 
518
518
  Provides link:https://www.terraform.io[Terraform] resources.
519
519
 
520
- 1. link:https://www.alchemists.io/public/aflred/workflows/terraform.alfredworkflow[Download] and
520
+ 1. link:https://www.alchemists.io/public/alfred/workflows/terraform.alfredworkflow[Download] and
521
521
  double click to install.
522
522
  2. Type `tf` to activate.
523
523
 
@@ -526,7 +526,7 @@ Provides link:https://www.terraform.io[Terraform] resources.
526
526
  Provides general text manipulation utilities beyond the Pennyworth powered _text_ keyword (mentioned
527
527
  earlier).
528
528
 
529
- 1. link:https://www.alchemists.io/public/aflred/workflows/text.alfredworkflow[Download] and
529
+ 1. link:https://www.alchemists.io/public/alfred/workflows/text.alfredworkflow[Download] and
530
530
  double click to install.
531
531
  2. Use any of the following global hotkeys to activate:
532
532
  ** `CONTROL + OPTION + COMMAND + o` - Open selected URL in default browser.
@@ -605,10 +605,11 @@ to this project and much more.
605
605
 
606
606
  Read link:LICENSE.adoc[LICENSE] for details.
607
607
 
608
- == History
608
+ == Changes
609
609
 
610
610
  Read link:CHANGES.adoc[CHANGES] for details.
611
611
 
612
612
  == Credits
613
613
 
614
- Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
614
+ * Built with link:https://www.alchemists.io/projects/gemsmith[Gemsmith].
615
+ * Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
@@ -5,7 +5,7 @@ module Pennyworth
5
5
  module Actions
6
6
  # Handles the configuration action.
7
7
  class Config
8
- def initialize configuration: Configuration::Loader::HANDLER, container: Container
8
+ def initialize configuration: Configuration::Loader::CLIENT, container: Container
9
9
  @configuration = configuration
10
10
  @container = container
11
11
  end
@@ -10,7 +10,7 @@ module Pennyworth
10
10
  @container = container
11
11
  end
12
12
 
13
- def call = processor.call.to_json.then { |json| logger.info json }
13
+ def call = processor.call.to_json.then { |json| logger.info { json } }
14
14
 
15
15
  private
16
16
 
@@ -13,7 +13,7 @@ module Pennyworth
13
13
  def call endpoint
14
14
  processor.call(endpoint)
15
15
  .to_json
16
- .then { |json| logger.info json }
16
+ .then { |json| logger.info { json } }
17
17
  end
18
18
 
19
19
  private
@@ -10,7 +10,7 @@ module Pennyworth
10
10
  @container = container
11
11
  end
12
12
 
13
- def call = processor.call.to_json.then { |json| logger.info json }
13
+ def call = processor.call.to_json.then { |json| logger.info { json } }
14
14
 
15
15
  private
16
16
 
@@ -13,7 +13,7 @@ module Pennyworth
13
13
  def call endpoint
14
14
  processor.call(endpoint)
15
15
  .to_json
16
- .then { |json| logger.info json }
16
+ .then { |json| logger.info { json } }
17
17
  end
18
18
 
19
19
  private
@@ -11,7 +11,7 @@ module Pennyworth
11
11
  @container = container
12
12
  end
13
13
 
14
- def call = processor.call.to_json.then { |json| logger.info json }
14
+ def call = processor.call.to_json.then { |json| logger.info { json } }
15
15
 
16
16
  private
17
17
 
@@ -11,7 +11,7 @@ module Pennyworth
11
11
  @container = container
12
12
  end
13
13
 
14
- def call = processor.call.to_json.then { |json| logger.info json }
14
+ def call = processor.call.to_json.then { |json| logger.info { json } }
15
15
 
16
16
  private
17
17
 
@@ -10,7 +10,7 @@ module Pennyworth
10
10
  @container = container
11
11
  end
12
12
 
13
- def call(content) = processor.call(content).to_json.then { |json| logger.info json }
13
+ def call(content) = processor.call(content).to_json.then { |json| logger.info { json } }
14
14
 
15
15
  private
16
16
 
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "optparse"
4
+
5
+ module Pennyworth
6
+ module CLI
7
+ # Assembles and parses all Command Line Interface (CLI) options.
8
+ class Parser
9
+ CLIENT = OptionParser.new nil, 40, " "
10
+ SECTIONS = [Parsers::Core, Parsers::GitHub, Parsers::RubyGems].freeze # Order is important.
11
+
12
+ def initialize configuration = Configuration::Loader.call,
13
+ sections: SECTIONS,
14
+ client: CLIENT
15
+ @configuration = configuration.dup
16
+ @sections = sections
17
+ @client = client
18
+ end
19
+
20
+ def call arguments = []
21
+ sections.each { |parser| parser.call configuration, client: }
22
+ client.parse arguments
23
+ configuration.freeze
24
+ end
25
+
26
+ def to_s = client.to_s
27
+
28
+ private
29
+
30
+ attr_reader :configuration, :client, :sections
31
+ end
32
+ end
33
+ end
@@ -12,7 +12,7 @@ module Pennyworth
12
12
  class Core
13
13
  def self.call(...) = new(...).call
14
14
 
15
- def initialize configuration = Configuration::Loader.call, client: CLIENT
15
+ def initialize configuration = Configuration::Loader.call, client: Parser::CLIENT
16
16
  @configuration = configuration
17
17
  @client = client
18
18
  end
@@ -21,7 +21,8 @@ module Pennyworth
21
21
  client.banner = "#{Identity::LABEL} - #{Identity::SUMMARY}"
22
22
  client.separator "\nUSAGE:\n"
23
23
  collate
24
- arguments.empty? ? arguments : client.parse!(arguments)
24
+ client.parse arguments
25
+ configuration
25
26
  end
26
27
 
27
28
  private
@@ -85,7 +86,7 @@ module Pennyworth
85
86
 
86
87
  def add_version
87
88
  client.on "-v", "--version", "Show gem version." do
88
- configuration.action_version = Identity::VERSION_LABEL
89
+ configuration.action_version = true
89
90
  end
90
91
  end
91
92
 
@@ -11,7 +11,7 @@ module Pennyworth
11
11
 
12
12
  def self.call(...) = new(...).call
13
13
 
14
- def initialize configuration = Configuration::Loader.call, client: CLIENT
14
+ def initialize configuration = Configuration::Loader.call, client: Parser::CLIENT
15
15
  @configuration = configuration
16
16
  @client = client
17
17
  end
@@ -19,7 +19,8 @@ module Pennyworth
19
19
  def call arguments = []
20
20
  client.separator "\nGITHUB OPTIONS:\n"
21
21
  private_methods.sort.grep(/add_/).each { |method| __send__ method }
22
- arguments.empty? ? arguments : client.parse!(arguments)
22
+ client.parse arguments
23
+ configuration
23
24
  end
24
25
 
25
26
  private
@@ -7,7 +7,7 @@ module Pennyworth
7
7
  class RubyGems
8
8
  def self.call(...) = new(...).call
9
9
 
10
- def initialize configuration = Configuration::Loader.call, client: CLIENT
10
+ def initialize configuration = Configuration::Loader.call, client: Parser::CLIENT
11
11
  @configuration = configuration
12
12
  @client = client
13
13
  end
@@ -15,7 +15,8 @@ module Pennyworth
15
15
  def call arguments = []
16
16
  client.separator "\nRUBYGEMS OPTIONS:\n"
17
17
  add_owner
18
- arguments.empty? ? arguments : client.parse!(arguments)
18
+ client.parse arguments
19
+ configuration
19
20
  end
20
21
 
21
22
  private
@@ -15,7 +15,7 @@ module Pennyworth
15
15
  text: Actions::Text.new
16
16
  }.freeze
17
17
 
18
- def initialize parser: Parsers::Assembler.new, actions: ACTIONS, container: Container
18
+ def initialize parser: Parser.new, actions: ACTIONS, container: Container
19
19
  @parser = parser
20
20
  @actions = actions
21
21
  @container = container
@@ -24,7 +24,7 @@ module Pennyworth
24
24
  def call arguments = []
25
25
  perform parser.call(arguments)
26
26
  rescue OptionParser::ParseError, KeyError => error
27
- logger.error error.message
27
+ logger.error { error.message }
28
28
  end
29
29
 
30
30
  private
@@ -43,7 +43,7 @@ module Pennyworth
43
43
  in action_system_signals: true then system_signals
44
44
  in action_system_errors: true then system_errors
45
45
  in action_text: String => content then text content
46
- in action_version: String => version then logger.info version
46
+ in action_version: true then logger.info { Identity::VERSION_LABEL }
47
47
  else usage
48
48
  end
49
49
  end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pennyworth
4
+ module Configuration
5
+ # Defines configuration content as the primary source of truth for use throughout the gem.
6
+ Content = Struct.new(
7
+ :action_encodings,
8
+ :action_git_hub,
9
+ :action_http_statuses,
10
+ :action_ruby_gems,
11
+ :action_system_errors,
12
+ :action_system_signals,
13
+ :action_text,
14
+ :action_config,
15
+ :action_version,
16
+ :action_help,
17
+ :alfred_preferences,
18
+ :inflections,
19
+ :git_hub_api_url,
20
+ :git_hub_organization,
21
+ :git_hub_user,
22
+ :http_statuses_url,
23
+ :ruby_gems_api_url,
24
+ :ruby_gems_owner,
25
+ keyword_init: true
26
+ ) do
27
+ def initialize *arguments
28
+ super
29
+ freeze
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "pathname"
4
+ require "refinements/hashes"
5
+ require "refinements/structs"
6
+ require "runcom"
7
+ require "yaml"
8
+
9
+ module Pennyworth
10
+ module Configuration
11
+ # Represents the fully assembled Command Line Interface (CLI) configuration.
12
+ class Loader
13
+ using Refinements::Hashes
14
+ using Refinements::Structs
15
+
16
+ DEFAULTS = YAML.load_file(Pathname(__dir__).join("defaults.yml")).freeze
17
+ CLIENT = Runcom::Config.new "#{Identity::NAME}/configuration.yml", defaults: DEFAULTS
18
+
19
+ def self.call = new.call
20
+
21
+ def self.with_defaults = new(client: DEFAULTS)
22
+
23
+ def initialize content: Content.new, client: CLIENT
24
+ @content = content
25
+ @client = client
26
+ end
27
+
28
+ def call = content.merge(**client.to_h.flatten_keys)
29
+
30
+ private
31
+
32
+ attr_reader :content, :client
33
+ end
34
+ end
35
+ end
@@ -10,7 +10,7 @@ module Pennyworth
10
10
  module Container
11
11
  extend Dry::Container::Mixin
12
12
 
13
- register(:configuration) { CLI::Configuration::Loader.call }
13
+ register(:configuration) { Configuration::Loader.call }
14
14
  register(:environment) { ENV }
15
15
  register(:kernel) { Kernel }
16
16
  register(:http) { HTTP }
@@ -6,7 +6,7 @@ module Pennyworth
6
6
  NAME = "pennyworth"
7
7
  LABEL = "Pennyworth"
8
8
  SUMMARY = "A command line interface that augments Alfred workflows."
9
- VERSION = "11.2.2"
9
+ VERSION = "12.0.0"
10
10
  VERSION_LABEL = "#{LABEL} #{VERSION}".freeze
11
11
  end
12
12
  end
@@ -3,7 +3,7 @@
3
3
  module Pennyworth
4
4
  # Overrides any string to desired form if matched, otherwise answers the original string.
5
5
  class Inflector
6
- DEFAULTS = Array(CLI::Configuration::Loader.call.inflections).reduce({}, :merge)
6
+ DEFAULTS = Array(Configuration::Loader.call.inflections).reduce({}, :merge)
7
7
 
8
8
  def initialize overrides = DEFAULTS
9
9
  @overrides = overrides
@@ -20,7 +20,7 @@ module Pennyworth
20
20
  end
21
21
 
22
22
  def get endpoint, parameters: {}
23
- paginate ->(page) { sole_get endpoint, parameters: parameters.merge(page: page) }
23
+ paginate ->(page) { sole_get endpoint, parameters: parameters.merge(page:) }
24
24
  end
25
25
 
26
26
  private
@@ -8,14 +8,14 @@ module Pennyworth
8
8
  class HTTPStatuses
9
9
  def initialize codes: Rack::Utils::HTTP_STATUS_CODES,
10
10
  model: Models::HTTPStatus,
11
- configuration: CLI::Configuration::Loader.call
11
+ configuration: Configuration::Loader.call
12
12
  @codes = codes
13
13
  @model = model
14
14
  @configuration = configuration
15
15
  end
16
16
 
17
17
  def call _omit = nil
18
- codes.map { |(code, label)| model[code: code, label: label, url: "#{url}/#{code}"] }
18
+ codes.map { |(code, label)| model[code:, label:, url: "#{url}/#{code}"] }
19
19
  end
20
20
 
21
21
  private
@@ -10,7 +10,7 @@ module Pennyworth
10
10
  @model = model
11
11
  end
12
12
 
13
- def call(_omit = nil) = list.map { |name, number| model[number: number, name: name] }
13
+ def call(_omit = nil) = list.map { |name, number| model[number:, name:] }
14
14
 
15
15
  private
16
16
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pennyworth
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.2.2
4
+ version: 12.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,7 +28,7 @@ cert_chain:
28
28
  lkHilIrX69jq8wMPpBhlaw2mRmeSL50Wv5u6xVBvOHhXFSP1crXM95vfLhLyRYod
29
29
  W2A=
30
30
  -----END CERTIFICATE-----
31
- date: 2021-11-20 00:00:00.000000000 Z
31
+ date: 2021-12-29 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: dry-container
@@ -92,28 +92,28 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '8.5'
95
+ version: '9.0'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '8.5'
102
+ version: '9.0'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: runcom
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '7.0'
109
+ version: '8.0'
110
110
  type: :runtime
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '7.0'
116
+ version: '8.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: zeitwerk
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -150,15 +150,14 @@ files:
150
150
  - lib/pennyworth/cli/actions/system/errors.rb
151
151
  - lib/pennyworth/cli/actions/system/signals.rb
152
152
  - lib/pennyworth/cli/actions/text.rb
153
- - lib/pennyworth/cli/configuration/content.rb
154
- - lib/pennyworth/cli/configuration/defaults.yml
155
- - lib/pennyworth/cli/configuration/loader.rb
156
- - lib/pennyworth/cli/parsers.rb
157
- - lib/pennyworth/cli/parsers/assembler.rb
153
+ - lib/pennyworth/cli/parser.rb
158
154
  - lib/pennyworth/cli/parsers/core.rb
159
155
  - lib/pennyworth/cli/parsers/git_hub.rb
160
156
  - lib/pennyworth/cli/parsers/ruby_gems.rb
161
157
  - lib/pennyworth/cli/shell.rb
158
+ - lib/pennyworth/configuration/content.rb
159
+ - lib/pennyworth/configuration/defaults.yml
160
+ - lib/pennyworth/configuration/loader.rb
162
161
  - lib/pennyworth/container.rb
163
162
  - lib/pennyworth/identity.rb
164
163
  - lib/pennyworth/inflector.rb
@@ -192,7 +191,7 @@ files:
192
191
  - lib/pennyworth/serializers/text.rb
193
192
  homepage: https://www.alchemists.io/projects/pennyworth
194
193
  licenses:
195
- - Apache-2.0
194
+ - Hippocratic-3.0
196
195
  metadata:
197
196
  bug_tracker_uri: https://github.com/bkuhlmann/pennyworth/issues
198
197
  changelog_uri: https://www.alchemists.io/projects/pennyworth/changes.html
@@ -207,14 +206,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
207
206
  requirements:
208
207
  - - "~>"
209
208
  - !ruby/object:Gem::Version
210
- version: '3.0'
209
+ version: '3.1'
211
210
  required_rubygems_version: !ruby/object:Gem::Requirement
212
211
  requirements:
213
212
  - - ">="
214
213
  - !ruby/object:Gem::Version
215
214
  version: '0'
216
215
  requirements: []
217
- rubygems_version: 3.2.31
216
+ rubygems_version: 3.3.4
218
217
  signing_key:
219
218
  specification_version: 4
220
219
  summary: A command line interface that augments Alfred workflows.
metadata.gz.sig CHANGED
@@ -1 +1,3 @@
1
- ���jV,��~�D��د���ž�0���M��˭�mص�6ZCC�K��l���3�-i�4�+uLj��yI�w�5;T>q �bf'o9n���v�Z�j�yL�����4`��1P���Gk5ǘ�mj-�_�j"T!Ȥ ��1fY}�s Z���OкD��s���l�DT>�f��d�I�������sI�T�hl���➃��d��?bn�bc M8c3���cP/��E����2���_c>N��^/���xp�B
1
+ 9+�&�!���̌�c�b>���?b�$`�OG��;癨�)��4��׺�������1���XF9��m r�����<A
2
+ ݣ��0��t �B�'ds�MUUL^��<^�
3
+ ������z��s��F�>R������$� �����f�R�´u�\nA��BR�_�$��偵DŽG�w����hO���W�!^o"�D�~S߃���}12C�9,��Řyv��!�&�6p��,���\66��X����b-��,ؠ�
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Pennyworth
4
- module CLI
5
- module Configuration
6
- # Defines configuration content as the primary source of truth for use throughout the gem.
7
- Content = Struct.new :action_encodings,
8
- :action_git_hub,
9
- :action_http_statuses,
10
- :action_ruby_gems,
11
- :action_system_errors,
12
- :action_system_signals,
13
- :action_text,
14
- :action_config,
15
- :action_version,
16
- :action_help,
17
- :alfred_preferences,
18
- :inflections,
19
- :git_hub_api_url,
20
- :git_hub_organization,
21
- :git_hub_user,
22
- :http_statuses_url,
23
- :ruby_gems_api_url,
24
- :ruby_gems_owner,
25
- keyword_init: true
26
- end
27
- end
28
- end
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "pathname"
4
- require "refinements/hashes"
5
- require "refinements/structs"
6
- require "runcom"
7
- require "yaml"
8
-
9
- module Pennyworth
10
- module CLI
11
- module Configuration
12
- # Represents the fully assembled Command Line Interface (CLI) configuration.
13
- class Loader
14
- using Refinements::Hashes
15
- using Refinements::Structs
16
-
17
- DEFAULTS = YAML.load_file(Pathname(__dir__).join("defaults.yml")).freeze
18
- HANDLER = Runcom::Config.new "#{Identity::NAME}/configuration.yml", defaults: DEFAULTS
19
-
20
- def self.call = new.call
21
-
22
- def self.with_defaults = new(handler: DEFAULTS)
23
-
24
- def initialize content: Content.new, handler: HANDLER
25
- @content = content
26
- @handler = handler
27
- end
28
-
29
- def call = content.merge(**handler.to_h.flatten_keys)
30
-
31
- private
32
-
33
- attr_reader :content, :handler
34
- end
35
- end
36
- end
37
- end
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Pennyworth
4
- module CLI
5
- module Parsers
6
- SECTIONS = [Core, GitHub, RubyGems].freeze # Order is important.
7
-
8
- # Assembles and parses all Command Line Interface (CLI) options.
9
- class Assembler
10
- def initialize configuration = CLI::Configuration::Loader.call,
11
- sections: SECTIONS,
12
- client: CLIENT
13
- @configuration = configuration
14
- @sections = sections
15
- @client = client
16
- end
17
-
18
- def call arguments = []
19
- sections.each { |parser| parser.call configuration, client: client }
20
- client.parse! arguments
21
- configuration
22
- end
23
-
24
- def to_s = client.to_s
25
-
26
- private
27
-
28
- attr_reader :configuration, :client, :sections
29
- end
30
- end
31
- end
32
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "optparse"
4
-
5
- module Pennyworth
6
- module CLI
7
- module Parsers
8
- CLIENT = OptionParser.new nil, 40, " "
9
- end
10
- end
11
- end