middleman-remove-indent 1.0.0 → 1.0.1

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: 89eda9843be20b62ffaf7df0da801e341fa42005
4
- data.tar.gz: a50d56accd7fdd8cf7fa84c35ddb06464026c2f3
3
+ metadata.gz: db854cadb9ce64d213900d7562363e19739541c8
4
+ data.tar.gz: fdd91de92980b0a9450d8708eb7b72ff7c22e8a7
5
5
  SHA512:
6
- metadata.gz: 7157f8661e4535f8f56b8a60c4b18d170f458204e4cf497b90e1157ca8e078a0ee4aed01e1a0ddf01a6b6add1e7478fbae1a9b5a763395b83b32916156292d74
7
- data.tar.gz: 14aa0e82f20dac14c8963e10d2fba9ae2dee0efc38238815024bc2fc81bd09cfbca9434a0e851b087215f5bf1e07f102d4f6fe87086a1b96de42a8ca0d76479c
6
+ metadata.gz: fe95afb1862524fdea9f9008ef14dbf0b9853e714ceee63cbcba47388774abdc0b4784a3b514b768252150fb89aa5506808f35e8feabaf50827f4d3109645bb4
7
+ data.tar.gz: c7f255171c68f1f9ae018abbc5a56a2ca433a40e78ad3c764664017bb2b875a296f4e7c1dd3e0459d7699f5ebe1c4ce8322bd3902797f9a753bad49c357059f5
data/.travis.yml CHANGED
@@ -1,13 +1,19 @@
1
1
  language: ruby
2
- script: "bundle exec cucumber"
2
+ script: bundle exec cucumber
3
3
  rvm:
4
- - 1.9.3
5
- - 2.0.0
6
- - 2.1.1
7
- - jruby-19mode
4
+ - ruby-head
5
+ - jruby-head
6
+ - jruby-19mode
7
+ - 2.2
8
+ - 2.1
9
+ - 2.0
10
+ - 1.9.3
11
+ os:
12
+ - linux
13
+ - osx
8
14
  env: TEST=true TRAVIS=true
9
15
  gemfile:
10
- - Gemfile
16
+ - Gemfile
11
17
  notifications:
12
- webhooks:
13
- - https://idobata.io/hook/travis_ci/a7668cc4-aa10-4871-b8e4-095e117ad464
18
+ slack:
19
+ secure: gY/P/bRQZPcFK3TuakmJg9GwDXRKC0FIsM/Lp+hJ6yC1qgvmq1IL7jrcUySXpmy62i7R8/nT9mT6bqln2PjNLtUydd0NR/p/fpxeZaRsVTHXA0hMaAfpngh3nhHQRoF1cHAveSJgUCe7gT8RDD6ste+U5bx+Yp3i3aWq34C++lo=
@@ -30,6 +30,23 @@ Feature: Middleman-Remove-indent
30
30
  And the file "stylesheets/all.css" should match /^\.doc:before/
31
31
  And the file "stylesheets/all.css" should not match /^\n/
32
32
 
33
+ Scenario: With ':remove_blank_line' option using block
34
+ Given a fixture app "basic-app"
35
+ And a file named "config.rb" with:
36
+ """
37
+ configure :build do
38
+ activate :remove_indent do |r|
39
+ r.remove_blank_line = true
40
+ end
41
+ end
42
+ """
43
+ And a successfully built app at "basic-app"
44
+ When I cd to "build"
45
+ Then the file "index.html" should match /^<head>/
46
+ And the file "index.html" should not match /^\n/
47
+ And the file "stylesheets/all.css" should match /^\.doc:before/
48
+ And the file "stylesheets/all.css" should not match /^\n/
49
+
33
50
  Scenario: Remove indent only html with :exts option
34
51
  Given a fixture app "basic-app"
35
52
  And a file named "config.rb" with:
@@ -1,15 +1,16 @@
1
1
  module Middleman
2
2
  module RemoveIndent
3
+ # Middleman Remove Indent Extension
3
4
  class Extension < ::Middleman::Extension
4
5
  option :exts, %w(.html .css), 'List of target file extensions'
5
6
  option :remove_blank_line, false, 'Remove Brank Line from target files'
6
7
 
7
8
  def initialize(app, options_hash = {}, &block)
8
9
  super
9
-
10
- exts = (options.exts.is_a?(String)) ? Array(options.exts) : options.exts
11
- build_dir = app.build_dir
12
10
  extension = self
11
+ build_dir = app.build_dir
12
+ exts = options.exts
13
+ exts = Array(exts) if exts.instance_of? String
13
14
 
14
15
  app.after_build do
15
16
  targets = extension.target_files(build_dir, exts)
@@ -45,4 +46,3 @@ module Middleman
45
46
  end
46
47
  end
47
48
  end
48
-
@@ -1,5 +1,6 @@
1
1
  module Middleman
2
+ # Middleman RemoveIndent Module
2
3
  module RemoveIndent
3
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
4
5
  end
5
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-remove-indent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - yterajima
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-12 00:00:00.000000000 Z
11
+ date: 2015-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project:
135
- rubygems_version: 2.2.2
135
+ rubygems_version: 2.4.5
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Remove indent from build files