crass 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MDM3ZDU2Y2U1NDBkNGQxMDQwMzNhNGM1YTRjM2UyM2RjMTA5MGU5MA==
5
- data.tar.gz: !binary |-
6
- YTMyMDVkZTViMjEyNjVlMGJkNjE2N2M0MWRhYmQ3Mzc3NGU0YzE3Mg==
2
+ SHA1:
3
+ metadata.gz: a113964aef62593fb97ac9cb48a4e5a0c9f20428
4
+ data.tar.gz: 01c82afdd4fa11e034f8b4a89751d7e9712d2893
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZDkwYmUyNGVkZjA5NGMwOWRlNzVlYmIwMmM5NjJlMDYxYWYxMzE0YzE2YWNl
10
- MTYwZDU4MzZmMTkwZGVmMDk3ODI4MTMwZmE0NWQ3Y2M5ODE1MTllYjhlZWI2
11
- NmQxMjExYmEzMmI1MTQzOWExOTk1Yjg0NjlkODNiYzM5ZDIwZjk=
12
- data.tar.gz: !binary |-
13
- OTQ4N2Y4MWNiYjQzNTdlN2MzMDVjMTRhY2U2NjE4YzczNDgwMzVhYzQ5ODcy
14
- NjMwYTRhZmNiOTc5ZjViMjgyYzlhZThkOWU2Yjc5ODI4YTJlNDUzNmQ1ODAy
15
- MTQ2YTA2ZDhmZWUzNDMwNDk2NjQ2MDk4OTBmNmI5NDdmOTNlNzE=
6
+ metadata.gz: e534077f4b8c368a8a469451bc9d713df4d69edc68554d461276d35075e1c77c17c2dec95c2a2b1e9d8833fbeeb912683206305991d015bfd8e369842b4fb14d
7
+ data.tar.gz: 1e78567ce0c1f91f232cd52e676bb4ef6826d207eb5e6c52b6ff0af924d122c4289d6c4bfedbe57f6ffa8616b46e51537dac3e1415dc03d64339efe1501f9592
data/HISTORY.md CHANGED
@@ -1,6 +1,15 @@
1
1
  Crass Change History
2
2
  ====================
3
3
 
4
+ 0.2.1 (2014-07-22)
5
+ ------------------
6
+
7
+ * Fixed: Error when the last property of a rule has no value and no terminating
8
+ semicolon. [#2][]
9
+
10
+ [#2]:https://github.com/rgrove/crass/issues/2
11
+
12
+
4
13
  0.2.0 (2013-10-10)
5
14
  ------------------
6
15
 
@@ -452,7 +452,7 @@ module Crass
452
452
  end
453
453
 
454
454
  children = decl[:value].dup
455
- children.pop if children.last[:node] == :semicolon
455
+ children.pop if children.last && children.last[:node] == :semicolon
456
456
 
457
457
  properties << create_node(:property,
458
458
  :name => decl[:name],
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Crass
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
@@ -259,5 +259,20 @@ describe 'Crass::Parser' do
259
259
  {:node=>:semicolon, :pos=>27, :raw=>";"}]}
260
260
  ], tree)
261
261
  end
262
+
263
+ it 'should not choke on a missing property value' do
264
+ tree = parse("font-family:")
265
+
266
+ assert_equal([
267
+ {:node=>:property,
268
+ :name=>"font-family",
269
+ :value=>"",
270
+ :children=>[],
271
+ :important=>false,
272
+ :tokens=>
273
+ [{:node=>:ident, :pos=>0, :raw=>"font-family", :value=>"font-family"},
274
+ {:node=>:colon, :pos=>11, :raw=>":"}]}
275
+ ], tree)
276
+ end
262
277
  end
263
278
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Grove
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-10 00:00:00.000000000 Z
11
+ date: 2014-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 5.0.8
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: 5.0.8
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 10.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: 10.1.0
41
41
  description: Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 draft.
@@ -45,9 +45,9 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - .gitignore
49
- - .travis.yml
50
- - .yardopts
48
+ - ".gitignore"
49
+ - ".travis.yml"
50
+ - ".yardopts"
51
51
  - Gemfile
52
52
  - HISTORY.md
53
53
  - LICENSE
@@ -81,17 +81,17 @@ require_paths:
81
81
  - lib
82
82
  required_ruby_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - ! '>='
84
+ - - ">="
85
85
  - !ruby/object:Gem::Version
86
86
  version: 1.9.2
87
87
  required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - ! '>='
89
+ - - ">="
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.1.3
94
+ rubygems_version: 2.2.2
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: CSS parser based on the CSS Syntax Level 3 draft.