zine 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b288c0de3e56f4d866463af9d47a7297c324f17
4
- data.tar.gz: '09a5e9eade1683838fbdea5ca5e0a0f72503e5c2'
3
+ metadata.gz: 86608dfa096084c2c6a21b3ea494a358ad9e33da
4
+ data.tar.gz: 5439829d544b3a76e946cc2061ce6aa3e93cae8d
5
5
  SHA512:
6
- metadata.gz: 1212ef35301f8cda64e1af9ad1b743e21a97ead47fb4e2b980446d13ca7dab579bd99cc7305744e8e9f4bfb241983188b26d4486c6b3146a976826f07b88b5a1
7
- data.tar.gz: 937adc8a6c6930d10daa8113f386f6fa5ce8683b40e0655b151cb9e48e9ebca60434d5a59bc2b300d9987b73eba46b3765341da794d49f2c9a39fe496bb6394d
6
+ metadata.gz: 2dc5d411caf5539c69fa6489c3db594f0a070b848bb276739145436a745f46812b075c1876e8cae2537e3dd0d9ad62c0152790d15807d54a10c9688e9c465637
7
+ data.tar.gz: fb7cf50e0f7491a2969028add5641e0a17f6bd18c16a3e42b7316fac50c5e23d89f95da8701a3d16a1c6720677990e7af13857c3741fced873006cdc4fd7a85d
@@ -1,751 +1,104 @@
1
- # 100 Days Of Code - Log
1
+ # Zine Changelog
2
2
 
3
- ### Day 1: January 24, 2017
3
+ ## Pre 0.0.1
4
4
 
5
- **Today's Progress**:
6
-
7
- - set up the blog & repos, my first project is a static blog engine called Zine
8
- - set up bundler, wrote some rspec tests & got the gem to build & installed it locally
9
- - using Thor for the menu & as a generator for scaffold files for new blog posts is the first functional part of the gem
10
-
11
- **Thoughts:**
12
-
13
- I might push the code up every few days, not sure about that yet.
14
-
15
- **Links to work**
16
-
17
- 1. [(empty) Zine repo](https://github.com/mikekreuzer/zine)
18
- 2. [Tweet](https://twitter.com/mikekreuzer/status/823876650316111872)
19
- 3. [Blog](https://mikekreuzer.com/blog/2017/1/100-days-of-code.html)
20
-
21
- ### Day 2: January 25, 2017
22
-
23
- **Today's Progress**:
24
-
25
- - generate a (still mostly empty) new site scaffold
26
- - read a YAML options file
5
+ - set up the blog & repos
6
+ - set up bundler, rspec tests
7
+ - Thor for the menu & as a generator
8
+ - YAML options
27
9
  - have a Site object pushing file names to Page objects
28
-
29
- **Thoughts:**
30
-
31
- Next up is the the meat of the blog engine - reading the YAML & Markdown, generating the folder structure & pushing text through Kramdown & ERB. That's where I'd hoped to get to tonight.
32
-
33
- **Links to work**
34
-
35
- 1. [Tweet](https://twitter.com/mikekreuzer/status/824237414306627589)
36
-
37
- ### Day 3: January 26, 2017
38
-
39
- **Today's Progress**:
40
-
41
- - reading the files' YAML front matter & Markdown
42
- - generating the folder structure from the YAML dates (& spending ages with date errors in Psych.... they need to be quoted it turns out, it did used to know that I think)
43
10
  - Kramdown
44
-
45
- **Thoughts:**
46
-
47
- Didn't get as far as the ERB templates - still have to translate my current Jade templates across, probably via the Jade's HTML output. That's for tomorrow.
48
-
49
- Big time saver today was remembering to chain bash commands:
50
- ```bash
51
- gem uninstall zine -x && gem build zine.gemspec && gem install ./zine-0.1.0.gem
52
- ```
53
-
54
- **Links to work**
55
-
56
- 1. [Tweet](https://twitter.com/mikekreuzer/status/824602333359190017)
57
-
58
- ### Day 4: January 27, 2017
59
-
60
- **Today's Progress**:
61
-
62
- - moved the log to the Zine repo
63
- - went with Slim templates instead - rendering & partials both working, yet to translate the existing templates though
64
- - wrote some more rspec tests, played with cucumber for a while but decided not to use it, it's a DSL too far.
65
-
66
- **Thoughts:**
67
-
68
- Couldn't resist the terse syntax of Slim. Lagging behind on the test front.
69
-
70
- **Links to work**
71
-
72
- 1. [Tweet](https://twitter.com/mikekreuzer/status/824948475355762688)
73
-
74
- ### Day 5: January 28, 2017
75
-
76
- **Today's Progress**:
77
-
78
- - dropped Slim, back with ERB - translation was going to take too long
11
+ - played with cucumber for a while but decided not to use it, it's a DSL too far.
12
+ - Slim, then dropped Slim, back with ERB - translation was going to take too long
79
13
  - added HTML compression, even though the difference is only around 1kb a page
80
-
81
- **Thoughts:**
82
-
83
- Simplicity rules. Terse syntax is neat, but yet another DSL is a burden.
84
-
85
- On a positive note I feel like I'm on a bit of a roll with this project now. Tags next, I think.
86
-
87
- **Links to work**
88
-
89
- 1. [Tweet](https://twitter.com/mikekreuzer/status/825327843059994625)
90
-
91
- ### Day 6: January 29, 2017
92
-
93
- **Today's Progress**:
94
-
95
14
  - ERB partials
96
15
  - working posts & tags
97
- - draft of the README.md file
98
-
99
- **Thoughts:**
100
-
101
- I'm occasionally missing the safety check of a compile failing when using a compiled language. Also structs in Ruby aren't the best... but those are both partly a problem of my development habits. Still thinking about Cucumber & Slim, and seeing DSLs as a cost, as a topic for a blog post. Thinking of swapping colorize for pastel too (only because of the monkey patching).
102
-
103
- Next up: the home & article list pages, pages that aren't posts like the about page, and copying across the CSS - all up that would probably represent a minimum viable product. Much less than I plan to do in the end, but enough for a first cut of the gem I think. End of week one tomorrow!
104
-
105
- **Links to work**
106
-
107
- 1. [Tweet](https://twitter.com/mikekreuzer/status/825689819204300800)
108
-
109
- ### Day 7: January 30, 2017
110
-
111
- **Today's Progress**:
112
-
113
- - delete added as a CLI option
114
- - refactoring of tags (to be continued, to swap out ERB::Util for a slug name method, I think)
115
-
116
- **Thoughts:**
117
-
118
- Might push the template and CSS folders into a layouts/default folder, in case anyone ever wants to make other layouts. Tomorrow. Busy day. One week though, nice.
119
-
120
- **Links to work**
121
-
122
- 1. [Tweet](https://twitter.com/mikekreuzer/status/826045386405998594)
123
-
124
- ### Day 8: January 31, 2017
125
-
126
- **Today's Progress**:
127
-
128
16
  - replaced Colorize with Rainbow
129
17
  - replaced ERB::Util with a slug name generator
130
18
  - added dates to tag lists
131
-
132
- **Thoughts:**
133
-
134
- Refactoring my monolithic page class tomorrow, cleaning up tags was preparation for that.
135
-
136
- **Links to work**
137
-
138
- 1. [Tweet](https://twitter.com/mikekreuzer/status/826414672542732288)
139
-
140
- ### Day 9: February 1, 2017
141
-
142
- **Today's Progress**:
143
-
144
- - Ripley for February
145
- - Ripley 0.7.1
146
-
147
- **Thoughts:**
148
-
149
- A very brief break from Zine to detour back to some Elixir coding. The March edition of Ripley could be a Zine site, in time for its first anniversary in April.
150
-
151
- **Links to work**
152
-
153
- 1. [Ripley](https://mikekreuzer.github.io/Ripley/)
154
- 2. [Ripley code](https://github.com/mikekreuzer/Ripley)
155
- 3. [Tweet](https://twitter.com/mikekreuzer/status/826775864696147969)
156
-
157
- ### Day 10: February 2, 2017
158
-
159
- **Today's Progress**:
160
-
161
19
  - copies files that aren't Markdown or templates to the build directory, preserving the folder structure
162
- - a simple WEBrick server for preview, with SSL
163
-
164
- **Thoughts:**
165
-
166
- As well as breaking up Page I'm going to have break up a monolithic Site class, these things grow like topsy. Will do that when this cold abates.
167
-
168
- **Links to work**
169
-
170
- 1. [Tweet](https://twitter.com/mikekreuzer/status/827135313621311488)
171
-
172
- ### Day 11: February 3, 2017
173
-
174
- **Today's Progress**:
175
-
176
- - moved yesterday's local server out of the site class
177
-
178
- **Thoughts:**
179
-
180
- Fruitlessly debugged ERB. The cold continues. Real progress when I stop coughing.
181
-
182
- **Links to work**
183
-
184
- 1. [Tweet](https://twitter.com/mikekreuzer/status/827504315430367232)
185
-
186
- ### Day 12: February 4, 2017
187
-
188
- **Today's Progress**:
189
-
20
+ - a simple WEBrick server for preview, with SSL, then
190
21
  - WEBrick swapped out for Thin - WEBrick's been ridiculously slow
191
22
  - DataPage class carved out of Page
192
23
  - home & all tags index pages
193
-
194
- **Thoughts:**
195
-
196
- The index page of all the tag pages is the first bit of Zine that pushes beyond the envelope of what I'm using now. That feels good.
197
-
198
- I'm wondering how much of my memory of having speed issue with Jekyll was caused by WEBrick.
199
-
200
- Finally starting to feel better, summer colds are the pits.
201
-
202
- **Links to work**
203
-
204
- 1. [Tweet](https://twitter.com/mikekreuzer/status/827857782330138628)
205
-
206
- ### Day 13: February 5, 2017
207
-
208
- **Today's Progress**:
209
-
210
24
  - more serious site & page class refactoring
211
- - pages that aren't blog posts
25
+ - pages that aren't blog posts (eg about)
212
26
  - started into RSS/Atom feeds, and the standard library docs are borderline nonexistent
213
27
 
214
- **Thoughts:**
215
-
216
- Lucky 13.
217
-
218
- RSS would round out the two week mark nicely, if I get it to work. I have escaped content, but getting CDATA in there without writing the generator myself would be nice.
219
-
220
- Two weeks to get the rough structure right, and to get something like a minimum viable product feels about right. While that would be much less than I intend to do it'd be time to start pushing code to GitHub & to release this as more than a stub of a gem. Tomorrow, maybe, with a bit of luck.
221
-
222
- **Links to work**
223
-
224
- 1. [Tweet](https://twitter.com/mikekreuzer/status/828231071770632193)
225
-
226
- ## v0.1.0
227
-
228
- ### Day 14: February 6, 2017
229
-
230
- **Today's Progress**:
28
+ ## 0.1.0, February 6, 2017
231
29
 
232
- - claimed the feed content's xhtml to get it to work, will revisit & fix this with CDATA
30
+ - claimed the feed content is xhtml to get it to work, will revisit & fix this with CDATA
233
31
  - started testing the engine against old blog posts
234
32
  - first code to GitHub
235
33
  - gem published
236
34
 
237
- **Thoughts:**
238
-
239
- Two weeks, and here's the first cut of code to GitHub & a (slightly) more than just a stub of a gem. Plenty of room to improve, but a nice start.
240
-
241
- **Links to work**
242
-
243
- 1. [Repo](https://github.com/mikekreuzer/zine)
244
- 2. [Gem](https://rubygems.org/gems/zine)
245
- 3. [Tweet](https://twitter.com/mikekreuzer/status/828584150479228928)
246
-
247
- ### Day 15: February 7, 2017
248
-
249
- **Today's Progress**:
35
+ ## 0.2.0, February 9, 2017
250
36
 
251
37
  - RSS now using DataPage & ERB, with CDATA tags
252
38
  - added Ruby 2.0 as a minimum to the gemspec
253
- - version headings added to this log
254
-
255
- **Thoughts:**
256
-
257
- My thoughts are in the blog post. Happy. :-)
258
-
259
- **Links to work**
260
-
261
- 1. [Blog post](https://mikekreuzer.com/blog/2017/2/two-weeks-of-code.html)
262
- 2. [Repo](https://github.com/mikekreuzer/zine)
263
- 3. [Tweet](https://twitter.com/mikekreuzer/status/828952725090037760)
264
-
265
- ### Day 16: February 8, 2017
266
-
267
- **Today's Progress**:
268
-
269
39
  - template names from zine.yaml
270
-
271
- **Thoughts:**
272
-
273
- A stocktake sort of a day. Need to get some changes back into the templates, then do the articles index. May consolidate the DataPage calls, & maybe get posts out of Site at the same time.
274
-
275
- **Links to work**
276
-
277
- 1. [Repo](https://github.com/mikekreuzer/zine)
278
- 2. [Tweet](https://twitter.com/mikekreuzer/status/829318150868983808)
279
-
280
- ## v0.2.0
281
-
282
- ### Day 17: February 9, 2017
283
-
284
- **Today's Progress**:
285
-
286
40
  - consolidated the DataPage calls in the Site class (the home page, feed, and now added an articles/archive index to that)
287
41
  - added 'skip to main content' back into the header partial
288
42
  - some bug fixes & minor refactoring
289
- - version 0.2.0
290
-
291
- **Thoughts:**
292
-
293
- Played around with the concurrent-ruby gem - seems promising, inspired by Erlang it's got a lot in common with Elixir... but it doesn't work to just fling the local server into the background with async, & Thin itself uses EventMachine...
294
-
295
- Was listening in on RubyConf_au going on in the background on Twitter all day -- inspirational. Couldn't wait to start my hour of coding, even more than usual. :-)
296
-
297
- **Links to work**
298
43
 
299
- 1. [Repo](https://github.com/mikekreuzer/zine)
300
- 2. [Gem](https://rubygems.org/gems/zine)
301
- 3. [Tweet](https://twitter.com/mikekreuzer/status/829677797241090050)
302
-
303
- ### Day 18: February 10, 2017
304
-
305
- **Today's Progress**:
44
+ ## 0.3.0, February 19, 2017
306
45
 
46
+ - moved the local post directory creation to the write method
47
+ - added a minimalist version of building additional posts while build is running
307
48
  - PostsAndHeadlines class extracted from Site
308
49
  - CSS preprocessing with Sass added (LibSass and SassC)
309
50
  - messing about with styles
310
51
  - some minor refactoring & doc work
311
-
312
- **Thoughts:**
313
-
314
- Now well behind with testing, will need to concentrate on that soon.
315
-
316
- **Links to work**
317
-
318
- 1. [Repo](https://github.com/mikekreuzer/zine)
319
- 2. [Tweet](https://twitter.com/mikekreuzer/status/830034964393529345)
320
-
321
- ### Day 19: February 11, 2017
322
-
323
- **Today's Progress**:
324
-
325
52
  - watching the Markdown files for changes with Listener
326
53
  - started on incremental builds
327
-
328
- **Thoughts:**
329
-
330
- A productive evening, despite spending a lot of time breaking my brain trying to work around the Guard gem. Incremental builds are on the way (deleted files I'm still to do), then on to live reloads and SFTP uploads (I think).
331
-
332
- **Links to work**
333
-
334
- 1. [Repo](https://github.com/mikekreuzer/zine)
335
- 2. [Tweet](https://twitter.com/mikekreuzer/status/830414957745369088)
336
-
337
- ### Day 20: February 12, 2017
338
-
339
- **Today's Progress**:
340
-
341
54
  - added SFTP uploads of the files that changed, which includes (and it warrants a line)...
342
55
  - my own homegrown (& no doubt pretty rough) SFTP version of mkdir_p
343
56
  - incremental builds handle Markdown file deletions now
344
57
  - rearranged the zine.yaml preferences file to accommodate file transfers
345
58
  - added footer links via zine.yaml, tweaking the style & templates a little
346
-
347
- **Thoughts:**
348
-
349
- Writing the remote version of mkdir_p feels good, even if the number of edge cases I'd be missing must be huge. I'm going to drop live reloads for now, too much JavaScript jiggery pokery. It's been almost been 3 weeks... Need to optimise the tag rebuilds & uploads, probably. And tests...
350
-
351
- **Links to work**
352
-
353
- 1. [Repo](https://github.com/mikekreuzer/zine)
354
- 2. [Tweet](https://twitter.com/mikekreuzer/status/830762418485633024)
355
-
356
- ### Day 21: February 13, 2017
357
-
358
- **Today's Progress**:
359
-
360
- - fixed some hard wiring from yesterday
361
-
362
- **Thoughts:**
363
-
364
- Three weeks! And it looks like my router is dying. Sigh. Not much time for programming tonight.
365
-
366
- Need to adjust the ordering of the build & file watching, to catch the initial build. Want to consolidate the mkdir requests before I send duplicates over the wire, as well as the tag rebuilds.
367
-
368
- **Links to work**
369
-
370
- 1. [Repo](https://github.com/mikekreuzer/zine)
371
- 2. [Tweet](https://twitter.com/mikekreuzer/status/831116561515638785)
372
-
373
- ### Day 22: February 14, 2017
374
-
375
- **Today's Progress**:
376
-
377
- - slogging it out (so far unsuccessfully) consolidating upload paths
378
-
379
- **Thoughts:**
380
-
381
- Valentine's Day special. Router seems to have righted itself for the moment. Slow going.
382
-
383
- **Links to work**
384
-
385
- 1. [Tweet](https://twitter.com/mikekreuzer/status/831478367174037506)
386
-
387
- ### Day 23: February 15, 2017
388
-
389
- **Today's Progress**:
390
-
391
59
  - consolidate upload paths instead of sending duplicate mkdir requests via SFTP
392
-
393
- **Thoughts:**
394
-
395
- Was looking the wrong way - was looking at a folder's children, when it's its parents that matter when removing duplicate mkdir calls.
396
-
397
- **Links to work**
398
-
399
- 1. [Repo](https://github.com/mikekreuzer/zine)
400
- 2. [Tweet](https://twitter.com/mikekreuzer/status/831859701411307520)
401
-
402
- ### Day 24: February 16, 2017
403
-
404
- **Today's Progress**:
405
-
406
60
  - file watcher extended to cover non Markdown files
407
-
408
- **Thoughts:**
409
-
410
- A brief session after a few slugfest-y nights
411
-
412
- **Links to work**
413
-
414
- 1. [Repo](https://github.com/mikekreuzer/zine)
415
- 2. [Tweet](https://twitter.com/mikekreuzer/status/832174649492463616)
416
-
417
- ### Day 25: February 17, 2017
418
-
419
- **Today's Progress**:
420
-
421
61
  - testing real world data with my blog
422
-
423
- **Thoughts:**
424
-
425
- Exciting, looking at things I need to clean up to make this workable...
426
-
427
- **Links to work**
428
-
429
- 1. [Repo](https://github.com/mikekreuzer/zine)
430
- 2. [Tweet](https://twitter.com/mikekreuzer/status/832575013769187330)
431
-
432
- ### Day 26: February 18, 2017
433
-
434
- **Today's Progress**:
435
-
436
62
  - start the file watcher earlier to catch the initial build in a full build,
437
63
  meant everything was a change so everything's uploaded...
438
64
  - added an incremental build that skipped the initial writes to fix that
439
65
  - linked homepage post titles to posts
440
66
 
441
- **Thoughts:**
442
-
443
- Have to move some local directory writes, then I think that's probably v0.3.0. Tomorrow. Would mean uploads took a week by themselves.
444
-
445
- **Links to work**
446
-
447
- 1. [Repo](https://github.com/mikekreuzer/zine)
448
- 2. [Tweet](https://twitter.com/mikekreuzer/status/832941448307748864)
449
-
450
- ## v0.3.0
451
-
452
- ### Day 27: February 19, 2017
453
-
454
- **Today's Progress**:
455
-
456
- - moved the local post directory creation to the write method
457
- - added a minimalist version of building additional posts while build is running
458
- - v0.3.0
459
- - and tonight Zine's in use in the wild
460
-
461
- **Thoughts:**
462
-
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
-
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**:
67
+ ## 0.4.0, February 20, 2017
479
68
 
480
69
  - 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)
70
+ - fixed some typos in the blog
482
71
  - 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).
488
-
489
- **Links to work**
490
-
491
- 1. [Repo](https://github.com/mikekreuzer/zine)
492
- 2. [Gem](https://rubygems.org/gems/zine)
493
- 3. [Blog](https://mikekreuzer.com)
494
- 4. [Tweet](https://twitter.com/mikekreuzer/status/833658907054583809)
495
-
496
- ### Day 29: February 21, 2017
497
72
 
498
- **Today's Progress**:
73
+ ## 0.5.0, March 9, 2017
499
74
 
500
- - deleted the stock post & about files I uploaded to my blog by mistake (hmm)
501
75
  - updated dependencies: Rake & Simplecov
502
76
  - refactored Zine::Site#housekeeping_copy
503
77
  - started chipping away at RDoc, and making some methods private
504
- - started to get back into writing tests again
505
-
506
-
507
- **Thoughts:**
508
-
509
- Need to need make the stock files more obvious, or maybe have an upgrade option, not sure where to draw the line on that... everything but the initial post & the about file? Tests. Finally.
510
-
511
- **Links to work**
512
-
513
- 1. [Repo](https://github.com/mikekreuzer/zine)
514
- 2. [Tweet](https://twitter.com/mikekreuzer/status/834021891383767040)
515
-
516
- ### Took the night off: February 22, 2017
517
-
518
- ### Day 30: February 23, 2017
519
-
520
- **Today's Progress**:
521
-
522
- - rebased a pull request for BennyHallett/elixir-rss
523
78
  - Page tests
524
-
525
- **Thoughts:**
526
-
527
- Needed a break last night, back into it.
528
-
529
- **Links to work**
530
-
531
- 1. [Repo](https://github.com/mikekreuzer/zine)
532
- 2. [Tweet](https://twitter.com/mikekreuzer/status/834740235460177920)
533
-
534
- ### Day 31: February 24, 2017
535
-
536
- **Today's Progress**:
537
-
538
79
  - trawling through set_trace_func call logs
539
-
540
- **Thoughts:**
541
-
542
- Looking at execution paths, to make sure they are what I think they are.
543
-
544
- **Links to work**
545
-
546
- 1. [Tweet](https://twitter.com/mikekreuzer/status/835110622794661889)
547
-
548
- ### Day 32: February 25, 2017
549
-
550
- **Today's Progress**:
551
-
552
80
  - cleaned up Server, setting headers properly
553
81
  - added curb as a development dependency, started on Server tests with tests of those headers
554
82
  - then back in on page tests... some more refactoring required
555
-
556
- **Thoughts:**
557
-
558
- Testing times. :-)
559
-
560
- **Links to work**
561
-
562
- 1. [Repo](https://github.com/mikekreuzer/zine)
563
- 2. [Tweet](https://twitter.com/mikekreuzer/status/835471172967944192)
564
-
565
- ### Day 33: February 26, 2017
566
-
567
- **Today's Progress**:
568
-
569
83
  - added what I thought would've been the default filter to Simplecov (excluding the spec directory)
570
84
  - injecting File into the file writing methods, to make testable versions
571
85
  - rewrote some Page and Server tests
572
-
573
- **Thoughts:**
574
-
575
- Been thinking about my next project while playing around with the tests. Had originally imagined maybe three or four projects, but it seems it'll be more like two, maybe three now. I have at least a week or maybe two of writing tests till I'm willing to slow down on those, having only just started, & a project of a similar size to Zine in mind for my next gig.
576
-
577
- **Links to work**
578
-
579
- 1. [Repo](https://github.com/mikekreuzer/zine)
580
- 2. [Tweet](https://twitter.com/mikekreuzer/status/835809220020707329)
581
-
582
- ### Day 34: February 27, 2017
583
-
584
- **Today's Progress**:
585
-
586
86
  - minor doc work
587
-
588
- **Thoughts:**
589
-
590
- Toyed with using Apple's news format... but RSS seems to work fine. Almost a night off. Almost.
591
-
592
- **Links to work**
593
-
594
- 1. [Repo](https://github.com/mikekreuzer/zine)
595
- 2. [Tweet](https://twitter.com/mikekreuzer/status/836196422722580480)
596
-
597
- ### Day 35: February 28, 2017
598
-
599
- **Today's Progress**:
600
-
601
87
  - more tests (Style and some more of CLI)
602
-
603
- **Thoughts:**
604
-
605
- 43.8% covered, supposedly. Realistically there are ten substantive classes, one of which (PostsAndHeadlines) will act as an integration test, and I've written some tests for three... so somewhere around the 33% mark is probably closer to it. Happy with that rate of progress. My memory of rspec's mocking syntax especially is very shaky, but fixing that is what this is all about.
606
-
607
- **Links to work**
608
-
609
- 1. [Repo](https://github.com/mikekreuzer/zine)
610
- 2. [Tweet](https://twitter.com/mikekreuzer/status/836554681690181632)
611
-
612
- ### Day 36: March 1, 2017
613
-
614
- **Today's Progress**:
615
-
616
- - Ripley for March
617
- - started playing around with GitHub uploads
618
-
619
- **Thoughts:**
620
-
621
- Snuck Ripley in in my first session (the 'only just AM', 'is that the time' session)... Had hoped to be using Zine for the Ripley site for March; April for the first anniversary for sure.
622
-
623
- Overall still want the tests to catch up some more before adding new features, but the upload code needs splitting up, and that's an opportune moment to get both SFTP & Octokit in there.
624
-
625
- **Links to work**
626
-
627
- 1. [Ripley](https://mikekreuzer.github.io/Ripley/)
628
- 2. [Ripley repo](https://github.com/mikekreuzer/Ripley)
629
- 3. [Ripley Tweet](https://twitter.com/mikekreuzer/status/836564005799915520)
630
- 4. [Zine Tweet](https://twitter.com/mikekreuzer/status/836925144853467136)
631
-
632
- ### Day 37: March 2, 2017
633
-
634
- **Today's Progress**:
635
-
636
- - more work on GitHub uploads
637
-
638
- **Thoughts:**
639
-
640
- Octokit seems to work ok, though yet to integrate it (the Upload code still needs to be split up).
641
-
642
- Having to poll each possible remote copy of a file to see if it exists, to get its sha & to call separate create or update methods is clumsy. With a small number of uploads that's still likely to be fewer calls than getting all the remote files' info to update that locally though, because I'd need to poll each remote directory for its contents.
643
-
644
- **Links to work**
645
-
646
- 1. [Tweet](https://twitter.com/mikekreuzer/status/837282872876638209)
647
-
648
- ### Day 38: March 3, 2017
649
-
650
- **Today's Progress**:
651
-
652
- - Ripley
653
-
654
- **Thoughts:**
655
-
656
- Started on converting Ripley over to a static site, getting the JSON data to compare locally - to get smooth navigation between months. More Ruby, in what had been an Elixir project (and before that a Go project). :-)
657
-
658
- **Links to work**
659
-
660
- 1. [Tweet](https://twitter.com/mikekreuzer/status/837652254773563392)
661
-
662
- ### Day 39: March 4, 2017
663
-
664
- **Today's Progress**:
665
-
666
- - more toying with making Ripley data into Zine posts
667
-
668
- **Thoughts:**
669
-
670
- Long week, short night of coding.
671
-
672
- **Links to work**
673
-
674
- 1. [Tweet](https://twitter.com/mikekreuzer/status/838004709793280000)
675
-
676
- ### Day 40: March 5, 2017
677
-
678
- **Today's Progress**:
679
88
  - shuffled some Upload methods
680
-
681
- **Thoughts:**
682
-
683
- Trying to wind things up by 11:30 so I can get up in the mornings is taking its toll. This is my only coding nowadays, will need to work out a way to square that circle sustainably.
684
-
685
- **Links to work**
686
-
687
- 1. [Tweet](https://twitter.com/mikekreuzer/status/838365598643970050)
688
-
689
- ### Day 41: March 6, 2017
690
-
691
- **Today's Progress**:
692
-
693
89
  - the articles page takes its name from its template
694
90
  - zine.yaml - deleted the redundant css preprocessor option
695
91
  - fixed some shouldn't-be-private method bugs
696
92
  - Ruby script added to Ripley, to generate Zine post files from the JSON
697
- - Ripley is now a Zine site, though this upload was via git
698
-
699
- **Thoughts:**
700
-
701
- Ripley gets (currently clumsy) navigation between months to show historical data, as well as the benefit of being a (faster to load) static site, in time for next month's first anniversary. And I got to discover all sorts of assumptions I'd made about a site living in the root directory that I'll need to translate back to the stock templates.
702
-
703
- **Links to work**
704
-
705
- 1. [Ripley](https://mikekreuzer.github.io/Ripley/)
706
- 2. [Ripley Ruby](https://github.com/mikekreuzer/Ripley/tree/master/build_table)
707
- 3. [Zine Repo](https://github.com/mikekreuzer/zine)
708
- 2. [Tweet](https://twitter.com/mikekreuzer/status/838740083792470016)
709
-
710
- ### Day 42: March 7, 2017
711
-
712
- **Today's Progress**:
713
-
93
+ - Ripley is now a Zine site
714
94
  - fixed root directory assumptions in templates (images, css, links, all absolute) includes a url in the sass for the moment
715
95
  - worked around some URI.join weirdness (join for files doesn't know what dots means, & for URIs expects the first param to be root)
716
- - some cosmetic fixes in Ripley
717
96
  - Upload class split up, into Upload and UploadSFTP
718
- - UploadGitHub class added
719
-
720
- **Thoughts:**
721
-
722
- Sent some time fixing the bugs I caught yesterday, pushing things live's a good integration test sometimes. :-) Happy with Ripley for now, but will improve the build process. For April I still want to link to the JSON files, have a more natural forwards/backwards navigation between months, & table styles in the RSS. Tables might be a reason to look at Apple News again.
723
-
724
- Will push that code up tomorrow when I've seen it work. Time for a blog update, it's been two weeks. Then it's back to writing tests - it's been a week already.
725
-
726
- **Links to work**
727
-
728
- 1. [Repo](https://github.com/mikekreuzer/zine)
729
- 2. [Tweet](https://twitter.com/mikekreuzer/status/839091283897405440)
730
-
731
- ### Took the night off: March 8, 2017
732
-
733
- ## 0.5.0
734
-
735
- ### Day 43: March 9, 2017
736
-
737
- **Today's Progress**:
738
-
739
- - pushing the new upload classes
740
- - version bump, GitHub uploads are worth a version bump
741
-
742
- **Thoughts:**
743
-
744
- Thought about keeping the old lede para split going as an option, instead of pushing styles into the RSS (for tables).
745
-
746
- Tests have fallen to 43.33%...
97
+ - UploadGitHub class added - GitHub uploads
747
98
 
748
- **Links to work**
99
+ ## 0.6.0, September 17, 2017
749
100
 
750
- 1. [Repo](https://github.com/mikekreuzer/zine)
751
- 2. [Tweet](https://twitter.com/mikekreuzer/status/839799560339775489)
101
+ - tests: for Upload & UploaderGitHub - found a bug, which is gratifying... would've been caught by a compiler, oh well
102
+ - fixed a mismatched div tag in the footer
103
+ - changed to a non 100 days of code change log
104
+ - updated some development dependencies (curb, rake, rspec, simplecov)
data/README.md CHANGED
@@ -7,7 +7,7 @@ These are the very early days of zine, expect breaking changes.
7
7
 
8
8
  ## Why yet another static blog engine?
9
9
 
10
- Written in a #100DaysOfCode challenge -- my [progress log's here](CHANGELOG.md). Despite the [proliferation in these things][engine_list] (450!) I still find it more comfortable to use my own tools.
10
+ Despite the [proliferation in these things][engine_list] (450!) I still find it more comfortable to use my own tools.
11
11
 
12
12
  Distinguishing features include:
13
13
 
@@ -48,7 +48,7 @@ module Zine
48
48
 
49
49
  def parse_date(front_matter_date)
50
50
  DateTime.rfc3339(front_matter_date).strftime('%B %-d, %Y')
51
- rescue
51
+ rescue ArgumentError
52
52
  ''
53
53
  end
54
54
 
@@ -101,7 +101,7 @@ module Zine
101
101
  @raw_text,
102
102
  input: 'GFM',
103
103
  auto_ids: false,
104
- smart_quotes: %w(apos apos quot quot),
104
+ smart_quotes: %w[apos apos quot quot],
105
105
  syntax_highlighter: 'rouge'
106
106
  ).to_html
107
107
  @raw_text = nil
@@ -1,3 +1,4 @@
1
+ require 'highline'
1
2
  require 'rainbow'
2
3
  require 'rack'
3
4
  require 'thin'
@@ -67,7 +68,7 @@ module Zine
67
68
  (@delete_array.empty? && @upload_array.empty?)
68
69
  uploader = Zine::Upload.new rel_path_build, upload_options,
69
70
  @delete_array, @upload_array
70
- uploader.upload_decision
71
+ uploader.upload_decision HighLine
71
72
  end
72
73
  end
73
74
  end
@@ -17,7 +17,7 @@
17
17
  <li>Built with <a href="https://github.com/mikekreuzer/zine">Zine</a></li>
18
18
  <li>&copy; 2017<span> <%= page[:site_author] %></span></li>
19
19
  </ul>
20
- <div>
20
+ </div>
21
21
  </footer>
22
22
  </body>
23
23
  </html>
@@ -9,18 +9,21 @@ module Zine
9
9
  # Deploy changes to a remote host, via SFTP or using the GitHub Rest API
10
10
  class Upload
11
11
  def initialize(build_dir, options, delete_file_array, upload_file_array)
12
- return if options['method'] == 'none'
12
+ if options['method'] == 'none'
13
+ @no_upload = true
14
+ return
15
+ end
13
16
  @build_dir = build_dir
14
17
  @options = options
15
18
  cred_file = options['credentials']
16
- @credentials = parse_yaml(File.open(cred_file, 'r'), cred_file)
17
-
19
+ @credentials = read_credentials(cred_file)
18
20
  @upload_file_array = Set.new(upload_file_array).to_a
19
21
  @delete_file_array = Set.new(delete_file_array).to_a - @upload_file_array
20
22
  end
21
23
 
22
- def upload_decision
23
- cli = HighLine.new
24
+ def upload_decision(query_class)
25
+ return if @no_upload
26
+ cli = query_class.new
24
27
  answer = cli.ask('Upload files? (Y/n)') { |q| q.default = 'Y' }
25
28
  return if answer != 'Y'
26
29
  puts Rainbow('Connecting...').green
@@ -36,12 +39,20 @@ module Zine
36
39
  { 'username' => '', 'password' => '' }
37
40
  end
38
41
 
42
+ def read_credentials(cred_file)
43
+ parse_yaml(File.open(cred_file, 'r'), cred_file)
44
+ rescue Errno::ENOENT
45
+ puts Rainbow('Path to upload credentials missing from zine.yaml').red
46
+ exit
47
+ end
48
+
39
49
  def github_upload
40
50
  uploader = Zine::UploaderGitHub.new(@build_dir,
41
51
  @options,
42
52
  @credentials,
43
53
  @delete_file_array,
44
54
  @upload_file_array)
55
+ puts '---', uploader.inspect, '---'
45
56
  uploader.upload
46
57
  end
47
58
 
@@ -60,7 +71,7 @@ module Zine
60
71
  elsif @options['method'] == 'github'
61
72
  github_upload
62
73
  else
63
- puts Rainbow('Unknown upload option in zine.yaml').green
74
+ puts Rainbow('Unknown upload option in zine.yaml').red
64
75
  end
65
76
  end
66
77
  end
@@ -12,7 +12,10 @@ module Zine
12
12
  # https://help.github.com/articles/creating-an-access-token-for-command-line-use/
13
13
  def initialize(build_dir, options, credentials, delete_file_array,
14
14
  upload_file_array)
15
- return unless options['method'] == 'github'
15
+ unless options['method'] == 'github'
16
+ @no_upload = true
17
+ return
18
+ end
16
19
  @build_dir = build_dir
17
20
  @repo_full_name = options['path_or_repo']
18
21
  @client = Octokit::Client.new(access_token: credentials['access_token'])
@@ -23,8 +26,9 @@ module Zine
23
26
  end
24
27
 
25
28
  # Duplicates within & between the files already removed in Zine::Upload
26
- # then .each... upload & delete - use build_dor to create relative paths
29
+ # then .each... upload & delete - uses @build_dir to create relative paths
27
30
  def upload
31
+ return if @no_upload
28
32
  @delete_file_array.each do |file_pathname|
29
33
  delete_file file_pathname
30
34
  end
@@ -33,18 +37,20 @@ module Zine
33
37
  end
34
38
  end
35
39
 
40
+ private
41
+
36
42
  # see if file exists, then delete it if it does
37
43
  # returns commit hash (unused)
38
44
  def delete_file(rel_path)
39
- info_hash = info github_path
45
+ info_hash = info rel_path
40
46
  @client.delete_contents(@repo_full_name,
41
47
  rel_path,
42
48
  'Zine delete', # commit message
43
49
  info_hash[:sha],
44
50
  branch: 'gh-pages')
45
- puts "Deleted #{github_path}" if @verbose
51
+ puts "Deleted #{rel_path}" if @verbose
46
52
  rescue Octokit::NotFound
47
- puts "Tried to delete nonexistent remote file #{github_path}"
53
+ puts "Tried to delete nonexistent remote file #{rel_path}"
48
54
  end
49
55
 
50
56
  # return info on a file if it exsists, otherwise throws Octokit::NotFound
@@ -1,4 +1,4 @@
1
1
  module Zine
2
2
  # The version
3
- VERSION = '0.5.0'.freeze
3
+ VERSION = '0.6.0'.freeze
4
4
  end
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.5.0
4
+ version: 0.6.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-03-09 00:00:00.000000000 Z
11
+ date: 2017-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,56 +30,56 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.9.3
33
+ version: 0.9.4
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.9.3
40
+ version: 0.9.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '12.0'
47
+ version: '12.1'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '12.0'
54
+ version: '12.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.0'
61
+ version: '3.6'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '3.0'
68
+ version: '3.6'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.13'
75
+ version: 0.15.1
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.13'
82
+ version: 0.15.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: highline
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -338,7 +338,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
338
338
  version: '0'
339
339
  requirements: []
340
340
  rubyforge_project:
341
- rubygems_version: 2.6.10
341
+ rubygems_version: 2.6.13
342
342
  signing_key:
343
343
  specification_version: 4
344
344
  summary: Yet another blog aware static site generator.