middleman-slim 0.1.1 → 0.1.2
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/.travis.yml +12 -5
- data/README.md +2 -2
- data/features/cli_init.feature +2 -1
- data/lib/middleman-slim/template.rb +12 -8
- data/lib/middleman-slim/template/shared/Gemfile.tt +3 -0
- data/lib/middleman-slim/template/shared/config.tt +5 -3
- data/lib/middleman-slim/template/source/stylesheets/all.css +2 -2
- data/lib/middleman-slim/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9797498ef1f23c32c3d8df898cf03a611ea76862
|
4
|
+
data.tar.gz: 4d919141b346d82a41dfad068f59a51b339360ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 069dd9c3eb47093af5567fa717073ec9c1a4435222480be7894124029662da035447359bbe4c4579d154bb9fbd58145a5968771e75883b1a9ffe2c07178ebc58
|
7
|
+
data.tar.gz: f698a14c36d8714e6bddff650db6a613cfc4989d3862d158aae9470f1805949d39483b8dd3245130c418494593c171b0a977c2e562907cef430991fa982ddc2d
|
data/.travis.yml
CHANGED
@@ -1,8 +1,15 @@
|
|
1
|
+
language: ruby
|
1
2
|
rvm:
|
2
|
-
-
|
3
|
+
- ruby-head
|
4
|
+
- 2.1.1
|
5
|
+
- 2.1.0
|
3
6
|
- 2.0.0
|
7
|
+
- 1.9.3
|
4
8
|
- jruby-19mode
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
+
matrix:
|
10
|
+
fast_finish: true
|
11
|
+
allow_failures:
|
12
|
+
- rvm: ruby-head
|
13
|
+
- rvm: jruby-19mode
|
14
|
+
script: bundle exec cucumber
|
15
|
+
env: TEST=true
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# middleman-slim
|
2
2
|
|
3
|
-
[][gem]
|
4
|
+
[][travis]
|
5
5
|
|
6
6
|
middleman-slim is an extension for the Middleman static site generator that adds support for Slim.
|
7
7
|
|
data/features/cli_init.feature
CHANGED
@@ -15,6 +15,7 @@ Feature: Middleman-Slim CLI
|
|
15
15
|
| source/javascripts/all.js |
|
16
16
|
| source/stylesheets/all.css |
|
17
17
|
| source/stylesheets/normalize.css |
|
18
|
+
And the file "source/stylesheets/all.css" should contain "../images/"
|
18
19
|
|
19
20
|
Scenario: Create a new project with --images-dir option
|
20
21
|
Given I run `middleman init MY_PROJECT --template slim --images-dir img`
|
@@ -25,4 +26,4 @@ Feature: Middleman-Slim CLI
|
|
25
26
|
| source/img/middleman.png |
|
26
27
|
| source/stylesheets/all.css |
|
27
28
|
And the file "source/stylesheets/all.css" should contain "../img/"
|
28
|
-
And the file "source/stylesheets/all.css" should not contain "../
|
29
|
+
And the file "source/stylesheets/all.css" should not contain "../images/"
|
@@ -39,14 +39,18 @@ module Middleman
|
|
39
39
|
|
40
40
|
private
|
41
41
|
def replace_images_dir
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
42
|
+
if options[:images_dir] == 'images'
|
43
|
+
return
|
44
|
+
end
|
45
|
+
|
46
|
+
open(File.join(location, 'source', options[:css_dir], 'all.css'), 'r+') {|f|
|
47
|
+
f.flock(File::LOCK_EX)
|
48
|
+
body = f.read
|
49
|
+
body = body.gsub(/images/, options[:images_dir])
|
50
|
+
f.rewind
|
51
|
+
f.puts body
|
52
|
+
f.truncate(f.tell)
|
53
|
+
}
|
50
54
|
end
|
51
55
|
end
|
52
56
|
end
|
@@ -24,7 +24,7 @@
|
|
24
24
|
# page "/admin/*"
|
25
25
|
# end
|
26
26
|
|
27
|
-
# Proxy pages (http://middlemanapp.com/dynamic-pages/)
|
27
|
+
# Proxy pages (http://middlemanapp.com/basics/dynamic-pages/)
|
28
28
|
# proxy "/this-page-has-no-template.html", "/template-file.html", :locals => {
|
29
29
|
# :which_fake_page => "Rendering a fake page with a local variable" }
|
30
30
|
|
@@ -36,7 +36,9 @@
|
|
36
36
|
# activate :automatic_image_sizes
|
37
37
|
|
38
38
|
# Reload the browser automatically whenever files change
|
39
|
-
#
|
39
|
+
# configure :development do
|
40
|
+
# activate :livereload
|
41
|
+
# end
|
40
42
|
|
41
43
|
# Methods defined in the helpers block are available in templates
|
42
44
|
# helpers do
|
@@ -86,5 +88,5 @@ configure :build do
|
|
86
88
|
# activate :relative_assets
|
87
89
|
|
88
90
|
# Or use a different image path
|
89
|
-
# set :
|
91
|
+
# set :http_prefix, "/Content/images/"
|
90
92
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
@charset "utf-8";
|
2
2
|
|
3
3
|
body {
|
4
|
-
background: #d4d4d4 url("../
|
4
|
+
background: #d4d4d4 url("../images/background.png");
|
5
5
|
text-align: center;
|
6
6
|
font-family: sans-serif; }
|
7
7
|
|
@@ -12,7 +12,7 @@ h1 {
|
|
12
12
|
letter-spacing: -1px;
|
13
13
|
text-transform: uppercase;
|
14
14
|
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
|
15
|
-
background: url("../
|
15
|
+
background: url("../images/middleman.png") no-repeat center 100px;
|
16
16
|
padding: 350px 0 10px;
|
17
17
|
margin: 0; }
|
18
18
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-slim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yterajima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slim
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
version: '0'
|
121
121
|
requirements: []
|
122
122
|
rubyforge_project:
|
123
|
-
rubygems_version: 2.
|
123
|
+
rubygems_version: 2.0.3
|
124
124
|
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: A Middleman template using Slim.
|