alula 0.2.0c → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0c
1
+ 0.2.0
@@ -0,0 +1,75 @@
1
+ require 'RMagick'
2
+
3
+ module Alula
4
+ class AssetHelper
5
+ IMAGES = %w{jpg png gif}
6
+ MOVIES = %w{mp4}
7
+
8
+ def initialize(asset_path, options)
9
+ @options = options
10
+ @asset_path = asset_path
11
+ end
12
+
13
+ def process(asset, options)
14
+ options = @options.deep_merge(options)
15
+
16
+ # Resolve our asset type
17
+ ext = File.extname(asset)[1..-1].downcase
18
+
19
+ if IMAGES.include?(ext)
20
+ [:image, process_image(asset, options)]
21
+ elsif MOVIES.include?(ext)
22
+ [:movie, process_movie(asset, options)]
23
+ else
24
+ raise "Unknown asset type #{ext} for #{asset}"
25
+ end
26
+ end
27
+
28
+ private
29
+ def process_image(asset, options)
30
+ ext = File.extname(asset)[1..-1].downcase
31
+ name = File.basename(asset, ext).to_url
32
+ generated = []
33
+
34
+ # Resolve size for new photo
35
+ width, height = case options[:type]
36
+ when :attachment
37
+ options["images"]["size"].split("x").collect {|i| i.to_i }
38
+ when :thumbnail
39
+ options["images"]["thumbnails"].split("x").collect {|i| i.to_i }
40
+ end
41
+
42
+ file_path = case options[:type]
43
+ when :attachment
44
+ File.join("attachments", "_generated", "images", @asset_path)
45
+ when :thumbnail
46
+ File.join("attachments", "_generated", "thumbnails", @asset_path)
47
+ end
48
+ # Create output path
49
+ FileUtils.mkdir_p(file_path)
50
+
51
+ # Copy asset to originals
52
+ if options[:type] == :attachment
53
+ FileUtils.mkdir_p File.join("attachments", "originals", @asset_path)
54
+ FileUtils.cp asset, File.join("attachments", "originals", @asset_path, "#{name}.#{ext}")
55
+ end
56
+
57
+ # Create normal photo
58
+ image = Magick::Image.read(asset).first
59
+ image_width, image_height = image.columns, image.rows
60
+
61
+ resized = image.resize_to_fit(width, height)
62
+ resized.write(File.join(file_path, "#{name}.#{ext}"))
63
+ generated << File.join(@asset_path, "#{name}.#{ext}")
64
+
65
+ # Generate retina if required
66
+ if (options["images"]["retina"] and (image_width > width * 2) or (image_height > height * 2))
67
+ retina = image.resize_to_fit(width * 2, height * 2)
68
+ resized.write(File.join(file_path, "#{name}_2x.#{ext}"))
69
+ generated << File.join(@asset_path, "#{name}_2x.#{ext}")
70
+ end
71
+
72
+ return generated
73
+ end
74
+ end
75
+ end
data/lib/alula/cli.rb CHANGED
@@ -11,7 +11,7 @@ module Alula
11
11
  desc "init [PATH]", "Creates a new aLula blog in given path or current directory"
12
12
  def init(path = ".")
13
13
  # Create directory structure
14
- %w{attachments attachments/_originals attachments/_thumbnails posts pages}.each do |dir|
14
+ %w{attachments attachments/originals attachments/_generated/images attachments/_generated/_thumbnails posts pages}.each do |dir|
15
15
  empty_directory File.join(path, dir)
16
16
  end
17
17
 
@@ -1,5 +1,3 @@
1
- require 'RMagick'
2
-
3
1
  module Alula
4
2
  module Plugins
5
3
  class GenericAsset < Liquid::Tag
@@ -0,0 +1,121 @@
1
+ module Jekyll
2
+
3
+ class Pagination < Generator
4
+ # This generator is safe from arbitrary code execution.
5
+ safe true
6
+
7
+ # Generate paginated pages if necessary.
8
+ #
9
+ # site - The Site.
10
+ #
11
+ # Returns nothing.
12
+ def generate(site)
13
+ site.pages.dup.each do |page|
14
+ paginate(site, page) if Pager.pagination_enabled?(site.config, page)
15
+ end
16
+ end
17
+
18
+ # Paginates the blog's posts. Renders the index.html file into paginated
19
+ # directories, e.g.: page2/index.html, page3/index.html, etc and adds more
20
+ # site-wide data.
21
+ #
22
+ # site - The Site.
23
+ # page - The index.html Page that requires pagination.
24
+ #
25
+ # {"paginator" => { "page" => <Number>,
26
+ # "per_page" => <Number>,
27
+ # "posts" => [<Post>],
28
+ # "total_posts" => <Number>,
29
+ # "total_pages" => <Number>,
30
+ # "previous_page" => <Number>,
31
+ # "next_page" => <Number> }}
32
+ def paginate(site, page)
33
+ all_posts = site.site_payload['site']['posts']
34
+ pages = Pager.calculate_pages(all_posts, site.config['paginate'].to_i)
35
+ page_dir = page.destination('').sub(/\/[^\/]+$/, '')
36
+ page_dir_config = site.config['pagination_dir']
37
+ dir = ((page_dir_config || page_dir) + '/').sub(/^\/+/, '')
38
+
39
+ (1..pages).each do |num_page|
40
+ pager = Pager.new(site.config, num_page, all_posts, page_dir+'/', '/'+dir, pages)
41
+ if num_page > 1
42
+ newpage = Page.new(site, site.source, page_dir, page.name)
43
+ newpage.pager = pager
44
+ newpage.dir = File.join(page.dir, "#{dir}page/#{num_page}")
45
+ site.pages << newpage
46
+ else
47
+ page.pager = pager
48
+ end
49
+ end
50
+ end
51
+ end
52
+
53
+ class Pager
54
+ attr_reader :page, :per_page, :posts, :total_posts, :total_pages, :previous_page, :next_page
55
+
56
+ # Calculate the number of pages.
57
+ #
58
+ # all_posts - The Array of all Posts.
59
+ # per_page - The Integer of entries per page.
60
+ #
61
+ # Returns the Integer number of pages.
62
+ def self.calculate_pages(all_posts, per_page)
63
+ (all_posts.size.to_f / per_page.to_i).ceil
64
+ end
65
+
66
+ # Determine if pagination is enabled for a given file.
67
+ #
68
+ # config - The configuration Hash.
69
+ # file - The String filename of the file.
70
+ #
71
+ # Returns true if pagination is enabled, false otherwise.
72
+ def self.pagination_enabled?(config, file)
73
+ file.name == 'index.html' && !config['paginate'].nil? && file.content =~ /paginator\./
74
+ end
75
+
76
+ # Initialize a new Pager.
77
+ #
78
+ # config - The Hash configuration of the site.
79
+ # page - The Integer page number.
80
+ # all_posts - The Array of all the site's Posts.
81
+ # num_pages - The Integer number of pages or nil if you'd like the number
82
+ # of pages calculated.
83
+ def initialize(config, page, all_posts, index_dir, pagination_dir, num_pages = nil)
84
+ @page = page
85
+ @per_page = config['paginate'].to_i
86
+ @page_dir = pagination_dir + 'page/'
87
+ @total_pages = num_pages || Pager.calculate_pages(all_posts, @per_page)
88
+ @previous_page = nil
89
+
90
+ if @page > @total_pages
91
+ raise RuntimeError, "page number can't be greater than total pages: #{@page} > #{@total_pages}"
92
+ end
93
+
94
+ init = (@page - 1) * @per_page
95
+ offset = (init + @per_page - 1) >= all_posts.size ? all_posts.size : (init + @per_page - 1)
96
+
97
+ @total_posts = all_posts.size
98
+ @posts = all_posts[init..offset]
99
+ @previous_page = @page != 1 ? @page_dir + (@page - 1).to_s + '/' : nil
100
+ @previous_page = index_dir if @page - 1 == 1
101
+ @next_page = @page != @total_pages ? @page_dir + (@page + 1).to_s + '/' : nil
102
+ end
103
+
104
+ # Convert this Pager's data to a Hash suitable for use by Liquid.
105
+ #
106
+ # Returns the Hash representation of this Pager.
107
+ def to_liquid
108
+ {
109
+ 'page' => page,
110
+ 'per_page' => per_page,
111
+ 'posts' => posts,
112
+ 'total_posts' => total_posts,
113
+ 'total_pages' => total_pages,
114
+ 'previous_page' => previous_page,
115
+ 'next_page' => next_page
116
+ }
117
+ end
118
+ end
119
+
120
+ end
121
+
@@ -0,0 +1,23 @@
1
+ module Alula
2
+ module Plugins
3
+ # def self.register(plugin, path)
4
+ # @@plugins ||= {}
5
+ # @@plugins[plugin] = path
6
+ # end
7
+ #
8
+ # def self.plugins
9
+ # @@plugins
10
+ # end
11
+ def self.register_attachment_handler(type, handler)
12
+ @@handlers ||= {}
13
+ @@handlers[:attachment] ||= {}
14
+ @@handlers[:attachment][type] = handler
15
+ end
16
+
17
+ def self.attachment_handler(type)
18
+ @@handlers ||= {}
19
+ @@handlers[:attachment] ||= {}
20
+ @@handlers[:attachment][type]
21
+ end
22
+ end
23
+ end
data/lib/alula/site.rb CHANGED
@@ -1,13 +1,13 @@
1
1
  require 'yaml'
2
2
  require 'jekyll'
3
3
  require 'sprockets'
4
- require 'RMagick'
5
4
  require 'active_support/inflector/methods'
6
5
  require 'progressbar'
7
6
  require 'stringex'
8
7
 
9
8
  require 'alula/theme'
10
- require 'alula/plugin'
9
+ require 'alula/plugins'
10
+ require 'alula/assethelper'
11
11
 
12
12
  # Compressors
13
13
  require 'alula/compressors'
@@ -15,6 +15,7 @@ require 'alula/compressors'
15
15
  # Jekyll extensions, plugins, tags
16
16
  # These are used always in every blog, i.e. mandatory plugins
17
17
  require 'alula/plugins/assets'
18
+ require 'alula/plugins/pagination'
18
19
 
19
20
  module Alula
20
21
  class Site
@@ -71,7 +72,7 @@ module Alula
71
72
  @sprockets.append_path File.join("_tmp", "assets")
72
73
 
73
74
  # Attachments
74
- @sprockets.append_path File.join("attachments")
75
+ @sprockets.append_path File.join("attachments", "_generated")
75
76
 
76
77
  # Vendor assets
77
78
  vendor_path = File.expand_path(File.join(File.dirname(__FILE__), *%w{.. .. vendor}))
@@ -79,13 +80,15 @@ module Alula
79
80
  @sprockets.append_path File.join(vendor_path, "javascripts")
80
81
 
81
82
  # Initialize blog plugins
82
- @config["plugins"].each do |plugin, opts|
83
- require "alula/plugins/#{plugin}"
83
+ if @config["plugins"] != nil
84
+ @config["plugins"].each do |plugin, opts|
85
+ require "alula/plugins/#{plugin}"
84
86
 
85
- plugin_class = Alula::Plugins.const_get(ActiveSupport::Inflector.camelize(plugin, true))
86
- path = plugin_class.install(opts)
87
- @sprockets.append_path File.join(path, "stylesheets")
88
- @sprockets.append_path File.join(path, "javascripts")
87
+ plugin_class = Alula::Plugins.const_get(ActiveSupport::Inflector.camelize(plugin, true))
88
+ path = plugin_class.install(opts)
89
+ @sprockets.append_path File.join(path, "stylesheets")
90
+ @sprockets.append_path File.join(path, "javascripts")
91
+ end
89
92
  end
90
93
  end
91
94
 
@@ -137,55 +140,32 @@ module Alula
137
140
  post = find_post(a_post) or raise "Cannot find post #{a_post}"
138
141
 
139
142
  /(?<date>(\d{4}-\d{2}-\d{2}))/ =~ post
140
- # require 'pry';binding.pry
141
143
  date = Time.parse(date)
142
-
143
- width, height = @config["images"]["size"].split("x").collect {|i| i.to_i }
144
144
  asset_path = File.join(%w{%Y %m %d}.collect{|f| date.strftime(f) })
145
- file_path = File.join("attachments", "_originals", asset_path)
146
- FileUtils.mkdir_p(file_path)
147
145
 
148
- processed = []
146
+ helper = Alula::AssetHelper.new(asset_path, @config)
149
147
 
150
148
  post_io = File.open(post, "a")
151
-
152
- # Generate assets
153
- image_types = [".jpg", ".png"]
154
149
  assets.each do |asset|
155
- asset_ext = File.extname(asset).downcase
156
- asset_base = File.basename(asset).downcase
157
- asset_plain = File.basename(asset, asset_ext).to_url
158
-
159
- if image_types.include?(asset_ext)
160
- img = Magick::Image.read(asset).first
161
- orig_w, orig_h = img.columns, img.rows
162
-
163
- img_normal = img.resize_to_fit(width, height)
164
- img_normal.write(File.join(file_path, "#{asset_plain}#{asset_ext}"))
165
- img_normal = nil
166
-
167
- if (@config["images"]["retina"] and (orig_w > width * 2) or (orig_h > height * 2))
168
- img_retina = img.resize_to_fit(width * 2, height * 2)
169
- retina_fname = File.join(file_path, "#{asset_plain}_2x#{asset_ext}")
170
- img_retina.write(retina_fname)
171
- img_retina = nil
172
- end
173
-
174
- processed << File.join(asset_path, asset_base)
175
-
176
- if @config["plugins"].keys.include?("lightbox")
177
- post_io.puts "{% lightbox #{File.join(asset_path, "#{asset_plain}#{asset_ext}")} %}"
150
+ type, generated = helper.process(asset, :type => :attachment)
151
+ tn_type, tn_generated = helper.process(asset, :type => :thumbnail)
152
+ if generated and tn_generated
153
+ # Asset processed
154
+ puts "(#{asset}) done."
155
+ if handler = Alula::Plugins.attachment_handler(type)
156
+ post_io.puts handler.call(generated[0])
178
157
  else
179
- post_io.puts "{% image #{File.join("_originals", asset_path, "#{asset_plain}#{asset_ext}")} %}"
158
+ post_io.puts "{% image _images/#{generated[0]} %}"
180
159
  end
160
+ else
161
+ puts "(#{asset}) cannot process."
181
162
  end
182
163
  end
183
-
184
- post_io.close
185
164
  end
186
165
 
187
166
  def clean
188
167
  cleanup
168
+ FileUtils.rm_rf(Dir[File.join("attachments", "_images", "*")])
189
169
  FileUtils.rm_rf(Dir[File.join("attachments", "_thumbnails", "*")])
190
170
  end
191
171
 
@@ -228,7 +208,13 @@ module Alula
228
208
  FileUtils.cp_r Dir[File.join("posts", "*")], File.join("_tmp", "_posts")
229
209
 
230
210
  # Copy pages
231
- FileUtils.cp_r Dir[File.join("pages", "**", "*")], File.join("_tmp")
211
+ Dir[File.join("pages", "**", "*")].each do |page|
212
+ next unless File.file?(page)
213
+ page = File.join(page.split("/")[1..-1])
214
+
215
+ FileUtils.mkdir_p File.join("_tmp", File.dirname(page))
216
+ FileUtils.cp File.join("pages", page), File.join("_tmp", page)
217
+ end
232
218
 
233
219
  FileUtils.mkdir_p File.join("_tmp", "assets")
234
220
  end
@@ -239,23 +225,31 @@ module Alula
239
225
  width, height = @config["images"]["thumbnails"].split("x").collect {|i| i.to_i }
240
226
 
241
227
  # Get all attachements
242
- originals_path = File.join("attachments", "_originals")
243
- thumbnails_path = File.join("attachments", "_thumbnails")
228
+ images_path = File.join("attachments", "_generated", "images")
229
+ thumbnails_path = File.join("attachments", "_generated", "thumbnails")
244
230
 
245
- assets = Dir[File.join(originals_path, "**", "*")]
231
+ assets = Dir[File.join(images_path, "**", "*")]
246
232
  .select {|f| File.file?(f) }
247
- .collect {|f| File.join(f.split("/")[2..-1])}
233
+ .collect {|f| File.join(f.split("/")[3..-1])}
248
234
  pb = ProgressBar.new "Assets", assets.count
235
+ # helper = Alula::AssetHelper.new(asset_path, @config)
249
236
 
250
- assets.each do |original|
251
- unless File.exists?(File.join(thumbnails_path, original))
252
- image = Magick::Image.read(File.join(originals_path, original)).first
253
- image.crop_resized!(width, height, Magick::NorthGravity)
254
- FileUtils.mkdir_p File.dirname(File.join(thumbnails_path, original))
255
- image.write(File.join(thumbnails_path, original))
237
+ assets.each do |asset|
238
+ unless File.exists?(File.join(thumbnails_path, asset))
239
+ helper = Alula::AssetHelper.new(File.dirname(asset), @config)
240
+ tn_type, tn_generated = helper.process(File.join("attachments", "originals", asset), :type => :thumbnail)
241
+ pb.inc
256
242
  end
257
- pb.inc
258
243
  end
244
+ # assets.each do |original|
245
+ # unless File.exists?(File.join(thumbnails_path, original))
246
+ # image = Magick::Image.read(File.join(originals_path, original)).first
247
+ # image.crop_resized!(width, height, Magick::NorthGravity)
248
+ # FileUtils.mkdir_p File.dirname(File.join(thumbnails_path, original))
249
+ # image.write(File.join(thumbnails_path, original))
250
+ # end
251
+ # pb.inc
252
+ # end
259
253
 
260
254
  pb.finish
261
255
  end
@@ -268,7 +262,9 @@ module Alula
268
262
  tf.puts "/*"
269
263
  tf.puts " *=require #{@config["theme"]}"
270
264
  # Plugins
271
- @config["plugins"].each { |plugin, opts| tf.puts " *=require #{plugin}" }
265
+ if @config["plugins"]
266
+ @config["plugins"].each { |plugin, opts| tf.puts " *=require #{plugin}" }
267
+ end
272
268
  tf.puts " */"
273
269
  end
274
270
 
@@ -276,13 +272,17 @@ module Alula
276
272
  File.open(File.join("_tmp", "assets", "scripts.js"), "w") do |tf|
277
273
  tf.puts "//=require #{@config["theme"]}"
278
274
  # Plugins
279
- @config["plugins"].each { |plugin, opts| tf.puts "//=require #{plugin}" }
275
+ if @config["plugins"]
276
+ @config["plugins"].each { |plugin, opts| tf.puts "//=require #{plugin}" }
277
+ end
280
278
  end
281
279
 
282
280
  File.open(File.join("_tmp", "assets", "scripts_body.js"), "w") do |tf|
283
281
  tf.puts "//=require #{@config["theme"]}_body"
284
282
  # Plugins
285
- @config["plugins"].each { |plugin, opts| tf.puts "//=require #{plugin}_body" }
283
+ if @config["plugins"]
284
+ @config["plugins"].each { |plugin, opts| tf.puts "//=require #{plugin}_body" }
285
+ end
286
286
  end
287
287
 
288
288
 
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alula
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0c
5
- prerelease: 5
4
+ version: 0.2.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mikko Kokkonen
@@ -13,7 +13,7 @@ date: 2012-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll
16
- requirement: &70293003811360 !ruby/object:Gem::Requirement
16
+ requirement: &70277502059980 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.11'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70293003811360
24
+ version_requirements: *70277502059980
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sprockets
27
- requirement: &70293003810680 !ruby/object:Gem::Requirement
27
+ requirement: &70277502059420 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '2.4'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70293003810680
35
+ version_requirements: *70277502059420
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: thor
38
- requirement: &70293003826360 !ruby/object:Gem::Requirement
38
+ requirement: &70277502058720 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0.14'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70293003826360
46
+ version_requirements: *70277502058720
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rmagick
49
- requirement: &70293003825620 !ruby/object:Gem::Requirement
49
+ requirement: &70277502057920 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '2.13'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70293003825620
57
+ version_requirements: *70277502057920
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: sass
60
- requirement: &70293003824960 !ruby/object:Gem::Requirement
60
+ requirement: &70277502073420 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '3.1'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70293003824960
68
+ version_requirements: *70277502073420
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: coffee-script
71
- requirement: &70293003824280 !ruby/object:Gem::Requirement
71
+ requirement: &70277502071820 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '2.2'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70293003824280
79
+ version_requirements: *70277502071820
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: uglifier
82
- requirement: &70293003823560 !ruby/object:Gem::Requirement
82
+ requirement: &70277502070340 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '1.2'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *70293003823560
90
+ version_requirements: *70277502070340
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: front-compiler
93
- requirement: &70293003822880 !ruby/object:Gem::Requirement
93
+ requirement: &70277502069600 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '1.1'
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *70293003822880
101
+ version_requirements: *70277502069600
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: activesupport
104
- requirement: &70293003822100 !ruby/object:Gem::Requirement
104
+ requirement: &70277502067420 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '3.2'
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *70293003822100
112
+ version_requirements: *70277502067420
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: stringex
115
- requirement: &70293003820960 !ruby/object:Gem::Requirement
115
+ requirement: &70277502066880 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '1.3'
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *70293003820960
123
+ version_requirements: *70277502066880
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: ruby-progressbar
126
- requirement: &70293003820100 !ruby/object:Gem::Requirement
126
+ requirement: &70277502066400 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ~>
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: 0.0.10
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *70293003820100
134
+ version_requirements: *70277502066400
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: version
137
- requirement: &70293003819560 !ruby/object:Gem::Requirement
137
+ requirement: &70277502065920 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ~>
@@ -142,7 +142,7 @@ dependencies:
142
142
  version: '1.0'
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *70293003819560
145
+ version_requirements: *70277502065920
146
146
  description: Alula is a simple tool for creating fast, static blogs easily.
147
147
  email:
148
148
  - mikko@owlforestry.com
@@ -160,10 +160,12 @@ files:
160
160
  - alula.gemspec
161
161
  - bin/alula
162
162
  - lib/alula.rb
163
+ - lib/alula/assethelper.rb
163
164
  - lib/alula/cli.rb
164
165
  - lib/alula/compressors.rb
165
- - lib/alula/plugin.rb
166
+ - lib/alula/plugins.rb
166
167
  - lib/alula/plugins/assets.rb
168
+ - lib/alula/plugins/pagination.rb
167
169
  - lib/alula/rake_tasks.rb
168
170
  - lib/alula/site.rb
169
171
  - lib/alula/tasks.rb
@@ -187,9 +189,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
187
189
  required_rubygems_version: !ruby/object:Gem::Requirement
188
190
  none: false
189
191
  requirements:
190
- - - ! '>'
192
+ - - ! '>='
191
193
  - !ruby/object:Gem::Version
192
- version: 1.3.1
194
+ version: '0'
193
195
  requirements: []
194
196
  rubyforge_project:
195
197
  rubygems_version: 1.8.17
data/lib/alula/plugin.rb DELETED
@@ -1,12 +0,0 @@
1
- module Alula
2
- class Plugin
3
- def self.register(plugin, path)
4
- @@plugins ||= {}
5
- @@plugins[plugin] = path
6
- end
7
-
8
- def self.plugins
9
- @@plugins
10
- end
11
- end
12
- end