octopress-gist 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +7 -13
- data/lib/octopress-gist/gist.rb +4 -1
- data/lib/octopress-gist/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd1d986d4c889fa5a136a6be849e0b2eacf1bcc4
|
4
|
+
data.tar.gz: 50105a1ef7fd7a1eea181d359758fd61b5fe4964
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec48ecf66ada84a8d7f90993c13d6ea2bd49d797c0e0f9c7b3d9c3459b909f932be02e8f9f4221eed447767342cb3c25b23e30ff7ff1e616876175af25e8ea29
|
7
|
+
data.tar.gz: 1b4624c2e6040d2948c9de4b96cc6ad4aaf4f208ba852c23e81ab249e85a322cc4518d0f984c736530a3572f1a4ad7689ee2c00d93d507e7b0f78525b10c0fbc
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,33 +2,27 @@
|
|
2
2
|
|
3
3
|
Embed GitHub Gists in your Jekyll or Octopress blog.
|
4
4
|
|
5
|
-
[![Build Status](https://travis-ci.org/octopress/
|
5
|
+
[![Build Status](https://travis-ci.org/octopress/gist.png?branch=master)](https://travis-ci.org/octopress/gist)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
Add this line to your application's Gemfile
|
10
|
-
the :jekyll_plugins group:
|
9
|
+
Add this line to your application's Gemfile
|
11
10
|
|
12
11
|
```ruby
|
13
|
-
|
14
|
-
gem 'octopress-gist'
|
15
|
-
end
|
12
|
+
gem 'octopress-gist'
|
16
13
|
```
|
17
14
|
|
18
15
|
And then execute:
|
19
16
|
|
20
17
|
$ bundle
|
21
18
|
|
22
|
-
Next add
|
19
|
+
Next add the gem to your Jekyll's `gems` configuration.
|
23
20
|
|
24
|
-
```
|
25
|
-
|
26
|
-
|
27
|
-
Bundler.require(:jekyll_plugins)
|
21
|
+
```yaml
|
22
|
+
gems:
|
23
|
+
- octopress-gist
|
28
24
|
```
|
29
25
|
|
30
|
-
Or you can just create a ruby file in your Jekyll plugins directory with the line `require "octopress-gist"`
|
31
|
-
|
32
26
|
## Usage
|
33
27
|
|
34
28
|
The gist syntax looks like this.
|
data/lib/octopress-gist/gist.rb
CHANGED
@@ -43,7 +43,9 @@ module Octopress
|
|
43
43
|
begin
|
44
44
|
code = CodeHighlighter.select_lines(file['content'], opt)
|
45
45
|
code = CodeHighlighter.highlight(code, opt)
|
46
|
-
|
46
|
+
if page = context.registers[:page]
|
47
|
+
code = "<notextile>#{code}</notextile>" if page['path'] && page['path'].match(/textile/)
|
48
|
+
end
|
47
49
|
output << code
|
48
50
|
rescue => e
|
49
51
|
markup = "{% #{@tag_name} #{@markup.strip} %}"
|
@@ -88,6 +90,7 @@ module Octopress
|
|
88
90
|
retry
|
89
91
|
end
|
90
92
|
rescue => e
|
93
|
+
require 'pry-debugger'; binding.pry
|
91
94
|
puts "Failed to download Gist: #{gist}.".red
|
92
95
|
puts e.extend Error
|
93
96
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopress-gist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|