greentable 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/greentable.gemspec CHANGED
@@ -1,8 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "greentable"
3
- s.version = "0.0.2"
3
+ s.version = "0.0.3"
4
4
  s.author = "Wael Chatila"
5
- s.summary = "Rails declarative html tables with export (xls,csv) features"
5
+ s.homepage = "https://github.com/waelchatila/greentable"
6
+ s.summary = "Rails declarative html tables with export features"
7
+ s.description = "Rails declarative html tables with export features"
6
8
 
7
9
  s.files = `git ls-files`.split("\n")
8
10
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -1,9 +1,6 @@
1
1
  require 'greentable/greentable_counter'
2
2
 
3
3
  module Greentable
4
- #class Column
5
- # attr_accessor :attributes, :html, :tag
6
- #end
7
4
 
8
5
  class Table
9
6
  def initialize(parent, records, opts)
@@ -28,14 +25,8 @@ module Greentable
28
25
  return if capture_headers
29
26
  return if opts[:display_on] == :first && !@row_counter.first?
30
27
  return if opts[:display_on] == :last && !@row_counter.last?
31
- #@th_html[@col_counter] = th
32
- #@td_html[@col_counter] = capture(@records[@row_counter.i], self, &block)
33
28
  end
34
29
 
35
- #def current_row
36
- # @rows_attributes[@counter.rows]
37
- #end
38
-
39
30
  def greencolumn(th = nil, opts = {}, &block)
40
31
  @th_html[@current_col] = th
41
32
 
@@ -7,8 +7,8 @@ module Greentable
7
7
  ActionView::Base.send :include, ViewHelpers
8
8
  end
9
9
 
10
- initializer "greentable.rackexport" do |app|
11
- app.middleware.use Greentable::Export
12
- end
10
+ #initializer "greentable.rackexport" do |app|
11
+ # app.middleware.use Greentable::Export
12
+ #end
13
13
  end
14
14
  end
@@ -3,17 +3,9 @@ require 'greentable/greentable_table'
3
3
  module Greentable
4
4
  module ViewHelpers
5
5
  def greentable(records, opts = {}, &block)
6
- begin
7
- gt = Table.new(self,records, opts)
8
- gt.process(&block)
9
- gt.to_s.html_safe
10
- rescue => e
11
- concat("<b>"+e.message+"</b><br><br>".html_safe)
12
- concat(e.backtrace.each{|x| x.to_s}.join('<br>').html_safe)
13
- return e
14
- end
6
+ gt = Table.new(self,records, opts)
7
+ gt.process(&block)
8
+ gt.to_s.html_safe
15
9
  end
16
-
17
- private
18
10
  end
19
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: greentable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -43,7 +43,7 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
- description:
46
+ description: Rails declarative html tables with export features
47
47
  email:
48
48
  executables: []
49
49
  extensions: []
@@ -59,7 +59,7 @@ files:
59
59
  - lib/greentable/greentable_table.rb
60
60
  - lib/greentable/railtie.rb
61
61
  - lib/greentable/view_helpers.rb
62
- homepage:
62
+ homepage: https://github.com/waelchatila/greentable
63
63
  licenses: []
64
64
  post_install_message:
65
65
  rdoc_options: []
@@ -82,5 +82,5 @@ rubyforge_project:
82
82
  rubygems_version: 1.8.25
83
83
  signing_key:
84
84
  specification_version: 3
85
- summary: Rails declarative html tables with export (xls,csv) features
85
+ summary: Rails declarative html tables with export features
86
86
  test_files: []