render_table_v2 2.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 62aec7ca406a95dfb7f8ff3f9eca4097ee8bebe95b34cec950cd363765658265
4
+ data.tar.gz: 5523491502145a3c200e1c65a3c187a6890e8c6d86d9e817e42ef1b31725729f
5
+ SHA512:
6
+ metadata.gz: d303d4fa56e80c423170d67e4506338feccda8978f5268806cd67292bfe6205613da8d2d01196919e748dd92a7844d56df52c8c0992ce600703c3ff14dff6f4d
7
+ data.tar.gz: f39324b99311062ac6b5c243d616fb670a2c3ed18632e169473c77648ea49f408caf60bdd00cd97c0a56d54be9ead1bc90dbd4dc42b67055b9e860ee7e109b60
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 3.0.3
7
+ before_install: gem install bundler -v 2.2.33
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at morales.jmanuel16@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in render_table.gemspec
6
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 manuel morales
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,252 @@
1
+ # RenderTable
2
+
3
+ RenderTable is a set of extensible table building modules that make displaying tabular data easy.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'render_table'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install render_table
20
+
21
+ ## Usage
22
+ ### Rendering a table
23
+ Invoke the .render method on the table class with the template you want to render.
24
+
25
+ Within an ERB template:
26
+ ```ruby
27
+ <%= RenderTable::Table.render(records: User.all, header: [:id, :email, :name, :created_at]) %>
28
+ ```
29
+ Records can be any collection that responds to .each
30
+
31
+ You can also pass .render a block:
32
+ ```ruby
33
+ <%= RenderTable::Table.render do |table| %>
34
+ <% table.records = User.all
35
+ <% table.header = [:id, :email, :name, :created_at] %>
36
+ <% end %>
37
+ ```
38
+
39
+ ### Table ID and Classes
40
+ To add an id or class to the rendered table
41
+ ```ruby
42
+ table.table_id = 'my-table-id'
43
+ table.table_class = 'my-table-class'
44
+ ```
45
+ ```html
46
+ <table id="my-table-id" class="my-table-class">
47
+ ```
48
+ You can also set global defaults for thse values within an initializer.
49
+ ```ruby
50
+ RenderTable.configure do |config|
51
+ config.table_id = 'table-id'
52
+ config.table_class = 'table-class'
53
+ end
54
+ ```
55
+ ### Overrides
56
+ To override the value of a cell regardless of its header pass a hash of procedures mapped to the overriden header.
57
+ ```ruby
58
+ <%= RenderTable::Table.render do |table| %>
59
+ <% table.records = User.all
60
+ <% table.header = [:id, :not_a_real_method] %>
61
+ <% table.override = {
62
+ not_a_real_method: ->(_cell, _cell_index) { 'hello world' }
63
+ } %>
64
+ <% end %>
65
+ ```
66
+ ```html
67
+ <table>
68
+ <thead>
69
+ <tr>
70
+ <th>id</th>
71
+ <th>not_a_real_method</th>
72
+ </tr>
73
+ </thead>
74
+ <tbody>
75
+ <tr>
76
+ <td>1</td>
77
+ <td>hello world</td>
78
+ </tr>
79
+ </table>
80
+ ```
81
+ Overrides can be any object that responds to .call(record, index)
82
+ ```ruby
83
+ class User::NameOverride
84
+ def self.call(record, index)
85
+ record.name.upcase
86
+ end
87
+ end
88
+
89
+ RenderTable::Table.render do |table|
90
+ table.records = User.all
91
+ table.header = [:id, :name]
92
+ table.override = { name: User::NameOverride }
93
+ end
94
+ ```
95
+
96
+ ### Row and Cell CSS
97
+ To add dynamically created class and ids to row and cell elements pass a hash of procedures mapped to the desired class/id names.
98
+ #### Rows
99
+ ```ruby
100
+ table.html[:rows][:classes] = {
101
+ 'is-user' => ->(record, _row_index) { record.is_a? User },
102
+ 'is-first' => ->(_record, row_index) { row_index.zero? }
103
+ }
104
+
105
+ table.html[:rows][:ids] = {
106
+ 'first' => ->(_record, row_index) { row_index.zero? },
107
+ 'last' => ->(record, _index) { record == records.last }
108
+ }
109
+ ```
110
+ ```html
111
+ <tbody>
112
+ <tr id="first" class="is-first is-user">...</tr>
113
+ <tr class="is-user">...</tr>
114
+ <tr id="last" class="is-user">...</tr>
115
+ </tbody>
116
+ ```
117
+ #### Cells
118
+ ```ruby
119
+ table.html[:cells][:classes] = {
120
+ 'is-integer' => ->(cell_value, _cell_index) { cell_value == Integer },
121
+ 'is-first' => ->(_cell_value, cell_index) { cell_index.zero? },
122
+ }
123
+
124
+ table.html[:cells][:ids] = {
125
+ 'first' => ->(_record, cell_index) { cell_index.zero? }
126
+ }
127
+ ```
128
+
129
+ ```html
130
+ <tr>
131
+ <td id="first" class="is-integer is-first">1</td>
132
+ <td>john.doe@example.com</td>
133
+ </tr>
134
+ ```
135
+ ### Options Column
136
+ To add control elements to a row you can pass an inline template or file path to the 'options' attribute.
137
+ #### Inline Template
138
+ ```ruby
139
+ RenderTable::Table.render do |table|
140
+ table.records = User.all
141
+ table.header = [:id, :name]
142
+ table.options = "<%= link_to 'Edit', edit_user_path(record) %>"
143
+ end
144
+ ```
145
+ ```html
146
+ <table>
147
+ <thead>
148
+ <tr>
149
+ <th>id</th>
150
+ <th>name</th>
151
+ <th></th>
152
+ </tr>
153
+ </thead>
154
+ <tbody>
155
+ <tr>
156
+ <td>1</td>
157
+ <td>John Doe</td>
158
+ <td><a href="users/1/edit/">Edit</a></td>
159
+ </tr>
160
+ </tbody>
161
+ </table>
162
+ ```
163
+ You may also path a file path where a template can be rendered
164
+ ```ruby
165
+ ...
166
+
167
+ table.options = File.join(__dir__, './options.html.erb')
168
+ ```
169
+
170
+ ### Custom table templates
171
+ To add a custom table render class, create a new class that inherits from RenderTable::Base and provide a new implementation for .template
172
+
173
+ Example Div Table template.
174
+ ```ruby
175
+ class RenderTable::DivTable < RenderTable::Base
176
+ def template
177
+ <<-HTML
178
+ <div id="<%= table.table_id %>" class="div-table <%= table.table_class %>">
179
+ <div class="div-table-thead">
180
+ <div class="div-table-tr">
181
+ <% table.header.each do |header| %>
182
+ <div class="div-table-td"><%= header.to_s %></div>
183
+ <% end %>
184
+ <% if table.options %>
185
+ <div class="div-table-td"></div>
186
+ <% end %>
187
+ </div>
188
+ </div>
189
+ <div class="div-table-tbody">
190
+ <% table.rows.each do |row| %>
191
+ <div id="<%= row.id %>" class="div-table-tr <%= row.class %>">
192
+ <% row.cells.each do |cell| %>
193
+ <div id="<%= cell.id %>" class="div-table-td <%= cell.class %>">
194
+ <%= cell.value %>
195
+ </div>
196
+ <% end %>
197
+ <% if table.options %>
198
+ <div class="div-table-td"><%= options_cell(row.record, row.row_index) %></div>
199
+ <% end %>
200
+ </div>
201
+ <% end %>
202
+ </div>
203
+ </div>
204
+ HTML
205
+ end
206
+ end
207
+ ```
208
+
209
+ Then call .render on the newly created class.
210
+
211
+ ```ruby
212
+ RenderTable::DivTable.render do |table|
213
+ table.records = User.all
214
+ table.header = [:id, :name]
215
+ end
216
+ ```
217
+
218
+ # Changing defaults
219
+ To modify the default values on rendered tables call the .configuration method from a required initializer.
220
+ ```ruby
221
+ # config/render_table_config.rb
222
+ RenderTable.configure do |config|
223
+ config.table_id = 'test-table-id'
224
+ config.table_class = 'test-table-class'
225
+ config.cell_value = '---'
226
+ config.html = {
227
+ rows: {
228
+ classes: {},
229
+ ids: {}
230
+ },
231
+ cells: {
232
+ classes: {},
233
+ ids: {}
234
+ }
235
+ }
236
+ end
237
+ ```
238
+ ## Development
239
+
240
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
241
+
242
+ ## Contributing
243
+
244
+ Bug reports and pull requests are welcome on GitHub at https://github.com/mjmorales/render_table. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
245
+
246
+ ## License
247
+
248
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
249
+
250
+ ## Code of Conduct
251
+
252
+ Everyone interacting in the RenderTable project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/mjmorales/render_table/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'render_table'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require 'irb'
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,57 @@
1
+ require 'erb'
2
+
3
+ class RenderTable::Base
4
+ include ERB::Util
5
+
6
+ attr_accessor :records, :header, :html, :override, :table_id, :table_class, :options, :records, :header, :html,
7
+ :override, :table_id, :table_class, :timestamps, :options
8
+
9
+ def self.render(args = {})
10
+ table = new(args)
11
+ yield table
12
+ table.render.html_safe
13
+ end
14
+
15
+ def initialize(args = {})
16
+ @records = args[:records] || []
17
+ @header = args[:header] || []
18
+ @override = args[:override] || {}
19
+ @table_id = args[:table_id] || RenderTable.config.table_id
20
+ @table_class = args[:table_class] || RenderTable.config.table_class
21
+ @html = args[:html] || RenderTable.config.html
22
+ @timestamps ||= true
23
+ @options = args[:options]
24
+ end
25
+
26
+ def rows
27
+ RenderTable::Row.rows_for_table(self)
28
+ end
29
+
30
+ def render
31
+ ERB.new(template, 0, '%<>').result(binding)
32
+ end
33
+
34
+ def context
35
+ binding
36
+ end
37
+
38
+ private
39
+
40
+ def table
41
+ self
42
+ end
43
+
44
+ def options_cell(record, index)
45
+ RenderTable::Options.generate(table, @options, record, index)
46
+ end
47
+
48
+ def template
49
+ <<-ERB
50
+ <% table.rows.each do |row| %>
51
+ <% row.cells.each do |cell| %>
52
+ <%= cell.value %>
53
+ <% end %>
54
+ <% end %>
55
+ ERB
56
+ end
57
+ end
@@ -0,0 +1,33 @@
1
+ class RenderTable::Cell
2
+ attr_accessor :header, :cell_index, :html
3
+
4
+ def self.cells_for_row(row, table)
5
+ table.header.collect.with_index do |header_cell, cell_index|
6
+ RenderTable::Cell.new(header_cell, row, cell_index, table)
7
+ end
8
+ end
9
+
10
+ def initialize(header, row, cell_index, table)
11
+ @header = header
12
+ @row = row
13
+ @cell_index = cell_index
14
+ @table = table
15
+ @html = @table.html[:cells]
16
+ end
17
+
18
+ def value
19
+ record = @row.record
20
+ overriden_header = @table.override[header]
21
+ return overriden_header.call(record, @cell_index) if overriden_header
22
+ return record.send(header) if @row.record.respond_to? header
23
+ RenderTable.config.cell_value
24
+ end
25
+
26
+ def class
27
+ RenderTable::Html.html_string(@html[:classes], value, @cell_index)
28
+ end
29
+
30
+ def id
31
+ RenderTable::Html.html_string(@html[:ids], value, @cell_index)
32
+ end
33
+ end
@@ -0,0 +1,37 @@
1
+ class RenderTable::Configuration
2
+ attr_accessor :table_id, :table_class, :html, :cell_value
3
+
4
+ def initialize
5
+ @table_id = RenderTable::Configuration.default_table_id
6
+ @table_class = RenderTable::Configuration.default_table_class
7
+ @html = RenderTable::Configuration.default_html
8
+ @cell_value = RenderTable::Configuration.default_cell_value
9
+ end
10
+
11
+ class << self
12
+ def default_html
13
+ {
14
+ rows: {
15
+ classes: {},
16
+ ids: {}
17
+ },
18
+ cells: {
19
+ classes: {},
20
+ ids: {}
21
+ }
22
+ }
23
+ end
24
+
25
+ def default_table_id
26
+ ''
27
+ end
28
+
29
+ def default_table_class
30
+ ''
31
+ end
32
+
33
+ def default_cell_value
34
+ 'N/A'
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,11 @@
1
+ module RenderTable::Html
2
+ def self.html_string(html_procedure_hash, record, index)
3
+ accumulated_html_strings = []
4
+ html_procedure_hash.each do |html_string, procedure|
5
+ next unless procedure.call(record, index)
6
+ accumulated_html_strings << html_string
7
+ end
8
+
9
+ accumulated_html_strings.join(' ')
10
+ end
11
+ end
@@ -0,0 +1,6 @@
1
+ module RenderTable::Options
2
+ def self.generate(table, template, record, index)
3
+ template = File.read(template) if File.exist? template
4
+ ERB.new(template, 0, '%<>').result(binding)
5
+ end
6
+ end
@@ -0,0 +1,29 @@
1
+
2
+ class RenderTable::Row
3
+ attr_accessor :record, :row_index, :html
4
+
5
+ def self.rows_for_table(table)
6
+ table.records.collect.with_index do |record, row_index|
7
+ RenderTable::Row.new(record, row_index, table)
8
+ end
9
+ end
10
+
11
+ def initialize(record, row_index, table)
12
+ @record = record
13
+ @row_index = row_index
14
+ @table = table
15
+ @html = @table.html[:rows]
16
+ end
17
+
18
+ def class
19
+ RenderTable::Html.html_string(@html[:classes], @record, @row_index)
20
+ end
21
+
22
+ def id
23
+ RenderTable::Html.html_string(@html[:ids], @record, @row_index)
24
+ end
25
+
26
+ def cells
27
+ RenderTable::Cell.cells_for_row(self, @table)
28
+ end
29
+ end
@@ -0,0 +1,40 @@
1
+ class RenderTable::Table < RenderTable::Base
2
+ def template
3
+ <<-HTML
4
+ <table id="<%= table.table_id %>" class="<%= table.table_class %>">
5
+ <thead>
6
+ <tr>
7
+ <% table.header.each do |header| %>
8
+ <th><%= header.to_s %></th>
9
+ <% end %>
10
+ <% if table.timestamps %>
11
+ <th>Date Created</th>
12
+ <th>Last Updated</th>
13
+ <% end %>
14
+ <% if table.options %>
15
+ <th>Options</th>
16
+ <% end %>
17
+ </tr>
18
+ </thead>
19
+ <tbody>
20
+ <% table.rows.each do |row| %>
21
+ <tr id="<%= row.id %>" class="<%= row.class %>">
22
+ <% row.cells.each do |cell| %>
23
+ <td id="<%= cell.id %>" class="<%= cell.class %>">
24
+ <%= cell.value %>
25
+ </td>
26
+ <% end %>
27
+ <% if table.timestamps %>
28
+ <td><%= row.record.created_at.strftime("%b %e, %Y - %l:%M %p %Z") %></td>
29
+ <td><%= row.record.updated_at.strftime("%b %e, %Y - %l:%M %p %Z") %></td>
30
+ <% end %>
31
+ <% if table.options %>
32
+ <td><%= options_cell(row.record, row.row_index) %></td>
33
+ <% end %>
34
+ </tr>
35
+ <% end %>
36
+ </tbody>
37
+ </table>
38
+ HTML
39
+ end
40
+ end
@@ -0,0 +1,3 @@
1
+ module RenderTable
2
+ VERSION = '2.0.1'.freeze
3
+ end
@@ -0,0 +1,23 @@
1
+ require 'render_table/version'
2
+ require 'render_table/configuration'
3
+ require 'render_table/html'
4
+ require 'render_table/base'
5
+ require 'render_table/row'
6
+ require 'render_table/cell'
7
+ require 'render_table/table'
8
+ require 'render_table/options'
9
+
10
+ module RenderTable
11
+ class << self
12
+ attr_accessor :configuration
13
+ end
14
+
15
+ def self.configure
16
+ self.configuration ||= RenderTable::Configuration.new
17
+ yield(configuration)
18
+ end
19
+
20
+ def self.config
21
+ self.configuration || RenderTable::Configuration.new
22
+ end
23
+ end
@@ -0,0 +1,27 @@
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'render_table/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'render_table_v2'
7
+ spec.version = RenderTable::VERSION
8
+ spec.authors = ['Manuel Morales', 'Mary Kniffin', 'Leo Policastro']
9
+ spec.email = ['emau757@gmail.com']
10
+
11
+ spec.summary = 'Extensible ruby html table building classes.'
12
+ spec.homepage = 'https://github.com/galacticplastic/render_table'
13
+ spec.license = 'MIT'
14
+
15
+ # Specify which files should be added to the gem when it is released.
16
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
17
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
18
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ end
20
+ spec.bindir = 'exe'
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ['lib']
23
+
24
+ spec.add_development_dependency 'bundler', '~> 2.3.4'
25
+ spec.add_development_dependency 'rake', '~> 13.0.6'
26
+ spec.add_development_dependency 'rspec', '~> 3.10.0'
27
+ end
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: render_table_v2
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Manuel Morales
8
+ - Mary Kniffin
9
+ - Leo Policastro
10
+ autorequire:
11
+ bindir: exe
12
+ cert_chain: []
13
+ date: 2022-01-28 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: bundler
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: 2.3.4
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: 2.3.4
29
+ - !ruby/object:Gem::Dependency
30
+ name: rake
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - "~>"
34
+ - !ruby/object:Gem::Version
35
+ version: 13.0.6
36
+ type: :development
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: 13.0.6
43
+ - !ruby/object:Gem::Dependency
44
+ name: rspec
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: 3.10.0
50
+ type: :development
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: 3.10.0
57
+ description:
58
+ email:
59
+ - emau757@gmail.com
60
+ executables: []
61
+ extensions: []
62
+ extra_rdoc_files: []
63
+ files:
64
+ - ".gitignore"
65
+ - ".rspec"
66
+ - ".travis.yml"
67
+ - CODE_OF_CONDUCT.md
68
+ - Gemfile
69
+ - LICENSE.txt
70
+ - README.md
71
+ - Rakefile
72
+ - bin/console
73
+ - bin/setup
74
+ - lib/render_table.rb
75
+ - lib/render_table/base.rb
76
+ - lib/render_table/cell.rb
77
+ - lib/render_table/configuration.rb
78
+ - lib/render_table/html.rb
79
+ - lib/render_table/options.rb
80
+ - lib/render_table/row.rb
81
+ - lib/render_table/table.rb
82
+ - lib/render_table/version.rb
83
+ - render_table.gemspec
84
+ homepage: https://github.com/galacticplastic/render_table
85
+ licenses:
86
+ - MIT
87
+ metadata: {}
88
+ post_install_message:
89
+ rdoc_options: []
90
+ require_paths:
91
+ - lib
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ requirements: []
103
+ rubygems_version: 3.3.3
104
+ signing_key:
105
+ specification_version: 4
106
+ summary: Extensible ruby html table building classes.
107
+ test_files: []