htmle 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 93e7c1888e602df5acb001981fca8619d84b822c
4
- data.tar.gz: a952275233aa537b01ac53e8a36307b776c691e4
3
+ metadata.gz: de7a24aa9976274f37b8133c3861cb0e898677d9
4
+ data.tar.gz: 85534c6a157905cea38bc44b10331ec9c8628c6f
5
5
  SHA512:
6
- metadata.gz: 5156f616d45f770ace7c9eff2826e9e8aa3d19218453cb76495a47668b6f4b55d0928fb00a30f6e8433f7c7d68492530b58f7a44928607524e18212053fda696
7
- data.tar.gz: a8971a13fcc7d2ae9cd72b4080f7e3710acd0c19b48df94a9ec87875c020f7579fb989276e66dbdce11b705096f6bbdb54a4538364724019a4d4ddbb719d5926
6
+ metadata.gz: c27d1b53dd1f8e56afa49a3d82035c766cb9f14306ad3b1648bc5f6fdc0b0a0ad953a5e3746e89d63a1b25f3222fef4d295ad25b0452cd652ccdb52f45bbee4e
7
+ data.tar.gz: a301851367621e413c5642582a3a0939a73dfaa394bf540c15ef84249047946fb77d919ec60c416262ff43eac44dbeaf9623009b5f5a2ff5ff41cc766ee515bf
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/htmle.rb CHANGED
@@ -9,8 +9,8 @@ require 'svgle'
9
9
  DEFAULT_HTML_CSS = <<CSS
10
10
 
11
11
  * {
12
- margin: 5 5; padding: 10 10;
13
- font-size: 16; color: red;
12
+ margin: 0.4em; padding: 0.6em;
13
+ font-size: 16; color: rgb(255,0,0);
14
14
  }
15
15
  html {background-color: white;}
16
16
  div {background-color: green; padding: 30 10; margin: 5 5;}
@@ -28,22 +28,46 @@ class Htmle < Domle
28
28
 
29
29
  class Head < Box
30
30
  end
31
+
32
+ class Title < Box
33
+ end
34
+
35
+ class Style < Box
36
+ end
31
37
 
32
38
  class Body < Box
33
- end
39
+ end
40
+
41
+ class Strong < Box
42
+ end
34
43
 
35
44
  class Div < Box
36
45
  end
37
46
 
47
+ class P < Box
48
+ end
49
+
50
+ class A < Box
51
+ end
52
+
53
+ class Ul < Box
54
+ end
55
+
56
+ class Ol < Box
57
+ end
58
+
59
+ class Li < Box
60
+ end
61
+
38
62
  private
39
63
 
40
64
 
41
65
  def find_add_css()
42
66
 
43
67
  # add the default CSS
44
- add_css DEFAULT_HTML_CSS
68
+ add_css DEFAULT_HTML_CSS, override: false
45
69
 
46
- @doc.root.xpath('//style').each {|e| add_css e.text }
70
+ @doc.root.xpath('//style').each {|e| add_css e.text }
47
71
 
48
72
  # check for an external CSS file
49
73
  # still to-do
@@ -57,8 +81,18 @@ class Htmle < Domle
57
81
  doc: Rexle::Element,
58
82
  html: Htmle::Html,
59
83
  head: Htmle::Head,
84
+ title: Htmle::Title,
85
+ style: Htmle::Style,
60
86
  body: Htmle::Body,
61
- div: Htmle::Div
87
+ b: Htmle::Strong,
88
+ strong: Htmle::Strong,
89
+ div: Htmle::Div,
90
+ p: Htmle::P,
91
+ a: Htmle::A,
92
+ ul: Htmle::Ul,
93
+ ol: Htmle::Ol,
94
+ li: Htmle::Li
95
+
62
96
  }
63
97
  end
64
98
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: htmle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  9/8tMrxMp33ZKdljAh8KititpZ31BDtBNavEU2kZMbNV6fFHnMRMx0k1U9EilTqT
32
32
  SmSNn+xbqen7GA==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-11-27 00:00:00.000000000 Z
34
+ date: 2015-11-29 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: domle
metadata.gz.sig CHANGED
@@ -1,3 +1,3 @@
1
- 6xTI�AW�ȑfӘ�Z�<FX���A����F������֪��R���IsmN��15u
2
- fw����N.�{%k��
3
- K>�]iWl�lm�%�<���Ҙᯚ�E�\�[H����� ��5��D�����A"��<?5xM3]hy����M+�za�����%���Er;U}��\wr��U�L�)��N,b�~����;�I��kl*�����Ry
1
+ 7���N���Y���T��Q(������v��%�������Og'O�-="_�+�w�M�����o�=�7�'ty�y�� Φ���2�����ݩAJ��>T�˺�t�yjy H��� �u���I!�Vf��5���[�|�0�v�>�
2
+ �Pl�0��Å���B���]+��&�c��_�'�v��s_��e��1�3Ês"�B��[7B|�t�=% �c�t����ׇ��#��v��
3
+ ��GId� �