sublime_text_kit 11.0.1 → 12.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +1 -2
- data/LICENSE.adoc +207 -155
- data/README.adoc +23 -36
- data/{bin → exe}/sublime_text_kit +0 -0
- data/lib/sublime_text_kit/cli/actions/config.rb +1 -1
- data/lib/sublime_text_kit/cli/actions/metadata.rb +1 -1
- data/lib/sublime_text_kit/cli/actions/snippets.rb +3 -4
- data/lib/sublime_text_kit/cli/actions/update.rb +1 -1
- data/lib/sublime_text_kit/cli/parser.rb +32 -0
- data/lib/sublime_text_kit/cli/parsers/core.rb +17 -20
- data/lib/sublime_text_kit/cli/shell.rb +4 -4
- data/lib/sublime_text_kit/configuration/content.rb +45 -0
- data/lib/sublime_text_kit/{cli/configuration → configuration}/defaults.yml +1 -1
- data/lib/sublime_text_kit/configuration/loader.rb +35 -0
- data/lib/sublime_text_kit/container.rb +1 -1
- data/lib/sublime_text_kit/identity.rb +1 -1
- data/lib/sublime_text_kit/metadata/handler.rb +2 -6
- data.tar.gz.sig +0 -0
- metadata +19 -19
- metadata.gz.sig +0 -0
- data/lib/sublime_text_kit/cli/configuration/content.rb +0 -45
- data/lib/sublime_text_kit/cli/configuration/loader.rb +0 -37
- data/lib/sublime_text_kit/cli/parsers/assembler.rb +0 -32
- data/lib/sublime_text_kit/cli/parsers.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e97bb94145600555520ac0640ce33b5e02f06407f43dd631e52dca46c5e1be24
|
4
|
+
data.tar.gz: 76ad7dcfc8538dd75fcda935dc020e842b2c854e1140c5a4a4ab7f6be51a86d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 369bb0b9c90a73bf39c253594551847e674c3c0b02ddebd8ff3cd56347f30581f38999c0ff6c2b43e0c48700d21ba0ec2afd46a13e5d717de754fc430a824e2a
|
7
|
+
data.tar.gz: 63fe603e3c60133a22bc8e98e28d47475cf9921962a502f216ba2e6e7ee235f012aa1fba7b2bde994ba4ce7cd9d58d40e0d3ade51152bb04b35487cd9d2ea073
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
��w'�[�4���B�C��`�=[
|
1
|
+
��{������V`�s�XVdgj/��x�����]ܓ5d���oq����"�,�~��){���ߑ��0!���j�wl�&����D���� �`�-~|k1-C.�!_��z���F��v%���ߌOְp�-��?O&�h��oaiX������Vu��G��;BO�*�cC*����e5�u8�k�ól�q�����~]�����l5�lz��pP�pz������/O>��i4�=\������$r�"
|
data/LICENSE.adoc
CHANGED
@@ -1,162 +1,214 @@
|
|
1
|
-
=
|
1
|
+
= HIPPOCRATIC LICENSE
|
2
2
|
|
3
|
-
Version
|
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
|
-
|
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
|
-
|
24
|
-
License.
|
7
|
+
*TERMS AND CONDITIONS*
|
25
8
|
|
26
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
with the
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
conditions
|
82
|
-
|
83
|
-
.
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
of the
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
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
@@ -22,9 +22,8 @@ toc::[]
|
|
22
22
|
* Manages project metadata (`.sublime-project` and `.sublime-workspace` files).
|
23
23
|
* Manages session metadata so you can quickly toggle between projects via the `CONTROL+COMMAND+p`
|
24
24
|
shortcut.
|
25
|
-
* Prints all of your custom snippets in either
|
26
|
-
link:https://daringfireball.net/projects/markdown[Markdown]
|
27
|
-
link:https://asciidoctor.org[ASCII Doc] format.
|
25
|
+
* Prints all of your custom snippets in either link:https://asciidoctor.org[ASCII Doc] or
|
26
|
+
link:https://daringfireball.net/projects/markdown[Markdown] format.
|
28
27
|
|
29
28
|
== Requirements
|
30
29
|
|
@@ -52,7 +51,7 @@ USAGE:
|
|
52
51
|
-h, --help Show this message.
|
53
52
|
-m, --metadata ACTION Manage project metadata. Actions: create, delete, or recreate.
|
54
53
|
-S, --session Rebuild session metadata.
|
55
|
-
-s, --snippets [FORMAT] View snippets.
|
54
|
+
-s, --snippets [FORMAT] View snippets. Formats: markdown or ascii_doc. Default: ascii_doc.
|
56
55
|
-u, --update Update project and session metadata based on current settings.
|
57
56
|
-v, --version Show gem version.
|
58
57
|
....
|
@@ -71,13 +70,13 @@ An example configuration could be:
|
|
71
70
|
- "~/Engineering/Organizations"
|
72
71
|
- "~/Engineering/OSS"
|
73
72
|
:metadata_dir: "~/Dropbox/Cache/Sublime"
|
74
|
-
:snippets_format: :
|
73
|
+
:snippets_format: :markdown
|
75
74
|
----
|
76
75
|
|
77
76
|
Feel free to take this configuration, modify, and save as your own.
|
78
77
|
|
79
78
|
The `project_roots` key defines the root level directories where your project folders are located.
|
80
|
-
When project metadata (i.e.
|
79
|
+
When project metadata (i.e. `.sublime-project`, `.sublime-workspace`) is generated, the name of the
|
81
80
|
metadata file will be the same name as the project folder. All project metadata, regardless of root
|
82
81
|
location, is written to the same metadata directory as defined by the `metadata_dir` key. If using
|
83
82
|
the example settings shown above and assuming the following directory structure exists…
|
@@ -96,25 +95,25 @@ the example settings shown above and assuming the following directory structure
|
|
96
95
|
~/Dropbox/Cache/Sublime/sublime_text_kit.sublime-workspace
|
97
96
|
....
|
98
97
|
|
99
|
-
The `snippets_format` key allows you define what format to print your snippets as.
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
98
|
+
The `snippets_format` key allows you define what format to print your snippets as. You can always
|
99
|
+
override your default configuration by specifying the format from the command line:
|
100
|
+
`sublime_text_kit -s ascii_doc`. For example, this is how
|
101
|
+
link:https://www.alchemists.io/projects/sublime_text_setup/#_snippets[snippets documentation] is
|
102
|
+
generated for the link:https://www.alchemists.io/projects/sublime_text_setup[Sublime Text Setup]
|
103
|
+
project.
|
105
104
|
|
106
105
|
=== Workflow
|
107
106
|
|
108
107
|
The following demonstrates a default Sublime Text setup:
|
109
108
|
|
110
109
|
1. Start by defining your configuration: `sublime_text_kit --config edit`.
|
111
|
-
|
112
|
-
|
110
|
+
2. Shutdown Sublime Text (i.e. `COMMAND+q`).
|
111
|
+
3. Run `sublime_text_kit --update` which will create project metadata and rebuild session metadata
|
113
112
|
so Sublime Text has a complete project history from which to switch between via the
|
114
113
|
`CONTROL+COMMMAND+p` shortcut.
|
115
|
-
|
114
|
+
4. Launch Sublime Text and use the `CONTROL+COMMAND+p` keyboard shortcut to toggle between projects.
|
116
115
|
Notice that you can (fuzzy type) project names to jump between them.
|
117
|
-
|
116
|
+
5. Navigate through your project workload with ease. 🎉
|
118
117
|
|
119
118
|
=== Troubleshooting
|
120
119
|
|
@@ -151,31 +150,19 @@ To test, run:
|
|
151
150
|
bundle exec rake
|
152
151
|
----
|
153
152
|
|
154
|
-
==
|
153
|
+
== link:https://www.alchemists.io/policies/license[License]
|
155
154
|
|
156
|
-
|
155
|
+
== link:https://www.alchemists.io/policies/security[Security]
|
157
156
|
|
158
|
-
|
159
|
-
* Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
|
160
|
-
* Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
|
157
|
+
== link:https://www.alchemists.io/policies/code_of_conduct[Code of Conduct]
|
161
158
|
|
162
|
-
==
|
159
|
+
== link:https://www.alchemists.io/policies/contributions[Contributions]
|
163
160
|
|
164
|
-
|
165
|
-
participating in this project you agree to abide by its terms.
|
161
|
+
== link:https://www.alchemists.io/projects/sublime_text_kit/versions[Versions]
|
166
162
|
|
167
|
-
==
|
168
|
-
|
169
|
-
Read link:CONTRIBUTING.adoc[CONTRIBUTING] for details.
|
170
|
-
|
171
|
-
== License
|
172
|
-
|
173
|
-
Read link:LICENSE.adoc[LICENSE] for details.
|
174
|
-
|
175
|
-
== History
|
176
|
-
|
177
|
-
Read link:CHANGES.adoc[CHANGES] for details.
|
163
|
+
== link:https://www.alchemists.io/community[Community]
|
178
164
|
|
179
165
|
== Credits
|
180
166
|
|
181
|
-
|
167
|
+
* Built with link:https://www.alchemists.io/projects/gemsmith[Gemsmith].
|
168
|
+
* Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
|
File without changes
|
@@ -5,7 +5,7 @@ module SublimeTextKit
|
|
5
5
|
module Actions
|
6
6
|
# Handles gem configuration action.
|
7
7
|
class Config
|
8
|
-
def initialize configuration: Configuration::Loader::
|
8
|
+
def initialize configuration: Configuration::Loader::CLIENT, container: Container
|
9
9
|
@configuration = configuration
|
10
10
|
@container = container
|
11
11
|
end
|
@@ -15,18 +15,17 @@ module SublimeTextKit
|
|
15
15
|
@container = container
|
16
16
|
end
|
17
17
|
|
18
|
-
def call
|
19
|
-
kind = configuration.snippets_format
|
18
|
+
def call kind
|
20
19
|
printers.fetch(kind).call
|
21
20
|
rescue KeyError
|
22
|
-
logger.error { "Invalid snippet format
|
21
|
+
logger.error { "Invalid snippet format: #{kind}. Use #{formats}." }
|
23
22
|
end
|
24
23
|
|
25
24
|
private
|
26
25
|
|
27
26
|
attr_reader :printers, :container
|
28
27
|
|
29
|
-
def formats = printers.keys.
|
28
|
+
def formats = printers.keys.join(" or ")
|
30
29
|
|
31
30
|
def configuration = container[__method__]
|
32
31
|
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "optparse"
|
4
|
+
|
5
|
+
module SublimeTextKit
|
6
|
+
module CLI
|
7
|
+
# Assembles and parses all Command Line Interface (CLI) options.
|
8
|
+
class Parser
|
9
|
+
CLIENT = OptionParser.new nil, 40, " "
|
10
|
+
|
11
|
+
def initialize configuration = Container[:configuration],
|
12
|
+
section: Parsers::Core,
|
13
|
+
client: CLIENT
|
14
|
+
@configuration = configuration.dup
|
15
|
+
@section = section
|
16
|
+
@client = client
|
17
|
+
end
|
18
|
+
|
19
|
+
def call arguments = []
|
20
|
+
section.call configuration, client: client
|
21
|
+
client.parse arguments
|
22
|
+
configuration.freeze
|
23
|
+
end
|
24
|
+
|
25
|
+
def to_s = client.to_s
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
attr_reader :configuration, :section, :client
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -1,30 +1,32 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
3
|
+
require "refinements/structs"
|
4
4
|
|
5
5
|
module SublimeTextKit
|
6
6
|
module CLI
|
7
|
-
# Handles parsing of Command Line Interface (CLI) primary options.
|
8
7
|
module Parsers
|
9
8
|
# Handles parsing of Command Line Interface (CLI) core options.
|
10
9
|
class Core
|
10
|
+
using Refinements::Structs
|
11
|
+
|
11
12
|
def self.call(...) = new(...).call
|
12
13
|
|
13
|
-
def initialize
|
14
|
+
def initialize configuration = Container[:configuration], client: Parser::CLIENT
|
15
|
+
@configuration = configuration
|
14
16
|
@client = client
|
15
|
-
@container = container
|
16
17
|
end
|
17
18
|
|
18
19
|
def call arguments = []
|
19
20
|
client.banner = "#{Identity::LABEL} - #{Identity::SUMMARY}"
|
20
21
|
client.separator "\nUSAGE:\n"
|
21
22
|
collate
|
22
|
-
|
23
|
+
client.parse arguments
|
24
|
+
configuration
|
23
25
|
end
|
24
26
|
|
25
27
|
private
|
26
28
|
|
27
|
-
attr_reader :
|
29
|
+
attr_reader :configuration, :client
|
28
30
|
|
29
31
|
def collate = private_methods.sort.grep(/add_/).each { |method| __send__ method }
|
30
32
|
|
@@ -35,7 +37,7 @@ module SublimeTextKit
|
|
35
37
|
%i[edit view],
|
36
38
|
"Manage gem configuration. Actions: edit or view."
|
37
39
|
) do |action|
|
38
|
-
configuration.action_config
|
40
|
+
configuration.merge! action_config: action
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
@@ -46,13 +48,13 @@ module SublimeTextKit
|
|
46
48
|
%i[create delete recreate],
|
47
49
|
"Manage project metadata. Actions: create, delete, or recreate."
|
48
50
|
) do |action|
|
49
|
-
configuration.action_metadata
|
51
|
+
configuration.merge! action_metadata: action
|
50
52
|
end
|
51
53
|
end
|
52
54
|
|
53
55
|
def add_session
|
54
56
|
client.on "-S", "--session", "Rebuild session metadata." do
|
55
|
-
configuration.action_session
|
57
|
+
configuration.merge! action_session: true
|
56
58
|
end
|
57
59
|
end
|
58
60
|
|
@@ -61,11 +63,10 @@ module SublimeTextKit
|
|
61
63
|
"-s",
|
62
64
|
"--snippets [FORMAT]",
|
63
65
|
%i[markdown ascii_doc],
|
64
|
-
"View snippets.
|
65
|
-
"
|
66
|
+
"View snippets. Formats: markdown or ascii_doc. " \
|
67
|
+
"Default: #{configuration.snippets_format}."
|
66
68
|
) do |kind|
|
67
|
-
configuration.action_snippets
|
68
|
-
configuration.snippets_format = kind if kind
|
69
|
+
configuration.merge! action_snippets: true, snippets_format: kind
|
69
70
|
end
|
70
71
|
end
|
71
72
|
|
@@ -75,25 +76,21 @@ module SublimeTextKit
|
|
75
76
|
"--update",
|
76
77
|
"Update project and session metadata based on current settings."
|
77
78
|
) do
|
78
|
-
configuration.action_update
|
79
|
+
configuration.merge! action_update: true
|
79
80
|
end
|
80
81
|
end
|
81
82
|
|
82
83
|
def add_version
|
83
84
|
client.on "-v", "--version", "Show gem version." do
|
84
|
-
configuration.action_version
|
85
|
+
configuration.merge! action_version: true
|
85
86
|
end
|
86
87
|
end
|
87
88
|
|
88
89
|
def add_help
|
89
90
|
client.on "-h", "--help", "Show this message." do
|
90
|
-
configuration.action_help
|
91
|
+
configuration.merge! action_help: true
|
91
92
|
end
|
92
93
|
end
|
93
|
-
|
94
|
-
private_methods
|
95
|
-
|
96
|
-
def configuration = container[__method__]
|
97
94
|
end
|
98
95
|
end
|
99
96
|
end
|
@@ -12,7 +12,7 @@ module SublimeTextKit
|
|
12
12
|
update: Actions::Update.new
|
13
13
|
}.freeze
|
14
14
|
|
15
|
-
def initialize parser:
|
15
|
+
def initialize parser: Parser.new, actions: ACTIONS, container: Container
|
16
16
|
@parser = parser
|
17
17
|
@actions = actions
|
18
18
|
@container = container
|
@@ -33,9 +33,9 @@ module SublimeTextKit
|
|
33
33
|
in action_config: Symbol => action then config action
|
34
34
|
in action_metadata: Symbol => kind then metadata kind
|
35
35
|
in action_session: true then session
|
36
|
-
in action_snippets: true then snippets
|
36
|
+
in action_snippets: true then snippets configuration
|
37
37
|
in action_update: true then update
|
38
|
-
in action_version:
|
38
|
+
in action_version: true then logger.info Identity::VERSION_LABEL
|
39
39
|
else usage
|
40
40
|
end
|
41
41
|
end
|
@@ -46,7 +46,7 @@ module SublimeTextKit
|
|
46
46
|
|
47
47
|
def session = actions.fetch(__method__).call
|
48
48
|
|
49
|
-
def snippets = actions.fetch(__method__).call
|
49
|
+
def snippets(configuration) = actions.fetch(__method__).call(configuration.snippets_format)
|
50
50
|
|
51
51
|
def update = actions.fetch(__method__).call
|
52
52
|
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "refinements/pathnames"
|
4
|
+
|
5
|
+
module SublimeTextKit
|
6
|
+
module Configuration
|
7
|
+
# Defines configuration content as the primary source of truth for use throughout the gem.
|
8
|
+
Content = Struct.new(
|
9
|
+
:action_config,
|
10
|
+
:action_help,
|
11
|
+
:action_metadata,
|
12
|
+
:action_session,
|
13
|
+
:action_snippets,
|
14
|
+
:action_update,
|
15
|
+
:action_version,
|
16
|
+
:project_roots,
|
17
|
+
:metadata_dir,
|
18
|
+
:snippets_format,
|
19
|
+
:session_path,
|
20
|
+
:user_dir,
|
21
|
+
keyword_init: true
|
22
|
+
) do
|
23
|
+
using Refinements::Pathnames
|
24
|
+
|
25
|
+
def initialize *arguments
|
26
|
+
super
|
27
|
+
|
28
|
+
home = Pathname ENV["HOME"]
|
29
|
+
|
30
|
+
self[:session_path] ||= home.join(
|
31
|
+
"Library/Application Support/Sublime Text/Local/Session.sublime_session"
|
32
|
+
)
|
33
|
+
|
34
|
+
self[:user_dir] ||= home.join "Library/Application Support/Sublime Text/Packages/User"
|
35
|
+
|
36
|
+
freeze
|
37
|
+
end
|
38
|
+
|
39
|
+
def project_dirs
|
40
|
+
Array(project_roots).map { |path| Pathname(path).expand_path }
|
41
|
+
.flat_map(&:directories)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
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 SublimeTextKit
|
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
|
@@ -9,7 +9,7 @@ module SublimeTextKit
|
|
9
9
|
module Container
|
10
10
|
extend Dry::Container::Mixin
|
11
11
|
|
12
|
-
register(:configuration
|
12
|
+
register(:configuration) { Configuration::Loader.call }
|
13
13
|
register(:colorizer) { Pastel.new enabled: $stdout.tty? }
|
14
14
|
register(:kernel) { Kernel }
|
15
15
|
|
@@ -5,7 +5,7 @@ module SublimeTextKit
|
|
5
5
|
module Identity
|
6
6
|
NAME = "sublime_text_kit"
|
7
7
|
LABEL = "Sublime Text Kit"
|
8
|
-
VERSION = "
|
8
|
+
VERSION = "12.0.1"
|
9
9
|
VERSION_LABEL = "#{LABEL} #{VERSION}".freeze
|
10
10
|
SUMMARY = "A command line interface for managing Sublime Text metadata."
|
11
11
|
end
|
@@ -10,16 +10,12 @@ module SublimeTextKit
|
|
10
10
|
|
11
11
|
def self.with_project project_dir, metadata_dir
|
12
12
|
new "sublime-project",
|
13
|
-
serializer: Serializers::Project.new(
|
14
|
-
Pathway[project_dir: project_dir, metadata_dir: metadata_dir]
|
15
|
-
)
|
13
|
+
serializer: Serializers::Project.new(Pathway[project_dir:, metadata_dir:])
|
16
14
|
end
|
17
15
|
|
18
16
|
def self.with_workspace project_dir, metadata_dir
|
19
17
|
new "sublime-workspace",
|
20
|
-
serializer: Serializers::Workspace.new(
|
21
|
-
Pathway[project_dir: project_dir, metadata_dir: metadata_dir]
|
22
|
-
)
|
18
|
+
serializer: Serializers::Workspace.new(Pathway[project_dir:, metadata_dir:])
|
23
19
|
end
|
24
20
|
|
25
21
|
def initialize extension, serializer:
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sublime_text_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 12.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
28
28
|
lkHilIrX69jq8wMPpBhlaw2mRmeSL50Wv5u6xVBvOHhXFSP1crXM95vfLhLyRYod
|
29
29
|
W2A=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date:
|
31
|
+
date: 2022-01-01 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: dry-container
|
@@ -64,42 +64,42 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '9.0'
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '9.0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: runcom
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
81
|
+
version: '8.0'
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
88
|
+
version: '8.0'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: zeitwerk
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '2.
|
95
|
+
version: '2.5'
|
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: '2.
|
102
|
+
version: '2.5'
|
103
103
|
description:
|
104
104
|
email:
|
105
105
|
- brooke@alchemists.io
|
@@ -112,20 +112,19 @@ extra_rdoc_files:
|
|
112
112
|
files:
|
113
113
|
- LICENSE.adoc
|
114
114
|
- README.adoc
|
115
|
-
-
|
115
|
+
- exe/sublime_text_kit
|
116
116
|
- lib/sublime_text_kit.rb
|
117
117
|
- lib/sublime_text_kit/cli/actions/config.rb
|
118
118
|
- lib/sublime_text_kit/cli/actions/metadata.rb
|
119
119
|
- lib/sublime_text_kit/cli/actions/session.rb
|
120
120
|
- lib/sublime_text_kit/cli/actions/snippets.rb
|
121
121
|
- lib/sublime_text_kit/cli/actions/update.rb
|
122
|
-
- lib/sublime_text_kit/cli/
|
123
|
-
- lib/sublime_text_kit/cli/configuration/defaults.yml
|
124
|
-
- lib/sublime_text_kit/cli/configuration/loader.rb
|
125
|
-
- lib/sublime_text_kit/cli/parsers.rb
|
126
|
-
- lib/sublime_text_kit/cli/parsers/assembler.rb
|
122
|
+
- lib/sublime_text_kit/cli/parser.rb
|
127
123
|
- lib/sublime_text_kit/cli/parsers/core.rb
|
128
124
|
- lib/sublime_text_kit/cli/shell.rb
|
125
|
+
- lib/sublime_text_kit/configuration/content.rb
|
126
|
+
- lib/sublime_text_kit/configuration/defaults.yml
|
127
|
+
- lib/sublime_text_kit/configuration/loader.rb
|
129
128
|
- lib/sublime_text_kit/container.rb
|
130
129
|
- lib/sublime_text_kit/identity.rb
|
131
130
|
- lib/sublime_text_kit/metadata/handler.rb
|
@@ -140,11 +139,12 @@ files:
|
|
140
139
|
- lib/sublime_text_kit/snippets/reader.rb
|
141
140
|
homepage: https://www.alchemists.io/projects/sublime_text_kit
|
142
141
|
licenses:
|
143
|
-
-
|
142
|
+
- Hippocratic-3.0
|
144
143
|
metadata:
|
145
144
|
bug_tracker_uri: https://github.com/bkuhlmann/sublime_text_kit/issues
|
146
|
-
changelog_uri: https://www.alchemists.io/projects/sublime_text_kit/
|
145
|
+
changelog_uri: https://www.alchemists.io/projects/sublime_text_kit/versions
|
147
146
|
documentation_uri: https://www.alchemists.io/projects/sublime_text_kit
|
147
|
+
rubygems_mfa_required: 'true'
|
148
148
|
source_code_uri: https://github.com/bkuhlmann/sublime_text_kit
|
149
149
|
post_install_message:
|
150
150
|
rdoc_options: []
|
@@ -154,14 +154,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
154
154
|
requirements:
|
155
155
|
- - "~>"
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version: '3.
|
157
|
+
version: '3.1'
|
158
158
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
159
|
requirements:
|
160
160
|
- - ">="
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
|
-
rubygems_version: 3.
|
164
|
+
rubygems_version: 3.3.4
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: A command line interface for managing Sublime Text metadata.
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "refinements/pathnames"
|
4
|
-
|
5
|
-
module SublimeTextKit
|
6
|
-
module CLI
|
7
|
-
module Configuration
|
8
|
-
# Defines configuration content as the primary source of truth for use throughout the gem.
|
9
|
-
Content = Struct.new(
|
10
|
-
:action_config,
|
11
|
-
:action_help,
|
12
|
-
:action_metadata,
|
13
|
-
:action_session,
|
14
|
-
:action_snippets,
|
15
|
-
:action_update,
|
16
|
-
:action_version,
|
17
|
-
:project_roots,
|
18
|
-
:metadata_dir,
|
19
|
-
:snippets_format,
|
20
|
-
:session_path,
|
21
|
-
:user_dir,
|
22
|
-
keyword_init: true
|
23
|
-
) do
|
24
|
-
using Refinements::Pathnames
|
25
|
-
|
26
|
-
def initialize *arguments
|
27
|
-
super
|
28
|
-
|
29
|
-
home = Pathname ENV["HOME"]
|
30
|
-
|
31
|
-
self[:session_path] ||= home.join(
|
32
|
-
"Library/Application Support/Sublime Text/Local/Session.sublime_session"
|
33
|
-
)
|
34
|
-
|
35
|
-
self[:user_dir] ||= home.join "Library/Application Support/Sublime Text/Packages/User"
|
36
|
-
end
|
37
|
-
|
38
|
-
def project_dirs
|
39
|
-
Array(project_roots).map { |path| Pathname(path).expand_path }
|
40
|
-
.flat_map(&:directories)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
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 SublimeTextKit
|
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
|
-
require "runcom"
|
4
|
-
|
5
|
-
module SublimeTextKit
|
6
|
-
module CLI
|
7
|
-
module Parsers
|
8
|
-
# Assembles and parses all Command Line Interface (CLI) options.
|
9
|
-
class Assembler
|
10
|
-
def initialize section: Core, client: CLIENT, container: Container
|
11
|
-
@section = section
|
12
|
-
@client = client
|
13
|
-
@container = container
|
14
|
-
end
|
15
|
-
|
16
|
-
def call arguments = []
|
17
|
-
section.call client: client
|
18
|
-
client.parse! arguments
|
19
|
-
configuration
|
20
|
-
end
|
21
|
-
|
22
|
-
def to_s = client.to_s
|
23
|
-
|
24
|
-
private
|
25
|
-
|
26
|
-
attr_reader :section, :client, :container
|
27
|
-
|
28
|
-
def configuration = container[__method__]
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|