csspool-st 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt CHANGED
@@ -1,62 +1,65 @@
1
- .autotest
2
- CHANGELOG.rdoc
3
- Manifest.txt
4
- README.rdoc
5
- Rakefile
6
- lib/csspool.rb
7
- lib/csspool/collection.rb
8
- lib/csspool/css.rb
9
- lib/csspool/css/charset.rb
10
- lib/csspool/css/declaration.rb
11
- lib/csspool/css/document.rb
12
- lib/csspool/css/document_handler.rb
13
- lib/csspool/css/import_rule.rb
14
- lib/csspool/css/media.rb
15
- lib/csspool/css/parser.rb
16
- lib/csspool/css/parser.y
17
- lib/csspool/css/rule_set.rb
18
- lib/csspool/css/tokenizer.rb
19
- lib/csspool/css/tokenizer.rex
20
- lib/csspool/node.rb
21
- lib/csspool/sac.rb
22
- lib/csspool/sac/document.rb
23
- lib/csspool/sac/parser.rb
24
- lib/csspool/selector.rb
25
- lib/csspool/selectors.rb
26
- lib/csspool/selectors/additional.rb
27
- lib/csspool/selectors/attribute.rb
28
- lib/csspool/selectors/class.rb
29
- lib/csspool/selectors/id.rb
30
- lib/csspool/selectors/pseudo_class.rb
31
- lib/csspool/selectors/simple.rb
32
- lib/csspool/selectors/type.rb
33
- lib/csspool/selectors/universal.rb
34
- lib/csspool/terms.rb
35
- lib/csspool/terms/function.rb
36
- lib/csspool/terms/hash.rb
37
- lib/csspool/terms/ident.rb
38
- lib/csspool/terms/number.rb
39
- lib/csspool/terms/rgb.rb
40
- lib/csspool/terms/string.rb
41
- lib/csspool/terms/uri.rb
42
- lib/csspool/visitors.rb
43
- lib/csspool/visitors/children.rb
44
- lib/csspool/visitors/comparable.rb
45
- lib/csspool/visitors/iterator.rb
46
- lib/csspool/visitors/to_css.rb
47
- lib/csspool/visitors/visitor.rb
48
- test/css/test_document.rb
49
- test/css/test_import_rule.rb
50
- test/css/test_parser.rb
51
- test/css/test_tokenizer.rb
52
- test/helper.rb
53
- test/sac/test_parser.rb
54
- test/sac/test_properties.rb
55
- test/sac/test_terms.rb
56
- test/test_collection.rb
57
- test/test_parser.rb
58
- test/test_selector.rb
59
- test/visitors/test_children.rb
60
- test/visitors/test_comparable.rb
61
- test/visitors/test_each.rb
62
- test/visitors/test_to_css.rb
1
+ .autotest
2
+ CHANGELOG.rdoc
3
+ Manifest.txt
4
+ README.rdoc
5
+ Rakefile
6
+ lib/csspool.rb
7
+ lib/csspool/collection.rb
8
+ lib/csspool/css.rb
9
+ lib/csspool/css/charset.rb
10
+ lib/csspool/css/declaration.rb
11
+ lib/csspool/css/document.rb
12
+ lib/csspool/css/document_handler.rb
13
+ lib/csspool/css/import_rule.rb
14
+ lib/csspool/css/media.rb
15
+ lib/csspool/css/parser.rb
16
+ lib/csspool/css/parser.y
17
+ lib/csspool/css/rule_set.rb
18
+ lib/csspool/css/tokenizer.rb
19
+ lib/csspool/css/tokenizer.rex
20
+ lib/csspool/node.rb
21
+ lib/csspool/sac.rb
22
+ lib/csspool/sac/document.rb
23
+ lib/csspool/sac/parser.rb
24
+ lib/csspool/selector.rb
25
+ lib/csspool/selectors.rb
26
+ lib/csspool/selectors/additional.rb
27
+ lib/csspool/selectors/attribute.rb
28
+ lib/csspool/selectors/class.rb
29
+ lib/csspool/selectors/id.rb
30
+ lib/csspool/selectors/media_expression.rb
31
+ lib/csspool/selectors/pseudo.rb
32
+ lib/csspool/selectors/pseudo_class.rb
33
+ lib/csspool/selectors/pseudo_element.rb
34
+ lib/csspool/selectors/simple.rb
35
+ lib/csspool/selectors/type.rb
36
+ lib/csspool/selectors/universal.rb
37
+ lib/csspool/terms.rb
38
+ lib/csspool/terms/function.rb
39
+ lib/csspool/terms/hash.rb
40
+ lib/csspool/terms/ident.rb
41
+ lib/csspool/terms/number.rb
42
+ lib/csspool/terms/rgb.rb
43
+ lib/csspool/terms/string.rb
44
+ lib/csspool/terms/uri.rb
45
+ lib/csspool/visitors.rb
46
+ lib/csspool/visitors/children.rb
47
+ lib/csspool/visitors/comparable.rb
48
+ lib/csspool/visitors/iterator.rb
49
+ lib/csspool/visitors/to_css.rb
50
+ lib/csspool/visitors/visitor.rb
51
+ test/css/test_document.rb
52
+ test/css/test_import_rule.rb
53
+ test/css/test_parser.rb
54
+ test/css/test_tokenizer.rb
55
+ test/helper.rb
56
+ test/sac/test_parser.rb
57
+ test/sac/test_properties.rb
58
+ test/sac/test_terms.rb
59
+ test/test_collection.rb
60
+ test/test_parser.rb
61
+ test/test_selector.rb
62
+ test/visitors/test_children.rb
63
+ test/visitors/test_comparable.rb
64
+ test/visitors/test_each.rb
65
+ test/visitors/test_to_css.rb
data/lib/csspool.rb CHANGED
@@ -13,7 +13,7 @@ require 'csspool/visitors'
13
13
  require 'csspool/collection'
14
14
 
15
15
  module CSSPool
16
- VERSION = "3.1.1"
16
+ VERSION = "3.1.2"
17
17
 
18
18
  def self.CSS doc
19
19
  CSSPool::CSS::Document.parse doc
@@ -0,0 +1,13 @@
1
+ module CSSPool
2
+ module Selectors
3
+ class MediaExpression < CSSPool::Selectors::Additional
4
+ attr_accessor :name
5
+ attr_accessor :value
6
+
7
+ def initialize name, value
8
+ @name = name
9
+ @value = value
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,15 @@
1
+ require 'csspool/selectors/pseudo_class'
2
+ require 'csspool/selectors/pseudo_element'
3
+
4
+ module CSSPool
5
+ module Selectors
6
+ def Selectors.pseudo name
7
+ css2_pseudo_elements =
8
+ if %w{after before first-letter first-line}.include? name
9
+ PseudoElement.new name, true
10
+ else
11
+ PseudoClass.new name
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ module CSSPool
2
+ module Selectors
3
+ class PseudoElement < CSSPool::Selectors::Additional
4
+ attr_accessor :name
5
+ attr_accessor :css2
6
+
7
+ def initialize name, css2 = nil
8
+ @name = name
9
+ @css2 = css2
10
+ end
11
+ end
12
+ end
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csspool-st
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-04-27 00:00:00.000000000Z
14
+ date: 2012-04-28 00:00:00.000000000Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rdoc
18
- requirement: &26915280 !ruby/object:Gem::Requirement
18
+ requirement: &28662072 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ~>
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: '3.10'
24
24
  type: :development
25
25
  prerelease: false
26
- version_requirements: *26915280
26
+ version_requirements: *28662072
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: racc
29
- requirement: &26914680 !ruby/object:Gem::Requirement
29
+ requirement: &28661724 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
- version_requirements: *26914680
37
+ version_requirements: *28661724
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: rexical
40
- requirement: &26914356 !ruby/object:Gem::Requirement
40
+ requirement: &28661412 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: '0'
46
46
  type: :development
47
47
  prerelease: false
48
- version_requirements: *26914356
48
+ version_requirements: *28661412
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: hoe-git
51
- requirement: &26913876 !ruby/object:Gem::Requirement
51
+ requirement: &28661088 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: '0'
57
57
  type: :development
58
58
  prerelease: false
59
- version_requirements: *26913876
59
+ version_requirements: *28661088
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: hoe-gemspec
62
- requirement: &26913468 !ruby/object:Gem::Requirement
62
+ requirement: &28660752 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: '0'
68
68
  type: :development
69
69
  prerelease: false
70
- version_requirements: *26913468
70
+ version_requirements: *28660752
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: hoe-bundler
73
- requirement: &26912892 !ruby/object:Gem::Requirement
73
+ requirement: &28660416 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ! '>='
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: '0'
79
79
  type: :development
80
80
  prerelease: false
81
- version_requirements: *26912892
81
+ version_requirements: *28660416
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: hoe
84
- requirement: &26912172 !ruby/object:Gem::Requirement
84
+ requirement: &28660092 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ~>
@@ -89,7 +89,7 @@ dependencies:
89
89
  version: '3.0'
90
90
  type: :development
91
91
  prerelease: false
92
- version_requirements: *26912172
92
+ version_requirements: *28660092
93
93
  description: ! 'Fork of CSSPool. CSSPool is a CSS parser. CSSPool provides a SAC
94
94
  interface for parsing CSS as
95
95
 
@@ -134,7 +134,10 @@ files:
134
134
  - lib/csspool/selectors/attribute.rb
135
135
  - lib/csspool/selectors/class.rb
136
136
  - lib/csspool/selectors/id.rb
137
+ - lib/csspool/selectors/media_expression.rb
138
+ - lib/csspool/selectors/pseudo.rb
137
139
  - lib/csspool/selectors/pseudo_class.rb
140
+ - lib/csspool/selectors/pseudo_element.rb
138
141
  - lib/csspool/selectors/simple.rb
139
142
  - lib/csspool/selectors/type.rb
140
143
  - lib/csspool/selectors/universal.rb
@@ -184,7 +187,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
184
187
  version: '0'
185
188
  segments:
186
189
  - 0
187
- hash: -163742947
190
+ hash: -780338289
188
191
  required_rubygems_version: !ruby/object:Gem::Requirement
189
192
  none: false
190
193
  requirements: