octopress-ink 1.0.0.alpha.37 → 1.0.0.alpha.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63076c5c71344a52fe0542b959d1bd4221be9a88
|
4
|
+
data.tar.gz: 341926b7f002a70c5508f24c71596efb01ec6f8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 166d18bd6a83d26a7efe41d16dd66cfda145c0fbe37da8849964bcef2eeaede2a04f6658ad198d1c0b1b17a1046208d859cbd934b7caf7f29a5933e7dd367b39
|
7
|
+
data.tar.gz: d5d99d6c59247f25b19ef826d2131bf648f73f9843241657565fcd9cfe6929bee3ce421480b51861bd6a1193c6f356f98f736b4509b921b09512cbc2149f100e
|
data/lib/octopress-ink.rb
CHANGED
@@ -133,6 +133,22 @@ module Octopress
|
|
133
133
|
puts "You have no plugins installed."
|
134
134
|
end
|
135
135
|
end
|
136
|
+
|
137
|
+
def self.copy_doc(source, dest)
|
138
|
+
contents = File.open(source).read
|
139
|
+
contents.sub!(/^# (.*)$/, "#{title('\1').strip}")
|
140
|
+
FileUtils.mkdir_p File.dirname(dest)
|
141
|
+
File.open(dest, 'w') {|f| f.write(contents) }
|
142
|
+
puts "Updated #{dest} from #{source}"
|
143
|
+
end
|
144
|
+
|
145
|
+
def sefl.doc_title(input)
|
146
|
+
<<-YAML
|
147
|
+
---
|
148
|
+
title: "#{input.strip}"
|
149
|
+
---
|
150
|
+
YAML
|
151
|
+
end
|
136
152
|
end
|
137
153
|
end
|
138
154
|
|
@@ -20,14 +20,15 @@ class String
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def smart_capitalize
|
23
|
+
target = dup
|
23
24
|
# ignore any leading crazy characters and capitalize the first real character
|
24
|
-
if
|
25
|
+
if target =~ /^['"\(\[']*([a-z])/
|
25
26
|
i = index($1)
|
26
|
-
x =
|
27
|
+
x = target[i,target.length]
|
27
28
|
# word with capitals and periods mid-word are left alone
|
28
|
-
|
29
|
+
target[i,1] = target[i,1].upcase unless x =~ /[A-Z]/ or x =~ /\.\w+/
|
29
30
|
end
|
30
|
-
|
31
|
+
target
|
31
32
|
end
|
32
33
|
|
33
34
|
def smart_capitalize!
|
@@ -6,7 +6,7 @@ class Ink < Octopress::Ink::Plugin
|
|
6
6
|
assets_path: File.expand_path(File.join(File.dirname(__FILE__), '../../../assets')),
|
7
7
|
version: Octopress::Ink::VERSION,
|
8
8
|
description: "Octopress Ink is a plugin framework for Jekyll",
|
9
|
-
website: "http://octopress.org/ink"
|
9
|
+
website: "http://octopress.org/docs/ink"
|
10
10
|
}
|
11
11
|
end
|
12
12
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopress-ink
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.alpha.
|
4
|
+
version: 1.0.0.alpha.38
|
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-03-
|
11
|
+
date: 2014-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|