plate 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## Plate 0.5.2
2
+
3
+ * Added `platify` command line utility to set up a new site.
4
+
1
5
  ## Plate 0.5.1
2
6
 
3
7
  * Updates to new post command line utility. Pass in a category and layout to a new post.
data/README.md CHANGED
@@ -4,10 +4,7 @@
4
4
 
5
5
  Plate is a super simple static site generator and blog engine. It takes a folder full of Markdown files and turns it into a site that you can host anywhere. The output is a plain old static HTML site. In addition to basic formatting with Markdown, Plate also supports generating asset files with CoffeeScript, Sass and others.
6
6
 
7
- ## Requirements
8
-
9
- * Ruby 1.9.2 or 1.9.3
10
- * Bundler
7
+ Requires Ruby 1.9.2 or 1.9.3. For additional processing, install CoffeeScript, Sass, Haml and other formatters.
11
8
 
12
9
  ## Installation
13
10
 
@@ -17,21 +14,23 @@ Or, create a `Gemfile` and add:
17
14
 
18
15
  gem 'plate'
19
16
 
20
- ## Set up
17
+ ## Command line
21
18
 
22
19
  To generate a new site with plate, run the following command:
23
20
 
24
- plate new site-name/
21
+ platify .
25
22
 
26
- ## Building a site
27
-
28
23
  To build your site, run:
29
24
 
30
25
  plate build
31
26
 
32
- Or, just run:
27
+ Or, just run `plate` without any options to build the site.
33
28
 
34
29
  plate
30
+
31
+ To show details about the site build, enable verbose mode:
32
+
33
+ plate --verbose
35
34
 
36
35
  ## Directory Structure
37
36
 
@@ -89,6 +88,6 @@ Plate is fully tested using Test Unit, Shoulda and Mocha. To run the test suite,
89
88
 
90
89
  ## License
91
90
 
92
- Challah is released under the [MIT license](http://www.opensource.org/licenses/MIT)
91
+ Plate is released under the [MIT license](http://www.opensource.org/licenses/MIT)
93
92
 
94
93
  Contributions and pull-requests are more than welcome.
data/bin/platify ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'plate'
4
+ Plate::CLI.new(['new', *ARGV].flatten).run
data/lib/plate/builder.rb CHANGED
@@ -158,7 +158,7 @@ module Plate
158
158
  # Returns the time it took to run render! (in milliseconds)
159
159
  def timer
160
160
  return 0 unless @end_time and @start_time
161
- ((@end_time - @start_time)).round(2)
161
+ ((@end_time - @start_time)).round
162
162
  end
163
163
 
164
164
  # The directory path of where to put the files while the site is being built.
@@ -88,6 +88,10 @@ module Plate
88
88
  @tag_list ||= tags.keys.sort
89
89
  end
90
90
 
91
+ def to_a
92
+ @posts
93
+ end
94
+
91
95
  def years
92
96
  @years ||= archives.keys.sort
93
97
  end
data/lib/plate/site.rb CHANGED
@@ -30,7 +30,7 @@ module Plate
30
30
  end
31
31
 
32
32
  def all_files
33
- @all_files ||= self.assets + self.layouts + self.pages + self.posts
33
+ @all_files ||= self.assets + self.layouts + self.pages + self.posts.to_a
34
34
  end
35
35
 
36
36
  # All extensions that are registered, as strings.
@@ -239,7 +239,7 @@ module Plate
239
239
  end
240
240
  end
241
241
 
242
- @posts.sort
242
+ @posts.sort!
243
243
 
244
244
  log("#{@posts.size} posts loaded") if log
245
245
 
data/lib/plate/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plate
2
- VERSION = "0.5.1" unless defined?(::Plate::VERSION)
2
+ VERSION = "0.5.2" unless defined?(::Plate::VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,18 +13,18 @@ date: 2012-03-11 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70156589437180 !ruby/object:Gem::Requirement
16
+ requirement: &70303059133800 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '3.1'
21
+ version: '3.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70156589437180
24
+ version_requirements: *70303059133800
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: directory_watcher
27
- requirement: &70156589436800 !ruby/object:Gem::Requirement
27
+ requirement: &70303059133420 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70156589436800
35
+ version_requirements: *70303059133420
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: i18n
38
- requirement: &70156589471840 !ruby/object:Gem::Requirement
38
+ requirement: &70303059132880 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0.6'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70156589471840
46
+ version_requirements: *70303059132880
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &70156589471420 !ruby/object:Gem::Requirement
49
+ requirement: &70303059132460 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70156589471420
57
+ version_requirements: *70303059132460
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: redcarpet
60
- requirement: &70156589470880 !ruby/object:Gem::Requirement
60
+ requirement: &70303059131920 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '2'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70156589470880
68
+ version_requirements: *70303059131920
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: tilt
71
- requirement: &70156589470380 !ruby/object:Gem::Requirement
71
+ requirement: &70303059131420 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,16 +76,18 @@ dependencies:
76
76
  version: '1.3'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70156589470380
80
- description: Plate is a simple Ruby-based static blogging engine.
79
+ version_requirements: *70303059131420
80
+ description: Plate is a simple, static site generator and blog engine.
81
81
  email:
82
82
  - john@johntornow.com
83
83
  executables:
84
84
  - plate
85
+ - platify
85
86
  extensions: []
86
87
  extra_rdoc_files: []
87
88
  files:
88
89
  - bin/plate
90
+ - bin/platify
89
91
  - lib/plate/asset.rb
90
92
  - lib/plate/builder.rb
91
93
  - lib/plate/callbacks.rb
@@ -116,7 +118,7 @@ files:
116
118
  - README.md
117
119
  - CHANGELOG.md
118
120
  - LICENSE
119
- homepage: http://platerb.com
121
+ homepage: https://github.com/jdtornow/plate
120
122
  licenses: []
121
123
  post_install_message:
122
124
  rdoc_options: []
@@ -136,8 +138,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
138
  version: 1.8.12
137
139
  requirements: []
138
140
  rubyforge_project:
139
- rubygems_version: 1.8.15
141
+ rubygems_version: 1.8.17
140
142
  signing_key:
141
143
  specification_version: 3
142
- summary: A simple static blogging engine.
144
+ summary: A static site generator and blog engine.
143
145
  test_files: []