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: 1226eebcf70464a6a5f11e81f3ccb35d12c388c7
4
- data.tar.gz: 63696eb04d509a4c58f151efc79367d18f43285e
3
+ metadata.gz: 63076c5c71344a52fe0542b959d1bd4221be9a88
4
+ data.tar.gz: 341926b7f002a70c5508f24c71596efb01ec6f8c
5
5
  SHA512:
6
- metadata.gz: a5f58e9e24ae5e56927fc74d5a5fb3201445647d84c680a615a673ac423477983977f83f5b66f696822e0905222dbef20899417a7ba106a0f8ae9beffff97071
7
- data.tar.gz: 9bc459fc294e66fad9c5d9ed07d779c3e84c24c08b9566085938bf6b6a3e434fb63213096562c8e8d87b7fd366a03297eeff838e225c94dac7463fe2112ac2c0
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
 
@@ -24,7 +24,7 @@ module Octopress
24
24
  else
25
25
  file = '_octopress.yml'
26
26
  if File.exist? file
27
- YAML.safe_load(File.open(file))
27
+ YAML.safe_load(File.open(file).read || {})
28
28
  else
29
29
  {}
30
30
  end
@@ -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 self =~ /^['"\(\[']*([a-z])/
25
+ if target =~ /^['"\(\[']*([a-z])/
25
26
  i = index($1)
26
- x = self[i,self.length]
27
+ x = target[i,target.length]
27
28
  # word with capitals and periods mid-word are left alone
28
- self[i,1] = self[i,1].upcase unless x =~ /[A-Z]/ or x =~ /\.\w+/
29
+ target[i,1] = target[i,1].upcase unless x =~ /[A-Z]/ or x =~ /\.\w+/
29
30
  end
30
- self
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
 
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Ink
3
- VERSION = "1.0.0.alpha.37"
3
+ VERSION = "1.0.0.alpha.38"
4
4
  end
5
5
  end
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.37
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-13 00:00:00.000000000 Z
11
+ date: 2014-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll