greentable 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +20 -1
- data/README.md +2 -0
- data/greentable.gemspec +2 -2
- data/lib/greentable/export.rb +1 -1
- data/lib/greentable/version.rb +1 -1
- data/test/dummy/log/test.log +237 -0
- data/test/greentable_test.rb +19 -0
- data/test/test_helper.rb +5 -4
- metadata +36 -4
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
greentable (0.9.
|
4
|
+
greentable (0.9.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -36,6 +36,13 @@ GEM
|
|
36
36
|
arel (3.0.3)
|
37
37
|
builder (3.0.4)
|
38
38
|
coderay (1.0.9)
|
39
|
+
coveralls (0.7.0)
|
40
|
+
multi_json (~> 1.3)
|
41
|
+
rest-client
|
42
|
+
simplecov (>= 0.7)
|
43
|
+
term-ansicolor
|
44
|
+
thor
|
45
|
+
docile (1.1.3)
|
39
46
|
erubis (2.7.0)
|
40
47
|
fastercsv (1.5.5)
|
41
48
|
ffi (1.9.0)
|
@@ -105,6 +112,13 @@ GEM
|
|
105
112
|
ffi (>= 0.5.0)
|
106
113
|
rdoc (3.12.2)
|
107
114
|
json (~> 1.4)
|
115
|
+
rest-client (1.6.7)
|
116
|
+
mime-types (>= 1.16)
|
117
|
+
simplecov (0.8.2)
|
118
|
+
docile (~> 1.1.0)
|
119
|
+
multi_json
|
120
|
+
simplecov-html (~> 0.8.0)
|
121
|
+
simplecov-html (0.8.0)
|
108
122
|
slop (3.4.6)
|
109
123
|
sprockets (2.2.2)
|
110
124
|
hike (~> 1.2)
|
@@ -112,9 +126,12 @@ GEM
|
|
112
126
|
rack (~> 1.0)
|
113
127
|
tilt (~> 1.1, != 1.3.0)
|
114
128
|
sqlite3 (1.3.9)
|
129
|
+
term-ansicolor (1.3.0)
|
130
|
+
tins (~> 1.0)
|
115
131
|
test-unit (2.5.5)
|
116
132
|
thor (0.19.1)
|
117
133
|
tilt (1.4.1)
|
134
|
+
tins (1.0.1)
|
118
135
|
treetop (1.4.15)
|
119
136
|
polyglot
|
120
137
|
polyglot (>= 0.3.1)
|
@@ -124,6 +141,7 @@ PLATFORMS
|
|
124
141
|
ruby
|
125
142
|
|
126
143
|
DEPENDENCIES
|
144
|
+
coveralls
|
127
145
|
fastercsv
|
128
146
|
greentable!
|
129
147
|
guard-test
|
@@ -131,5 +149,6 @@ DEPENDENCIES
|
|
131
149
|
nokogiri
|
132
150
|
rack-test
|
133
151
|
rails (~> 3.2.17)
|
152
|
+
simplecov
|
134
153
|
sqlite3
|
135
154
|
test-unit
|
data/README.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
[![Build Status](https://travis-ci.org/waelchatila/greentable.svg?branch=master)](https://travis-ci.org/waelchatila/greentable)
|
2
|
+
[![Coverage Status](https://coveralls.io/repos/waelchatila/greentable/badge.png?branch=master)](https://coveralls.io/r/waelchatila/greentable?branch=master)
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/greentable.png)](http://badge.fury.io/rb/greentable)
|
2
4
|
Greentable
|
3
5
|
==========
|
4
6
|
Greentable produces HTML tables from an array without you having to deal with any HTML elements.
|
data/greentable.gemspec
CHANGED
@@ -25,8 +25,8 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency "fastercsv"
|
26
26
|
spec.add_development_dependency "guard-test"
|
27
27
|
spec.add_development_dependency "rack-test"
|
28
|
-
|
29
|
-
|
28
|
+
spec.add_development_dependency 'simplecov'
|
29
|
+
spec.add_development_dependency 'coveralls'
|
30
30
|
end
|
31
31
|
|
32
32
|
|
data/lib/greentable/export.rb
CHANGED
@@ -13,7 +13,7 @@ module Greentable
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def _call(env)
|
16
|
-
status, headers, response = @app.call(env)
|
16
|
+
status, headers, response = @app.call(env)
|
17
17
|
greentable_export = (env['QUERY_STRING'] || '').scan(/greentable_export=([csv|print]+)/i)[0][0] rescue nil
|
18
18
|
if greentable_export
|
19
19
|
request = Rack::Request.new(env)
|
data/lib/greentable/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -1879,3 +1879,240 @@ Processing by ApplicationController#home as HTML
|
|
1879
1879
|
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"print"}
|
1880
1880
|
Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms)
|
1881
1881
|
[1m[35m (0.0ms)[0m rollback transaction
|
1882
|
+
Connecting to database specified by database.yml
|
1883
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
1884
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1885
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1886
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1887
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1888
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1889
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1890
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1891
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1892
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1893
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1894
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1895
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1896
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1897
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1898
|
+
Started GET "/" for 127.0.0.1 at 2014-03-30 01:44:36 +0100
|
1899
|
+
Processing by ApplicationController#home as HTML
|
1900
|
+
Rendered application/home.html.erb within layouts/application (2.1ms)
|
1901
|
+
Completed 200 OK in 9.3ms (Views: 9.0ms | ActiveRecord: 0.0ms)
|
1902
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1903
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1904
|
+
Started GET "/?greentable_id=greentable_id&greentable_export=csv" for 127.0.0.1 at 2014-03-30 01:44:36 +0100
|
1905
|
+
Processing by ApplicationController#home as HTML
|
1906
|
+
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"csv"}
|
1907
|
+
Completed 200 OK in 1.7ms (Views: 1.5ms | ActiveRecord: 0.0ms)
|
1908
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1909
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1910
|
+
Started GET "/?greentable_id=greentable_id&greentable_export=print" for 127.0.0.1 at 2014-03-30 01:44:36 +0100
|
1911
|
+
Processing by ApplicationController#home as HTML
|
1912
|
+
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"print"}
|
1913
|
+
Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms)
|
1914
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1915
|
+
Connecting to database specified by database.yml
|
1916
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1917
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1918
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1919
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1920
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1921
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1922
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1923
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1924
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1925
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1926
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1927
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1928
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1929
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1930
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1931
|
+
Started GET "/" for 127.0.0.1 at 2014-03-30 01:45:00 +0100
|
1932
|
+
Processing by ApplicationController#home as HTML
|
1933
|
+
Rendered application/home.html.erb within layouts/application (2.0ms)
|
1934
|
+
Completed 200 OK in 31.9ms (Views: 31.6ms | ActiveRecord: 0.0ms)
|
1935
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1936
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1937
|
+
Started GET "/?greentable_id=greentable_id&greentable_export=csv" for 127.0.0.1 at 2014-03-30 01:45:00 +0100
|
1938
|
+
Processing by ApplicationController#home as HTML
|
1939
|
+
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"csv"}
|
1940
|
+
Completed 200 OK in 1.7ms (Views: 1.6ms | ActiveRecord: 0.0ms)
|
1941
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1942
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1943
|
+
Started GET "/?greentable_id=greentable_id&greentable_export=print" for 127.0.0.1 at 2014-03-30 01:45:00 +0100
|
1944
|
+
Processing by ApplicationController#home as HTML
|
1945
|
+
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"print"}
|
1946
|
+
Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms)
|
1947
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1948
|
+
Connecting to database specified by database.yml
|
1949
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1950
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1951
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1952
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1953
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1954
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1955
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1956
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1957
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1958
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1959
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1960
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1961
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1962
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1963
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1964
|
+
Started GET "/" for 127.0.0.1 at 2014-03-30 01:45:12 +0100
|
1965
|
+
Processing by ApplicationController#home as HTML
|
1966
|
+
Rendered application/home.html.erb within layouts/application (2.0ms)
|
1967
|
+
Completed 200 OK in 30.4ms (Views: 30.1ms | ActiveRecord: 0.0ms)
|
1968
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1969
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1970
|
+
Started GET "/?greentable_id=greentable_id&greentable_export=csv" for 127.0.0.1 at 2014-03-30 01:45:12 +0100
|
1971
|
+
Processing by ApplicationController#home as HTML
|
1972
|
+
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"csv"}
|
1973
|
+
Completed 200 OK in 1.6ms (Views: 1.4ms | ActiveRecord: 0.0ms)
|
1974
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1975
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1976
|
+
Started GET "/?greentable_id=greentable_id&greentable_export=print" for 127.0.0.1 at 2014-03-30 01:45:12 +0100
|
1977
|
+
Processing by ApplicationController#home as HTML
|
1978
|
+
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"print"}
|
1979
|
+
Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms)
|
1980
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1981
|
+
Connecting to database specified by database.yml
|
1982
|
+
[1m[36m (3.2ms)[0m [1mbegin transaction[0m
|
1983
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1984
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1985
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1986
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1987
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1988
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1989
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1990
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1991
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1992
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1993
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1994
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1995
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1996
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1997
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1998
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1999
|
+
Started GET "/" for 127.0.0.1 at 2014-03-31 11:25:37 +0200
|
2000
|
+
Processing by ApplicationController#home as HTML
|
2001
|
+
Rendered application/home.html.erb within layouts/application (2.5ms)
|
2002
|
+
Completed 200 OK in 11.7ms (Views: 11.4ms | ActiveRecord: 0.0ms)
|
2003
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2004
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2005
|
+
Started GET "/?greentable_id=greentable_id&greentable_export=csv" for 127.0.0.1 at 2014-03-31 11:25:37 +0200
|
2006
|
+
Processing by ApplicationController#home as HTML
|
2007
|
+
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"csv"}
|
2008
|
+
Completed 200 OK in 1.7ms (Views: 1.5ms | ActiveRecord: 0.0ms)
|
2009
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2010
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2011
|
+
Started GET "/?greentable_id=greentable_id&greentable_export=print" for 127.0.0.1 at 2014-03-31 11:25:37 +0200
|
2012
|
+
Processing by ApplicationController#home as HTML
|
2013
|
+
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"print"}
|
2014
|
+
Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms)
|
2015
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2016
|
+
Connecting to database specified by database.yml
|
2017
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
2018
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2019
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2020
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2021
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2022
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2023
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2024
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2025
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2026
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2027
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2028
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2029
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2030
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2031
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2032
|
+
Started GET "/" for 127.0.0.1 at 2014-03-31 11:26:12 +0200
|
2033
|
+
Processing by ApplicationController#home as HTML
|
2034
|
+
Rendered application/home.html.erb within layouts/application (2.1ms)
|
2035
|
+
Completed 200 OK in 30.2ms (Views: 29.9ms | ActiveRecord: 0.0ms)
|
2036
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2037
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2038
|
+
Started GET "/?greentable_id=greentable_id&greentable_export=csv" for 127.0.0.1 at 2014-03-31 11:26:12 +0200
|
2039
|
+
Processing by ApplicationController#home as HTML
|
2040
|
+
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"csv"}
|
2041
|
+
Completed 200 OK in 1.5ms (Views: 1.4ms | ActiveRecord: 0.0ms)
|
2042
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2043
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2044
|
+
Started GET "/?greentable_id=greentable_id&greentable_export=print" for 127.0.0.1 at 2014-03-31 11:26:12 +0200
|
2045
|
+
Processing by ApplicationController#home as HTML
|
2046
|
+
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"print"}
|
2047
|
+
Completed 200 OK in 1.5ms (Views: 1.4ms | ActiveRecord: 0.0ms)
|
2048
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2049
|
+
Connecting to database specified by database.yml
|
2050
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
2051
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2052
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2053
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2054
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2055
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2056
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2057
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2058
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
2059
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2060
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2061
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2062
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2063
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2064
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2065
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2066
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2067
|
+
Started GET "/" for 127.0.0.1 at 2014-03-31 11:26:48 +0200
|
2068
|
+
Processing by ApplicationController#home as HTML
|
2069
|
+
Rendered application/home.html.erb within layouts/application (1.8ms)
|
2070
|
+
Completed 200 OK in 9.5ms (Views: 9.1ms | ActiveRecord: 0.0ms)
|
2071
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2072
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2073
|
+
Started GET "/?greentable_id=greentable_id&greentable_export=csv" for 127.0.0.1 at 2014-03-31 11:26:48 +0200
|
2074
|
+
Processing by ApplicationController#home as HTML
|
2075
|
+
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"csv"}
|
2076
|
+
Completed 200 OK in 1.6ms (Views: 1.5ms | ActiveRecord: 0.0ms)
|
2077
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2078
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2079
|
+
Started GET "/?greentable_id=greentable_id&greentable_export=print" for 127.0.0.1 at 2014-03-31 11:26:48 +0200
|
2080
|
+
Processing by ApplicationController#home as HTML
|
2081
|
+
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"print"}
|
2082
|
+
Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms)
|
2083
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2084
|
+
Connecting to database specified by database.yml
|
2085
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
2086
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2087
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2088
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2089
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2090
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2091
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2092
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2093
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2094
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2095
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2096
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2097
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2098
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2099
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2100
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2101
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2102
|
+
Started GET "/" for 127.0.0.1 at 2014-03-31 11:27:22 +0200
|
2103
|
+
Processing by ApplicationController#home as HTML
|
2104
|
+
Rendered application/home.html.erb within layouts/application (2.0ms)
|
2105
|
+
Completed 200 OK in 31.2ms (Views: 30.9ms | ActiveRecord: 0.0ms)
|
2106
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2107
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2108
|
+
Started GET "/?greentable_id=greentable_id&greentable_export=csv" for 127.0.0.1 at 2014-03-31 11:27:22 +0200
|
2109
|
+
Processing by ApplicationController#home as HTML
|
2110
|
+
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"csv"}
|
2111
|
+
Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms)
|
2112
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2113
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2114
|
+
Started GET "/?greentable_id=greentable_id&greentable_export=print" for 127.0.0.1 at 2014-03-31 11:27:22 +0200
|
2115
|
+
Processing by ApplicationController#home as HTML
|
2116
|
+
Parameters: {"greentable_id"=>"greentable_id", "greentable_export"=>"print"}
|
2117
|
+
Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms)
|
2118
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
data/test/greentable_test.rb
CHANGED
@@ -87,4 +87,23 @@ class GreentableTest < ActiveSupport::TestCase
|
|
87
87
|
end
|
88
88
|
assert_equal '<table class="a aa" style="b:c"><thead><tr class="d"><th onclick="e();" class="h i ee">col0</th><th onclick="e();" class="ee">col1</th></tr></thead><tbody><tr class="d"><td data-target="f" class="h ff">0</td><td data-target="f" class="j ff">0</td></tr></tbody></table>', gt.to_s
|
89
89
|
end
|
90
|
+
|
91
|
+
test "global configuration" do
|
92
|
+
Greentable.configure do |config|
|
93
|
+
config.defaults = {class: 'table_class', tr: {class: 'tr_class'}, th: {class: 'th_class'}, td: {class: 'td_class'}}
|
94
|
+
end
|
95
|
+
begin
|
96
|
+
gt = Greentable::Table.new(self,[0], {})
|
97
|
+
gt.process do |gt, x|
|
98
|
+
gt.col('col0') do
|
99
|
+
x
|
100
|
+
end
|
101
|
+
end
|
102
|
+
assert_equal "<table class=\"table_class\"><thead><tr class=\"tr_class\"><th class=\"th_class\">col0</th></tr></thead><tbody><tr class=\"tr_class\"><td class=\"td_class\">0</td></tr></tbody></table>", gt.to_s
|
103
|
+
ensure
|
104
|
+
Greentable.configure do |config|
|
105
|
+
config.defaults = {}
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
90
109
|
end
|
data/test/test_helper.rb
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
SimpleCov.start('rails')
|
3
|
+
|
1
4
|
# Configure Rails Environment
|
2
5
|
ENV["RAILS_ENV"] = "test"
|
3
6
|
|
@@ -16,10 +19,8 @@ Rails.backtrace_cleaner.remove_silencers!
|
|
16
19
|
|
17
20
|
|
18
21
|
require 'greentable'
|
19
|
-
|
20
|
-
|
21
|
-
#SimpleCov.start('rails')
|
22
|
-
#Coveralls.wear!
|
22
|
+
require 'coveralls'
|
23
|
+
Coveralls.wear!
|
23
24
|
|
24
25
|
public
|
25
26
|
|
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.9.
|
4
|
+
version: 0.9.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -123,6 +123,38 @@ dependencies:
|
|
123
123
|
- - ! '>='
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: simplecov
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: coveralls
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
126
158
|
description: Greentable produces HTML tables from an array without you having to deal
|
127
159
|
with any HTML elements.
|
128
160
|
email:
|
@@ -215,7 +247,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
215
247
|
version: '0'
|
216
248
|
segments:
|
217
249
|
- 0
|
218
|
-
hash:
|
250
|
+
hash: -3809614129295099888
|
219
251
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
252
|
none: false
|
221
253
|
requirements:
|
@@ -224,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
256
|
version: '0'
|
225
257
|
segments:
|
226
258
|
- 0
|
227
|
-
hash:
|
259
|
+
hash: -3809614129295099888
|
228
260
|
requirements: []
|
229
261
|
rubyforge_project:
|
230
262
|
rubygems_version: 1.8.25
|