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 +5 -5
- data/.gitignore +1 -0
- data/README.md +5 -1
- data/lib/table_go/renderers/renderer_base.rb +5 -5
- data/lib/table_go/version.rb +1 -1
- data/spec/table_go/renderers/csv_renderer_spec.rb +2 -2
- metadata +2 -2
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:
|
|
7
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8f06c241e066e961405fc1238dcdc8269e89fc33bb4955a5d6f3cc55fb70532a6d67d5bccb4d205b5857a7f799c84459af62b83eeb62180e5e5cb2b87c47e9f
|
|
4
|
+
data.tar.gz: 7205d17bc0cbf241ccab0ce955c15fe84fea721c6ee8e2cae655d440e8d3ea3fb08fd16e4dc12bbfe384d3ceb5acbbe05e1e64cc7329633bdcd7cdb62fafa9e9
|
|
5
|
+
SHA1:
|
|
6
|
+
metadata.gz: 2974ec0b7e439e63cecb042fc30c24dbddde570d
|
|
7
|
+
data.tar.gz: eaf33867d2e5a9e9ec52c0342191e2c9896bbb90
|
data/.gitignore
CHANGED
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, :
|
|
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
|
-
|
|
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
|
|
data/lib/table_go/version.rb
CHANGED
|
@@ -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.
|
|
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-
|
|
13
|
+
date: 2013-12-16 00:00:00 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: actionpack
|