octopress-ink 1.0.0.rc.3 → 1.0.0.rc.5
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 +4 -4
- data/CHANGELOG.md +11 -2
- data/lib/octopress-ink.rb +13 -0
- data/lib/octopress-ink/assets/asset.rb +4 -4
- data/lib/octopress-ink/assets/page.rb +9 -3
- data/lib/octopress-ink/commands/new.rb +42 -5
- data/lib/octopress-ink/jekyll/page.rb +11 -5
- data/lib/octopress-ink/plugin.rb +3 -0
- data/lib/octopress-ink/version.rb +1 -1
- data/test/test-plugin-expected/.gitignore +22 -0
- data/test/test-plugin-expected/Gemfile +4 -0
- data/test/test-plugin-expected/LICENSE.txt +22 -0
- data/test/test-plugin-expected/README.md +29 -0
- data/test/test-plugin-expected/Rakefile +2 -0
- data/test/test-plugin-expected/assets/config.yml +4 -0
- data/test/test-plugin-expected/demo/Gemfile +6 -0
- data/test/test-plugin-expected/demo/_config.yml +2 -0
- data/test/test-plugin-expected/demo/index.html +0 -0
- data/test/test-plugin-expected/lib/test-plugin.rb +12 -0
- data/test/test-plugin-expected/lib/test-plugin/version.rb +3 -0
- data/test/test-plugin-expected/test-plugin.gemspec +26 -0
- data/test/test-theme-expected/.gitignore +22 -0
- data/test/test-theme-expected/Gemfile +4 -0
- data/test/test-theme-expected/LICENSE.txt +22 -0
- data/test/test-theme-expected/README.md +29 -0
- data/test/test-theme-expected/Rakefile +2 -0
- data/test/test-theme-expected/assets/config.yml +4 -0
- data/test/test-theme-expected/demo/Gemfile +6 -0
- data/test/test-theme-expected/demo/_config.yml +2 -0
- data/test/test-theme-expected/demo/index.html +0 -0
- data/test/test-theme-expected/lib/test-theme.rb +12 -0
- data/test/test-theme-expected/lib/test-theme/version.rb +3 -0
- data/test/test-theme-expected/test-theme.gemspec +26 -0
- data/test/test.rb +38 -0
- data/test/test_suite.rb +1 -1
- metadata +50 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 929a480cd5c29286e1e9d27ac281ce9f78352205
|
4
|
+
data.tar.gz: d946b8c7b9154c3b1c8c264ff0fadda79bcfaaf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 412911ec07bbcd3deb32b4927d02e099e5720d3e87a2b540fa19e1fb35fb8790232d1dcee09c8c8c3b9d0fa38a38dff7b643a81abe91ada2dc53b2459bc22e16
|
7
|
+
data.tar.gz: 266037047141b44054ce6cb560920ce4283b41d553bc56fb8f1678ead45efa140f5becf4264f6e85be5a44eef7af4af75db91a715b0d13c1d10e1dee01c01c63
|
data/CHANGELOG.md
CHANGED
@@ -2,12 +2,21 @@
|
|
2
2
|
|
3
3
|
## Current released version
|
4
4
|
|
5
|
-
### 1.0.0
|
5
|
+
### 1.0.0 RC5 - 2014-06-06
|
6
6
|
|
7
|
-
-
|
7
|
+
- New: site.linkposts loops through linkposts
|
8
|
+
- New: site.articles loops through non-linkpost articles
|
8
9
|
|
9
10
|
## Past versions
|
10
11
|
|
12
|
+
### 1.0.0 RC4 - 2014-05-28
|
13
|
+
|
14
|
+
- Improved: Plugin scaffold does a better job of handling gem names with dashes.
|
15
|
+
|
16
|
+
### 1.0.0 RC3 - 2014-05-27
|
17
|
+
|
18
|
+
- Improved: Now copy and list commands use the flag --config-file instead of --defaults
|
19
|
+
|
11
20
|
### 1.0.0 RC2 - 2014-05-26
|
12
21
|
|
13
22
|
- Fixed: Post and Page data is appended to at read time.
|
data/lib/octopress-ink.rb
CHANGED
@@ -68,6 +68,11 @@ module Octopress
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def self.site=(site)
|
71
|
+
# Octopress historically used site.title
|
72
|
+
# This allows theme developers to expect site.name
|
73
|
+
# in consistancy with Jekyll's scaffold config
|
74
|
+
site.config['name'] ||= site.config['title']
|
75
|
+
|
71
76
|
@site = site
|
72
77
|
end
|
73
78
|
|
@@ -81,6 +86,14 @@ module Octopress
|
|
81
86
|
payload['doc_pages'] = Octopress::Ink::Plugins.doc_pages
|
82
87
|
end
|
83
88
|
|
89
|
+
payload['site']['linkposts'] = site.posts.collect do |p|
|
90
|
+
p.data['linkpost']
|
91
|
+
end
|
92
|
+
|
93
|
+
payload['site']['articles'] = site.posts.reject do |p|
|
94
|
+
p.data['linkpost']
|
95
|
+
end
|
96
|
+
|
84
97
|
payload
|
85
98
|
end
|
86
99
|
|
@@ -90,6 +90,10 @@ module Octopress
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
+
def destination
|
94
|
+
File.join(dir, file)
|
95
|
+
end
|
96
|
+
|
93
97
|
private
|
94
98
|
|
95
99
|
def source_dir
|
@@ -100,10 +104,6 @@ module Octopress
|
|
100
104
|
end
|
101
105
|
end
|
102
106
|
|
103
|
-
def destination
|
104
|
-
File.join(dir, file)
|
105
|
-
end
|
106
|
-
|
107
107
|
# Render file through Liquid if it contains YAML front-matter
|
108
108
|
#
|
109
109
|
def render
|
@@ -26,6 +26,15 @@ module Octopress
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
def page
|
30
|
+
@page ||= Page.new(Ink.site, source_dir, page_dir, file, plugin.config)
|
31
|
+
end
|
32
|
+
|
33
|
+
def info
|
34
|
+
message = super
|
35
|
+
message.ljust(25) + url_info
|
36
|
+
end
|
37
|
+
|
29
38
|
private
|
30
39
|
|
31
40
|
def page_dir
|
@@ -44,9 +53,6 @@ module Octopress
|
|
44
53
|
File.join Ink.site.source, Plugins.custom_dir, plugin.slug, base
|
45
54
|
end
|
46
55
|
|
47
|
-
def page
|
48
|
-
@page ||= Page.new(Ink.site, source_dir, page_dir, file, plugin.config)
|
49
|
-
end
|
50
56
|
end
|
51
57
|
end
|
52
58
|
end
|
@@ -35,7 +35,10 @@ module Octopress
|
|
35
35
|
end
|
36
36
|
|
37
37
|
FileUtils.cd path do
|
38
|
-
|
38
|
+
name = gem_name.gsub(/-/,'_')
|
39
|
+
create_gem(name)
|
40
|
+
|
41
|
+
fix_name(path) if name != gem_name
|
39
42
|
|
40
43
|
@settings = gem_settings(path_to_gem)
|
41
44
|
@settings[:type] = @options['theme'] ? 'theme' : 'plugin'
|
@@ -47,6 +50,40 @@ module Octopress
|
|
47
50
|
end
|
48
51
|
end
|
49
52
|
|
53
|
+
def self.fix_name(path)
|
54
|
+
name = @options['name'].gsub(/-/,'_')
|
55
|
+
path = rename(path, name)
|
56
|
+
|
57
|
+
rename(path, "lib/#{name}")
|
58
|
+
|
59
|
+
gemspec = rename(path, "#{name}.gemspec")
|
60
|
+
gem_file = rename(path, "lib/#{name}.rb")
|
61
|
+
|
62
|
+
rewrite_name(gemspec, name)
|
63
|
+
rewrite_name(gem_file, name)
|
64
|
+
rewrite_name(File.join(path, 'README.md'), name)
|
65
|
+
rewrite_name(File.join(path, 'Gemfile'), name)
|
66
|
+
|
67
|
+
action = "rename".rjust(12).green.bold
|
68
|
+
puts "#{action} #{name} to #{@options['name']}"
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.rewrite_name(path, name)
|
72
|
+
new_name = name.gsub(/_/, '-')
|
73
|
+
content = File.read(path).gsub(name, new_name)
|
74
|
+
|
75
|
+
File.open(path, 'w+') do |f|
|
76
|
+
f.write(content)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.rename(path, target)
|
81
|
+
old = File.join(path, target)
|
82
|
+
new = File.join(path, target.gsub(/_/, '-'))
|
83
|
+
FileUtils.mv(old, new)
|
84
|
+
new
|
85
|
+
end
|
86
|
+
|
50
87
|
# Create a new gem with Bundle's gem command
|
51
88
|
#
|
52
89
|
def self.create_gem(name)
|
@@ -122,7 +159,7 @@ module Octopress
|
|
122
159
|
|
123
160
|
config = <<-HERE
|
124
161
|
name: "#{@settings[:module_name]}",
|
125
|
-
slug: "#{@settings[:name]}",
|
162
|
+
slug: "#{@settings[:type] == 'theme' ? 'theme' : @settings[:name]}",
|
126
163
|
assets_path: File.expand_path(File.join(File.dirname(__FILE__), "#{assets_path}")),
|
127
164
|
type: "#{@settings[:type]}",
|
128
165
|
version: #{@settings[:version]},
|
@@ -146,7 +183,7 @@ website: ""
|
|
146
183
|
index = File.join(demo_dir, 'index.html')
|
147
184
|
action = File.exist?(index) ? "exists".rjust(12).blue.bold : "create".rjust(12).green.bold
|
148
185
|
FileUtils.touch index
|
149
|
-
puts "#{action} #{index}"
|
186
|
+
puts "#{action} #{index.sub("#{Dir.pwd}/", '')}"
|
150
187
|
|
151
188
|
gemfile_path = File.join(demo_dir, 'Gemfile')
|
152
189
|
gemfile_content = <<-HERE
|
@@ -172,7 +209,7 @@ end
|
|
172
209
|
File.open(path, 'w+') do |f|
|
173
210
|
f.write(contents)
|
174
211
|
end
|
175
|
-
puts "#{action} #{path}"
|
212
|
+
puts "#{action} #{path.sub("#{Dir.pwd}/", '')}"
|
176
213
|
end
|
177
214
|
|
178
215
|
def self.create_empty_dirs(dirs)
|
@@ -180,7 +217,7 @@ end
|
|
180
217
|
dir = File.join(d)
|
181
218
|
action = Dir.exist?(dir) ? "exists".rjust(12).blue.bold : "create".rjust(12).green.bold
|
182
219
|
FileUtils.mkdir_p dir
|
183
|
-
puts "#{action} #{dir}/"
|
220
|
+
puts "#{action} #{dir.sub("#{Dir.pwd}/", '')}/"
|
184
221
|
end
|
185
222
|
end
|
186
223
|
|
@@ -2,7 +2,7 @@ module Octopress
|
|
2
2
|
module Ink
|
3
3
|
class Page < Jekyll::Page
|
4
4
|
|
5
|
-
#
|
5
|
+
# Purpose: Configs can override a page's permalink
|
6
6
|
#
|
7
7
|
# url - Path relative to destination directory.
|
8
8
|
# examples:
|
@@ -15,10 +15,13 @@ module Octopress
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def destination(dest)
|
18
|
-
|
19
|
-
|
18
|
+
unless @dest
|
19
|
+
if @config['path']
|
20
|
+
dest = File.join(dest, @config['path'])
|
21
|
+
end
|
22
|
+
@dest = File.join(dest, self.url)
|
20
23
|
end
|
21
|
-
|
24
|
+
@dest
|
22
25
|
end
|
23
26
|
|
24
27
|
# Allow pages to read url from plugin configuration
|
@@ -28,7 +31,10 @@ module Octopress
|
|
28
31
|
@url
|
29
32
|
else
|
30
33
|
begin
|
31
|
-
|
34
|
+
|
35
|
+
page_name = File.basename(self.name, '.*')
|
36
|
+
config = @config['permalinks'][page_name]
|
37
|
+
|
32
38
|
if config.is_a? String
|
33
39
|
@url = config
|
34
40
|
self.data['permalink'] = nil
|
data/lib/octopress-ink/plugin.rb
CHANGED
@@ -230,6 +230,9 @@ module Octopress
|
|
230
230
|
next if assets.compact.size == 0
|
231
231
|
|
232
232
|
case name
|
233
|
+
when 'pages'
|
234
|
+
header = "pages:".ljust(36) + "urls"
|
235
|
+
message += asset_list(assets, header)
|
233
236
|
when 'docs'
|
234
237
|
header = "documentation: /#{docs_base_path}/"
|
235
238
|
message += asset_list(assets, header)
|
@@ -0,0 +1,22 @@
|
|
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
|
18
|
+
*.bundle
|
19
|
+
*.so
|
20
|
+
*.o
|
21
|
+
*.a
|
22
|
+
mkmf.log
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 TODO: Write your name
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# TestPlugin
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'test-plugin'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install test-plugin
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it ( https://github.com/[my-github-username]/test-plugin/fork )
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create a new Pull Request
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'test-plugin/version'
|
2
|
+
require 'octopress-ink'
|
3
|
+
|
4
|
+
Octopress::Ink.add_plugin({
|
5
|
+
name: "Test Plugin",
|
6
|
+
slug: "test-plugin",
|
7
|
+
assets_path: File.expand_path(File.join(File.dirname(__FILE__), "../assets")),
|
8
|
+
type: "plugin",
|
9
|
+
version: TestPlugin::VERSION,
|
10
|
+
description: "",
|
11
|
+
website: ""
|
12
|
+
})
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'test-plugin/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "test-plugin"
|
8
|
+
spec.version = TestPlugin::VERSION
|
9
|
+
spec.authors = ["TODO: Write your name"]
|
10
|
+
spec.email = ["TODO: Write your email address"]
|
11
|
+
spec.summary = %q{TODO: Write a short summary. Required.}
|
12
|
+
spec.description = %q{TODO: Write a longer description. Optional.}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "octopress"
|
24
|
+
|
25
|
+
spec.add_runtime_dependency "octopress-ink", "~> 1.0", ">= 1.0.0.rc.4"
|
26
|
+
end
|
@@ -0,0 +1,22 @@
|
|
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
|
18
|
+
*.bundle
|
19
|
+
*.so
|
20
|
+
*.o
|
21
|
+
*.a
|
22
|
+
mkmf.log
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 TODO: Write your name
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# TestTheme
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'test-theme'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install test-theme
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it ( https://github.com/[my-github-username]/test-theme/fork )
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create a new Pull Request
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'test-theme/version'
|
2
|
+
require 'octopress-ink'
|
3
|
+
|
4
|
+
Octopress::Ink.add_plugin({
|
5
|
+
name: "Test Theme",
|
6
|
+
slug: "theme",
|
7
|
+
assets_path: File.expand_path(File.join(File.dirname(__FILE__), "../assets")),
|
8
|
+
type: "theme",
|
9
|
+
version: TestTheme::VERSION,
|
10
|
+
description: "",
|
11
|
+
website: ""
|
12
|
+
})
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'test-theme/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "test-theme"
|
8
|
+
spec.version = TestTheme::VERSION
|
9
|
+
spec.authors = ["TODO: Write your name"]
|
10
|
+
spec.email = ["TODO: Write your email address"]
|
11
|
+
spec.summary = %q{TODO: Write a short summary. Required.}
|
12
|
+
spec.description = %q{TODO: Write a longer description. Optional.}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "octopress"
|
24
|
+
|
25
|
+
spec.add_runtime_dependency "octopress-ink", "~> 1.0", ">= 1.0.0.rc.4"
|
26
|
+
end
|
data/test/test.rb
CHANGED
@@ -2,6 +2,8 @@ require './test_suite'
|
|
2
2
|
ENV['JEKYLL_ENV'] = 'test'
|
3
3
|
|
4
4
|
@failures = []
|
5
|
+
@git_user_name = `git config user.name`.chomp
|
6
|
+
@git_user_email = `git config user.email`.chomp
|
5
7
|
|
6
8
|
build
|
7
9
|
|
@@ -69,4 +71,40 @@ test_cmd({
|
|
69
71
|
test_dirs('Copy theme', 'source/_copy', 'copy_layouts_pages/_copy')
|
70
72
|
`rm -rf source/_copy`
|
71
73
|
|
74
|
+
`git config user.name ''`
|
75
|
+
`git config user.email ''`
|
76
|
+
|
77
|
+
test_cmd({
|
78
|
+
desc: 'New plugin',
|
79
|
+
cmd: [
|
80
|
+
'octopress ink new test-plugin',
|
81
|
+
'rm -rf test-plugin/.git'
|
82
|
+
]
|
83
|
+
})
|
84
|
+
|
85
|
+
`git config user.name "#{@git_user_name}"`
|
86
|
+
`git config user.email #{@git_user_email}`
|
87
|
+
|
88
|
+
test_dirs('New plugin', 'test-plugin', 'test-plugin-expected')
|
89
|
+
|
90
|
+
`rm -rf test-plugin`
|
91
|
+
|
92
|
+
`git config user.name ''`
|
93
|
+
`git config user.email ''`
|
94
|
+
|
95
|
+
test_cmd({
|
96
|
+
desc: 'New Theme',
|
97
|
+
cmd: [
|
98
|
+
'octopress ink new test-theme --theme',
|
99
|
+
'rm -rf test-theme/.git'
|
100
|
+
]
|
101
|
+
})
|
102
|
+
|
103
|
+
`git config user.name "#{@git_user_name}"`
|
104
|
+
`git config user.email #{@git_user_email}`
|
105
|
+
|
106
|
+
test_dirs('New plugin', 'test-theme', 'test-theme-expected')
|
107
|
+
|
108
|
+
`rm -rf test-theme`
|
109
|
+
|
72
110
|
print_results
|
data/test/test_suite.rb
CHANGED
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.rc.
|
4
|
+
version: 1.0.0.rc.5
|
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-
|
11
|
+
date: 2014-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -340,6 +340,30 @@ files:
|
|
340
340
|
- test/source/test_tags/render.html
|
341
341
|
- test/source/test_tags/return.html
|
342
342
|
- test/source/test_tags/wrap.html
|
343
|
+
- test/test-plugin-expected/.gitignore
|
344
|
+
- test/test-plugin-expected/Gemfile
|
345
|
+
- test/test-plugin-expected/LICENSE.txt
|
346
|
+
- test/test-plugin-expected/README.md
|
347
|
+
- test/test-plugin-expected/Rakefile
|
348
|
+
- test/test-plugin-expected/assets/config.yml
|
349
|
+
- test/test-plugin-expected/demo/Gemfile
|
350
|
+
- test/test-plugin-expected/demo/_config.yml
|
351
|
+
- test/test-plugin-expected/demo/index.html
|
352
|
+
- test/test-plugin-expected/lib/test-plugin.rb
|
353
|
+
- test/test-plugin-expected/lib/test-plugin/version.rb
|
354
|
+
- test/test-plugin-expected/test-plugin.gemspec
|
355
|
+
- test/test-theme-expected/.gitignore
|
356
|
+
- test/test-theme-expected/Gemfile
|
357
|
+
- test/test-theme-expected/LICENSE.txt
|
358
|
+
- test/test-theme-expected/README.md
|
359
|
+
- test/test-theme-expected/Rakefile
|
360
|
+
- test/test-theme-expected/assets/config.yml
|
361
|
+
- test/test-theme-expected/demo/Gemfile
|
362
|
+
- test/test-theme-expected/demo/_config.yml
|
363
|
+
- test/test-theme-expected/demo/index.html
|
364
|
+
- test/test-theme-expected/lib/test-theme.rb
|
365
|
+
- test/test-theme-expected/lib/test-theme/version.rb
|
366
|
+
- test/test-theme-expected/test-theme.gemspec
|
343
367
|
- test/test.rb
|
344
368
|
- test/test_suite.rb
|
345
369
|
- test/uglify_js_false/javascripts/all-.js
|
@@ -523,6 +547,30 @@ test_files:
|
|
523
547
|
- test/source/test_tags/render.html
|
524
548
|
- test/source/test_tags/return.html
|
525
549
|
- test/source/test_tags/wrap.html
|
550
|
+
- test/test-plugin-expected/.gitignore
|
551
|
+
- test/test-plugin-expected/Gemfile
|
552
|
+
- test/test-plugin-expected/LICENSE.txt
|
553
|
+
- test/test-plugin-expected/README.md
|
554
|
+
- test/test-plugin-expected/Rakefile
|
555
|
+
- test/test-plugin-expected/assets/config.yml
|
556
|
+
- test/test-plugin-expected/demo/Gemfile
|
557
|
+
- test/test-plugin-expected/demo/_config.yml
|
558
|
+
- test/test-plugin-expected/demo/index.html
|
559
|
+
- test/test-plugin-expected/lib/test-plugin.rb
|
560
|
+
- test/test-plugin-expected/lib/test-plugin/version.rb
|
561
|
+
- test/test-plugin-expected/test-plugin.gemspec
|
562
|
+
- test/test-theme-expected/.gitignore
|
563
|
+
- test/test-theme-expected/Gemfile
|
564
|
+
- test/test-theme-expected/LICENSE.txt
|
565
|
+
- test/test-theme-expected/README.md
|
566
|
+
- test/test-theme-expected/Rakefile
|
567
|
+
- test/test-theme-expected/assets/config.yml
|
568
|
+
- test/test-theme-expected/demo/Gemfile
|
569
|
+
- test/test-theme-expected/demo/_config.yml
|
570
|
+
- test/test-theme-expected/demo/index.html
|
571
|
+
- test/test-theme-expected/lib/test-theme.rb
|
572
|
+
- test/test-theme-expected/lib/test-theme/version.rb
|
573
|
+
- test/test-theme-expected/test-theme.gemspec
|
526
574
|
- test/test.rb
|
527
575
|
- test/test_suite.rb
|
528
576
|
- test/uglify_js_false/javascripts/all-.js
|