alula-plugins 0.1.1a → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1a
1
+ 0.1.1
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = Alula::Plugins::VERSION
17
17
 
18
- gem.add_dependency 'alula', '~> 0.1'
18
+ gem.add_dependency 'alula', '~> 0.2'
19
19
 
20
20
  gem.add_development_dependency 'version', '~> 1.0.0'
21
21
  end
@@ -7,6 +7,11 @@ module Alula
7
7
  # Register custom tag
8
8
  Liquid::Template.register_tag('lightbox', Alula::Plugins::Lightbox)
9
9
 
10
+ # Register attachment insertion
11
+ Alula::Plugins.register_attachment_handler(:image, ->(asset){
12
+ "{% lightbox #{asset} %}"
13
+ })
14
+
10
15
  # Return path to assets
11
16
  File.expand_path(File.join(File.dirname(__FILE__), *%w{.. .. .. plugins lightbox}))
12
17
  end
@@ -24,8 +29,8 @@ module Alula
24
29
  asset_path = context.registers[:site].config["asset_path"]
25
30
  manifest = context.registers[:site].config["manifest"]
26
31
 
27
- original = File.join(asset_path, manifest.assets[File.join("_originals", @name)])
28
- thumbnail = File.join(asset_path, manifest.assets[File.join("_thumbnails", @name)])
32
+ original = File.join(asset_path, manifest.assets[File.join("images", @name)])
33
+ thumbnail = File.join(asset_path, manifest.assets[File.join("thumbnails", @name)])
29
34
 
30
35
  # Fetch image size
31
36
  img = Magick::Image.read(File.join("public", thumbnail)).first
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alula-plugins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1a
5
- prerelease: 5
4
+ version: 0.1.1
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mikko Kokkonen
@@ -13,18 +13,18 @@ date: 2012-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: alula
16
- requirement: &70294463925580 !ruby/object:Gem::Requirement
16
+ requirement: &70241112620360 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '0.1'
21
+ version: '0.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70294463925580
24
+ version_requirements: *70241112620360
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: version
27
- requirement: &70294463924620 !ruby/object:Gem::Requirement
27
+ requirement: &70241112619860 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 1.0.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70294463924620
35
+ version_requirements: *70241112619860
36
36
  description: Plugins for Alula blog
37
37
  email:
38
38
  - mikko@owlforestry.com
@@ -47,7 +47,6 @@ files:
47
47
  - Rakefile
48
48
  - VERSION
49
49
  - alula-plugins.gemspec
50
- - lib/alula/plugins.rb
51
50
  - lib/alula/plugins/lightbox.rb
52
51
  - lib/alula/plugins/version.rb
53
52
  - plugins/.DS_Store
@@ -72,9 +71,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
72
71
  required_rubygems_version: !ruby/object:Gem::Requirement
73
72
  none: false
74
73
  requirements:
75
- - - ! '>'
74
+ - - ! '>='
76
75
  - !ruby/object:Gem::Version
77
- version: 1.3.1
76
+ version: '0'
78
77
  requirements: []
79
78
  rubyforge_project:
80
79
  rubygems_version: 1.8.17
data/lib/alula/plugins.rb DELETED
@@ -1,7 +0,0 @@
1
- require "alula/plugins/version"
2
-
3
- module Alula
4
- module Plugins
5
- # Your code goes here...
6
- end
7
- end