lightning_sites 0.2.2 → 1.0.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/lib/lightning_sites.rb +9 -9
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f1b4be8bc8d4deadc0069b9b1fac0b6c54c347a6
|
|
4
|
+
data.tar.gz: 67896cda96e57dc18d8de2d609751403bce7ed76
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b83c914ce5a847e092a6fa0fa4300a8aed4b4e5ce18a36a1313b7c20a462e71a56e4de07b6dedbe6d625d6bf0e36bcc846c003e9235a29f06b538b52f6af3f7
|
|
7
|
+
data.tar.gz: 0887e88355cc2141b52c29a149b987f223ec4d83550f1f211324fb2c3665ea2ff155f76b67e43e6d8da1dfadd1e8b48255e9ea8ea540b5b26098d232d92916b8
|
data/lib/lightning_sites.rb
CHANGED
|
@@ -6,7 +6,7 @@ Rake::TaskManager.record_task_metadata = true
|
|
|
6
6
|
################################################################################
|
|
7
7
|
## Your Rakefile can override these variables
|
|
8
8
|
################################################################################
|
|
9
|
-
@source_dir = '
|
|
9
|
+
@source_dir = '.' # Editable source code, preferrably in git repo
|
|
10
10
|
@build_dir = 'BUILD' # Built HTML code
|
|
11
11
|
@backup_dir = 'BACKUPS' # Local home for backups of remote server
|
|
12
12
|
@remote_dir = '/dev/null' # Your remote server, use rsync format
|
|
@@ -81,7 +81,6 @@ namespace :git do
|
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
-
## don't use this right now
|
|
85
84
|
namespace :jekyll do
|
|
86
85
|
desc "Build Jekyll site"
|
|
87
86
|
task :build do
|
|
@@ -151,32 +150,33 @@ namespace :rsync do
|
|
|
151
150
|
end
|
|
152
151
|
end
|
|
153
152
|
|
|
154
|
-
#
|
|
153
|
+
# A few nice things you might like
|
|
155
154
|
namespace :seo do
|
|
156
155
|
desc "Find 404s"
|
|
157
156
|
task :find_404 do
|
|
158
157
|
puts "Finding 404 errors".blue
|
|
159
158
|
sh 'zgrep', '-r', ' 404 ', "#{@backup_dir}/logs"
|
|
160
|
-
# sh "zgrep -r ' 404 ' '#{@production_backup_dir}/logs'"
|
|
161
159
|
puts "Found".green
|
|
162
160
|
end
|
|
163
161
|
|
|
164
162
|
desc "Find 301s"
|
|
165
163
|
task :find_301 do
|
|
166
164
|
puts "Finding 301 errors".blue
|
|
167
|
-
sh
|
|
165
|
+
sh 'zgrep', '-r', ' 301 ', "#{@backup_dir}/logs"
|
|
168
166
|
puts "Found".green
|
|
169
167
|
end
|
|
170
168
|
end
|
|
171
169
|
|
|
172
|
-
#
|
|
170
|
+
# Validation for built html folder
|
|
173
171
|
namespace :html do
|
|
174
172
|
desc "Checks everything with htmlproofer that is reasonable to check"
|
|
175
173
|
task :check do
|
|
176
174
|
puts "⚡️ Checking HTML".blue
|
|
177
|
-
sh "bundle exec htmlproofer --check-sri --check-external-hash --check-html --check-img-http --check-opengraph --enforce-https --timeframe 6w #{@build_dir}" do
|
|
178
|
-
|
|
179
|
-
|
|
175
|
+
sh "bundle exec htmlproofer --check-sri --check-external-hash --check-html --check-img-http --check-opengraph --enforce-https --timeframe 6w #{@build_dir}" do |ok, res|
|
|
176
|
+
if !ok
|
|
177
|
+
puts 'Errors found'
|
|
178
|
+
exit(1)
|
|
179
|
+
end
|
|
180
180
|
end
|
|
181
181
|
puts "☀️ Checked HTML".green
|
|
182
182
|
end
|