peppermint 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +94 -0
- data/.ruby-version +1 -0
- data/.solargraph.yml +24 -0
- data/.standard.yml +3 -0
- data/Gemfile +18 -0
- data/Gemfile.lock +154 -0
- data/LICENSE +29 -0
- data/README.md +50 -0
- data/Rakefile +4 -0
- data/install.sh +7 -0
- data/lib/peppermint/rake/gwenGPT.rb +31 -0
- data/lib/peppermint/rake/ruby.rb +29 -0
- data/lib/peppermint/rake/rust.rb +37 -0
- data/lib/peppermint/rake/shared.rake +41 -0
- data/lib/peppermint/version.rb +4 -0
- data/lib/peppermint.rb +6 -0
- data/peppermint.gemspec +46 -0
- metadata +215 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 28e534602862174173188bb5444978a75a4c37bf52a8a1ae37240c0b7d3f62f2
|
|
4
|
+
data.tar.gz: 9706c6c6652cfab2455755ad5c1ccde87ce83cb8f9c6db12a3e1e2a76d6655db
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 39525c3489035d86278de71140f614d1029317650f8c760b73c7c47b3e85cdc5fba95fbf5a293b3311a9273b8c9aae664551d3d22a539d6912c0f50e91ecd391
|
|
7
|
+
data.tar.gz: 3fceed6b4919745509b46f11d14c037f0978d21d84defb5175b1c3a5742d1e6d0f3e238b84d80b9ae880f7ddddd1e9c18259c243248f797f510bbfc6c20fe83a
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
inherit_mode:
|
|
2
|
+
merge:
|
|
3
|
+
- Exclude
|
|
4
|
+
|
|
5
|
+
require:
|
|
6
|
+
- standard
|
|
7
|
+
- standard-custom
|
|
8
|
+
- standard-performance
|
|
9
|
+
- rubocop-performance
|
|
10
|
+
- rubocop-rake
|
|
11
|
+
- rubocop-rspec
|
|
12
|
+
|
|
13
|
+
inherit_gem:
|
|
14
|
+
standard: config/base.yml
|
|
15
|
+
standard-performance: config/base.yml
|
|
16
|
+
standard-custom: config/base.yml
|
|
17
|
+
|
|
18
|
+
# custom enables/disables
|
|
19
|
+
Layout/LineLength:
|
|
20
|
+
Enabled: true
|
|
21
|
+
Max: 100
|
|
22
|
+
Style/DisableCopsWithinSourceCodeDirective:
|
|
23
|
+
Enabled: true
|
|
24
|
+
Rake/Desc:
|
|
25
|
+
Enabled: false
|
|
26
|
+
RSpec/MultipleExpectations:
|
|
27
|
+
Enabled: false
|
|
28
|
+
RSpec/ExampleLength:
|
|
29
|
+
Enabled: false
|
|
30
|
+
|
|
31
|
+
AllCops:
|
|
32
|
+
NewCops: enable
|
|
33
|
+
Include:
|
|
34
|
+
- '**/*.rb'
|
|
35
|
+
- '**/*.arb'
|
|
36
|
+
- '**/*.axlsx'
|
|
37
|
+
- '**/*.builder'
|
|
38
|
+
- '**/*.fcgi'
|
|
39
|
+
- '**/*.gemfile'
|
|
40
|
+
- '**/*.gemspec'
|
|
41
|
+
- '**/*.god'
|
|
42
|
+
- '**/*.jb'
|
|
43
|
+
- '**/*.jbuilder'
|
|
44
|
+
- '**/*.mspec'
|
|
45
|
+
- '**/*.opal'
|
|
46
|
+
- '**/*.pluginspec'
|
|
47
|
+
- '**/*.podspec'
|
|
48
|
+
- '**/*.rabl'
|
|
49
|
+
- '**/*.rake'
|
|
50
|
+
- '**/*.rbuild'
|
|
51
|
+
- '**/*.rbw'
|
|
52
|
+
- '**/*.rbx'
|
|
53
|
+
- '**/*.ru'
|
|
54
|
+
- '**/*.ruby'
|
|
55
|
+
- '**/*.schema'
|
|
56
|
+
- '**/*.spec'
|
|
57
|
+
- '**/*.thor'
|
|
58
|
+
- '**/*.watchr'
|
|
59
|
+
- '**/.irbrc'
|
|
60
|
+
- '**/.pryrc'
|
|
61
|
+
- '**/.simplecov'
|
|
62
|
+
- '**/buildfile'
|
|
63
|
+
- '**/Appraisals'
|
|
64
|
+
- '**/Berksfile'
|
|
65
|
+
- '**/Brewfile'
|
|
66
|
+
- '**/Buildfile'
|
|
67
|
+
- '**/Capfile'
|
|
68
|
+
- '**/Cheffile'
|
|
69
|
+
- '**/Dangerfile'
|
|
70
|
+
- '**/Deliverfile'
|
|
71
|
+
- '**/Fastfile'
|
|
72
|
+
- '**/*Fastfile'
|
|
73
|
+
- '**/Gemfile'
|
|
74
|
+
- '**/Guardfile'
|
|
75
|
+
- '**/Jarfile'
|
|
76
|
+
- '**/Mavenfile'
|
|
77
|
+
- '**/Podfile'
|
|
78
|
+
- '**/Puppetfile'
|
|
79
|
+
- '**/Rakefile'
|
|
80
|
+
- '**/rakefile'
|
|
81
|
+
- '**/Schemafile'
|
|
82
|
+
- '**/Snapfile'
|
|
83
|
+
- '**/Steepfile'
|
|
84
|
+
- '**/Thorfile'
|
|
85
|
+
- '**/Vagabondfile'
|
|
86
|
+
- '**/Vagrantfile'
|
|
87
|
+
Exclude:
|
|
88
|
+
- 'target/**/*'
|
|
89
|
+
- 'node_modules/**/*'
|
|
90
|
+
- 'src/**/*'
|
|
91
|
+
- 'tmp/**/*'
|
|
92
|
+
- 'vendor/**/*'
|
|
93
|
+
- '.git/**/*'
|
|
94
|
+
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.2.2
|
data/.solargraph.yml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
include:
|
|
3
|
+
- "**/*.rb"
|
|
4
|
+
exclude:
|
|
5
|
+
- spec/**/*
|
|
6
|
+
- test/**/*
|
|
7
|
+
- vendor/**/*
|
|
8
|
+
- ".bundle/**/*"
|
|
9
|
+
require: []
|
|
10
|
+
domains: []
|
|
11
|
+
reporters:
|
|
12
|
+
- rubocop
|
|
13
|
+
- require_not_found
|
|
14
|
+
- typecheck
|
|
15
|
+
- update_errors
|
|
16
|
+
formatter:
|
|
17
|
+
rubocop:
|
|
18
|
+
cops: safe
|
|
19
|
+
except: []
|
|
20
|
+
only: []
|
|
21
|
+
extra_args: []
|
|
22
|
+
require_paths: []
|
|
23
|
+
plugins: []
|
|
24
|
+
max_files: 5000
|
data/.standard.yml
ADDED
data/Gemfile
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
source "https://rubygems.org"
|
|
4
|
+
|
|
5
|
+
gemspec
|
|
6
|
+
|
|
7
|
+
group :development do
|
|
8
|
+
gem "pry-byebug"
|
|
9
|
+
gem "rake", "~> 13.0"
|
|
10
|
+
gem "rdoc"
|
|
11
|
+
gem "rspec"
|
|
12
|
+
gem "rubocop", require: false
|
|
13
|
+
gem "rubocop-rake", require: false
|
|
14
|
+
gem "rubocop-rspec", require: false
|
|
15
|
+
gem "solargraph"
|
|
16
|
+
gem "standard", "~> 1.3", require: false
|
|
17
|
+
gem "yard"
|
|
18
|
+
end
|
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
peppermint (0.1.6)
|
|
5
|
+
pry-byebug
|
|
6
|
+
rake (~> 13.0)
|
|
7
|
+
rdoc
|
|
8
|
+
rspec
|
|
9
|
+
rubocop
|
|
10
|
+
rubocop-rake
|
|
11
|
+
rubocop-rspec
|
|
12
|
+
solargraph
|
|
13
|
+
standard (~> 1.3)
|
|
14
|
+
toml-rb
|
|
15
|
+
yard
|
|
16
|
+
|
|
17
|
+
GEM
|
|
18
|
+
remote: https://rubygems.org/
|
|
19
|
+
specs:
|
|
20
|
+
ast (2.4.2)
|
|
21
|
+
backport (1.2.0)
|
|
22
|
+
benchmark (0.3.0)
|
|
23
|
+
byebug (11.1.3)
|
|
24
|
+
citrus (3.0.2)
|
|
25
|
+
coderay (1.1.3)
|
|
26
|
+
diff-lcs (1.5.0)
|
|
27
|
+
e2mmap (0.1.0)
|
|
28
|
+
jaro_winkler (1.5.6)
|
|
29
|
+
json (2.7.1)
|
|
30
|
+
kramdown (2.4.0)
|
|
31
|
+
rexml
|
|
32
|
+
kramdown-parser-gfm (1.1.0)
|
|
33
|
+
kramdown (~> 2.0)
|
|
34
|
+
language_server-protocol (3.17.0.3)
|
|
35
|
+
lint_roller (1.1.0)
|
|
36
|
+
method_source (1.0.0)
|
|
37
|
+
nokogiri (1.15.5-x86_64-linux)
|
|
38
|
+
racc (~> 1.4)
|
|
39
|
+
parallel (1.24.0)
|
|
40
|
+
parser (3.2.2.4)
|
|
41
|
+
ast (~> 2.4.1)
|
|
42
|
+
racc
|
|
43
|
+
pry (0.14.2)
|
|
44
|
+
coderay (~> 1.1)
|
|
45
|
+
method_source (~> 1.0)
|
|
46
|
+
pry-byebug (3.10.1)
|
|
47
|
+
byebug (~> 11.0)
|
|
48
|
+
pry (>= 0.13, < 0.15)
|
|
49
|
+
psych (5.1.1.1)
|
|
50
|
+
stringio
|
|
51
|
+
racc (1.7.3)
|
|
52
|
+
rainbow (3.1.1)
|
|
53
|
+
rake (13.1.0)
|
|
54
|
+
rbs (2.8.4)
|
|
55
|
+
rdoc (6.6.2)
|
|
56
|
+
psych (>= 4.0.0)
|
|
57
|
+
regexp_parser (2.8.3)
|
|
58
|
+
reverse_markdown (2.1.1)
|
|
59
|
+
nokogiri
|
|
60
|
+
rexml (3.2.6)
|
|
61
|
+
rspec (3.12.0)
|
|
62
|
+
rspec-core (~> 3.12.0)
|
|
63
|
+
rspec-expectations (~> 3.12.0)
|
|
64
|
+
rspec-mocks (~> 3.12.0)
|
|
65
|
+
rspec-core (3.12.2)
|
|
66
|
+
rspec-support (~> 3.12.0)
|
|
67
|
+
rspec-expectations (3.12.3)
|
|
68
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
69
|
+
rspec-support (~> 3.12.0)
|
|
70
|
+
rspec-mocks (3.12.6)
|
|
71
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
72
|
+
rspec-support (~> 3.12.0)
|
|
73
|
+
rspec-support (3.12.1)
|
|
74
|
+
rubocop (1.57.2)
|
|
75
|
+
json (~> 2.3)
|
|
76
|
+
language_server-protocol (>= 3.17.0)
|
|
77
|
+
parallel (~> 1.10)
|
|
78
|
+
parser (>= 3.2.2.4)
|
|
79
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
80
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
81
|
+
rexml (>= 3.2.5, < 4.0)
|
|
82
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
|
83
|
+
ruby-progressbar (~> 1.7)
|
|
84
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
|
85
|
+
rubocop-ast (1.30.0)
|
|
86
|
+
parser (>= 3.2.1.0)
|
|
87
|
+
rubocop-capybara (2.19.0)
|
|
88
|
+
rubocop (~> 1.41)
|
|
89
|
+
rubocop-factory_bot (2.24.0)
|
|
90
|
+
rubocop (~> 1.33)
|
|
91
|
+
rubocop-performance (1.19.1)
|
|
92
|
+
rubocop (>= 1.7.0, < 2.0)
|
|
93
|
+
rubocop-ast (>= 0.4.0)
|
|
94
|
+
rubocop-rake (0.6.0)
|
|
95
|
+
rubocop (~> 1.0)
|
|
96
|
+
rubocop-rspec (2.25.0)
|
|
97
|
+
rubocop (~> 1.40)
|
|
98
|
+
rubocop-capybara (~> 2.17)
|
|
99
|
+
rubocop-factory_bot (~> 2.22)
|
|
100
|
+
ruby-progressbar (1.13.0)
|
|
101
|
+
solargraph (0.50.0)
|
|
102
|
+
backport (~> 1.2)
|
|
103
|
+
benchmark
|
|
104
|
+
bundler (~> 2.0)
|
|
105
|
+
diff-lcs (~> 1.4)
|
|
106
|
+
e2mmap
|
|
107
|
+
jaro_winkler (~> 1.5)
|
|
108
|
+
kramdown (~> 2.3)
|
|
109
|
+
kramdown-parser-gfm (~> 1.1)
|
|
110
|
+
parser (~> 3.0)
|
|
111
|
+
rbs (~> 2.0)
|
|
112
|
+
reverse_markdown (~> 2.0)
|
|
113
|
+
rubocop (~> 1.38)
|
|
114
|
+
thor (~> 1.0)
|
|
115
|
+
tilt (~> 2.0)
|
|
116
|
+
yard (~> 0.9, >= 0.9.24)
|
|
117
|
+
standard (1.32.1)
|
|
118
|
+
language_server-protocol (~> 3.17.0.2)
|
|
119
|
+
lint_roller (~> 1.0)
|
|
120
|
+
rubocop (~> 1.57.2)
|
|
121
|
+
standard-custom (~> 1.0.0)
|
|
122
|
+
standard-performance (~> 1.2)
|
|
123
|
+
standard-custom (1.0.2)
|
|
124
|
+
lint_roller (~> 1.0)
|
|
125
|
+
rubocop (~> 1.50)
|
|
126
|
+
standard-performance (1.2.1)
|
|
127
|
+
lint_roller (~> 1.1)
|
|
128
|
+
rubocop-performance (~> 1.19.1)
|
|
129
|
+
stringio (3.1.0)
|
|
130
|
+
thor (1.3.0)
|
|
131
|
+
tilt (2.3.0)
|
|
132
|
+
toml-rb (2.2.0)
|
|
133
|
+
citrus (~> 3.0, > 3.0)
|
|
134
|
+
unicode-display_width (2.5.0)
|
|
135
|
+
yard (0.9.34)
|
|
136
|
+
|
|
137
|
+
PLATFORMS
|
|
138
|
+
x86_64-linux
|
|
139
|
+
|
|
140
|
+
DEPENDENCIES
|
|
141
|
+
peppermint!
|
|
142
|
+
pry-byebug
|
|
143
|
+
rake (~> 13.0)
|
|
144
|
+
rdoc
|
|
145
|
+
rspec
|
|
146
|
+
rubocop
|
|
147
|
+
rubocop-rake
|
|
148
|
+
rubocop-rspec
|
|
149
|
+
solargraph
|
|
150
|
+
standard (~> 1.3)
|
|
151
|
+
yard
|
|
152
|
+
|
|
153
|
+
BUNDLED WITH
|
|
154
|
+
2.4.19
|
data/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023, Jane Davis
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
29
|
+
|
data/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# peppermint
|
|
2
|
+
|
|
3
|
+
_"A gem of a dev environment."_
|
|
4
|
+
|
|
5
|
+
# Installation
|
|
6
|
+
|
|
7
|
+
1. Put this in your `Gemfile`:
|
|
8
|
+
|
|
9
|
+
```ruby
|
|
10
|
+
group :development do
|
|
11
|
+
gem "peppermint", git: "https://github.com/janie314/peppermint"
|
|
12
|
+
end
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
2. Run:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
bundle
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
3. Put one of the following in your `Rakefile` as appropriate.
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
require "peppermint/rake/ruby"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
or
|
|
28
|
+
|
|
29
|
+
```ruby
|
|
30
|
+
require "peppermint/rake/rust"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
4. Pull down config files.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
bundle exec rake update_devel_config
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
# Update
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
bundle update peppermint
|
|
43
|
+
bundle exec rake update_devel_config
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
# Usage
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
bundle exec rake --tasks
|
|
50
|
+
```
|
data/Rakefile
ADDED
data/install.sh
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
set -e
|
|
2
|
+
printf 'source "https://rubygems.org/"\n\ngroup :development do\n gem "peppermint", git: "https://github.com/janie314/peppermint"\nend\n' >Gemfile
|
|
3
|
+
printf '# delete one of these, then save and quit...\nrequire "peppermint/rake/ruby"\nrequire "mutiny-devel/rake/rust"\n' >Rakefile
|
|
4
|
+
vi Rakefile
|
|
5
|
+
bundle
|
|
6
|
+
bundle exec rake update_devel_config
|
|
7
|
+
echo 'All done!'
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module Peppermint
|
|
2
|
+
class GwenGPT
|
|
3
|
+
def self.lint(subj, body)
|
|
4
|
+
if subj.match?(/[[:punct:]]$/)
|
|
5
|
+
[false, "cannot end with punctuation"]
|
|
6
|
+
elsif subj.match?(/^[a-z]/)
|
|
7
|
+
[false, "cannot start with lowercase letter"]
|
|
8
|
+
elsif subj.length > 120
|
|
9
|
+
[false, "subject too long"]
|
|
10
|
+
elsif subj.match?(/^[[:digit:]]*$/)
|
|
11
|
+
[false, "no fastgit"]
|
|
12
|
+
elsif body.count("\n") > 4
|
|
13
|
+
[false, "large body"]
|
|
14
|
+
else
|
|
15
|
+
[true, "fine"]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
desc "lint your git hist"
|
|
22
|
+
task :gwenGPT do
|
|
23
|
+
gitlog_raw = `git log --pretty=format:"%h~%s~%b~" --date=short main..`
|
|
24
|
+
gitlog_raw.split("~", -1)
|
|
25
|
+
.each_slice(3) { |row|
|
|
26
|
+
if row.length == 3
|
|
27
|
+
_, msg = Peppermint::GwenGPT.lint(row[1], row[2])
|
|
28
|
+
print "%-10s%-40s%-30s\n" % ([row[0], row[1], msg].map { |s| s.strip })
|
|
29
|
+
end
|
|
30
|
+
}
|
|
31
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
require "rake"
|
|
2
|
+
require "rubocop/rake_task"
|
|
3
|
+
|
|
4
|
+
module Peppermint
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
load File.join __dir__, "shared.rake"
|
|
8
|
+
|
|
9
|
+
desc "lint your git"
|
|
10
|
+
task git: :gwenGPT
|
|
11
|
+
|
|
12
|
+
desc "format this repo"
|
|
13
|
+
task fmt: [:deps, :"rubocop:autocorrect_all", :deno_fmt]
|
|
14
|
+
|
|
15
|
+
desc "install dependencies"
|
|
16
|
+
task deps: :deno_install
|
|
17
|
+
|
|
18
|
+
desc "install binary symlinks to ~/.local/bin"
|
|
19
|
+
task :install_local do
|
|
20
|
+
proj_name = File.basename Dir.pwd
|
|
21
|
+
symlink = File.join ENV["HOME"], ".local/bin/#{proj_name}"
|
|
22
|
+
dir = File.join ENV["HOME"], ".local/bin"
|
|
23
|
+
if File.exist? symlink
|
|
24
|
+
puts "symlink #{symlink} already seems to exist. doing nothing"
|
|
25
|
+
else
|
|
26
|
+
sh "mkdir", "-p", dir
|
|
27
|
+
sh "ln", "-s", (File.join Dir.pwd, "bin", "#{proj_name}.rb"), symlink
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
require "rake"
|
|
2
|
+
require "toml-rb"
|
|
3
|
+
require "rubocop/rake_task"
|
|
4
|
+
|
|
5
|
+
module Peppermint
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
load File.join __dir__, "shared.rake"
|
|
9
|
+
|
|
10
|
+
desc "development build"
|
|
11
|
+
task :build_dev do
|
|
12
|
+
cargo = TomlRB.load_file("./Cargo.toml")
|
|
13
|
+
ENV["PEPPERMINT_VERSION"] = cargo["package"]["version"] + "-" + `git rev-parse --short HEAD`.chop
|
|
14
|
+
sh "cargo build"
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
desc "release build"
|
|
18
|
+
task :build_release do
|
|
19
|
+
cargo = TomlRB.load_file("./Cargo.toml")
|
|
20
|
+
ENV["PEPPERMINT_VERSION"] = cargo["package"]["version"] + "-" + `git rev-parse --short HEAD`.chop
|
|
21
|
+
sh "cargo build -r"
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
desc "cargo fix"
|
|
25
|
+
task :fix do
|
|
26
|
+
sh "cargo fix"
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
desc "install dependencies"
|
|
30
|
+
task deps: :deno_install do
|
|
31
|
+
sh "command -v cargo || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
desc "format this repo"
|
|
35
|
+
task fmt: [:deps, :"rubocop:autocorrect_all", :deno_fmt] do
|
|
36
|
+
sh "cargo fmt"
|
|
37
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
require "rspec/core/rake_task"
|
|
2
|
+
require "yard"
|
|
3
|
+
require_relative "gwenGPT"
|
|
4
|
+
|
|
5
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
6
|
+
|
|
7
|
+
RuboCop::RakeTask.new do |t|
|
|
8
|
+
t.requires << "rubocop-rake"
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
YARD::Rake::YardocTask.new do |t|
|
|
12
|
+
t.files = ["lib/**/*.rb"]
|
|
13
|
+
t.options = ["--any", "--extra", "--opts"]
|
|
14
|
+
t.stats_options = ["--list-undoc"]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# desc "install deno idempotently"
|
|
18
|
+
task :deno_install do
|
|
19
|
+
sh "command -v deno || curl -fsSL https://deno.land/x/install/install.sh | sh"
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# desc "run deno fmt"
|
|
23
|
+
task :deno_fmt do
|
|
24
|
+
sh <<~SHELL
|
|
25
|
+
find . \\( -not -path '*target*' \\) \
|
|
26
|
+
-and \\( -not -path '*node_modules*' \\) \
|
|
27
|
+
-and \\( -not -path '*/doc' \\) \
|
|
28
|
+
-and \\( -name '*.json' -o -name '*.md' -o -name '*.js' \
|
|
29
|
+
-o -name '*.ts' -o -name '*.jsx' -o -name '*.tsx' \\) \
|
|
30
|
+
-and \\( -not -name 'project.json' \\) \
|
|
31
|
+
-and \\( -not -name 'personal.json' \\) \
|
|
32
|
+
-and -type f | xargs -r deno fmt
|
|
33
|
+
SHELL
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
desc "update those devel config files...."
|
|
37
|
+
task :update_devel_config do
|
|
38
|
+
[".solargraph.yml", ".rubocop.yml", ".standard.yml", ".rspec", ".ruby-version"].each do |filename|
|
|
39
|
+
FileUtils.cp (File.expand_path File.join __dir__, "..", "..", "..", filename), Dir.pwd
|
|
40
|
+
end
|
|
41
|
+
end
|
data/lib/peppermint.rb
ADDED
data/peppermint.gemspec
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
### BEGIN: DO NOT EDIT ###
|
|
4
|
+
proj = File.basename(__FILE__).split(".")[0]
|
|
5
|
+
require_relative "lib/#{proj}/version"
|
|
6
|
+
lib = File.expand_path(File.join(__dir__, "./lib"))
|
|
7
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
8
|
+
### END: DO NOT EDIT ###
|
|
9
|
+
|
|
10
|
+
Gem::Specification.new do |spec|
|
|
11
|
+
# gem metadata
|
|
12
|
+
spec.name = proj
|
|
13
|
+
spec.version = Peppermint::VERSION
|
|
14
|
+
spec.authors = ["'j'"]
|
|
15
|
+
spec.email = ["'pub@janie.page'"]
|
|
16
|
+
spec.summary = "A Gem of a dev environment"
|
|
17
|
+
spec.description = ""
|
|
18
|
+
spec.homepage = "https://github.com/janie314/peppermint"
|
|
19
|
+
spec.required_ruby_version = ">= 3.0.0"
|
|
20
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
21
|
+
|
|
22
|
+
# gem dependencies
|
|
23
|
+
spec.add_dependency "pry-byebug"
|
|
24
|
+
spec.add_dependency "rake", "~> 13.0"
|
|
25
|
+
spec.add_dependency "rdoc"
|
|
26
|
+
spec.add_dependency "rspec"
|
|
27
|
+
spec.add_dependency "rubocop"
|
|
28
|
+
spec.add_dependency "rubocop-rake"
|
|
29
|
+
spec.add_dependency "rubocop-rspec"
|
|
30
|
+
spec.add_dependency "solargraph"
|
|
31
|
+
spec.add_dependency "standard", "~> 1.3"
|
|
32
|
+
spec.add_dependency "toml-rb"
|
|
33
|
+
spec.add_dependency "yard"
|
|
34
|
+
|
|
35
|
+
### BEGIN: DO NOT EDIT ###
|
|
36
|
+
spec.files = Dir.chdir(__dir__) do
|
|
37
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
|
38
|
+
(File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git
|
|
39
|
+
.circleci appveyor])
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
spec.bindir = "exe"
|
|
43
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
44
|
+
spec.require_paths = ["lib"]
|
|
45
|
+
### END: DO NOT EDIT ###
|
|
46
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: peppermint
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.6
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- "'j'"
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2023-12-16 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: pry-byebug
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rake
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '13.0'
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '13.0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rdoc
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :runtime
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rspec
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :runtime
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: rubocop
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
type: :runtime
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: rubocop-rake
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :runtime
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - ">="
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: rubocop-rspec
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - ">="
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '0'
|
|
104
|
+
type: :runtime
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - ">="
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '0'
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: solargraph
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - ">="
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: '0'
|
|
118
|
+
type: :runtime
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - ">="
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: '0'
|
|
125
|
+
- !ruby/object:Gem::Dependency
|
|
126
|
+
name: standard
|
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
|
128
|
+
requirements:
|
|
129
|
+
- - "~>"
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: '1.3'
|
|
132
|
+
type: :runtime
|
|
133
|
+
prerelease: false
|
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
- - "~>"
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: '1.3'
|
|
139
|
+
- !ruby/object:Gem::Dependency
|
|
140
|
+
name: toml-rb
|
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - ">="
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: '0'
|
|
146
|
+
type: :runtime
|
|
147
|
+
prerelease: false
|
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
+
requirements:
|
|
150
|
+
- - ">="
|
|
151
|
+
- !ruby/object:Gem::Version
|
|
152
|
+
version: '0'
|
|
153
|
+
- !ruby/object:Gem::Dependency
|
|
154
|
+
name: yard
|
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
|
156
|
+
requirements:
|
|
157
|
+
- - ">="
|
|
158
|
+
- !ruby/object:Gem::Version
|
|
159
|
+
version: '0'
|
|
160
|
+
type: :runtime
|
|
161
|
+
prerelease: false
|
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
+
requirements:
|
|
164
|
+
- - ">="
|
|
165
|
+
- !ruby/object:Gem::Version
|
|
166
|
+
version: '0'
|
|
167
|
+
description: ''
|
|
168
|
+
email:
|
|
169
|
+
- "'pub@janie.page'"
|
|
170
|
+
executables: []
|
|
171
|
+
extensions: []
|
|
172
|
+
extra_rdoc_files: []
|
|
173
|
+
files:
|
|
174
|
+
- ".rspec"
|
|
175
|
+
- ".rubocop.yml"
|
|
176
|
+
- ".ruby-version"
|
|
177
|
+
- ".solargraph.yml"
|
|
178
|
+
- ".standard.yml"
|
|
179
|
+
- Gemfile
|
|
180
|
+
- Gemfile.lock
|
|
181
|
+
- LICENSE
|
|
182
|
+
- README.md
|
|
183
|
+
- Rakefile
|
|
184
|
+
- install.sh
|
|
185
|
+
- lib/peppermint.rb
|
|
186
|
+
- lib/peppermint/rake/gwenGPT.rb
|
|
187
|
+
- lib/peppermint/rake/ruby.rb
|
|
188
|
+
- lib/peppermint/rake/rust.rb
|
|
189
|
+
- lib/peppermint/rake/shared.rake
|
|
190
|
+
- lib/peppermint/version.rb
|
|
191
|
+
- peppermint.gemspec
|
|
192
|
+
homepage: https://github.com/janie314/peppermint
|
|
193
|
+
licenses: []
|
|
194
|
+
metadata:
|
|
195
|
+
homepage_uri: https://github.com/janie314/peppermint
|
|
196
|
+
post_install_message:
|
|
197
|
+
rdoc_options: []
|
|
198
|
+
require_paths:
|
|
199
|
+
- lib
|
|
200
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
201
|
+
requirements:
|
|
202
|
+
- - ">="
|
|
203
|
+
- !ruby/object:Gem::Version
|
|
204
|
+
version: 3.0.0
|
|
205
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
|
+
requirements:
|
|
207
|
+
- - ">="
|
|
208
|
+
- !ruby/object:Gem::Version
|
|
209
|
+
version: '0'
|
|
210
|
+
requirements: []
|
|
211
|
+
rubygems_version: 3.5.1
|
|
212
|
+
signing_key:
|
|
213
|
+
specification_version: 4
|
|
214
|
+
summary: A Gem of a dev environment
|
|
215
|
+
test_files: []
|