mojombo-jekyll 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ ==
2
+ * Minor Enhancements
3
+ * Changed date format on wordpress converter (zeropadding) [github.com/dysinger]
4
+ * Bug Fixes
5
+ * Add jekyll binary as executable to gemspec [github.com/dysinger]
6
+
1
7
  == 0.4.0 / 2009-02-03
2
8
  * Major Enhancements
3
9
  * Switch to Jeweler for packaging tasks
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 4
3
- :patch: 0
3
+ :patch: 1
4
4
  :major: 0
data/bin/jekyll CHANGED
@@ -51,7 +51,11 @@ opts = OptionParser.new do |opts|
51
51
  opts.on("--permalink [TYPE]", "Use 'date' (default) for YYYY/MM/DD") do |style|
52
52
  Jekyll.permalink_style = (style || 'date').to_sym
53
53
  end
54
-
54
+
55
+ opts.on("--version", "Display current version") do
56
+ puts "Jekyll " + Jekyll.version
57
+ exit 0
58
+ end
55
59
  end
56
60
 
57
61
  opts.parse!
@@ -10,8 +10,8 @@ require 'fileutils'
10
10
 
11
11
  module Jekyll
12
12
  module WordPress
13
-
14
- # Reads a MySQL database via Sequel and creates a post file for each
13
+
14
+ # Reads a MySQL database via Sequel and creates a post file for each
15
15
  # post in wp_posts that has post_status = 'publish'.
16
16
  # This restriction is made because 'draft' posts are not guaranteed to
17
17
  # have valid dates.
@@ -19,20 +19,21 @@ module Jekyll
19
19
 
20
20
  def self.process(dbname, user, pass, host = 'localhost')
21
21
  db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host)
22
-
22
+
23
23
  FileUtils.mkdir_p "_posts"
24
-
24
+
25
25
  db[QUERY].each do |post|
26
26
  # Get required fields and construct Jekyll compatible name
27
27
  title = post[:post_title]
28
28
  slug = post[:post_name]
29
29
  date = post[:post_date]
30
30
  content = post[:post_content]
31
-
32
- name = [date.year, date.month, date.day, slug].join('-') + ".markdown"
31
+
32
+ name = "%02d-%02d-%02d-%s.markdown" % [date.year, date.month, date.day,
33
+ slug]
33
34
 
34
35
  # Get the relevant fields as a hash, delete empty fields and convert
35
- # to YAML for the header
36
+ # to YAML for the header
36
37
  data = {
37
38
  'layout' => 'post',
38
39
  'title' => title.to_s,
@@ -51,4 +52,4 @@ module Jekyll
51
52
 
52
53
  end
53
54
  end
54
- end
55
+ end
data/lib/jekyll.rb CHANGED
@@ -43,8 +43,6 @@ require 'jekyll/tags/include'
43
43
  require 'jekyll/albino'
44
44
 
45
45
  module Jekyll
46
- VERSION = '0.3.0'
47
-
48
46
  class << self
49
47
  attr_accessor :source, :dest, :lsi, :pygments, :markdown_proc, :content_type, :permalink_style
50
48
  end
@@ -61,4 +59,9 @@ module Jekyll
61
59
  Jekyll.dest = dest
62
60
  Jekyll::Site.new(source, dest).process
63
61
  end
62
+
63
+ def self.version
64
+ yml = YAML.load(File.read(File.join(File.dirname(__FILE__), *%w[.. VERSION.yml])))
65
+ "#{yml[:major]}.#{yml[:minor]}.#{yml[:patch]}"
66
+ end
64
67
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mojombo-jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Preston-Werner
@@ -9,8 +9,8 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-03 00:00:00 -08:00
13
- default_executable:
12
+ date: 2009-02-10 00:00:00 -08:00
13
+ default_executable: jekyll
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: RedCloth
@@ -68,8 +68,8 @@ dependencies:
68
68
  version:
69
69
  description: Jekyll is a simple, blog aware, static site generator.
70
70
  email: tom@mojombo.com
71
- executables: []
72
-
71
+ executables:
72
+ - jekyll
73
73
  extensions: []
74
74
 
75
75
  extra_rdoc_files: []