html2slim 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 80166682417a633dce92c9ab90fbdf483031f025
4
+ data.tar.gz: 6b0ba218756add50271fa2b2ce4df4510774d1b3
5
+ SHA512:
6
+ metadata.gz: 2090c80d405e2a9080d57783734110f2130f5e4d20e53816559b360627c08f94eba147d568328c79a03fd423ff0073fe7acb40816733c5220cd27615e0ce538f
7
+ data.tar.gz: 58a092ca40b3707d689456c48835f4307deaa6c56cc86fe7e8164a6b2238cb93cb0b5df9dc36bd0081b18c03540f8ef1e0054038b4305176c4e0cec547b8456f
@@ -19,13 +19,13 @@ module HTML2Slim
19
19
  erb.gsub!(/<%(.+?)\s*\{\s*(\|.+?\|)?\s*%>/){ %(<%#{$1} do #{$2}%>) }
20
20
 
21
21
  # while, case, if, for and blocks...
22
- erb.gsub!(/<%(-\s+)?(\s*while .+?|\s*case .+?|\s*if .+?|\s*for .+?|.+?do\s*(\|.+?\|)?\s*)%>/){ %(<ruby code="#{$2.gsub(/"/, '&quot;')}">) }
22
+ erb.gsub!(/<%(-\s+)?(\s*while .+?|\s*case .+?|\s*if .+?|\s*for .+?|.+?do\s*(\|.+?\|)?\s*)-?%>/){ %(<ruby code="#{$2.gsub(/"/, '&quot;')}">) }
23
23
  # else
24
- erb.gsub!(/<%\s*else\s*%>/, %(</ruby><ruby code="else">))
24
+ erb.gsub!(/<%-?\s*else\s*-?%>/, %(</ruby><ruby code="else">))
25
25
  # elsif
26
- erb.gsub!(/<%\s*(elsif .+?)\s*%>/){ %(</ruby><ruby code="#{$1}">) }
26
+ erb.gsub!(/<%-?\s*(elsif .+?)\s*-?%>/){ %(</ruby><ruby code="#{$1}">) }
27
27
  # when
28
- erb.gsub!(/<%\s*(when .+?)\s*%>/){ %(</ruby><ruby code="#{$1}">) }
28
+ erb.gsub!(/<%-?\s*(when .+?)\s*-?%>/){ %(</ruby><ruby code="#{$1}">) }
29
29
  erb.gsub!(/<%\s*(end|}|end\s+-)\s*%>/, %(</ruby>))
30
30
  erb.gsub!(/<%(.+?)\s*%>/){ %(<ruby code="#{$1.gsub(/"/, '&quot;')}"></ruby>) }
31
31
  @slim ||= Hpricot(erb).to_slim
@@ -1,3 +1,3 @@
1
1
  module HTML2Slim
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,60 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html2slim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Maiz Lulkin
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-21 00:00:00.000000000Z
11
+ date: 2013-09-15 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: hpricot
16
- requirement: &2153452860 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *2153452860
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: minitest
27
- requirement: &2160455300 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ! '>='
31
+ - - '>='
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
34
  type: :development
34
35
  prerelease: false
35
- version_requirements: *2160455300
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: rake
38
- requirement: &2160454880 !ruby/object:Gem::Requirement
39
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
- - - ! '>='
45
+ - - '>='
42
46
  - !ruby/object:Gem::Version
43
47
  version: '0'
44
48
  type: :development
45
49
  prerelease: false
46
- version_requirements: *2160454880
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
47
55
  - !ruby/object:Gem::Dependency
48
56
  name: slim
49
- requirement: &2160454360 !ruby/object:Gem::Requirement
50
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
- - - ! '>='
59
+ - - '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: 1.0.0
55
62
  type: :development
56
63
  prerelease: false
57
- version_requirements: *2160454360
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: 1.0.0
58
69
  description: Convert HTML to Slim templates. Because HTML sux and Slim rules. That's
59
70
  why.
60
71
  email:
@@ -76,27 +87,27 @@ files:
76
87
  - lib/html2slim/version.rb
77
88
  homepage: https://github.com/slim-template/html2slim
78
89
  licenses: []
90
+ metadata: {}
79
91
  post_install_message:
80
92
  rdoc_options:
81
93
  - --charset=UTF-8
82
94
  require_paths:
83
95
  - lib
84
96
  required_ruby_version: !ruby/object:Gem::Requirement
85
- none: false
86
97
  requirements:
87
- - - ! '>='
98
+ - - '>='
88
99
  - !ruby/object:Gem::Version
89
100
  version: '0'
90
101
  required_rubygems_version: !ruby/object:Gem::Requirement
91
- none: false
92
102
  requirements:
93
- - - ! '>='
103
+ - - '>='
94
104
  - !ruby/object:Gem::Version
95
105
  version: '0'
96
106
  requirements: []
97
107
  rubyforge_project:
98
- rubygems_version: 1.8.15
108
+ rubygems_version: 2.0.6
99
109
  signing_key:
100
- specification_version: 3
110
+ specification_version: 4
101
111
  summary: HTML to Slim converter.
102
112
  test_files: []
113
+ has_rdoc: