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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6263bf471c5a4a986124a232fff5fc22dc67edad
4
- data.tar.gz: 474c6ce3fb3cb53db8732ab3cfdc3d419587188d
3
+ metadata.gz: 9797498ef1f23c32c3d8df898cf03a611ea76862
4
+ data.tar.gz: 4d919141b346d82a41dfad068f59a51b339360ee
5
5
  SHA512:
6
- metadata.gz: 10df49947c8af439de7cbb9780bfe35f4e9744cd56cffb97dd8a1e53ca58ad14ec96e59d2c74c66fff143995e9c70790f5ad0cacbd4355a088071b77adcef8f7
7
- data.tar.gz: fc72e47b6d1397a9d4d13ebe93880e04b11ff8c010fe51f071dee996b387b8710c6297d44b46ec41b253c709f2bf23200e07b6db7de9e6766d50d8987c629f51
6
+ metadata.gz: 069dd9c3eb47093af5567fa717073ec9c1a4435222480be7894124029662da035447359bbe4c4579d154bb9fbd58145a5968771e75883b1a9ffe2c07178ebc58
7
+ data.tar.gz: f698a14c36d8714e6bddff650db6a613cfc4989d3862d158aae9470f1805949d39483b8dd3245130c418494593c171b0a977c2e562907cef430991fa982ddc2d
data/.travis.yml CHANGED
@@ -1,8 +1,15 @@
1
+ language: ruby
1
2
  rvm:
2
- - 1.9.3
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
- script: "bundle exec cucumber"
7
-
8
- env: TEST=true TRAVIS=true
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 Version](https://badge.fury.io/rb/middleman-slim.png)][gem]
4
- [![Build Status](https://travis-ci.org/yterajima/middleman-slim.png)][travis]
3
+ [![Gem Version](https://badge.fury.io/rb/middleman-slim.svg)][gem]
4
+ [![Build Status](https://travis-ci.org/yterajima/middleman-slim.svg)][travis]
5
5
 
6
6
  middleman-slim is an extension for the Middleman static site generator that adds support for Slim.
7
7
 
@@ -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 "../IMG_DIR/"
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
- f = File.open(File.join(location, 'source', options[:css_dir], 'all.css'), 'r')
43
- buf = f.read
44
- buf.gsub!(/IMG_DIR/, options[:images_dir])
45
- f.close
46
-
47
- f = File.open(File.join(location, 'source', options[:css_dir], 'all.css'), 'w')
48
- f.write(buf)
49
- f.close
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
@@ -10,3 +10,6 @@ gem "middleman-livereload", "~> 3.1.0"
10
10
 
11
11
  # For faster file watcher updates on Windows:
12
12
  gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
13
+
14
+ # Windows does not come with time zone data
15
+ gem "tzinfo-data", platforms: [:mswin, :mingw]
@@ -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
- # activate :livereload
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 :http_path, "/Content/images/"
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("../IMG_DIR/background.png");
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("../IMG_DIR/middleman.png") no-repeat center 100px;
15
+ background: url("../images/middleman.png") no-repeat center 100px;
16
16
  padding: 350px 0 10px;
17
17
  margin: 0; }
18
18
 
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Slim
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
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.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: 2013-12-28 00:00:00.000000000 Z
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.2.0
123
+ rubygems_version: 2.0.3
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: A Middleman template using Slim.