zenweb 3.0.0.b4 → 3.0.0.b5

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,14 @@
1
+ === 3.0.0.b5 / 2012-08-21
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Added DATE=today and tomorrow support for new_post
6
+
7
+ * 2 bug fixes:
8
+
9
+ * Cache value in website factory method so we don't get double-renders
10
+ * Fixed isolate setup for example site
11
+
1
12
  === 3.0.0.b4 / 2012-07-16
2
13
 
3
14
  * 1 minor enhancement:
@@ -1,8 +1,5 @@
1
1
  require "isolate"
2
2
 
3
3
  Isolate.now! :path => ".isolate", :system => false do
4
- gem 'rake', '~> 0.9'
5
- gem 'less', '~> 1.2'
6
- gem 'coderay', '~> 1.0'
7
- gem 'kramdown', '~> 0.13'
4
+ gem 'zenweb', '~> 3.0.0.b1'
8
5
  end
@@ -1,12 +1,14 @@
1
1
  #!/usr/bin/env rake
2
2
 
3
+ HTML_DIR="/Library/WebServer/Documents"
4
+
3
5
  require "rubygems"
4
6
 
5
7
  load ".isolate.rb"
6
8
 
7
9
  $: << "../lib"
8
10
 
9
- Rake.application.options.rakelib << "../lib/zenweb"
11
+ require "zenweb/tasks"
10
12
 
11
13
  def extra_wirings
12
14
  site = $website
@@ -28,5 +30,5 @@ task :extra_wirings do
28
30
  end
29
31
 
30
32
  task :push do
31
- sh "rsync -rv --del .site/ /Library/WebServer/Documents/"
33
+ sh "rsync -rv --del .site/ #{HTML_DIR}"
32
34
  end
data/lib/zenweb.rb CHANGED
@@ -6,7 +6,7 @@ require "time"
6
6
 
7
7
  module Zenweb
8
8
  # duh
9
- VERSION = "3.0.0.b4"
9
+ VERSION = "3.0.0.b5"
10
10
  end
11
11
 
12
12
  require "zenweb/site"
@@ -3,6 +3,7 @@ require 'zenweb'
3
3
  task :default => :generate
4
4
 
5
5
  def website
6
+ return $website if defined?($website)
6
7
  $website = Zenweb::Site.new
7
8
  $website.scan
8
9
  $website.wire
@@ -54,10 +55,20 @@ end
54
55
  def new_file title, dir = ".", date = false
55
56
  path = "#{title.strip.downcase.gsub(/\W+/, '-')}.html.md"
56
57
 
58
+ t = Time.now
59
+ noon = Time.local(t.year, t.month, t.day, 12)
60
+
57
61
  if date then
58
62
  date = case date
59
63
  when String
60
- Time.parse(date)
64
+ case date
65
+ when /today/i then
66
+ noon
67
+ when /tomorrow/i then
68
+ noon + 86400
69
+ else
70
+ Time.parse(date)
71
+ end
61
72
  when Time
62
73
  date
63
74
  else
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zenweb
3
3
  version: !ruby/object:Gem::Version
4
- hash: -2384544044
4
+ hash: -1329660202
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
9
  - 0
10
10
  - b
11
- - 4
12
- version: 3.0.0.b4
11
+ - 5
12
+ version: 3.0.0.b5
13
13
  platform: ruby
14
14
  authors:
15
15
  - Ryan Davis
@@ -38,7 +38,7 @@ cert_chain:
38
38
  FBHgymkyj/AOSqKRIpXPhjC6
39
39
  -----END CERTIFICATE-----
40
40
 
41
- date: 2012-07-16 00:00:00 Z
41
+ date: 2012-08-22 00:00:00 Z
42
42
  dependencies:
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: rake
@@ -123,11 +123,11 @@ dependencies:
123
123
  requirements:
124
124
  - - ~>
125
125
  - !ruby/object:Gem::Version
126
- hash: 7
126
+ hash: 1
127
127
  segments:
128
128
  - 3
129
- - 0
130
- version: "3.0"
129
+ - 3
130
+ version: "3.3"
131
131
  type: :development
132
132
  version_requirements: *id006
133
133
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file