html-to-css 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ce023ea55a86ff16fef105a2ae4c1a7338aa76a
4
- data.tar.gz: 6befdb1a8b3c493fb40b51d3e94e272e6aa82fb6
3
+ metadata.gz: 5c92c0200e7312d8c99fc2526c4a6193c46fc0a9
4
+ data.tar.gz: 17138098f5955529a8ffb38e0394588462974baa
5
5
  SHA512:
6
- metadata.gz: df21b9e5cba643f151dbc83cf54b553a3e323439cc4fae9a84c029c62a3acf2fcbd3fb57278dbdb18b7bec04a0506096bc2f6d8f178b6676781e7320d3705f41
7
- data.tar.gz: 8853e230d5609db634711ccadf56e5387379eccf014bd2c433acd2a2287da283ab67c07cf6f184797a0116e8d10fc4407e7f96ef72af3aa7d18bfcff3bc59039
6
+ metadata.gz: 7b76982fb7b99e4a593c9dc5adb0aacf0176169e8210048ca0987e0fc296b57d16621064ca62a866a0ae0f37e5cd4638ebb90554cf02b95238ae80968571fdb3
7
+ data.tar.gz: cea7491cb0a501326aada04427f88b4d3619b7b4d10e01a013aa6476c46c9bcc4bdd4e70cc17eb653ae52be46a5372d0ccd39d9a00bd7cf9c5d4c086661d6909
@@ -1,3 +1,3 @@
1
- P27�|��! ���\_6���8��XN_+��]��>�e6Z�$�����Q)���7�7ك�̺�{v&sq ���2.����}@�At��cCO��ûě���16%���0p��U�����S�����4�����D��.�m��|+]Sh� � jz��&�#�8}\����f�q������(�^lL�q{R��$�z��"�E<�*�����)���G���9qi
2
- ғ}��/��MP
3
- ��Aj��
1
+ 3n�@�T�JZ�U 5�b�S�bJ�����h�&�2�lw�ɹ�O:D�57��"ZZD�ɱ�$�GM۠��L��b���?Ch�0����xr���r��:�ILK��+&�TII�>�
2
+ e���$�#�����,�<��2
3
+ ���Fv%j{"]��n��>V#����a;�(c�M�����bD��uмM�z�]�>_j/���C���ц��-4҅�&�
data.tar.gz.sig CHANGED
Binary file
@@ -15,7 +15,11 @@ class HtmlToCss
15
15
 
16
16
  attr_accessor :elements
17
17
 
18
- def initialize(filename=nil)
18
+ def initialize(options={})
19
+
20
+ opt = {rand_color: true, filename: nil}.merge options
21
+ filename = opt[:filename]
22
+ @rand_color = opt[:rand_color]
19
23
 
20
24
  if filename then
21
25
 
@@ -130,7 +134,8 @@ class HtmlToCss
130
134
  @selectors << selector
131
135
 
132
136
  if @elements.has_key?(e.name.to_sym) then
133
- attributes = @elements[e.name.to_sym].strip.sub(':color','#a5f').to_h
137
+ c = @rand_color ? "%06x" % (rand * 0xffffff) : 'a5f'
138
+ attributes = @elements[e.name.to_sym].strip.sub(':color','#' + c).to_h
134
139
  else
135
140
  attributes = {}
136
141
  end
@@ -184,4 +189,4 @@ end
184
189
 
185
190
  if __FILE__ == $0 then
186
191
  css = HtmlToCss.new('index.html').to_css
187
- end
192
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-to-css
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  n9X5YRMwlJkR8AjTM6rhQpKsbN0jqpzYjglj02VuBO/YASqBM1gV6sKxMtAbdYam
32
32
  6yGZgJtO0psElQ==
33
33
  -----END CERTIFICATE-----
34
- date: 2013-10-10 00:00:00.000000000 Z
34
+ date: 2013-10-11 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rexle
metadata.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- ]ڷKN��I)I��5�V�3t#R��y��"C0��J�����-�rE -�]9Նc)���<��v(��<n�VӠ��t�P�k���?z$���H]�O֗�x��CC��R��V�)+���,ШK
2
- ����
3
- �k=�e�C��A0c����՘*8x���n�TDX�`�_ڰ�
1
+ x�d��Xj2�V/G��;.ct�ɭkKi_SM���Ξ�99�$��rv`OS�M���^4S���mc���9"�7t5
2
+ �O?w*