tabulatr 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -1
- data/Changelog.textile +8 -4
- data/lib/tabulatr/tabulatr/header_cell.rb +2 -2
- data/lib/tabulatr/version.rb +1 -1
- data/spec/dummy_app/app/views/products/index_simple.html.erb +1 -0
- data/spec/requests/tabulatrs_spec.rb +1 -1
- metadata +3 -4
- data/Gemfile.lock +0 -142
data/.gitignore
CHANGED
data/Changelog.textile
CHANGED
@@ -1,23 +1,27 @@
|
|
1
1
|
h1. Changelog for tabulatr
|
2
2
|
|
3
|
+
h2. 0.1.3
|
4
|
+
|
5
|
+
* nicer table headers. Thanks to <a href="https://github.com/troya2" target="_blank">troya2 (Troy Anderson)</a>!
|
6
|
+
|
3
7
|
h2. 0.1.2
|
4
8
|
|
5
|
-
* Fixed bug with nil exception on 'empty' belongs_to association
|
9
|
+
* Fixed bug with nil exception on 'empty' belongs_to association. Thanks to <a href="https://github.com/dgm" target="_blank">dgm</a>!
|
6
10
|
|
7
11
|
h2. 0.1.1
|
8
12
|
|
9
|
-
* Fixed bug with "Select ..." buttons introduced in 0.1.0.
|
13
|
+
* Fixed bug with "Select ..." buttons introduced in 0.1.0.
|
10
14
|
* Added tests for these buttons.
|
11
15
|
|
12
16
|
h2. v0.1.0
|
13
17
|
|
14
|
-
* new <tt>find_for_table</tt> option <tt>:stateful</tt>. If
|
18
|
+
* new <tt>find_for_table</tt> option <tt>:stateful</tt>. If
|
15
19
|
|
16
20
|
<pre>
|
17
21
|
MyFancyModel.find_for_table params, :stateful => session
|
18
22
|
</pre>
|
19
23
|
|
20
|
-
is given, the current sorting, filtering, selecting and paging information is stored to the session and restored when reopened. Great for procession specifically filtered lists.
|
24
|
+
is given, the current sorting, filtering, selecting and paging information is stored to the session and restored when reopened. Great for procession specifically filtered lists.
|
21
25
|
|
22
26
|
h2. v0.0.5 (2011-03-28)
|
23
27
|
|
@@ -37,7 +37,7 @@ class Tabulatr
|
|
37
37
|
bid = "#{@classname}#{@table_form_options[:sort_postfix]}"
|
38
38
|
opts = normalize_column_options opts
|
39
39
|
make_tag(:th, opts[:th_html]) do
|
40
|
-
concat(t(opts[:header] || name.to_s.
|
40
|
+
concat(t(opts[:header] || name.to_s.humanize.titlecase), :escape_html)
|
41
41
|
if opts[:sortable] and @table_options[:sortable]
|
42
42
|
if @sorting and @sorting[:by].to_s == name.to_s
|
43
43
|
pname = "#{sortparam}[_resort][#{name}][#{@sorting[:direction] == 'asc' ? 'desc' : 'asc'}]"
|
@@ -74,7 +74,7 @@ class Tabulatr
|
|
74
74
|
# change classes accordingly
|
75
75
|
end
|
76
76
|
make_tag(:th, opts[:th_html]) do
|
77
|
-
concat(t(opts[:header] || "#{relation.to_s.
|
77
|
+
concat(t(opts[:header] || "#{relation.to_s.humanize.titlecase} #{name.to_s.humanize.titlecase}"), :escape_html)
|
78
78
|
end # </th>
|
79
79
|
end
|
80
80
|
|
data/lib/tabulatr/version.rb
CHANGED
@@ -52,7 +52,7 @@ describe "Tabulatrs" do
|
|
52
52
|
|
53
53
|
it "contains column headers" do
|
54
54
|
visit index_simple_products_path
|
55
|
-
['Id','Title','Price','Active','Vendor Name','Tags Title','Tags Count'].each do |n|
|
55
|
+
['Id','Title','Price','Active','Created At','Vendor Name','Tags Title','Tags Count'].each do |n|
|
56
56
|
page.should have_content(n)
|
57
57
|
end
|
58
58
|
end if CONTAINS_COLUMN_HEADERS
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: tabulatr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Peter Horn
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-04-
|
14
|
+
date: 2011-04-11 00:00:00 +02:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
@@ -60,7 +60,6 @@ files:
|
|
60
60
|
- .rspec
|
61
61
|
- Changelog.textile
|
62
62
|
- Gemfile
|
63
|
-
- Gemfile.lock
|
64
63
|
- LICENSE
|
65
64
|
- README.textile
|
66
65
|
- Rakefile
|
@@ -195,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
194
|
requirements: []
|
196
195
|
|
197
196
|
rubyforge_project: tabulatr
|
198
|
-
rubygems_version: 1.
|
197
|
+
rubygems_version: 1.5.0
|
199
198
|
signing_key:
|
200
199
|
specification_version: 3
|
201
200
|
summary: A tight DSL to build tables of ActiveRecord models with sorting, pagination, finding/filtering, selecting and batch actions.
|
data/Gemfile.lock
DELETED
@@ -1,142 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
tabulatr (0.1.2)
|
5
|
-
id_stuffer (>= 0.0.1)
|
6
|
-
rails (~> 3.0)
|
7
|
-
whiny_hash (>= 0.0.2)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: http://rubygems.org/
|
11
|
-
specs:
|
12
|
-
abstract (1.0.0)
|
13
|
-
actionmailer (3.0.5)
|
14
|
-
actionpack (= 3.0.5)
|
15
|
-
mail (~> 2.2.15)
|
16
|
-
actionpack (3.0.5)
|
17
|
-
activemodel (= 3.0.5)
|
18
|
-
activesupport (= 3.0.5)
|
19
|
-
builder (~> 2.1.2)
|
20
|
-
erubis (~> 2.6.6)
|
21
|
-
i18n (~> 0.4)
|
22
|
-
rack (~> 1.2.1)
|
23
|
-
rack-mount (~> 0.6.13)
|
24
|
-
rack-test (~> 0.5.7)
|
25
|
-
tzinfo (~> 0.3.23)
|
26
|
-
activemodel (3.0.5)
|
27
|
-
activesupport (= 3.0.5)
|
28
|
-
builder (~> 2.1.2)
|
29
|
-
i18n (~> 0.4)
|
30
|
-
activerecord (3.0.5)
|
31
|
-
activemodel (= 3.0.5)
|
32
|
-
activesupport (= 3.0.5)
|
33
|
-
arel (~> 2.0.2)
|
34
|
-
tzinfo (~> 0.3.23)
|
35
|
-
activeresource (3.0.5)
|
36
|
-
activemodel (= 3.0.5)
|
37
|
-
activesupport (= 3.0.5)
|
38
|
-
activesupport (3.0.5)
|
39
|
-
arel (2.0.9)
|
40
|
-
builder (2.1.2)
|
41
|
-
capybara (0.4.1.2)
|
42
|
-
celerity (>= 0.7.9)
|
43
|
-
culerity (>= 0.2.4)
|
44
|
-
mime-types (>= 1.16)
|
45
|
-
nokogiri (>= 1.3.3)
|
46
|
-
rack (>= 1.0.0)
|
47
|
-
rack-test (>= 0.5.4)
|
48
|
-
selenium-webdriver (>= 0.0.27)
|
49
|
-
xpath (~> 0.1.3)
|
50
|
-
celerity (0.8.9)
|
51
|
-
childprocess (0.1.8)
|
52
|
-
ffi (~> 1.0.6)
|
53
|
-
columnize (0.3.2)
|
54
|
-
configuration (1.2.0)
|
55
|
-
culerity (0.2.15)
|
56
|
-
database_cleaner (0.6.6)
|
57
|
-
diff-lcs (1.1.2)
|
58
|
-
erubis (2.6.6)
|
59
|
-
abstract (>= 1.0.0)
|
60
|
-
ffi (1.0.7)
|
61
|
-
rake (>= 0.8.7)
|
62
|
-
i18n (0.5.0)
|
63
|
-
id_stuffer (0.0.1)
|
64
|
-
json_pure (1.5.1)
|
65
|
-
launchy (0.4.0)
|
66
|
-
configuration (>= 0.0.5)
|
67
|
-
rake (>= 0.8.1)
|
68
|
-
linecache (0.43)
|
69
|
-
mail (2.2.15)
|
70
|
-
activesupport (>= 2.3.6)
|
71
|
-
i18n (>= 0.4.0)
|
72
|
-
mime-types (~> 1.16)
|
73
|
-
treetop (~> 1.4.8)
|
74
|
-
mime-types (1.16)
|
75
|
-
nokogiri (1.4.4)
|
76
|
-
polyglot (0.3.1)
|
77
|
-
rack (1.2.2)
|
78
|
-
rack-mount (0.6.14)
|
79
|
-
rack (>= 1.0.0)
|
80
|
-
rack-test (0.5.7)
|
81
|
-
rack (>= 1.0)
|
82
|
-
rails (3.0.5)
|
83
|
-
actionmailer (= 3.0.5)
|
84
|
-
actionpack (= 3.0.5)
|
85
|
-
activerecord (= 3.0.5)
|
86
|
-
activeresource (= 3.0.5)
|
87
|
-
activesupport (= 3.0.5)
|
88
|
-
bundler (~> 1.0)
|
89
|
-
railties (= 3.0.5)
|
90
|
-
railties (3.0.5)
|
91
|
-
actionpack (= 3.0.5)
|
92
|
-
activesupport (= 3.0.5)
|
93
|
-
rake (>= 0.8.7)
|
94
|
-
thor (~> 0.14.4)
|
95
|
-
rake (0.8.7)
|
96
|
-
rspec (2.5.0)
|
97
|
-
rspec-core (~> 2.5.0)
|
98
|
-
rspec-expectations (~> 2.5.0)
|
99
|
-
rspec-mocks (~> 2.5.0)
|
100
|
-
rspec-core (2.5.1)
|
101
|
-
rspec-expectations (2.5.0)
|
102
|
-
diff-lcs (~> 1.1.2)
|
103
|
-
rspec-mocks (2.5.0)
|
104
|
-
rspec-rails (2.5.0)
|
105
|
-
actionpack (~> 3.0)
|
106
|
-
activesupport (~> 3.0)
|
107
|
-
railties (~> 3.0)
|
108
|
-
rspec (~> 2.5.0)
|
109
|
-
ruby-debug (0.10.4)
|
110
|
-
columnize (>= 0.1)
|
111
|
-
ruby-debug-base (~> 0.10.4.0)
|
112
|
-
ruby-debug-base (0.10.4)
|
113
|
-
linecache (>= 0.3)
|
114
|
-
rubyzip (0.9.4)
|
115
|
-
selenium-webdriver (0.1.4)
|
116
|
-
childprocess (>= 0.1.7)
|
117
|
-
ffi (>= 1.0.7)
|
118
|
-
json_pure
|
119
|
-
rubyzip
|
120
|
-
sqlite3 (1.3.3)
|
121
|
-
sqlite3-ruby (1.3.3)
|
122
|
-
sqlite3 (>= 1.3.3)
|
123
|
-
thor (0.14.6)
|
124
|
-
treetop (1.4.9)
|
125
|
-
polyglot (>= 0.3.1)
|
126
|
-
tzinfo (0.3.25)
|
127
|
-
whiny_hash (0.0.2)
|
128
|
-
xpath (0.1.3)
|
129
|
-
nokogiri (~> 1.3)
|
130
|
-
|
131
|
-
PLATFORMS
|
132
|
-
ruby
|
133
|
-
|
134
|
-
DEPENDENCIES
|
135
|
-
capybara
|
136
|
-
database_cleaner
|
137
|
-
launchy
|
138
|
-
rspec
|
139
|
-
rspec-rails
|
140
|
-
ruby-debug
|
141
|
-
sqlite3-ruby
|
142
|
-
tabulatr!
|