jekyll-ultraviolet 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'http://rubygems.org'
2
+ gemspec
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
@@ -0,0 +1,16 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/jekyll/ultraviolet/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["Matte Noble"]
6
+ gem.email = ["me@mattenoble.com"]
7
+ gem.description = %q{Ultraviolet syntax highlighting in Jekyll}
8
+ gem.summary = %q{Ultraviolet syntax highlighting in Jekyll}
9
+
10
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
11
+ gem.files = `git ls-files`.split("\n")
12
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
13
+ gem.name = "jekyll-ultraviolet"
14
+ gem.require_paths = ["lib"]
15
+ gem.version = Jekyll::Ultraviolet::VERSION
16
+ end
@@ -0,0 +1,5 @@
1
+ module Jekyll
2
+ module Ultraviolet
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,33 @@
1
+ require 'uv'
2
+
3
+ module Jekyll
4
+ module Ultraviolet
5
+ class << self; attr_accessor :theme; end
6
+
7
+ def self.initialize
8
+ @theme = "twilight"
9
+ end
10
+
11
+ class Block < Liquid::Block
12
+ include Liquid::StandardFilters
13
+
14
+ def initialize(tag, lang, tokens)
15
+ super
16
+ @lang = (lang.strip unless lang.empty?) || "ruby"
17
+ end
18
+
19
+ def render(context)
20
+ output = []
21
+ output << context["pygments_prefix"]
22
+ output << Uv.parse(super.join, "xhtml", @lang, false, Ultraviolet.theme)
23
+ output << context["pygments_suffix"]
24
+ output.join
25
+ rescue LoadError
26
+ raise "Ultraviolet not installed."
27
+ end
28
+ end
29
+ end
30
+ end
31
+
32
+ Liquid::Template.register_tag('uv', Jekyll::Ultraviolet::Block)
33
+
metadata ADDED
@@ -0,0 +1,51 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-ultraviolet
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Matte Noble
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-08-20 00:00:00.000000000Z
13
+ dependencies: []
14
+ description: Ultraviolet syntax highlighting in Jekyll
15
+ email:
16
+ - me@mattenoble.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - .gitignore
22
+ - Gemfile
23
+ - Rakefile
24
+ - jekyll-ultraviolet.gemspec
25
+ - lib/jekyll/ultraviolet.rb
26
+ - lib/jekyll/ultraviolet/version.rb
27
+ homepage:
28
+ licenses: []
29
+ post_install_message:
30
+ rdoc_options: []
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ requirements: []
46
+ rubyforge_project:
47
+ rubygems_version: 1.8.6
48
+ signing_key:
49
+ specification_version: 3
50
+ summary: Ultraviolet syntax highlighting in Jekyll
51
+ test_files: []