table_go 0.2.5 → 0.2.6

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
- SHA1:
3
- metadata.gz: ca0a48b52a72f1e6d4280ed7cdc92622dba71b19
4
- data.tar.gz: cf79fc90e2b7926a42178768523eb0b3da9dbce2
5
2
  SHA512:
6
- metadata.gz: 5792a5aabc9e3696541a730d1d2ffff9e11da6e369ceedc995911414f8c88a9785e96000550f633949230b112c2fff93cd461f13976b34cda481b90b705c5256
7
- data.tar.gz: 133644075dbedcd9e1fa3515728f38fc505240f2646cb6210cda249f611afb05f297886d316f492a968e9a70f62428bb73c75eb2ad415a8c4d869382c77deb4a
3
+ metadata.gz: e8f06c241e066e961405fc1238dcdc8269e89fc33bb4955a5d6f3cc55fb70532a6d67d5bccb4d205b5857a7f799c84459af62b83eeb62180e5e5cb2b87c47e9f
4
+ data.tar.gz: 7205d17bc0cbf241ccab0ce955c15fe84fea721c6ee8e2cae655d440e8d3ea3fb08fd16e4dc12bbfe384d3ceb5acbbe05e1e64cc7329633bdcd7cdb62fafa9e9
5
+ SHA1:
6
+ metadata.gz: 2974ec0b7e439e63cecb042fc30c24dbddde570d
7
+ data.tar.gz: eaf33867d2e5a9e9ec52c0342191e2c9896bbb90
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ .idea/*
data/README.md CHANGED
@@ -20,7 +20,7 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- example in HAML
23
+ example in HAML (or more here: http://table-go-example.exsemt.de/)
24
24
 
25
25
  = table_go_for @orders, Order, :title => 'one Table',
26
26
  :table_html => { :id => :the_table },
@@ -78,6 +78,10 @@ example in HAML
78
78
 
79
79
  ## Changelog
80
80
 
81
+ #### 0.2.6
82
+
83
+ - bugfixing
84
+
81
85
  #### 0.2.5
82
86
 
83
87
  - fixed generate csv bug
@@ -91,20 +91,20 @@ module TableGo
91
91
  template.is_haml? ? capture_haml { yield } : template.capture { yield }
92
92
  end
93
93
 
94
- delegate :with_haml_buffer, :haml_buffer, :to => :template
94
+ #delegate :with_haml_buffer, :to => :template
95
95
 
96
96
  # stripped down ripoff from Haml's capture_haml, needed for speed
97
97
  def capture_haml(*args, &block)
98
98
  # buffer = eval('if defined? _hamlout then _hamlout else nil end', block.binding) || haml_buffer
99
99
  # buffer = haml_buffer
100
100
  # with_haml_buffer(buffer) do
101
- position = haml_buffer.buffer.length
101
+ position = template.send(:haml_buffer).buffer.length
102
102
 
103
- haml_buffer.capture_position = position
103
+ template.send(:haml_buffer).capture_position = position
104
104
  block.call(*args)
105
105
 
106
106
  # captured = haml_buffer.buffer.slice!(0..-1)
107
- captured = haml_buffer.buffer.slice!(position..-1)
107
+ captured = template.send(:haml_buffer).buffer.slice!(position..-1)
108
108
  # return captured if haml_buffer.options[:ugly]
109
109
 
110
110
  # debugger
@@ -124,7 +124,7 @@ module TableGo
124
124
  # end.join
125
125
  # end
126
126
  ensure
127
- haml_buffer.capture_position = nil
127
+ template.send(:haml_buffer).capture_position = nil
128
128
  end
129
129
 
130
130
 
@@ -1,3 +1,3 @@
1
1
  module TableGo
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
3
3
  end
@@ -25,7 +25,7 @@ describe TableGo::Renderers::CsvRenderer do
25
25
  end
26
26
 
27
27
  describe 'automatic mode without title row, render_rows_only => true' do
28
- subject { TableGo.render_csv(articles, Article, {:render_rows_only => true}) }
28
+ subject { TableGo.render_csv(articles, Article, {}, {:render_rows_only => true}) }
29
29
 
30
30
  it 'should render a simple automatic csv table' do
31
31
  subject.cleanup_csv.should == %Q(
@@ -36,7 +36,7 @@ describe TableGo::Renderers::CsvRenderer do
36
36
  end
37
37
 
38
38
  describe 'automatic mode without_header => true' do
39
- subject { TableGo.render_csv(articles, Article, {:without_header => true}) }
39
+ subject { TableGo.render_csv(articles, Article, {}, {:without_header => true}) }
40
40
 
41
41
  it 'should render a simple automatic csv table' do
42
42
  subject.cleanup_csv.should == %Q(
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table_go
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Gollnow
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2013-12-03 00:00:00 Z
13
+ date: 2013-12-16 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: actionpack