middleman-slim 0.0.3 → 0.1.0
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 +8 -0
- data/Gemfile +15 -1
- data/README.md +6 -0
- data/features/cli_init.feature +28 -0
- data/features/support/env.rb +8 -0
- data/lib/middleman-slim/template.rb +2 -2
- data/lib/middleman-slim/version.rb +1 -1
- metadata +16 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cae0b8068af3704304534085541da6cca7b2d21
|
4
|
+
data.tar.gz: 30186415af1cb64ef9a9af89cefc8a8e7768b7fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d05ae6054595a9386b710b8f88b5eb2b9e03d0f110b876bcdf605061eeba1721ef32fd8d1261eb425cd8e32af687d5ea8c42fb5580d0ba2202c0389ac52cdea
|
7
|
+
data.tar.gz: 1935e8cacdd8948520c9bcfdaf4e44ea35dfac92df82ad0cce457e62984dc24e896bc42ea69b10321646bd2a678225c7fb8592cef79576da240944c8176f6025
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
@@ -1,4 +1,18 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
gemspec
|
4
|
-
gem "slim", "~>
|
4
|
+
gem "slim", "~> 2.0.0"
|
5
|
+
|
6
|
+
group :test do
|
7
|
+
gem "rake", "~> 10.0.3", :require => false
|
8
|
+
|
9
|
+
# Add libraries
|
10
|
+
gem 'sass'
|
11
|
+
gem 'compass'
|
12
|
+
|
13
|
+
# Test tools
|
14
|
+
gem "cucumber", "~> 1.3.1"
|
15
|
+
gem "fivemat"
|
16
|
+
gem "aruba", "~> 0.5.1"
|
17
|
+
gem "simplecov"
|
18
|
+
end
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# middleman-slim
|
2
2
|
|
3
|
+
[][gem]
|
4
|
+
[][travis]
|
5
|
+
|
3
6
|
middleman-slim is an extension for the Middleman static site generator that adds support for Slim.
|
4
7
|
|
5
8
|
## Installation
|
@@ -21,3 +24,6 @@ middleman-slim is an extension for the Middleman static site generator that adds
|
|
21
24
|
## License
|
22
25
|
|
23
26
|
Released under the MIT License.
|
27
|
+
|
28
|
+
[gem]: https://rubygems.org/gems/middleman-slim
|
29
|
+
[travis]: http://travis-ci.org/yterajima/middleman-slim
|
@@ -0,0 +1,28 @@
|
|
1
|
+
Feature: Middleman-Slim CLI
|
2
|
+
|
3
|
+
Scenario: Create a new project
|
4
|
+
Given I run `middleman init MY_PROJECT --template slim`
|
5
|
+
Then the exit status should be 0
|
6
|
+
When I cd to "MY_PROJECT"
|
7
|
+
Then the following files should exist:
|
8
|
+
| Gemfile |
|
9
|
+
| .gitignore |
|
10
|
+
| config.rb |
|
11
|
+
| source/index.html.slim |
|
12
|
+
| source/images/background.png |
|
13
|
+
| source/images/middleman.png |
|
14
|
+
| source/layouts/layout.slim |
|
15
|
+
| source/javascripts/all.js |
|
16
|
+
| source/stylesheets/all.css |
|
17
|
+
| source/stylesheets/normalize.css |
|
18
|
+
|
19
|
+
Scenario: Create a new project with --images-dir option
|
20
|
+
Given I run `middleman init MY_PROJECT --template slim --images-dir img`
|
21
|
+
Then the exit status should be 0
|
22
|
+
When I cd to "MY_PROJECT"
|
23
|
+
Then the following files should exist:
|
24
|
+
| source/img/background.png |
|
25
|
+
| source/img/middleman.png |
|
26
|
+
| source/stylesheets/all.css |
|
27
|
+
And the file "source/stylesheets/all.css" should contain "../img/"
|
28
|
+
And the file "source/stylesheets/all.css" should not contain "../IMG_DIR/"
|
@@ -27,6 +27,7 @@ module Middleman
|
|
27
27
|
empty_directory File.join(location, 'source', options[:css_dir])
|
28
28
|
copy_file 'source/stylesheets/all.css', File.join(location, 'source', options[:css_dir], 'all.css')
|
29
29
|
copy_file 'source/stylesheets/normalize.css', File.join(location, 'source', options[:css_dir], 'normalize.css')
|
30
|
+
replace_images_dir
|
30
31
|
|
31
32
|
empty_directory File.join(location, 'source', options[:js_dir])
|
32
33
|
copy_file 'source/javascripts/all.js', File.join(location, 'source', options[:js_dir], 'all.js')
|
@@ -34,11 +35,10 @@ module Middleman
|
|
34
35
|
empty_directory File.join(location, 'source', options[:images_dir])
|
35
36
|
copy_file 'source/images/background.png', File.join(location, 'source', options[:images_dir], 'background.png')
|
36
37
|
copy_file 'source/images/middleman.png', File.join(location, 'source', options[:images_dir], 'middleman.png')
|
37
|
-
replace_css_img_dir
|
38
38
|
end
|
39
39
|
|
40
40
|
private
|
41
|
-
def
|
41
|
+
def replace_images_dir
|
42
42
|
f = File.open(File.join(location, 'source', options[:css_dir], 'all.css'), 'r')
|
43
43
|
buf = f.read
|
44
44
|
buf.gsub!(/IMG_DIR/, options[:images_dir])
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-slim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yterajima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slim
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 2.0.0
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: middleman-core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 3.1.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 3.1.0
|
41
41
|
description: A Middleman template using Slim. You can use Slim as easy in Middleman
|
@@ -46,11 +46,14 @@ executables: []
|
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
-
- .gitignore
|
49
|
+
- ".gitignore"
|
50
|
+
- ".travis.yml"
|
50
51
|
- Gemfile
|
51
52
|
- LICENSE.txt
|
52
53
|
- README.md
|
53
54
|
- Rakefile
|
55
|
+
- features/cli_init.feature
|
56
|
+
- features/support/env.rb
|
54
57
|
- lib/middleman-slim.rb
|
55
58
|
- lib/middleman-slim/template.rb
|
56
59
|
- lib/middleman-slim/template/shared/Gemfile.tt
|
@@ -79,18 +82,20 @@ require_paths:
|
|
79
82
|
- lib
|
80
83
|
required_ruby_version: !ruby/object:Gem::Requirement
|
81
84
|
requirements:
|
82
|
-
- -
|
85
|
+
- - ">="
|
83
86
|
- !ruby/object:Gem::Version
|
84
87
|
version: '0'
|
85
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
89
|
requirements:
|
87
|
-
- -
|
90
|
+
- - ">="
|
88
91
|
- !ruby/object:Gem::Version
|
89
92
|
version: '0'
|
90
93
|
requirements: []
|
91
94
|
rubyforge_project:
|
92
|
-
rubygems_version: 2.0.
|
95
|
+
rubygems_version: 2.0.3
|
93
96
|
signing_key:
|
94
97
|
specification_version: 4
|
95
98
|
summary: A Middleman template using Slim.
|
96
|
-
test_files:
|
99
|
+
test_files:
|
100
|
+
- features/cli_init.feature
|
101
|
+
- features/support/env.rb
|