dining-table 1.1.1 → 1.1.2

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
  SHA256:
3
- metadata.gz: 86007b91ee4155416dab5a0c477f781a77f294892982eebc9dcc2b08dab90f7d
4
- data.tar.gz: f7babfb11c2c7e06bb4cdf5a3508ea8450ac529958ff34b427c6a650965d733c
3
+ metadata.gz: d5736b3800cc26c5c79f21e688a1aeab622743414b75676f1ea49f332d783921
4
+ data.tar.gz: 4c30b46b49c90c2d544414d40a0d09de563003f07696eaf71933db13555b8fbd
5
5
  SHA512:
6
- metadata.gz: 5b0e978e433992578a3faf64dd27d899120a1391ef7b7d1517352867f36c66fb0dc8cfd635aec8491b998bd6954f632a1e1292c732454ff1547dee0b877fd498
7
- data.tar.gz: 1c0956e9c3dbf7af598d13b5058e2ff5ac5aaf0e06e8f78fb9945c6fd15ec7e1a1013b4863d83a35bcfd49b9b8fbc8ec94934ffd51428adc90e6af770a6a9dea
6
+ metadata.gz: 0633de5b1a15d7b26c36c3557abb19e6ff02385fa70cb66a0fdc6c6141dad7f17fc45365f4f246a04a234f95d799113aac7d022b4254d8538182d456b3d06d69
7
+ data.tar.gz: ade6bf7bcc76e08f463dd886c78fbcab4b9cecfa628a9f5aecded917b099b6c7fc0048de7a6951ef9c8e8877a6f42926f2508ec6de3e53676684ac6950bd3804
@@ -1,3 +1,7 @@
1
+ ## 1.1.2 (28/11/2019)
2
+
3
+ * Bugfix - fix html escaping issue
4
+
1
5
  ## 1.1.1 (12/10/2019)
2
6
 
3
7
  * Bugfix - call per-cell configuration block with correct index for footer row
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.1
1
+ 1.1.2
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: dining-table 1.1.1 ruby lib
5
+ # stub: dining-table 1.1.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "dining-table".freeze
9
- s.version = "1.1.1"
9
+ s.version = "1.1.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Micha\u00EBl Van Damme".freeze]
14
- s.date = "2019-10-12"
14
+ s.date = "2019-11-28"
15
15
  s.description = "Easily output tabular data, be it in HTML, CSV or XLSX. Create clean table classes instead of messing with views to create nice tables.".freeze
16
16
  s.email = "michael.vandamme@vub.ac.be".freeze
17
17
  s.extra_rdoc_files = [
@@ -6,7 +6,7 @@ module DiningTable
6
6
 
7
7
  def value(object)
8
8
  if block
9
- @incremental_value = ''
9
+ @incremental_value = ''.html_safe
10
10
  @current_object = object
11
11
  self.instance_eval(&block)
12
12
  @incremental_value
@@ -13,7 +13,7 @@ module DiningTable
13
13
  super
14
14
  self.base_tags_configuration = HTMLPresenterConfiguration::TagsConfiguration.from_hash( default_options )
15
15
  base_tags_configuration.merge_hash( options )
16
- self.output = ''
16
+ self.output = ''.html_safe
17
17
  end
18
18
 
19
19
  def identifier
@@ -49,7 +49,6 @@ module DiningTable
49
49
  columns.each do |column|
50
50
  value = column.value( object )
51
51
  configuration = cell_configuration( tags_configuration, column, table.index, object )
52
- #render_cell( value, column.options_for( identifier ) )
53
52
  render_cell( value, configuration )
54
53
  end
55
54
  add_tag(:end, :tr)
@@ -62,7 +61,6 @@ module DiningTable
62
61
  columns.each do |column|
63
62
  value = column.header
64
63
  configuration = cell_configuration( tags_configuration, column, :header, nil )
65
- #render_header_cell( value, column.options_for( identifier ) )
66
64
  render_header_cell( value, configuration )
67
65
  end
68
66
  add_tag(:end, :tr)
@@ -78,7 +76,6 @@ module DiningTable
78
76
  columns.each_with_index do |column, index|
79
77
  value = footers[index]
80
78
  configuration = cell_configuration( tags_configuration, column, :footer, nil )
81
- #render_footer_cell( value, column.options_for( identifier ) )
82
79
  render_footer_cell( value, configuration )
83
80
  end
84
81
  add_tag(:end, :tr)
@@ -87,7 +84,7 @@ module DiningTable
87
84
  end
88
85
 
89
86
  def output
90
- @output.respond_to?(:html_safe) ? @output.html_safe : @output
87
+ @output
91
88
  end
92
89
 
93
90
  def table_config(&block)
@@ -110,11 +107,11 @@ module DiningTable
110
107
  end
111
108
 
112
109
  def start_tag(tag, options = {})
113
- "<#{ tag.to_s }#{ options_string(options) }>"
110
+ "<#{ tag.to_s }#{ options_string(options) }>".html_safe
114
111
  end
115
112
 
116
113
  def end_tag(tag, options = {})
117
- "</#{ tag.to_s }>"
114
+ "</#{ tag.to_s }>".html_safe
118
115
  end
119
116
 
120
117
  def render_cell( string, configuration )
@@ -1,2 +1,8 @@
1
1
  require 'dining-table'
2
- require 'minitest/autorun'
2
+ require 'minitest/autorun'
3
+
4
+ class String
5
+ def html_safe
6
+ self
7
+ end
8
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dining-table
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michaël Van Damme
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-12 00:00:00.000000000 Z
11
+ date: 2019-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler