nokogiri-styles 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module NokogiriStyles
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -10,35 +10,6 @@ Gem::Specification.new do |gem|
10
10
  gem.description = <<-EOF
11
11
  NokgiriStyles lets you decompose inline CSS styling (the style attribute) in
12
12
  HTML elements so you don’t have to bother with regexes and such.
13
-
14
- Usage:
15
-
16
- require 'nokogiri'
17
- require 'nokogiri-styles'
18
-
19
- # ...
20
-
21
- # Get styles
22
- node['style'] # => 'width: 400px; color: blue'
23
- node.styles['width'] # => '400px'
24
- node.styles['color'] # => 'blue'
25
-
26
- # Update styles
27
- style = node.styles
28
- style['width'] = '500px'
29
- style['height'] = '300px'
30
- style['color'] = nil
31
- node.styles = style
32
- node['style'] # => 'width: 500xp; height: 300px'
33
-
34
- # Modify classes
35
- node['class'] # => 'foo bar'
36
- node.classes # => ['foo', 'bar']
37
- node.classes = ['foo']
38
- node['class'] # => 'foo'
39
-
40
- Note that the `style` attribute is only updated when assigning `.styles`,
41
- simply doing `node.styles['color'] = 'red'` does not work. Patches welcome.
42
13
  EOF
43
14
 
44
15
  gem.files = `git ls-files`.split($\)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri-styles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -44,18 +44,7 @@ dependencies:
44
44
  - !ruby/object:Gem::Version
45
45
  version: 2.4.8
46
46
  description: ! " NokgiriStyles lets you decompose inline CSS styling (the style
47
- attribute) in\n HTML elements so you don’t have to bother with regexes and such.\n\n
48
- \ Usage:\n \n require 'nokogiri'\n require 'nokogiri-styles'\n\n
49
- \ # ...\n \n # Get styles\n node['style'] # => 'width:
50
- 400px; color: blue'\n node.styles['width'] # => '400px'\n node.styles['color']
51
- \ # => 'blue'\n \n # Update styles\n style = node.styles\n style['width']
52
- \ = '500px'\n style['height'] = '300px'\n style['color'] = nil\n
53
- \ node.styles = style\n node['style'] # => 'width: 500xp; height:
54
- 300px'\n\n # Modify classes\n node['class'] # => 'foo bar'\n
55
- \ node.classes # => ['foo', 'bar']\n node.classes = ['foo']\n
56
- \ node['class'] # => 'foo'\n\n Note that the `style` attribute
57
- is only updated when assigning `.styles`,\n simply doing `node.styles['color']
58
- = 'red'` does not work. Patches welcome.\n"
47
+ attribute) in\n HTML elements so you don’t have to bother with regexes and such.\n"
59
48
  email:
60
49
  - sijmen@readmo.re
61
50
  executables: []