table_setter 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/VERSION.yml +1 -1
- data/index.html +1 -1
- data/lib/table_setter/table.rb +1 -1
- data/spec/table-setter_spec.rb +0 -6
- data/table_setter.gemspec +9 -9
- data/template/tables/example.yml +1 -1
- metadata +12 -9
data/Rakefile
CHANGED
@@ -16,7 +16,7 @@ begin
|
|
16
16
|
gem.add_dependency "thin", ">= 1.2.4"
|
17
17
|
gem.add_dependency "table_fu", ">= 0.3.4"
|
18
18
|
gem.add_dependency "sinatra", ">= 1.2.1"
|
19
|
-
gem.add_dependency "sinatra-static-assets", ">= 0.
|
19
|
+
gem.add_dependency "sinatra-static-assets", ">= 1.0.3"
|
20
20
|
gem.add_dependency "emk-sinatra-url-for", ">= 0.2.1"
|
21
21
|
gem.add_dependency "curb", ">= 0.7.15"
|
22
22
|
gem.add_dependency "rdiscount", ">= 1.6.8"
|
@@ -44,7 +44,7 @@ task :spec => :check_dependencies
|
|
44
44
|
|
45
45
|
task :default => :spec
|
46
46
|
|
47
|
-
require '
|
47
|
+
require 'rdoc/task'
|
48
48
|
Rake::RDocTask.new do |rdoc|
|
49
49
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
50
50
|
|
data/VERSION.yml
CHANGED
data/index.html
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
</head>
|
10
10
|
<body>
|
11
11
|
<a href="http://www.propublica.org" class="propublica"> </a>
|
12
|
-
<h1>TableSetter <small>– Version: 0.2.
|
12
|
+
<h1>TableSetter <small>– Version: 0.2.11</small></h1>
|
13
13
|
<p><a href="https://github.com/propublica/table-setter">TableSetter</a> is a Ruby app that provides an easy way to present CSVs hosted locally or remotely (e.g. on google, etc) in custom HTML. TableSetter in the wild: <a href="http://projects.propublica.org/tables/failed-banks">a list of all stimulus projects from last year</a>, <a href="http://projects.propublica.org/tables/stimulus-spending-progress">the stimulus spending progress</a>, or <a href="http://projects.propublica.org/tables/failed-banks">a list of failed banks due to the last recession</a>.</p>
|
14
14
|
<p>Each table is filterable and sortable on multiple columns. Also each column can be formatted in one of many different styles. In production mode, <strong>TableSetter</strong> provides valid expires headers and can be coupled with an upstream cache like <a href="http://rtomayko.github.com/rack-cache/">Rack::Cache</a> or varnish for speedy presentation.</p>
|
15
15
|
<h2><a id="toc">Table of Contents</a></h2>
|
data/lib/table_setter/table.rb
CHANGED
@@ -49,7 +49,7 @@ module TableSetter
|
|
49
49
|
# Returns a usable uri based on what sort of input we have.
|
50
50
|
def uri
|
51
51
|
case
|
52
|
-
when google_key then "https://
|
52
|
+
when google_key then "https://docs.google.com/spreadsheet/pub?key=#{google_key}&output=csv&single=true&gid=0"
|
53
53
|
when url then url
|
54
54
|
when file then File.expand_path("#{TableSetter.table_path}#{file}")
|
55
55
|
end
|
data/spec/table-setter_spec.rb
CHANGED
@@ -73,7 +73,6 @@ end
|
|
73
73
|
|
74
74
|
|
75
75
|
describe TableSetter::Table, "with hard pagination" do
|
76
|
-
|
77
76
|
before :each do
|
78
77
|
@data = TableSetter::Table.new("example_local")
|
79
78
|
end
|
@@ -111,12 +110,10 @@ describe TableSetter::Table, "with hard pagination" do
|
|
111
110
|
@data.page.should eql @data.total_pages
|
112
111
|
@data.next_page.should eql nil
|
113
112
|
end
|
114
|
-
|
115
113
|
end
|
116
114
|
|
117
115
|
|
118
116
|
describe TableSetter::Table, "with faceting and macros" do
|
119
|
-
|
120
117
|
before :all do
|
121
118
|
@data = TableSetter::Table.new("example_faceted")
|
122
119
|
@tables = @data.facets
|
@@ -150,9 +147,6 @@ describe TableSetter::Table, "with faceting and macros" do
|
|
150
147
|
it "should have $416,075,044 for North Carolina with dead row" do
|
151
148
|
@tables[35].total_for('Total Appropriation').to_s.should eql '$423,318,645'
|
152
149
|
end
|
153
|
-
|
154
|
-
|
155
|
-
|
156
150
|
end
|
157
151
|
|
158
152
|
describe TableSetter::Table, "group fetchers" do
|
data/table_setter.gemspec
CHANGED
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{table_setter}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.11"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date = %q{
|
11
|
+
s.authors = ["Jeff Larson"]
|
12
|
+
s.date = %q{2012-03-09}
|
13
13
|
s.description = %q{A sinatra based app for rendering CSVs hosted on google docs or locally in custom HTML}
|
14
14
|
s.email = %q{thejefflarson@gmail.com}
|
15
|
-
s.executables = [
|
15
|
+
s.executables = ["table-setter", "table-setter"]
|
16
16
|
s.extra_rdoc_files = [
|
17
17
|
"LICENSE",
|
18
18
|
"README",
|
@@ -124,9 +124,9 @@ Gem::Specification.new do |s|
|
|
124
124
|
"template/views/table.erb"
|
125
125
|
]
|
126
126
|
s.homepage = %q{http://propublica.github.com/table-setter/}
|
127
|
-
s.require_paths = [
|
127
|
+
s.require_paths = ["lib"]
|
128
128
|
s.rubyforge_project = %q{table-setter}
|
129
|
-
s.rubygems_version = %q{1.
|
129
|
+
s.rubygems_version = %q{1.6.2}
|
130
130
|
s.summary = %q{A sinatra based app for rendering CSVs in custom HTML}
|
131
131
|
|
132
132
|
if s.respond_to? :specification_version then
|
@@ -138,7 +138,7 @@ Gem::Specification.new do |s|
|
|
138
138
|
s.add_runtime_dependency(%q<thin>, [">= 1.2.4"])
|
139
139
|
s.add_runtime_dependency(%q<table_fu>, [">= 0.3.4"])
|
140
140
|
s.add_runtime_dependency(%q<sinatra>, [">= 1.2.1"])
|
141
|
-
s.add_runtime_dependency(%q<sinatra-static-assets>, [">= 0.
|
141
|
+
s.add_runtime_dependency(%q<sinatra-static-assets>, [">= 1.0.3"])
|
142
142
|
s.add_runtime_dependency(%q<emk-sinatra-url-for>, [">= 0.2.1"])
|
143
143
|
s.add_runtime_dependency(%q<curb>, [">= 0.7.15"])
|
144
144
|
s.add_runtime_dependency(%q<rdiscount>, [">= 1.6.8"])
|
@@ -148,7 +148,7 @@ Gem::Specification.new do |s|
|
|
148
148
|
s.add_dependency(%q<thin>, [">= 1.2.4"])
|
149
149
|
s.add_dependency(%q<table_fu>, [">= 0.3.4"])
|
150
150
|
s.add_dependency(%q<sinatra>, [">= 1.2.1"])
|
151
|
-
s.add_dependency(%q<sinatra-static-assets>, [">= 0.
|
151
|
+
s.add_dependency(%q<sinatra-static-assets>, [">= 1.0.3"])
|
152
152
|
s.add_dependency(%q<emk-sinatra-url-for>, [">= 0.2.1"])
|
153
153
|
s.add_dependency(%q<curb>, [">= 0.7.15"])
|
154
154
|
s.add_dependency(%q<rdiscount>, [">= 1.6.8"])
|
@@ -159,7 +159,7 @@ Gem::Specification.new do |s|
|
|
159
159
|
s.add_dependency(%q<thin>, [">= 1.2.4"])
|
160
160
|
s.add_dependency(%q<table_fu>, [">= 0.3.4"])
|
161
161
|
s.add_dependency(%q<sinatra>, [">= 1.2.1"])
|
162
|
-
s.add_dependency(%q<sinatra-static-assets>, [">= 0.
|
162
|
+
s.add_dependency(%q<sinatra-static-assets>, [">= 1.0.3"])
|
163
163
|
s.add_dependency(%q<emk-sinatra-url-for>, [">= 0.2.1"])
|
164
164
|
s.add_dependency(%q<curb>, [">= 0.7.15"])
|
165
165
|
s.add_dependency(%q<rdiscount>, [">= 1.6.8"])
|
data/template/tables/example.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
table:
|
2
2
|
title: Failed Banks List
|
3
|
-
google_key:
|
3
|
+
google_key: 0As64nCqduIekdElUaE1PdW9XcV9wSUdlVE5RWEswbFE
|
4
4
|
deck:
|
5
5
|
<p>The financial crisis has contributed to the failure of scores of banks this year. We’ve put together a handy chart of the fallen banks, the federal agency that provided oversight to each one, and the major public enforcement that occurred against the bank prior to its collapse. It’s all sortable state, date, or even regulatory agency.</p>
|
6
6
|
footer:
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: table_setter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 11
|
10
|
+
version: 0.2.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jeff Larson
|
@@ -15,7 +15,8 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-03-09 00:00:00 -05:00
|
19
|
+
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: rspec
|
@@ -103,12 +104,12 @@ dependencies:
|
|
103
104
|
requirements:
|
104
105
|
- - ">="
|
105
106
|
- !ruby/object:Gem::Version
|
106
|
-
hash:
|
107
|
+
hash: 17
|
107
108
|
segments:
|
109
|
+
- 1
|
108
110
|
- 0
|
109
|
-
-
|
110
|
-
|
111
|
-
version: 0.5.0
|
111
|
+
- 3
|
112
|
+
version: 1.0.3
|
112
113
|
type: :runtime
|
113
114
|
version_requirements: *id006
|
114
115
|
- !ruby/object:Gem::Dependency
|
@@ -163,6 +164,7 @@ description: A sinatra based app for rendering CSVs hosted on google docs or loc
|
|
163
164
|
email: thejefflarson@gmail.com
|
164
165
|
executables:
|
165
166
|
- table-setter
|
167
|
+
- table-setter
|
166
168
|
extensions: []
|
167
169
|
|
168
170
|
extra_rdoc_files:
|
@@ -273,6 +275,7 @@ files:
|
|
273
275
|
- template/views/index.erb
|
274
276
|
- template/views/layout.erb
|
275
277
|
- template/views/table.erb
|
278
|
+
has_rdoc: true
|
276
279
|
homepage: http://propublica.github.com/table-setter/
|
277
280
|
licenses: []
|
278
281
|
|
@@ -302,7 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
302
305
|
requirements: []
|
303
306
|
|
304
307
|
rubyforge_project: table-setter
|
305
|
-
rubygems_version: 1.
|
308
|
+
rubygems_version: 1.6.2
|
306
309
|
signing_key:
|
307
310
|
specification_version: 3
|
308
311
|
summary: A sinatra based app for rendering CSVs in custom HTML
|