zerofetcher 0.0.78 → 0.0.79

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 91550ada63795aeb97767c1693b551f0b4d0b201
4
- data.tar.gz: 853da9609dcf81435acd010f580b959013636547
2
+ SHA256:
3
+ metadata.gz: 9f182186f7a5055fadfc306fa9b37a7de06ce816d9cb74c34f11184f7a597c32
4
+ data.tar.gz: 70bed69c4c3aef8a8101bf24ff3026be85e597f765efc49808aeceba578ab468
5
5
  SHA512:
6
- metadata.gz: 90500414a51d4a5b4a83be0a494eacb7242f00616bf1bfcf1b7268a16d93ee7429327edaf874c465f10e9838239306cd20a7fba4dc11d64a653008700c491d26
7
- data.tar.gz: 78f5fd196a78fe468638f6eec204bcd16429f2ca4230e79b7158e92be1f42ae8588a42c95dacd06062e9c410c67e4f72d761436410847f046cda3a160e7075f2
6
+ metadata.gz: fa6d8b1732bd2f90be7ee65f7ee069c47d18c8720ea882368f14edb76fd347a5766244664f2a274f645ad2c0673651f46e3f085d3c6759bc3fd8c8270456809c
7
+ data.tar.gz: ed04a11984f7305a6e0a335543ceaf7fed74548cab2c2f91bb0f6c7c89976f3a01f3697b5d87c645b923088262656c009904291333c13f325129d5b3feec2d3d
data/bin/zerofetcher CHANGED
File without changes
File without changes
File without changes
data/lib/zerofetcher.rb CHANGED
@@ -35,6 +35,7 @@ class ZeroFetcher
35
35
  FileUtils::mkdir_p jekyll_path+'/_logs'
36
36
  FileUtils::mkdir_p jekyll_path+'/_data'
37
37
  FileUtils::mkdir_p jekyll_path+'/_posts'
38
+ FileUtils::mkdir_p jekyll_path+'/_passwords'
38
39
  FileUtils::mkdir_p jekyll_path+'/assets'
39
40
  FileUtils::mkdir_p jekyll_path+'/assets/images'
40
41
  FileUtils::mkdir_p jekyll_path+'/assets/images/pages'
@@ -99,6 +100,8 @@ ErrorDocument 404 /404/index.html'
99
100
  # Image Variants
100
101
  @@image_variants = data['image_variants']
101
102
 
103
+ paths_with_passwords = Array.new
104
+
102
105
  # Pages
103
106
  if data.key?("pages")
104
107
  pages_files_saved = Array.new
@@ -129,6 +132,10 @@ ErrorDocument 404 /404/index.html'
129
132
 
130
133
  self.log(" - Saved:"+jpage.getFileName)
131
134
 
135
+ if page['password_id']
136
+ paths_with_passwords.push({'url' => page['url'], 'password_id' => page['password_id']})
137
+ end
138
+
132
139
  # Add to pages array
133
140
  page_info = {
134
141
  'id' => page['id'],
@@ -164,7 +171,18 @@ ErrorDocument 404 /404/index.html'
164
171
 
165
172
  # Clean up content files
166
173
  self.cleanUpPages( pages_folder, content_files_saved )
167
- end
174
+ end
175
+
176
+ if data.key?("passwords")
177
+ # Save individual password files
178
+ data['passwords'].each do |password|
179
+ self.log('writing File /_passwords/.htpasswd_'+password['id'])
180
+ self.writeFile( jekyll_path+'/_passwords/.htpasswd_'+password['id'] , password['username']+':'+password['password'] );
181
+ end
182
+
183
+ # write _data/passwords.json
184
+ self.writeFile( jekyll_path+'/_data/passwords.json', JSON.pretty_generate(paths_with_passwords) )
185
+ end
168
186
 
169
187
  # Variables
170
188
  if data.key?("variables")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zerofetcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.78
4
+ version: 0.0.79
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Liccardo
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-04 00:00:00.000000000 Z
11
+ date: 2022-01-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Fetches content from zero
14
14
  email: brian@d3corp.com
@@ -25,7 +25,7 @@ homepage: http://d3corp.com
25
25
  licenses:
26
26
  - MIT
27
27
  metadata: {}
28
- post_install_message:
28
+ post_install_message:
29
29
  rdoc_options: []
30
30
  require_paths:
31
31
  - lib
@@ -40,9 +40,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  requirements: []
43
- rubyforge_project:
44
- rubygems_version: 2.5.2.1
45
- signing_key:
43
+ rubygems_version: 3.1.6
44
+ signing_key:
46
45
  specification_version: 4
47
46
  summary: Zero Fetcher
48
47
  test_files: []