middleman-slim 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a16deb4703b46e0154ed28496f0e613555c7f3cd
4
- data.tar.gz: d63292a7dc9e602f0542fa7bbcccb060149ce4e0
3
+ metadata.gz: 4cae0b8068af3704304534085541da6cca7b2d21
4
+ data.tar.gz: 30186415af1cb64ef9a9af89cefc8a8e7768b7fe
5
5
  SHA512:
6
- metadata.gz: 5b759234bd12b9866d779f9ba725e21c317ce56aad41ab8ca04a600fadfb8e040ea954d3ad0bbe33a5c81fd1f2c1e503a5d66bb9624c0044f9361eb9281bb3b3
7
- data.tar.gz: df35c1c66840c7dfe19d9300b173e93d8d51d401d72534d30f19f39e7d2dc068aee41083b1ac94a8e9cc7e8b119fa1db09f68d6a1591bce535ca616de12b8ecf
6
+ metadata.gz: 2d05ae6054595a9386b710b8f88b5eb2b9e03d0f110b876bcdf605061eeba1721ef32fd8d1261eb425cd8e32af687d5ea8c42fb5580d0ba2202c0389ac52cdea
7
+ data.tar.gz: 1935e8cacdd8948520c9bcfdaf4e44ea35dfac92df82ad0cce457e62984dc24e896bc42ea69b10321646bd2a678225c7fb8592cef79576da240944c8176f6025
data/.travis.yml ADDED
@@ -0,0 +1,8 @@
1
+ rvm:
2
+ - 1.9.3
3
+ - 2.0.0
4
+ - jruby-19mode
5
+
6
+ script: "bundle exec cucumber"
7
+
8
+ env: TEST=true TRAVIS=true
data/Gemfile CHANGED
@@ -1,4 +1,18 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
- gem "slim", "~> 1.3.6"
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 Version](https://badge.fury.io/rb/middleman-slim.png)][gem]
4
+ [![Build Status](https://travis-ci.org/yterajima/middleman-slim.png)][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/"
@@ -0,0 +1,8 @@
1
+ ENV["TEST"] = "true"
2
+ ENV["AUTOLOAD_SPROCKETS"] = "false"
3
+
4
+ require 'simplecov'
5
+ SimpleCov.root(File.expand_path(File.dirname(__FILE__) + '/../..'))
6
+
7
+ require 'middleman-core'
8
+ require 'middleman-core/step_definitions'
@@ -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 replace_css_img_dir
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])
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Slim
3
- VERSION = "0.0.3"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
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.3
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-08-03 00:00:00.000000000 Z
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.2
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