neocities-red 1.0.5 → 1.1.0
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 +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +32 -32
- data/.github/PULL_REQUEST_TEMPLATE.md +18 -18
- data/.github/dependabot.yml +6 -6
- data/.github/workflows/ci.yml +139 -51
- data/.gitignore +38 -6
- data/.rspec +3 -3
- data/.rubocop.yml +43 -43
- data/CODE_OF_CONDUCT.md +128 -128
- data/CONTRIBUTING.md +83 -83
- data/Gemfile +12 -11
- data/Gemfile.lock +193 -161
- data/LICENSE +21 -21
- data/README.md +153 -119
- data/SECURITY.md +7 -7
- data/bin/neocities-red +9 -9
- data/ext/mkrf_conf.rb +21 -20
- data/lib/neocities_red/cli.rb +335 -624
- data/lib/neocities_red/cli_display.rb +271 -0
- data/lib/neocities_red/client.rb +200 -169
- data/lib/neocities_red/services/common/pizza.rb +107 -0
- data/lib/neocities_red/services/file/folder_uploader.rb +65 -0
- data/lib/neocities_red/services/file/list.rb +65 -0
- data/lib/neocities_red/services/file/remover.rb +35 -0
- data/lib/neocities_red/services/file/uploader.rb +45 -0
- data/lib/neocities_red/services/site/differencer.rb +76 -0
- data/lib/neocities_red/services/site/exporter.rb +43 -0
- data/lib/neocities_red/services/site/informer.rb +43 -0
- data/lib/neocities_red/services/site/pusher.rb +146 -0
- data/lib/neocities_red/version.rb +5 -5
- data/lib/neocities_red.rb +17 -15
- data/neocities-red.gemspec +54 -34
- data/spec/neocities_red/cli_display_spec.rb +139 -0
- data/spec/neocities_red/cli_spec.rb +68 -0
- data/spec/neocities_red/client_spec.rb +306 -0
- data/spec/neocities_red/services/common/pizza_spec.rb +26 -0
- data/spec/neocities_red/services/file/folder_uploader_spec.rb +64 -0
- data/spec/neocities_red/services/file/list_spec.rb +177 -0
- data/spec/neocities_red/services/file/remover_spec.rb +125 -0
- data/spec/neocities_red/services/file/uploader_spec.rb +158 -0
- data/spec/neocities_red/services/site/differencer_spec.rb +162 -0
- data/spec/neocities_red/services/site/exporter_spec.rb +116 -0
- data/spec/neocities_red/services/site/informer_spec.rb +180 -0
- data/spec/neocities_red/services/site/pusher_spec.rb +167 -0
- data/spec/spec_helper.rb +20 -0
- metadata +73 -10
- data/lib/neocities_red/services/file_list.rb +0 -61
- data/lib/neocities_red/services/file_remover.rb +0 -33
- data/lib/neocities_red/services/file_uploader.rb +0 -43
- data/lib/neocities_red/services/folder_uploader.rb +0 -65
- data/lib/neocities_red/services/pizza.rb +0 -105
- data/lib/neocities_red/services/profile_info.rb +0 -41
- data/lib/neocities_red/services/site_difference.rb +0 -76
- data/lib/neocities_red/services/site_exporter.rb +0 -42
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f450f9c7416a7b6c3140c0e366c2ae8168d5f4cf0412ae7a14c8ba3a030590ab
|
|
4
|
+
data.tar.gz: 5406c3c15e06f5928bec50135dd5a1e70d347965c2b953aa584624325c2ae5b5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef6d6e9c1daa75d2033a41d244ea7fbaa9c105d4d8fff9134c93cc4bd20ba8e885685f55b8ec41f9d3c11cdd23d190ca4c835136ca929c0af64e3ce3ca309d27
|
|
7
|
+
data.tar.gz: 3c76844a9191b5365d7a2766ffd1e2c3a920e778f6c6363656cb81ae79c75e93850b78ccbb40a00f91df56a4ed7ffe9766f7a2fef81f8bc6db55e7e1247c0944
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
title: ''
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: o-200
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Describe the bug**
|
|
11
|
-
A clear and concise description of what the bug is.
|
|
12
|
-
|
|
13
|
-
**To Reproduce**
|
|
14
|
-
Steps to reproduce the behavior:
|
|
15
|
-
1. Go to '...'
|
|
16
|
-
2. Click on '....'
|
|
17
|
-
3. Scroll down to '....'
|
|
18
|
-
4. See error
|
|
19
|
-
|
|
20
|
-
**Expected behavior**
|
|
21
|
-
A clear and concise description of what you expected to happen.
|
|
22
|
-
|
|
23
|
-
**Logs**
|
|
24
|
-
If applicable, add logs from terminal with errors or mistakes to help explain your problem.
|
|
25
|
-
|
|
26
|
-
** Additional info(please complete the following information):**
|
|
27
|
-
- OS: [e.g. Linux (Arch), Windows, MacOS]
|
|
28
|
-
- Version of gem (`gem info neocities-red`)
|
|
29
|
-
- Version of ruby (`ruby -v`)
|
|
30
|
-
|
|
31
|
-
**Additional context**
|
|
32
|
-
Add any other context about the problem here.
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: o-200
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Click on '....'
|
|
17
|
+
3. Scroll down to '....'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Logs**
|
|
24
|
+
If applicable, add logs from terminal with errors or mistakes to help explain your problem.
|
|
25
|
+
|
|
26
|
+
** Additional info(please complete the following information):**
|
|
27
|
+
- OS: [e.g. Linux (Arch), Windows, MacOS]
|
|
28
|
+
- Version of gem (`gem info neocities-red`)
|
|
29
|
+
- Version of ruby (`ruby -v`)
|
|
30
|
+
|
|
31
|
+
**Additional context**
|
|
32
|
+
Add any other context about the problem here.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
## Description
|
|
2
|
-
Please include a summary of the changes and the related issue.
|
|
3
|
-
|
|
4
|
-
## Type of change
|
|
5
|
-
- [ ] Bug fix
|
|
6
|
-
- [ ] New feature
|
|
7
|
-
- [ ] Breaking change
|
|
8
|
-
- [ ] Documentation update
|
|
9
|
-
|
|
10
|
-
## How has this been tested?
|
|
11
|
-
Describe the tests you ran and how to reproduce.
|
|
12
|
-
|
|
13
|
-
## Checklist
|
|
14
|
-
- [ ] My code follows the style guidelines
|
|
15
|
-
- [ ] I have performed a self-review
|
|
16
|
-
- [ ] I have added tests
|
|
17
|
-
- [ ] I have updated documentation, README.md
|
|
18
|
-
|
|
1
|
+
## Description
|
|
2
|
+
Please include a summary of the changes and the related issue.
|
|
3
|
+
|
|
4
|
+
## Type of change
|
|
5
|
+
- [ ] Bug fix
|
|
6
|
+
- [ ] New feature
|
|
7
|
+
- [ ] Breaking change
|
|
8
|
+
- [ ] Documentation update
|
|
9
|
+
|
|
10
|
+
## How has this been tested?
|
|
11
|
+
Describe the tests you ran and how to reproduce.
|
|
12
|
+
|
|
13
|
+
## Checklist
|
|
14
|
+
- [ ] My code follows the style guidelines
|
|
15
|
+
- [ ] I have performed a self-review
|
|
16
|
+
- [ ] I have added tests
|
|
17
|
+
- [ ] I have updated documentation, README.md
|
|
18
|
+
|
data/.github/dependabot.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
- package-ecosystem: "bundler"
|
|
4
|
-
directory: "/" # Location of package manifests
|
|
5
|
-
schedule:
|
|
6
|
-
interval: "weekly"
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "bundler"
|
|
4
|
+
directory: "/" # Location of package manifests
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -1,51 +1,139 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- name:
|
|
16
|
-
uses:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
bundle exec
|
|
29
|
-
|
|
30
|
-
- name: Run linter
|
|
31
|
-
run: bundle exec rubocop
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- master
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
name: Lint (ubuntu-latest)
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout repository
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up Ruby 4.0.0
|
|
19
|
+
uses: ruby/setup-ruby@v1
|
|
20
|
+
with:
|
|
21
|
+
ruby-version: 4.0.0
|
|
22
|
+
bundler-cache: true
|
|
23
|
+
|
|
24
|
+
- name: Debug versions
|
|
25
|
+
run: |
|
|
26
|
+
ruby -v
|
|
27
|
+
bundle exec rubocop -V
|
|
28
|
+
bundle exec rspec -v
|
|
29
|
+
|
|
30
|
+
- name: Run linter
|
|
31
|
+
run: bundle exec rubocop
|
|
32
|
+
|
|
33
|
+
test_linux:
|
|
34
|
+
name: Test (ubuntu-latest)
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
|
|
37
|
+
steps:
|
|
38
|
+
- name: Checkout repository
|
|
39
|
+
uses: actions/checkout@v4
|
|
40
|
+
|
|
41
|
+
- name: Set up Ruby 4.0.0
|
|
42
|
+
uses: ruby/setup-ruby@v1
|
|
43
|
+
with:
|
|
44
|
+
ruby-version: 4.0.0
|
|
45
|
+
bundler-cache: true
|
|
46
|
+
|
|
47
|
+
- name: Run tests
|
|
48
|
+
run: bundle exec rspec
|
|
49
|
+
|
|
50
|
+
test_non_linux:
|
|
51
|
+
name: Test (${{ matrix.os }})
|
|
52
|
+
runs-on: ${{ matrix.os }}
|
|
53
|
+
strategy:
|
|
54
|
+
fail-fast: false
|
|
55
|
+
matrix:
|
|
56
|
+
os: [macos-latest, windows-latest]
|
|
57
|
+
|
|
58
|
+
steps:
|
|
59
|
+
- name: Checkout repository
|
|
60
|
+
uses: actions/checkout@v4
|
|
61
|
+
|
|
62
|
+
- name: Set up Ruby 4.0.0
|
|
63
|
+
uses: ruby/setup-ruby@v1
|
|
64
|
+
with:
|
|
65
|
+
ruby-version: 4.0.0
|
|
66
|
+
bundler-cache: true
|
|
67
|
+
|
|
68
|
+
- name: Run tests
|
|
69
|
+
run: bundle exec rspec
|
|
70
|
+
|
|
71
|
+
smoke_unix:
|
|
72
|
+
name: Start CLI (${{ matrix.os }})
|
|
73
|
+
runs-on: ${{ matrix.os }}
|
|
74
|
+
strategy:
|
|
75
|
+
fail-fast: false
|
|
76
|
+
matrix:
|
|
77
|
+
os: [ubuntu-latest, macos-latest]
|
|
78
|
+
|
|
79
|
+
steps:
|
|
80
|
+
- name: Checkout repository
|
|
81
|
+
uses: actions/checkout@v4
|
|
82
|
+
|
|
83
|
+
- name: Set up Ruby 4.0.0
|
|
84
|
+
uses: ruby/setup-ruby@v1
|
|
85
|
+
with:
|
|
86
|
+
ruby-version: 4.0.0
|
|
87
|
+
bundler-cache: true
|
|
88
|
+
|
|
89
|
+
- name: Start CLI
|
|
90
|
+
run: |
|
|
91
|
+
chmod +x bin/neocities-red
|
|
92
|
+
bundle exec bin/neocities-red
|
|
93
|
+
|
|
94
|
+
smoke_windows:
|
|
95
|
+
name: Start CLI (windows-latest)
|
|
96
|
+
runs-on: windows-latest
|
|
97
|
+
|
|
98
|
+
steps:
|
|
99
|
+
- name: Checkout repository
|
|
100
|
+
uses: actions/checkout@v4
|
|
101
|
+
|
|
102
|
+
- name: Set up Ruby 4.0.0
|
|
103
|
+
uses: ruby/setup-ruby@v1
|
|
104
|
+
with:
|
|
105
|
+
ruby-version: 4.0.0
|
|
106
|
+
bundler-cache: true
|
|
107
|
+
|
|
108
|
+
- name: Start CLI
|
|
109
|
+
shell: pwsh
|
|
110
|
+
run: bundle exec ruby bin/neocities-red
|
|
111
|
+
|
|
112
|
+
freebsd:
|
|
113
|
+
name: Test + Start (freebsd-14.2)
|
|
114
|
+
runs-on: ubuntu-latest
|
|
115
|
+
|
|
116
|
+
steps:
|
|
117
|
+
- name: Checkout repository
|
|
118
|
+
uses: actions/checkout@v4
|
|
119
|
+
|
|
120
|
+
- name: Run lint, tests, and start CLI in FreeBSD VM
|
|
121
|
+
uses: vmactions/freebsd-vm@v1
|
|
122
|
+
with:
|
|
123
|
+
release: "14.2"
|
|
124
|
+
usesh: true
|
|
125
|
+
prepare: |
|
|
126
|
+
pkg install -y ca_root_nss git rubygem-bundler
|
|
127
|
+
pkg install -y ruby34
|
|
128
|
+
run: |
|
|
129
|
+
RUBY_BIN="$(command -v ruby34 || command -v ruby)"
|
|
130
|
+
"$RUBY_BIN" -v
|
|
131
|
+
"$RUBY_BIN" -e 'required = Gem::Version.new("3.4.0"); current = Gem::Version.new(RUBY_VERSION); abort("Need Ruby >= #{required}, got #{current}") if current < required'
|
|
132
|
+
"$RUBY_BIN" -S gem install bundler -v 4.0.6
|
|
133
|
+
"$RUBY_BIN" -S bundle _4.0.6_ -v
|
|
134
|
+
"$RUBY_BIN" -S bundle _4.0.6_ config set frozen true
|
|
135
|
+
"$RUBY_BIN" -S bundle _4.0.6_ install
|
|
136
|
+
"$RUBY_BIN" -S bundle _4.0.6_ exec rubocop
|
|
137
|
+
"$RUBY_BIN" -S bundle _4.0.6_ exec rspec
|
|
138
|
+
chmod +x bin/neocities-red
|
|
139
|
+
"$RUBY_BIN" -S bundle _4.0.6_ exec bin/neocities-red
|
data/.gitignore
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
|
-
test.rb
|
|
2
|
-
*.gem
|
|
3
|
-
|
|
4
|
-
mise.toml
|
|
5
|
-
|
|
6
|
-
.rspec_status
|
|
1
|
+
test.rb
|
|
2
|
+
*.gem
|
|
3
|
+
|
|
4
|
+
mise.toml
|
|
5
|
+
|
|
6
|
+
.rspec_status
|
|
7
|
+
.rubocop_cache
|
|
8
|
+
|
|
9
|
+
# Bundle directory
|
|
10
|
+
.bundle/
|
|
11
|
+
vendor/bundle/
|
|
12
|
+
|
|
13
|
+
# Environment variables
|
|
14
|
+
.env
|
|
15
|
+
.env.local
|
|
16
|
+
.env.*.local
|
|
17
|
+
|
|
18
|
+
# IDE and editor files
|
|
19
|
+
.idea/
|
|
20
|
+
.vscode/
|
|
21
|
+
*.swp
|
|
22
|
+
*.swo
|
|
23
|
+
*~
|
|
24
|
+
.project
|
|
25
|
+
.classpath
|
|
26
|
+
.settings/
|
|
27
|
+
|
|
28
|
+
# OS files
|
|
29
|
+
.DS_Store
|
|
30
|
+
Thumbs.db
|
|
31
|
+
|
|
32
|
+
# Coverage
|
|
33
|
+
coverage/
|
|
34
|
+
*.lcov
|
|
35
|
+
|
|
36
|
+
# Temporary files
|
|
37
|
+
tmp/
|
|
38
|
+
*.log
|
data/.rspec
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# .rspec
|
|
2
|
-
--require spec_helper
|
|
3
|
-
--format documentation
|
|
1
|
+
# .rspec
|
|
2
|
+
--require spec_helper
|
|
3
|
+
--format documentation
|
|
4
4
|
--color
|
data/.rubocop.yml
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
plugins:
|
|
2
|
-
- rubocop-rspec
|
|
3
|
-
|
|
4
|
-
AllCops:
|
|
5
|
-
NewCops: enable
|
|
6
|
-
SuggestExtensions: false
|
|
7
|
-
Exclude:
|
|
8
|
-
- "bin/**/*"
|
|
9
|
-
- "vendor/**/*"
|
|
10
|
-
- "tmp/**/*"
|
|
11
|
-
- "spec/fixtures/**/*"
|
|
12
|
-
|
|
13
|
-
Layout/LineLength:
|
|
14
|
-
Max: 150
|
|
15
|
-
|
|
16
|
-
Metrics:
|
|
17
|
-
Enabled: false
|
|
18
|
-
|
|
19
|
-
Style/Documentation:
|
|
20
|
-
Enabled: false
|
|
21
|
-
|
|
22
|
-
Style/StringLiterals:
|
|
23
|
-
EnforcedStyle: double_quotes
|
|
24
|
-
|
|
25
|
-
Style/GuardClause:
|
|
26
|
-
Enabled: true
|
|
27
|
-
|
|
28
|
-
RSpec:
|
|
29
|
-
Enabled: true
|
|
30
|
-
|
|
31
|
-
RSpec/ExampleLength:
|
|
32
|
-
Max: 15
|
|
33
|
-
|
|
34
|
-
RSpec/MultipleExpectations:
|
|
35
|
-
Max: 5
|
|
36
|
-
|
|
37
|
-
RSpec/NestedGroups:
|
|
38
|
-
Max: 4
|
|
39
|
-
|
|
40
|
-
Gemspec/DevelopmentDependencies:
|
|
41
|
-
Enabled: false
|
|
42
|
-
|
|
43
|
-
RSpec/MultipleMemoizedHelpers:
|
|
1
|
+
plugins:
|
|
2
|
+
- rubocop-rspec
|
|
3
|
+
|
|
4
|
+
AllCops:
|
|
5
|
+
NewCops: enable
|
|
6
|
+
SuggestExtensions: false
|
|
7
|
+
Exclude:
|
|
8
|
+
- "bin/**/*"
|
|
9
|
+
- "vendor/**/*"
|
|
10
|
+
- "tmp/**/*"
|
|
11
|
+
- "spec/fixtures/**/*"
|
|
12
|
+
|
|
13
|
+
Layout/LineLength:
|
|
14
|
+
Max: 150
|
|
15
|
+
|
|
16
|
+
Metrics:
|
|
17
|
+
Enabled: false
|
|
18
|
+
|
|
19
|
+
Style/Documentation:
|
|
20
|
+
Enabled: false
|
|
21
|
+
|
|
22
|
+
Style/StringLiterals:
|
|
23
|
+
EnforcedStyle: double_quotes
|
|
24
|
+
|
|
25
|
+
Style/GuardClause:
|
|
26
|
+
Enabled: true
|
|
27
|
+
|
|
28
|
+
RSpec:
|
|
29
|
+
Enabled: true
|
|
30
|
+
|
|
31
|
+
RSpec/ExampleLength:
|
|
32
|
+
Max: 15
|
|
33
|
+
|
|
34
|
+
RSpec/MultipleExpectations:
|
|
35
|
+
Max: 5
|
|
36
|
+
|
|
37
|
+
RSpec/NestedGroups:
|
|
38
|
+
Max: 4
|
|
39
|
+
|
|
40
|
+
Gemspec/DevelopmentDependencies:
|
|
41
|
+
Enabled: false
|
|
42
|
+
|
|
43
|
+
RSpec/MultipleMemoizedHelpers:
|
|
44
44
|
Enabled: false
|