HTML-AutoTag 0.0.2 → 0.0.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: 9fc31c05d334bd5d82c998c2d2c0888e46f1320e
4
- data.tar.gz: 27001fd038878125cde27b92c8097b3607a0e64f
3
+ metadata.gz: dae12f7b677813064b921eac8c4c74e68fea259f
4
+ data.tar.gz: fe557caadd740b29b8c80cb75f463002aeefcc71
5
5
  SHA512:
6
- metadata.gz: 2e99692edea1c4119f7e2252e8ffee650fff90048bc7a4f9d194eb724406fcb9d6a8bf93bec72322d9bf326d97f865525e590070726831b1280dcaeb85c866e2
7
- data.tar.gz: 56d17d0d3c9dd5ae2c46561b1c79cb18646fb110cb468bfd0fdaa89fdff283656b4cda9c88d1855d4a1b27d015bd1044e20d29bdfe980c7afc0e98308c8a4c99
6
+ metadata.gz: fdb7fb4735ca473870c62cd352281fce81236ef0dfd54125c5511f54cae32b09d689aceab95837d7f10a8d3bdcf9deeab364e7888d4a5f5131ae2be4db5a028d
7
+ data.tar.gz: ca6126ff7a16295301506f1789713805b7985c28a02dd1c6d7af8b5eb3f7b35449a257eab4707012a112ac76353277256d89992e85d6c2e3bb6d9dc04ec220d4
data/Changes CHANGED
@@ -1,5 +1,9 @@
1
1
  Revision history for html-autotag-ruby
2
2
 
3
+ 0.0.3
4
+ - explicit check for hash
5
+ - corrected misspelled key name (data => cdata)
6
+
3
7
  0.0.2
4
8
  - added htmlentities
5
9
 
data/lib/HTML/AutoAttr.rb CHANGED
@@ -11,6 +11,7 @@ module HTML
11
11
 
12
12
  def to_s
13
13
 
14
+ return '' unless @hash.kind_of?( Hash )
14
15
  keys = @sorted ? @hash.keys.sort : @hash.keys
15
16
  str = ''
16
17
  seen = {}
data/lib/HTML/AutoTag.rb CHANGED
@@ -12,8 +12,8 @@ module HTML
12
12
  @encodes = params['encodes'] ? 1 : 0
13
13
  @indent = params['indent'] || ''
14
14
  @level = params['level'] || 0
15
- @sorted = params['sorted'] || 0
16
- @newline = params['indent'] ? "\n" : ''
15
+ @sorted = params['sorted'] ? 1 : 0
16
+ @newline = params['indent'] ? "\n" : ''
17
17
  @encoder = HTMLEntities.new
18
18
  end
19
19
 
@@ -42,7 +42,7 @@ module HTML
42
42
 
43
43
  else
44
44
  str = ''
45
- params['data'].each do |scalar|
45
+ params['cdata'].each do |scalar|
46
46
  str += tag( 'tag' => params['tag'], 'attr' => attr, 'cdata' => scalar )
47
47
  end
48
48
  return str
@@ -1,5 +1,5 @@
1
1
  module HTML
2
2
  class AutoTag
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: HTML-AutoTag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - jeffa