zine 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -1
- data/lib/zine/skeleton/source/screen.css +1 -1
- data/lib/zine/skeleton/source/styles/screen.scss +5 -1
- data/lib/zine/upload.rb +1 -25
- data/lib/zine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7a4c3e5fea09ab51fe7b331af07cb4fe8f1513f
|
4
|
+
data.tar.gz: fc16a0fa30ce65e81c5273462f29844f870a41af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f57f529d7167611348b10ba2e80e4f64aae423dc61e4590eb5ed6583790492471b7ca059f9aa984bb91c849d4d9db12dd213c7fe8194b2f1b1f0d61bb642daa8
|
7
|
+
data.tar.gz: 4993f64db9279bb07ebcc5c89efb47d09ec2cc7b2201173c671234ef79cdbf0bf1864d9738740eee4b2a7647840ab99217c4ee197dd282fa73dd845c6b6b4385
|
data/CHANGELOG.md
CHANGED
@@ -462,7 +462,29 @@ Have to move some local directory writes, then I think that's probably v0.3.0. T
|
|
462
462
|
|
463
463
|
Happy to call this a new pre release version, and also happy enough to push Zine into production use. My first 'Built with Zine' blog post's going up tonight.
|
464
464
|
|
465
|
-
TODO: A 'known issue' I'll deal with later: adding a post file while build is running will generate a post, but the posts & tags won't be re-ordered by date. Adding new posts during a build's not how my blogging workflow works, but it's a bug so I'll fix it.
|
465
|
+
TODO: A 'known issue' I'll deal with later: adding a post file while build is running will generate a post, but the posts & tags won't be re-ordered by date. Adding new posts during a build's not how my blogging workflow works, but it's a bug so I'll fix it. Hm, and there's a bug I've just discovered with incremental uploads of just the most recent post... the most common use case - that's next to sort out.
|
466
|
+
|
467
|
+
**Links to work**
|
468
|
+
|
469
|
+
1. [Repo](https://github.com/mikekreuzer/zine)
|
470
|
+
2. [Gem](https://rubygems.org/gems/zine)
|
471
|
+
3. [Blog](https://mikekreuzer.com)
|
472
|
+
4. [Tweet](https://twitter.com/mikekreuzer/status/833304266886377474)
|
473
|
+
|
474
|
+
## 0.4.0
|
475
|
+
|
476
|
+
### Day 28: February 20, 2017
|
477
|
+
|
478
|
+
**Today's Progress**:
|
479
|
+
|
480
|
+
- fixed a bug in file uploads, which warrants a gem version bump
|
481
|
+
- fixed some typos in the blog (hey, editing to trigger changes is still editing)
|
482
|
+
- updated some styles (footer links, bold text)
|
483
|
+
- 0.4.0
|
484
|
+
|
485
|
+
**Thoughts:**
|
486
|
+
|
487
|
+
Fixed the bug in file uploads by using .uniq on an array of hashes (which I'd planned to use, then forgot about... my Ruby Fu is still rusty).
|
466
488
|
|
467
489
|
**Links to work**
|
468
490
|
|
@@ -1 +1 @@
|
|
1
|
-
*{margin:0;padding:0}html,body{height:100%}body{background-color:#fff;font-family:GillSansRegular,"Gill Sans MT","Gill Sans","Century Gothic",Calibri,"Trebuchet MS",sans-serif;line-height:1.618;color:#333;text-align:center;font-weight:300}#skiptocontent{height:1px;width:1px;position:absolute;overflow:hidden;top:-10px}h1,h2,h3,h4,h5,h6{color:#333;letter-spacing:0.1em}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{color:#414f7c;text-decoration:none}h1 a:hover,h2 a:hover,h3 a:hover,h4 a:hover,h5 a:hover,h6 a:hover{color:#212721}h1{font-weight:300;font-size:2.618em;margin:1.809em 0 0.809em}h2{font-weight:300;font-size:1.618em;margin:1.809em 0 0.809em}h3,h4,h5,h6{font-weight:400;font-size:1em;margin:1.809em 0 0.809em}p,li{margin:1em 0}ul{margin:0}a{color:#414f7c}a:hover{color:#212721}section{margin-bottom:1.618em}section>section{margin-bottom:3.236em}body>header{width:43em;text-align:center;margin:0 auto 0}body>header a{text-decoration:none;margin-left:0.5em;margin-right:0.5em}body>header,body>main,body>footer{display:block}body>header a{color:#414f7c}body>header a:hover{color:#212721}body>header a.extra{color:#414f7c;margin-left:1em}body>header a.extra:hover{color:#212721}body>header nav ul li{display:inline;list-style:none}.button{width:30px;height:30px;display:inline-block;background-size:100%;text-indent:-999em;text-align:left;margin:20px}.twitter{background:url("/assets/webicon-twitter-m.png");background-image:url("/assets/webicon-twitter.svg"),none}.rss{background:url("/assets/webicon-rss-m.png");background-image:url("/assets/webicon-rss.svg"),none}main{text-align:left;width:43em;margin:3em auto 2em}main li{margin-left:2.618em}.meta{color:#667}footer{width:43em;color:#667;border-top:4px solid #ddd;margin:3em auto 2em;overflow:hidden}footer .column{float:left;width:33%;text-align:left}footer .column ul{list-style:none}footer .column a,.tags a{color:#414f7c;text-decoration:none}footer .column a:hover,.tags a:hover{color:#212721;text-decoration:
|
1
|
+
*{margin:0;padding:0}html,body{height:100%}body{background-color:#fff;font-family:GillSansRegular,"Gill Sans MT","Gill Sans","Century Gothic",Calibri,"Trebuchet MS",sans-serif;line-height:1.618;color:#333;text-align:center;font-weight:300}#skiptocontent{height:1px;width:1px;position:absolute;overflow:hidden;top:-10px}h1,h2,h3,h4,h5,h6{color:#333;letter-spacing:0.1em}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{color:#414f7c;text-decoration:none}h1 a:hover,h2 a:hover,h3 a:hover,h4 a:hover,h5 a:hover,h6 a:hover{color:#212721}h1{font-weight:300;font-size:2.618em;margin:1.809em 0 0.809em}h2{font-weight:300;font-size:1.618em;margin:1.809em 0 0.809em}h3,h4,h5,h6{font-weight:400;font-size:1em;margin:1.809em 0 0.809em}p,li{margin:1em 0}ul{margin:0}a{color:#414f7c}a:hover{color:#212721}section{margin-bottom:1.618em}section>section{margin-bottom:3.236em}strong{font-weight:400}body>header{width:43em;text-align:center;margin:0 auto 0}body>header a{text-decoration:none;margin-left:0.5em;margin-right:0.5em}body>header,body>main,body>footer{display:block}body>header a{color:#414f7c}body>header a:hover{color:#212721}body>header a.extra{color:#414f7c;margin-left:1em}body>header a.extra:hover{color:#212721}body>header nav ul li{display:inline;list-style:none}.button{width:30px;height:30px;display:inline-block;background-size:100%;text-indent:-999em;text-align:left;margin:20px}.twitter{background:url("/assets/webicon-twitter-m.png");background-image:url("/assets/webicon-twitter.svg"),none}.rss{background:url("/assets/webicon-rss-m.png");background-image:url("/assets/webicon-rss.svg"),none}main{text-align:left;width:43em;margin:3em auto 2em}main li{margin-left:2.618em}.meta{color:#667}footer{width:43em;color:#667;border-top:4px solid #ddd;margin:3em auto 2em;overflow:hidden}footer .column{float:left;width:33%;text-align:left}footer .column ul{list-style:none}footer .column a,.tags a{color:#414f7c;text-decoration:none}footer .column a:hover,.tags a:hover{color:#212721;text-decoration:underline}.tags ul li{list-style:none;display:inline;font-variant:small-caps;font-size:1.2em}.archive a{text-decoration:none}ul.archive,ul.archive ul{margin-left:0}ul.archive li,ul.archive ul li{list-style:none;margin-left:0}.post pre{border:1px solid #ddd;background-color:#fff;padding:0 .4em}p.date{color:#667}pre{background-color:#eee;padding:1em;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}code{font-family:Consolas,Menlo,Monaco,"Lucida Console","Courier New",monospace,serif;font-size:0.8em}blockquote{margin:2em 2em 2em 1em;padding:0 .75em 0 1.25em;border-left:2px solid #ddd;border-right:0px solid #ddd}@media all and (max-width: 736px){body>header,main,footer{width:86%;margin:0 auto 0;padding:12px 24px 12px}p{margin-bottom:2em}.button{width:50px;height:50px;margin:20px}footer .column{width:100%}}
|
@@ -96,6 +96,10 @@ section > section {
|
|
96
96
|
margin-bottom: 3.236em;
|
97
97
|
}
|
98
98
|
|
99
|
+
strong {
|
100
|
+
font-weight: $heavyWeight;
|
101
|
+
}
|
102
|
+
|
99
103
|
/* Site */
|
100
104
|
body > header {
|
101
105
|
width: $desktopWidth;
|
@@ -185,7 +189,7 @@ footer .column {
|
|
185
189
|
|
186
190
|
footer .column ul { list-style: none; }
|
187
191
|
footer .column a, .tags a { color:$linkColour; text-decoration: none; }
|
188
|
-
footer .column a:hover, .tags a:hover { color:$hoverColour; text-decoration:
|
192
|
+
footer .column a:hover, .tags a:hover { color:$hoverColour; text-decoration: underline; }
|
189
193
|
|
190
194
|
.tags ul li {
|
191
195
|
list-style: none;
|
data/lib/zine/upload.rb
CHANGED
@@ -12,7 +12,6 @@ module Zine
|
|
12
12
|
|
13
13
|
def initialize(build_dir, options, delete_file_array, upload_file_array)
|
14
14
|
return unless options['method'] == 'sftp'
|
15
|
-
|
16
15
|
@build_dir = build_dir
|
17
16
|
@host = options['host']
|
18
17
|
@path = options['path']
|
@@ -99,24 +98,7 @@ module Zine
|
|
99
98
|
|
100
99
|
# for each level, if a node has the same name & same path it's a duplicate
|
101
100
|
def remove_duplicates(level_array)
|
102
|
-
level_array.map
|
103
|
-
length = level.length
|
104
|
-
level_copy = level
|
105
|
-
level.each_with_index.map do |node, index|
|
106
|
-
next if node.nil?
|
107
|
-
if index.zero?
|
108
|
-
node
|
109
|
-
elsif !level_copy[0..(index - 1)]
|
110
|
-
.index { |item| same(item, node) }.nil? ||
|
111
|
-
!level_copy[(index + 1)..(length - 1)]
|
112
|
-
.index { |item| same(item, node) }.nil?
|
113
|
-
level_copy[index] = nil
|
114
|
-
nil
|
115
|
-
else
|
116
|
-
node
|
117
|
-
end
|
118
|
-
end
|
119
|
-
end
|
101
|
+
level_array.map(&:uniq)
|
120
102
|
end
|
121
103
|
|
122
104
|
# array of file paths to array of directory paths
|
@@ -131,12 +113,6 @@ module Zine
|
|
131
113
|
end
|
132
114
|
end
|
133
115
|
|
134
|
-
# equality for a node
|
135
|
-
def same(first, second)
|
136
|
-
return false if first.nil? || second.nil?
|
137
|
-
first.name == second.name && first.path_string == second.path_string
|
138
|
-
end
|
139
|
-
|
140
116
|
# convert directory names to nodes with knowledge of their parentage
|
141
117
|
def strings_to_nodes(paths_array)
|
142
118
|
paths_array.map do |path|
|
data/lib/zine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Kreuzer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|