· 9 years ago · Oct 28, 2016, 03:38 AM
1diff -ru adopt-oakland/.gitignore adopt-sf/.gitignore
2--- adopt-oakland/.gitignore 2016-10-27 23:28:23.000000000 -0400
3+++ adopt-sf/.gitignore 2016-10-27 23:28:03.000000000 -0400
4@@ -1,22 +1,23 @@
5-# See http://help.github.com/ignore-files/ for more about ignoring files.
6+# See https://help.github.com/articles/ignoring-files for more about ignoring files.
7 #
8 # If you find yourself ignoring temporary files generated by your text editor
9 # or operating system, you probably want to add a global ignore instead:
10-# git config --global core.excludesfile ~/.gitignore_global
11+# git config --global core.excludesfile '~/.gitignore_global'
12
13-# Ignore bundler config
14+# Ignore bundler config.
15 /.bundle
16
17-# Include SimpleCov directory
18+# Ignore bundle
19+/vendor/bundle
20+
21+# Ignore SimpleCov directory.
22 /coverage
23
24 # Ignore the default SQLite database.
25 /db/*.sqlite3
26+/db/*.sqlite3-journal
27
28 # Ignore all logfiles and tempfiles.
29-/log/*.log
30+/log/*
31+!/log/.keep
32 /tmp
33-
34-# OS X detritus
35-.DS_Store
36-
37Only in adopt-sf: .rubocop.yml
38Only in adopt-sf: .ruby-version
39diff -ru adopt-oakland/.travis.yml adopt-sf/.travis.yml
40--- adopt-oakland/.travis.yml 2016-10-27 23:28:23.000000000 -0400
41+++ adopt-sf/.travis.yml 2016-10-27 23:28:03.000000000 -0400
42@@ -1,7 +1,18 @@
43-before_install: "gem update --system"
44+before_script: bundle exec rake db:create db:schema:load
45 bundler_args: "--without assets:development:production"
46-script: "bundle exec rake db:create db:schema:load test"
47+cache: bundler
48+language: ruby
49 rvm:
50- - 1.9.2
51- - 1.9.3
52-env: "RAILS_ENV=test"
53+- 2.2.3
54+script:
55+- bundle exec rake
56+- bundle exec rubocop
57+sudo: false
58+deploy:
59+ provider: heroku
60+ api_key:
61+ secure: RYcEa08NYClwvVGXEuxdkTPmWIasRPXIhVFhy3ievSYAlL6kRy44QoTApp26p+gDMImP1UIGcjI37RkPvqiONdmR70n2kVVYpbFYql5aJ3GjVYYYAwXqt6dHnFjt2Bi4mWhVH8ydyqxC7mQ8quW8a+yHkf/YSXhMv5IC1TmPnv4I+vyjAxK/Ru20768E5hn0UlcdYWGpNq81ZZhJzk26KZIEJDVOokJTY4dBDxXYEYsgSpTpAkN5KRipFJNosWPl2ASbEmOXzR23tmoHN4VcmAKhZ4ePwqupWN3G7VhkF5q3FA/1VB5AuNmUuvhr1G5lO9ZoIHStqPrm4G28PwAJF058QHyQOZk309F7bTRpfiY0nu77pnO09Ze/lK98NGygog+9YTQDzF43qwjPdIIn1Az06ng2QWAaur9QGoG3lGKuhadUKdSuFETpH/dVMfV+9DiPbYcIoTigDNLUhC8Pp4atFN1ltz7kLhRkJT8l4gPpWPNOQrQC1ZwVJyM1yCasetGIIcGWXa7pI9qq55P+ERseFTNB5WNmsSQb97eXTGKjaRCcpmLnXxUQ5sG6lxi/ZMJ2L/K4X15PfLHFwMhsc2jWgfvGWqmPYwuNXsqPeUNuNW/GY5dNAqKasa1fmURwJDzxCu/x1XsyktcCzGbY1HOEaYv+5HjV0Ycrj4ca4iY=
62+ app: adoptadrainsf-staging
63+ on:
64+ repo: sfbrigade/adopt-a-drain
65+ branch: production
66diff -ru adopt-oakland/Gemfile adopt-sf/Gemfile
67--- adopt-oakland/Gemfile 2016-10-27 23:28:23.000000000 -0400
68+++ adopt-sf/Gemfile 2016-10-27 23:28:03.000000000 -0400
69@@ -1,36 +1,38 @@
70 source 'https://rubygems.org'
71+ruby '2.2.3'
72
73-gem 'rails', '~> 3.2'
74-
75-
76-gem 'arel'
77+gem 'rails', '~> 4.2.4'
78+gem 'airbrake', '~> 5.2'
79 gem 'devise'
80-gem 'geokit', '~> 1.6.7'
81-gem 'haml', '~> 3.2.0.alpha'
82+gem 'geokit'
83+gem 'haml'
84 gem 'http_accept_language'
85-gem 'httparty'
86+gem 'obscenity', '~> 1.0', '>= 1.0.2'
87 gem 'pg'
88 gem 'rails_admin'
89 gem 'validates_formatting_of'
90-gem 'sendgrid', '~> 1.0.1'
91-gem 'newrelic_rpm'
92-gem 'google-v3-geocoder', '1.0.0'
93
94-platforms :ruby_18 do
95- gem 'fastercsv'
96-end
97+gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
98
99 group :assets do
100- gem 'sass-rails'
101+ gem 'sass-rails', '>= 4.0.3'
102 gem 'uglifier'
103 end
104
105+group :development do
106+ gem 'byebug'
107+ gem 'spring'
108+end
109+
110 group :production do
111- gem 'thin'
112+ gem 'rails_12factor'
113+ gem 'puma'
114+ gem 'skylight'
115 end
116
117 group :test do
118- gem 'simplecov'
119- gem 'sqlite3'
120+ gem 'coveralls', require: false
121+ gem 'simplecov', require: false
122+ gem 'rubocop'
123 gem 'webmock'
124 end
125diff -ru adopt-oakland/Gemfile.lock adopt-sf/Gemfile.lock
126--- adopt-oakland/Gemfile.lock 2016-10-27 23:28:23.000000000 -0400
127+++ adopt-sf/Gemfile.lock 2016-10-27 23:28:03.000000000 -0400
128@@ -1,201 +1,258 @@
129 GEM
130 remote: https://rubygems.org/
131 specs:
132- actionmailer (3.2.21)
133- actionpack (= 3.2.21)
134- mail (~> 2.5.4)
135- actionpack (3.2.21)
136- activemodel (= 3.2.21)
137- activesupport (= 3.2.21)
138- builder (~> 3.0.0)
139+ actionmailer (4.2.6)
140+ actionpack (= 4.2.6)
141+ actionview (= 4.2.6)
142+ activejob (= 4.2.6)
143+ mail (~> 2.5, >= 2.5.4)
144+ rails-dom-testing (~> 1.0, >= 1.0.5)
145+ actionpack (4.2.6)
146+ actionview (= 4.2.6)
147+ activesupport (= 4.2.6)
148+ rack (~> 1.6)
149+ rack-test (~> 0.6.2)
150+ rails-dom-testing (~> 1.0, >= 1.0.5)
151+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
152+ actionview (4.2.6)
153+ activesupport (= 4.2.6)
154+ builder (~> 3.1)
155 erubis (~> 2.7.0)
156- journey (~> 1.0.4)
157- rack (~> 1.4.5)
158- rack-cache (~> 1.2)
159- rack-test (~> 0.6.1)
160- sprockets (~> 2.2.1)
161- activemodel (3.2.21)
162- activesupport (= 3.2.21)
163- builder (~> 3.0.0)
164- activerecord (3.2.21)
165- activemodel (= 3.2.21)
166- activesupport (= 3.2.21)
167- arel (~> 3.0.2)
168- tzinfo (~> 0.3.29)
169- activeresource (3.2.21)
170- activemodel (= 3.2.21)
171- activesupport (= 3.2.21)
172- activesupport (3.2.21)
173- i18n (~> 0.6, >= 0.6.4)
174- multi_json (~> 1.0)
175- addressable (2.3.2)
176- arel (3.0.3)
177- bcrypt-ruby (3.0.1)
178- bootstrap-sass (2.2.2.0)
179- sass (~> 3.2)
180- builder (3.0.4)
181- coffee-rails (3.2.2)
182+ rails-dom-testing (~> 1.0, >= 1.0.5)
183+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
184+ activejob (4.2.6)
185+ activesupport (= 4.2.6)
186+ globalid (>= 0.3.0)
187+ activemodel (4.2.6)
188+ activesupport (= 4.2.6)
189+ builder (~> 3.1)
190+ activerecord (4.2.6)
191+ activemodel (= 4.2.6)
192+ activesupport (= 4.2.6)
193+ arel (~> 6.0)
194+ activesupport (4.2.6)
195+ i18n (~> 0.7)
196+ json (~> 1.7, >= 1.7.7)
197+ minitest (~> 5.1)
198+ thread_safe (~> 0.3, >= 0.3.4)
199+ tzinfo (~> 1.1)
200+ addressable (2.4.0)
201+ airbrake (5.2.3)
202+ airbrake-ruby (~> 1.2)
203+ airbrake-ruby (1.2.2)
204+ arel (6.0.3)
205+ ast (2.2.0)
206+ bcrypt (3.1.11)
207+ bcrypt (3.1.11-x64-mingw32)
208+ builder (3.2.2)
209+ byebug (8.2.4)
210+ coffee-rails (4.1.1)
211 coffee-script (>= 2.2.0)
212- railties (~> 3.2.0)
213- coffee-script (2.2.0)
214+ railties (>= 4.0.0, < 5.1.x)
215+ coffee-script (2.4.1)
216 coffee-script-source
217 execjs
218- coffee-script-source (1.4.0)
219- crack (0.3.2)
220- daemons (1.1.9)
221- devise (2.2.0)
222- bcrypt-ruby (~> 3.0)
223+ coffee-script-source (1.10.0)
224+ concurrent-ruby (1.0.1)
225+ coveralls (0.8.13)
226+ json (~> 1.8)
227+ simplecov (~> 0.11.0)
228+ term-ansicolor (~> 1.3)
229+ thor (~> 0.19.1)
230+ tins (~> 1.6.0)
231+ crack (0.4.3)
232+ safe_yaml (~> 1.0.0)
233+ devise (3.5.6)
234+ bcrypt (~> 3.0)
235 orm_adapter (~> 0.1)
236- railties (~> 3.1)
237- warden (~> 1.2.1)
238+ railties (>= 3.2.6, < 5)
239+ responders
240+ thread_safe (~> 0.1)
241+ warden (~> 1.2.3)
242+ docile (1.1.5)
243 erubis (2.7.0)
244- eventmachine (1.0.0)
245- execjs (1.4.0)
246- multi_json (~> 1.0)
247- fastercsv (1.5.5)
248- font-awesome-sass-rails (3.0.0.1)
249- railties (>= 3.1.1)
250- sass-rails (>= 3.1.1)
251- geokit (1.6.7)
252- multi_json (>= 1.3.2)
253- google-v3-geocoder (1.0.0)
254- geokit (>= 1.5.0)
255- geokit (>= 1.5.0)
256- json
257- haml (3.2.0.rc.2)
258+ execjs (2.6.0)
259+ font-awesome-rails (4.5.0.1)
260+ railties (>= 3.2, < 5.1)
261+ geokit (1.10.0)
262+ globalid (0.3.6)
263+ activesupport (>= 4.1.0)
264+ haml (4.0.7)
265 tilt
266- hike (1.2.3)
267- http_accept_language (1.0.2)
268- httparty (0.10.2)
269- multi_json (~> 1.0)
270- multi_xml (>= 0.5.2)
271+ hashdiff (0.3.0)
272+ http_accept_language (2.0.5)
273 i18n (0.7.0)
274- journey (1.0.4)
275- jquery-rails (2.1.4)
276- railties (>= 3.0, < 5.0)
277+ jquery-rails (4.1.1)
278+ rails-dom-testing (>= 1, < 3)
279+ railties (>= 4.2.0)
280 thor (>= 0.14, < 2.0)
281- jquery-ui-rails (2.0.2)
282- jquery-rails
283- railties (>= 3.1.0)
284- json (1.8.2)
285- kaminari (0.14.1)
286+ jquery-ui-rails (5.0.5)
287+ railties (>= 3.2.16)
288+ json (1.8.3)
289+ kaminari (0.16.3)
290 actionpack (>= 3.0.0)
291 activesupport (>= 3.0.0)
292- mail (2.5.4)
293- mime-types (~> 1.16)
294- treetop (~> 1.4.8)
295- mime-types (1.25.1)
296- multi_json (1.10.1)
297- multi_xml (0.5.3)
298- nested_form (0.3.1)
299- newrelic_rpm (3.5.5.38)
300- nokogiri (1.5.6)
301- orm_adapter (0.4.0)
302- pg (0.14.1)
303- polyglot (0.3.5)
304- rack (1.4.5)
305- rack-cache (1.2)
306- rack (>= 0.4)
307- rack-pjax (0.7.0)
308+ loofah (2.0.3)
309+ nokogiri (>= 1.5.9)
310+ mail (2.6.4)
311+ mime-types (>= 1.16, < 4)
312+ mime-types (3.0)
313+ mime-types-data (~> 3.2015)
314+ mime-types-data (3.2016.0221)
315+ mini_portile2 (2.1.0)
316+ minitest (5.8.4)
317+ nested_form (0.3.2)
318+ nokogiri (1.6.8)
319+ mini_portile2 (~> 2.1.0)
320+ pkg-config (~> 1.1.7)
321+ nokogiri (1.6.8-x64-mingw32)
322+ mini_portile2 (~> 2.1.0)
323+ pkg-config (~> 1.1.7)
324+ obscenity (1.0.2)
325+ orm_adapter (0.5.0)
326+ parser (2.3.0.7)
327+ ast (~> 2.2)
328+ pg (0.18.4)
329+ pg (0.18.4-x64-mingw32)
330+ pkg-config (1.1.7)
331+ powerpack (0.1.1)
332+ puma (3.4.0)
333+ rack (1.6.4)
334+ rack-pjax (0.8.0)
335 nokogiri (~> 1.5)
336- rack (~> 1.3)
337- rack-ssl (1.3.4)
338- rack
339+ rack (~> 1.1)
340 rack-test (0.6.3)
341 rack (>= 1.0)
342- rails (3.2.21)
343- actionmailer (= 3.2.21)
344- actionpack (= 3.2.21)
345- activerecord (= 3.2.21)
346- activeresource (= 3.2.21)
347- activesupport (= 3.2.21)
348- bundler (~> 1.0)
349- railties (= 3.2.21)
350- rails_admin (0.4.0)
351- bootstrap-sass (~> 2.1)
352- builder (~> 3.0)
353- coffee-rails (~> 3.1)
354- font-awesome-sass-rails (~> 3.0)
355- haml (~> 3.1)
356- jquery-rails (~> 2.1)
357- jquery-ui-rails (~> 2.0)
358+ rails (4.2.6)
359+ actionmailer (= 4.2.6)
360+ actionpack (= 4.2.6)
361+ actionview (= 4.2.6)
362+ activejob (= 4.2.6)
363+ activemodel (= 4.2.6)
364+ activerecord (= 4.2.6)
365+ activesupport (= 4.2.6)
366+ bundler (>= 1.3.0, < 2.0)
367+ railties (= 4.2.6)
368+ sprockets-rails
369+ rails-deprecated_sanitizer (1.0.3)
370+ activesupport (>= 4.2.0.alpha)
371+ rails-dom-testing (1.0.7)
372+ activesupport (>= 4.2.0.beta, < 5.0)
373+ nokogiri (~> 1.6.0)
374+ rails-deprecated_sanitizer (>= 1.0.1)
375+ rails-html-sanitizer (1.0.3)
376+ loofah (~> 2.0)
377+ rails_12factor (0.0.3)
378+ rails_serve_static_assets
379+ rails_stdout_logging
380+ rails_admin (0.8.1)
381+ builder (~> 3.1)
382+ coffee-rails (~> 4.0)
383+ font-awesome-rails (>= 3.0, < 5)
384+ haml (~> 4.0)
385+ jquery-rails (>= 3.0, < 5)
386+ jquery-ui-rails (~> 5.0)
387 kaminari (~> 0.14)
388- nested_form (~> 0.2)
389- rack-pjax (~> 0.6)
390- rails (~> 3.1)
391+ nested_form (~> 0.3)
392+ rack-pjax (~> 0.7)
393+ rails (~> 4.0)
394 remotipart (~> 1.0)
395- sass-rails (~> 3.1)
396- railties (3.2.21)
397- actionpack (= 3.2.21)
398- activesupport (= 3.2.21)
399- rack-ssl (~> 1.3.2)
400+ safe_yaml (~> 1.0)
401+ sass-rails (>= 4.0, < 6)
402+ rails_serve_static_assets (0.0.5)
403+ rails_stdout_logging (0.0.5)
404+ railties (4.2.6)
405+ actionpack (= 4.2.6)
406+ activesupport (= 4.2.6)
407 rake (>= 0.8.7)
408- rdoc (~> 3.4)
409- thor (>= 0.14.6, < 2.0)
410- rake (10.4.2)
411- rdoc (3.12.2)
412- json (~> 1.4)
413- remotipart (1.0.2)
414- sass (3.2.5)
415- sass-rails (3.2.5)
416- railties (~> 3.2.0)
417- sass (>= 3.1.10)
418- tilt (~> 1.3)
419- sendgrid (1.0.1)
420- json
421- json
422- simplecov (0.7.1)
423- multi_json (~> 1.0)
424- simplecov-html (~> 0.7.1)
425- simplecov-html (0.7.1)
426- sprockets (2.2.3)
427- hike (~> 1.2)
428- multi_json (~> 1.0)
429- rack (~> 1.0)
430- tilt (~> 1.1, != 1.3.0)
431- sqlite3 (1.3.6)
432- thin (1.5.0)
433- daemons (>= 1.0.9)
434- eventmachine (>= 0.12.6)
435- rack (>= 1.0.0)
436+ thor (>= 0.18.1, < 2.0)
437+ rainbow (2.1.0)
438+ rake (11.1.2)
439+ remotipart (1.2.1)
440+ responders (2.1.2)
441+ railties (>= 4.2.0, < 5.1)
442+ rubocop (0.39.0)
443+ parser (>= 2.3.0.7, < 3.0)
444+ powerpack (~> 0.1)
445+ rainbow (>= 1.99.1, < 3.0)
446+ ruby-progressbar (~> 1.7)
447+ unicode-display_width (~> 1.0, >= 1.0.1)
448+ ruby-progressbar (1.7.5)
449+ safe_yaml (1.0.4)
450+ sass (3.4.22)
451+ sass-rails (5.0.4)
452+ railties (>= 4.0.0, < 5.0)
453+ sass (~> 3.1)
454+ sprockets (>= 2.8, < 4.0)
455+ sprockets-rails (>= 2.0, < 4.0)
456+ tilt (>= 1.1, < 3)
457+ simplecov (0.11.2)
458+ docile (~> 1.1.0)
459+ json (~> 1.8)
460+ simplecov-html (~> 0.10.0)
461+ simplecov-html (0.10.0)
462+ skylight (0.10.3)
463+ activesupport (>= 3.0.0)
464+ spring (1.7.2)
465+ sprockets (3.6.0)
466+ concurrent-ruby (~> 1.0)
467+ rack (> 1, < 3)
468+ sprockets-rails (3.0.4)
469+ actionpack (>= 4.0)
470+ activesupport (>= 4.0)
471+ sprockets (>= 3.0.0)
472+ term-ansicolor (1.3.2)
473+ tins (~> 1.0)
474 thor (0.19.1)
475- tilt (1.4.1)
476- treetop (1.4.15)
477- polyglot
478- polyglot (>= 0.3.1)
479- tzinfo (0.3.42)
480- uglifier (1.3.0)
481- execjs (>= 0.3.0)
482- multi_json (~> 1.0, >= 1.0.2)
483- validates_formatting_of (0.7.1)
484- activemodel (~> 3.0)
485- warden (1.2.1)
486+ thread_safe (0.3.5)
487+ tilt (2.0.2)
488+ tins (1.6.0)
489+ tzinfo (1.2.2)
490+ thread_safe (~> 0.1)
491+ tzinfo-data (1.2016.3)
492+ tzinfo (>= 1.0.0)
493+ uglifier (3.0.0)
494+ execjs (>= 0.3.0, < 3)
495+ unicode-display_width (1.0.3)
496+ validates_formatting_of (0.9.0)
497+ activemodel
498+ warden (1.2.6)
499 rack (>= 1.0)
500- webmock (1.9.0)
501- addressable (>= 2.2.7)
502- crack (>= 0.1.7)
503+ webmock (1.24.2)
504+ addressable (>= 2.3.6)
505+ crack (>= 0.3.2)
506+ hashdiff
507
508 PLATFORMS
509 ruby
510+ x64-mingw32
511
512 DEPENDENCIES
513- arel
514+ airbrake (~> 5.2)
515+ byebug
516+ coveralls
517 devise
518- fastercsv
519- geokit (~> 1.6.7)
520- google-v3-geocoder (= 1.0.0)
521- haml (~> 3.2.0.alpha)
522+ geokit
523+ haml
524 http_accept_language
525- httparty
526- newrelic_rpm
527+ obscenity (~> 1.0, >= 1.0.2)
528 pg
529- rails (~> 3.2)
530+ puma
531+ rails (~> 4.2.4)
532+ rails_12factor
533 rails_admin
534- sass-rails
535- sendgrid (~> 1.0.1)
536+ rubocop
537+ sass-rails (>= 4.0.3)
538 simplecov
539- sqlite3
540- thin
541+ skylight
542+ spring
543+ tzinfo-data
544 uglifier
545 validates_formatting_of
546 webmock
547+
548+RUBY VERSION
549+ ruby 2.2.3p173
550+
551+BUNDLED WITH
552+ 1.13.1
553Only in adopt-oakland: LICENSE
554diff -ru adopt-oakland/Procfile adopt-sf/Procfile
555--- adopt-oakland/Procfile 2016-10-27 23:28:23.000000000 -0400
556+++ adopt-sf/Procfile 2016-10-27 23:28:03.000000000 -0400
557@@ -1 +1 @@
558-web: bundle exec rails server thin -p $PORT
559+web: bundle exec puma -p $PORT
560diff -ru adopt-oakland/README.md adopt-sf/README.md
561--- adopt-oakland/README.md 2016-10-27 23:28:23.000000000 -0400
562+++ adopt-sf/README.md 2016-10-27 23:28:03.000000000 -0400
563@@ -1,35 +1,90 @@
564-# Adopt-a-Drain [][travis] [][gemnasium]
565-Claim responsibility for reporting problems with Storm Drains
566+# Adopt-a-Drain
567
568-[travis]: http://travis-ci.org/openoakland/adopt-a-drain
569-[gemnasium]: https://gemnasium.com/openoakland/adopt-a-drain
570+[](https://gitter.im/sfbrigade/adopt-a-drain?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
571
572-## <a name="screenshots"></a>Screenshot
573-
574+[][travis]
575+[][gemnasium]
576+[][coveralls]
577
578-## <a name="demo"></a>Demo
579+[travis]: http://travis-ci.org/sfbrigade/adopt-a-drain
580+[gemnasium]: https://gemnasium.com/sfbrigade/adopt-a-drain
581+[coveralls]: https://coveralls.io/r/sfbrigade/adopt-a-drain
582+
583+Claim responsibility for cleaning out a storm drain after it rains.
584+
585+## Screenshot
586+
587+
588+## Demo
589 You can see a running version of the application at
590 [http://adopt-a-drain.herokuapp.com/][demo].
591
592 [demo]: http://adopt-a-drain.herokuapp.com/
593
594-## <a name="installation"></a>Installation
595+## Installation
596 This application requires [Postgres](http://www.postgresql.org/) to be installed
597
598- git clone git://github.com/openoakland/adopt-a-drain.git
599+ git clone git://github.com/sfbrigade/adopt-a-drain.git
600 cd adopt-a-drain
601 bundle install
602
603 bundle exec rake db:create
604 bundle exec rake db:schema:load
605
606-## <a name="usage"></a>Usage
607+See the [wiki](https://github.com/sfbrigade/adopt-a-drain/wiki/Windows-Development-Environment) for a guide on how to install this application on Windows.
608+
609+## Usage
610 rails server
611
612-## <a name="usage"></a>Seed Data
613- bundle exec rake db:seed
614+## Seed Data
615+ bundle exec rake data:load_drains
616+
617+## Deploying to Heroku
618+A successful deployment to Heroku requires a few setup steps:
619+
620+1. Generate a new secret token:
621+
622+ ```
623+ rake secret
624+ ```
625+
626+2. Set the token on Heroku:
627+
628+ ```
629+ heroku config:set SECRET_TOKEN=the_token_you_generated
630+ ```
631+
632+3. [Precompile your assets](https://devcenter.heroku.com/articles/rails3x-asset-pipeline-cedar)
633+
634+ ```
635+ RAILS_ENV=production bundle exec rake assets:precompile
636
637-## <a name="contributing"></a>Contributing
638+ git add public/assets
639+
640+ git commit -m "vendor compiled assets"
641+ ```
642+
643+4. Add a production database to config/database.yml
644+
645+5. Seed the production db:
646+
647+ `heroku run bundle exec rake db:seed`
648+
649+Keep in mind that the Heroku free Postgres plan only allows up to 10,000 rows,
650+so if your city has more than 10,000 fire drains (or other thing to be
651+adopted), you will need to upgrade to the $9/month plan.
652+
653+### Google Analytics
654+If you have a Google Analytics account you want to use to track visits to your
655+deployment of this app, just set your ID and your domain name as environment
656+variables:
657+
658+ heroku config:set GOOGLE_ANALYTICS_ID=your_id
659+ heroku config:set GOOGLE_ANALYTICS_DOMAIN=your_domain_name
660+
661+An example ID is `UA-12345678-9`, and an example domain is `adoptadrain.org`.
662+
663+## Contributing
664 In the spirit of [free software][free-sw], **everyone** is encouraged to help
665 improve this project.
666
667@@ -50,46 +105,43 @@
668 * by reviewing patches
669 * [financially][]
670
671-[locales]: https://github.com/codeforamerica/adopt-a-siren/tree/master/config/locales
672-[issues]: https://github.com/codeforamerica/adopt-a-siren/issues
673-[financially]: https://secure.codeforamerica.org/page/contribute
674+[locales]: https://github.com/sfbrigade/adopt-a-drain/tree/master/config/locales
675+[issues]: https://github.com/sfbrigade/adopt-a-drain/issues
676+[financially]: https://secure.sfbrigade.org/page/contribute
677
678-## <a name="issues"></a>Submitting an Issue
679+## Submitting an Issue
680 We use the [GitHub issue tracker][issues] to track bugs and features. Before
681 submitting a bug report or feature request, check to make sure it hasn't
682-already been submitted. You can indicate support for an existing issue by
683-voting it up. When submitting a bug report, please include a [Gist][] that
684-includes a stack trace and any details that may be necessary to reproduce the
685-bug, including your gem version, Ruby version, and operating system. Ideally, a
686-bug report should include a pull request with failing specs.
687+already been submitted. When submitting a bug report, please include a [Gist][]
688+that includes a stack trace and any details that may be necessary to reproduce
689+the bug, including your gem version, Ruby version, and operating system.
690+Ideally, a bug report should include a pull request with failing specs.
691
692 [gist]: https://gist.github.com/
693
694-## <a name="pulls"></a>Submitting a Pull Request
695-1. Fork the project.
696-2. Create a topic branch.
697-3. Implement your feature or bug fix.
698-4. Add tests for your feature or bug fix.
699-5. Run `bundle exec rake test`. If your changes are not 100% covered, go back
700- to step 4.
701-6. Commit and push your changes.
702-7. Submit a pull request. Please do not include changes to the gemspec or
703- version file. (If you want to create your own version for some reason,
704- please do so in a separate commit.)
705-
706-## <a name="versions"></a>Supported Ruby Versions
707-This library aims to support and is [tested against][travis] the following Ruby
708-implementations:
709+## Submitting a Pull Request
710+1. [Fork the repository.][fork]
711+2. [Create a topic branch.][branch]
712+3. Add specs for your unimplemented feature or bug fix.
713+4. Run `bundle exec rake test`. If your specs pass, return to step 3.
714+5. Implement your feature or bug fix.
715+6. Run `bundle exec rake test`. If your specs fail, return to step 5.
716+7. Run `open coverage/index.html`. If your changes are not completely covered
717+ by your tests, return to step 3.
718+8. Add, commit, and push your changes.
719+9. [Submit a pull request.][pr]
720+
721+[fork]: http://help.github.com/fork-a-repo/
722+[branch]: http://learn.github.com/p/branching.html
723+[pr]: http://help.github.com/send-pull-requests/
724
725-* Ruby 1.9.2
726-* Ruby 1.9.3
727+## Supported Ruby Version
728+This library aims to support and is [tested against][travis] Ruby version 2.2.2.
729
730-If something doesn't work on one of these interpreters, it should be considered
731-a bug.
732+If something doesn't work on this version, it should be considered a bug.
733
734 This library may inadvertently work (or seem to work) on other Ruby
735-implementations, however support will only be provided for the versions listed
736-above.
737+implementations, however support will only be provided for the version above.
738
739 If you would like this library to support another Ruby version, you may
740 volunteer to be a maintainer. Being a maintainer entails making sure all tests
741@@ -98,11 +150,7 @@
742 timely fashion. If critical issues for a particular implementation exist at the
743 time of a major release, support for that Ruby version may be dropped.
744
745-## <a name="copyright"></a>Copyright
746-Copyright (c) 2012 Code for America. See [LICENSE][] for details.
747-
748-[license]: https://github.com/codeforamerica/adopt-a-siren/blob/master/LICENSE.md
749-
750-[][tracker]
751+## Copyright
752+Copyright (c) 2015 Code for San Francisco. See [LICENSE.md](https://github.com/sfbrigade/adopt-a-drain/blob/master/LICENSE.md) for details.
753
754-[tracker]: http://stats.codeforamerica.org/projects/adopt-a-siren
755+[license]: https://github.com/sfbrigade/adopt-a-drain/blob/master/LICENSE.md
756diff -ru adopt-oakland/Rakefile adopt-sf/Rakefile
757--- adopt-oakland/Rakefile 2016-10-27 23:28:23.000000000 -0400
758+++ adopt-sf/Rakefile 2016-10-27 23:28:03.000000000 -0400
759@@ -1,7 +1,15 @@
760-#!/usr/bin/env rake
761 # Add your own tasks in files placed in lib/tasks ending in .rake,
762 # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
763
764 require File.expand_path('../config/application', __FILE__)
765
766-AdoptAThing::Application.load_tasks
767+begin
768+ require 'rubocop/rake_task'
769+ RuboCop::RakeTask.new
770+rescue LoadError
771+ puts 'Could not load rubocop'
772+end
773+
774+Rails.application.load_tasks
775+
776+task default: [:rubocop, :test]
777Only in adopt-sf: adopt.png
778Only in adopt-sf/app/assets/images: .keep
779Only in adopt-oakland/app/assets/images: adoptasiren_email_header.png
780Only in adopt-oakland/app/assets/images: ajax-loader.gif
781Only in adopt-oakland/app/assets/images: hydrant-in-snow.jpg
782Only in adopt-oakland/app/assets/images: location-aware-agreement.png
783Only in adopt-sf/app/assets/images/logos: DataSFLogo.png
784Only in adopt-sf/app/assets/images/logos: adopt-a-drain-horizontal.png
785Only in adopt-sf/app/assets/images/logos: adopt-a-drain.png
786Only in adopt-sf/app/assets/images/logos: adopt-a-drain_large.png
787Only in adopt-oakland/app/assets/images/logos: adoptadrain.png
788Only in adopt-oakland/app/assets/images/logos: adoptasiren.png
789Only in adopt-sf/app/assets/images/logos: boston.png
790Only in adopt-sf/app/assets/images/logos: bostonbuilt.png
791Only in adopt-sf/app/assets/images/logos: cfa.jpg
792Only in adopt-oakland/app/assets/images/logos: cfa.png
793Only in adopt-oakland/app/assets/images/logos: citytree_green_small.jpg
794Only in adopt-sf/app/assets/images/logos: codeforsanfrancisco.png
795Only in adopt-oakland/app/assets/images/logos: openoakland.png
796Only in adopt-sf/app/assets/images/logos: sfgov.png
797Only in adopt-sf/app/assets/images/logos: sfpuc.png
798Only in adopt-sf/app/assets/images/logos: sfpw.jpg
799Only in adopt-sf/app/assets/images/markers: adopted.png
800Only in adopt-sf/app/assets/images/markers: adoptedbyyou.png
801Only in adopt-oakland/app/assets/images/markers: green-marker.png
802Only in adopt-oakland/app/assets/images/markers: green-marker.psd
803Binary files adopt-oakland/app/assets/images/markers/green.png and adopt-sf/app/assets/images/markers/green.png differ
804Only in adopt-oakland/app/assets/images/markers: green_large.png
805Only in adopt-oakland/app/assets/images/markers: green_star.png
806Only in adopt-oakland/app/assets/images/markers: markergreen.png
807Only in adopt-oakland/app/assets/images/markers: markerorangedrain.gif
808Only in adopt-oakland/app/assets/images/markers: orange-marker.png
809Only in adopt-oakland/app/assets/images/markers: orange-marker.psd
810Only in adopt-oakland/app/assets/images/markers: orange.png
811Binary files adopt-oakland/app/assets/images/markers/red.png and adopt-sf/app/assets/images/markers/red.png differ
812Only in adopt-sf/app/assets/images/markers: tobay.png
813Only in adopt-sf/app/assets/images/markers: tosewer.png
814diff -ru adopt-oakland/app/assets/javascripts/application.js adopt-sf/app/assets/javascripts/application.js
815--- adopt-oakland/app/assets/javascripts/application.js 2016-10-27 23:28:23.000000000 -0400
816+++ adopt-sf/app/assets/javascripts/application.js 2016-10-27 23:28:03.000000000 -0400
817@@ -2,12 +2,12 @@
818 // listed below.
819 //
820 // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
821-// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
822+// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
823 //
824 // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
825-// the compiled file.
826+// compiled file.
827 //
828-// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
829-// GO AFTER THE REQUIRES BELOW.
830+// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
831+// about supported directives.
832 //
833 //= require_tree .
834Only in adopt-oakland/app/assets/javascripts: bootstrap-alerts.js
835Only in adopt-oakland/app/assets/javascripts: bootstrap-dropdown.js
836Only in adopt-oakland/app/assets/javascripts: bootstrap-modal.js
837Only in adopt-oakland/app/assets/javascripts: bootstrap-twipsy.js
838Only in adopt-sf/app/assets/javascripts: bootstrap.js
839Only in adopt-sf/app/assets/javascripts: main.js.erb
840diff -ru adopt-oakland/app/assets/stylesheets/application.css adopt-sf/app/assets/stylesheets/application.css
841--- adopt-oakland/app/assets/stylesheets/application.css 2016-10-27 23:28:23.000000000 -0400
842+++ adopt-sf/app/assets/stylesheets/application.css 2016-10-27 23:28:03.000000000 -0400
843@@ -3,11 +3,236 @@
844 * listed below.
845 *
846 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
847- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
848+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
849 *
850- * You're free to add application-wide styles to this file and they'll appear at the top of the
851- * compiled file, but it's generally better to create a new file per style scope.
852+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
853+ * compiled file so the styles you add here take precedence over styles defined in any styles
854+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
855+ * file per style scope.
856 *
857+ *= require bootstrap
858 *= require_self
859- *= require_tree .
860-*/
861+ *= require screen
862+ */
863+
864+body, html {
865+ height: 100%;
866+ width: 100%;
867+}
868+
869+div#logos {
870+ margin-top: 15px;
871+ padding-top: 25px;
872+ border-top: thin dotted #b4b4b4;
873+}
874+
875+div#logos img {
876+ width: 100%;
877+}
878+
879+div#logos img.dpw, div#logos img.puc{
880+ width: auto;
881+ height: 112px;
882+}
883+
884+div#logos .row div{
885+ text-align: center;
886+}
887+
888+input[type="text"], input[type="email"], input[type="password"], input[type="search"]
889+{
890+ font-size:16px;
891+}
892+
893+h3, .h3 {
894+ font-size: 18px;
895+}
896+
897+h5.my-things {
898+ font-weight: bold;
899+}
900+
901+.navbar {
902+ margin-bottom: 0;
903+ text-align: center;
904+}
905+
906+.navbar img {
907+ max-width: 130px;
908+ margin: 5px;
909+}
910+
911+.sidebar .navbar {
912+ background-color: #8DC63F;
913+}
914+
915+.sidebar {
916+ height: 90px;
917+ overflow: hidden;
918+ background-color: #fff;
919+ z-index: 2;
920+}
921+
922+.sidebar p.tos {
923+ text-align: center;
924+ margin-bottom: 15px;
925+}
926+
927+.sidebar p {
928+ padding: 0;
929+}
930+
931+.signed-in .sidebar {
932+ height: 210px;
933+ position: relative;
934+}
935+
936+.signed-in .sidebar-full, .sidebar-full {
937+ height: auto;
938+ z-index: 2;
939+ position: relative;
940+}
941+
942+.search-form .form-group {
943+ margin-bottom: 0;
944+}
945+
946+#adoption_form {
947+ text-align: center;
948+}
949+
950+.click-to-learn {
951+ text-align: center;
952+}
953+
954+.map-container {
955+ position: absolute;
956+ top:90px;
957+ bottom:0;
958+ width: 100%;
959+ z-index: 0;
960+}
961+
962+.navbar-default {
963+ background-color: transparent;
964+ border-color: transparent;
965+}
966+
967+.navbar-toggle {
968+ margin-top: 30px;
969+ margin-right: 15px;
970+}
971+
972+.sidebar-content {
973+ margin: 15px;
974+}
975+
976+.signed-in .map-container {
977+ top: 210px;
978+}
979+
980+.btn-primary {
981+ color: #fff;
982+ background-color: #396B80;
983+ border-color: #2e6da4;
984+}
985+
986+.btn-primary:hover {
987+ color: #fff;
988+ background-color: #005596;
989+ border-color: #204d74;
990+}
991+
992+.btn-danger {
993+ color: #fff;
994+ background-color: #BF2620;
995+ border-color: #d43f3a;
996+}
997+
998+.btn-danger:hover {
999+ color: #fff;
1000+ background-color: #EE2A24;
1001+ border-color: #d43f3a;
1002+}
1003+
1004+.btn-default {
1005+ color: #333;
1006+ background-color: #FAF0DC;
1007+ border-color: #ccc;
1008+}
1009+
1010+.break {
1011+ border-top: thin dotted #b4b4b4;
1012+ margin: 20px 0;
1013+}
1014+
1015+#legend {
1016+ background: white;
1017+ padding: 15px 0 15px 15px;
1018+ margin-bottom: 20px;
1019+ border: thin solid #bdbdbd;
1020+ right: 50px;
1021+}
1022+
1023+#legend div {
1024+ display: inline-block;
1025+ margin-right: 15px;
1026+}
1027+
1028+#legend .title {
1029+ display: block;
1030+ font-size: 1.2em;
1031+ font-weight: 700;
1032+ border-bottom: thin dotted #bdbdbd;
1033+ margin-bottom: 5px;
1034+}
1035+
1036+#legend .show-hide {
1037+ position: absolute;
1038+ top: 10px;
1039+ right: 10px;
1040+}
1041+
1042+a.guidelines {
1043+ text-decoration: none;
1044+}
1045+
1046+.sidebar p#tagline:hover {
1047+ background-color: #9682bc;
1048+}
1049+
1050+.user-things dd {
1051+ margin-left: 20px;
1052+}
1053+
1054+@media (min-width: 768px) {
1055+ .sidebar, .signed-in .sidebar {
1056+ height: 100%;
1057+ position: absolute;
1058+ top: 0;
1059+ left: 0;
1060+ width: 25%;
1061+ z-index: 2;
1062+ overflow: scroll;
1063+ }
1064+
1065+ .signed-in .map-container, .map-container {
1066+ width: 75%;
1067+ top: 0;
1068+ right: 0;
1069+ }
1070+
1071+ .navbar img {
1072+ max-width: 60%;
1073+ margin: 5px;
1074+ }
1075+
1076+ .sidebar button.navbar-toggle {
1077+ display: none;
1078+ }
1079+
1080+ #legend {
1081+ right: auto;
1082+ min-width: 594px;
1083+ }
1084+}
1085Only in adopt-sf/app/assets/stylesheets: bootstrap.css
1086Only in adopt-oakland/app/assets/stylesheets: bootstrap.min.css
1087Only in adopt-oakland/app/assets/stylesheets: ie6.css
1088diff -ru adopt-oakland/app/assets/stylesheets/screen.css adopt-sf/app/assets/stylesheets/screen.css
1089--- adopt-oakland/app/assets/stylesheets/screen.css 2016-10-27 23:28:23.000000000 -0400
1090+++ adopt-sf/app/assets/stylesheets/screen.css 2016-10-27 23:28:03.000000000 -0400
1091@@ -1,20 +1,6 @@
1092-html {
1093- height: 100%;
1094-}
1095-
1096-body {
1097- height: 100%;
1098- margin: 0;
1099-}
1100-
1101-h1{
1102- font-size: 260%;
1103-}
1104-
1105-
1106 h1, h2 {
1107 text-align: center;
1108- margin: 0 0 10px;
1109+ margin: 20px 0 10px;
1110 }
1111
1112 h2 {
1113@@ -23,18 +9,10 @@
1114 margin: 10px 0;
1115 }
1116
1117-
1118-
1119-
1120-form.form-stacked {
1121- padding-left: 0;
1122+form {
1123 margin-bottom: 0;
1124 }
1125
1126-form.form-stacked fieldset.control-group {
1127- padding: 0;
1128-}
1129-
1130 label {
1131 text-align: left;
1132 }
1133@@ -63,13 +41,8 @@
1134 }
1135
1136 form select, button.btn, input[type="submit"].btn {
1137- width: 210px;
1138 }
1139
1140-/* Copied from Bootstrap 2.0-wip
1141- * Modifications:
1142- * width: 180px
1143- */
1144 form input.search-query {
1145 -moz-border-radius: 14px;
1146 -webkit-border-radius: 14px;
1147@@ -77,82 +50,6 @@
1148 margin-bottom: 0;
1149 padding-left: 14px;
1150 padding-right: 14px;
1151- width: 180px;
1152-}
1153-
1154-.sidebar p {
1155- padding: 0 20px;
1156-}
1157-
1158-a.btn {
1159- width: 180px;
1160-}
1161-
1162-/* Copied from Bootstrap 2.0-wip */
1163-.control-group.error > label, .control-group.error .help-block, .control-group.error .help-inline {
1164- color: #b94a48;
1165-}
1166-
1167-.control-group.error input, .control-group.error textarea {
1168- color: #b94a48;
1169- border-color: #ee5f5b;
1170-}
1171-
1172-.control-group.error input:focus, .control-group.error textarea:focus {
1173- border-color: #e9322d;
1174- -webkit-box-shadow: 0 0 6px #f8b9b7;
1175- -moz-box-shadow: 0 0 6px #f8b9b7;
1176- box-shadow: 0 0 6px #f8b9b7;
1177-}
1178-
1179-.control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on {
1180- color: #b94a48;
1181- background-color: #fce6e6;
1182- border-color: #b94a48;
1183-}
1184-
1185-.control-group.warning > label, .control-group.warning .help-block, .control-group.warning .help-inline {
1186- color: #c09853;
1187-}
1188-
1189-.control-group.warning input, .control-group.warning textarea {
1190- color: #c09853;
1191- border-color: #ccae64;
1192-}
1193-
1194-.control-group.warning input:focus, .control-group.warning textarea:focus {
1195- border-color: #be9a3f;
1196- -webkit-box-shadow: 0 0 6px #e5d6b1;
1197- -moz-box-shadow: 0 0 6px #e5d6b1;
1198- box-shadow: 0 0 6px #e5d6b1;
1199-}
1200-
1201-.control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on {
1202- color: #c09853;
1203- background-color: #d2b877;
1204- border-color: #c09853;
1205-}
1206-
1207-.control-group.success > label, .control-group.success .help-block, .control-group.success .help-inline {
1208- color: #468847;
1209-}
1210-
1211-.control-group.success input, .control-group.success textarea {
1212- color: #468847;
1213- border-color: #57a957;
1214-}
1215-
1216-.control-group.success input:focus, .control-group.success textarea:focus {
1217- border-color: #458845;
1218- -webkit-box-shadow: 0 0 6px #9acc9a;
1219- -moz-box-shadow: 0 0 6px #9acc9a;
1220- box-shadow: 0 0 6px #9acc9a;
1221-}
1222-
1223-.control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on {
1224- color: #468847;
1225- background-color: #bcddbc;
1226- border-color: #468847;
1227 }
1228
1229 .table {
1230@@ -184,48 +81,19 @@
1231 padding-left: 10px;
1232 }
1233
1234-fieldset {
1235- margin-bottom: 0;
1236-}
1237-
1238 .sidebar {
1239- width: 250px;
1240- border-right: 1px solid #ccc;
1241- text-align: center;
1242 }
1243
1244-.sidebar fieldset.control-group {
1245+.sidebar .control-group {
1246 margin-left: 20px;
1247 }
1248
1249-/* Copied from Bootstrap 2.0-wip
1250- * Modifications:
1251- * padding-bottom: 10px
1252- * margin-top: 10px
1253- * margin-bottom: 10px
1254- */
1255-.sidebar fieldset.form-actions {
1256- padding: 17px 20px 10px;
1257- margin-top: 10px;
1258- margin-bottom: 10px;
1259- background-color: #f5f5f5;
1260- border-top: 1px solid #ddd;
1261+.sidebar .form-actions {
1262 }
1263
1264 .sidebar p#tagline {
1265 color: #ffffff;
1266- background-color: #c43c35;
1267- background-repeat: repeat-x;
1268- background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
1269- background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
1270- background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
1271- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
1272- background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
1273- background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
1274- background-image: linear-gradient(top, #ee5f5b, #c43c35);
1275- border-color: #c43c35 #c43c35 #882a25;
1276- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
1277- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
1278+ background-color: #8871B3;
1279 padding: 10px 20px;
1280 text-align: center;
1281 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
1282@@ -243,19 +111,18 @@
1283
1284 .sidebar #logos #col1 img {
1285 float: left;
1286- margin: 40px 0;
1287+ margin: 5px 0;
1288 }
1289
1290 .sidebar #logos #col2 {
1291 float: left;
1292- margin-top:10px;
1293 margin-left: 10px;
1294 width: 100px;
1295 }
1296
1297 .sidebar #mayor {
1298 font-family: "Times New Roman", Times, serif;
1299- font-size: 10px;
1300+ font-size: 8px;
1301 padding: 0;
1302 margin: -5px 0 0 0;
1303 }
1304@@ -270,7 +137,7 @@
1305 }
1306
1307 .map-container {
1308- width: auto;
1309+ padding: 0;
1310 }
1311
1312 #map {
1313@@ -278,9 +145,13 @@
1314 width: 100%;
1315 }
1316
1317-.modal {
1318- max-height: 500px;
1319- overflow: auto;
1320+#tos {
1321+ text-align: left;
1322+}
1323+
1324+#tos p {
1325+ padding: 0;
1326+ margin-bottom: 10px;
1327 }
1328
1329 .upcase {
1330@@ -301,9 +172,3 @@
1331 opacity: 0.8;
1332 filter: alpha(opacity=80); /* For IE8 and earlier */
1333 }
1334-
1335-#legend{
1336- background-color: white;
1337- border: 1px solid #aaa;
1338- padding: 10px;
1339-}
1340diff -ru adopt-oakland/app/controllers/addresses_controller.rb adopt-sf/app/controllers/addresses_controller.rb
1341--- adopt-oakland/app/controllers/addresses_controller.rb 2016-10-27 23:28:23.000000000 -0400
1342+++ adopt-sf/app/controllers/addresses_controller.rb 2016-10-27 23:28:03.000000000 -0400
1343@@ -3,10 +3,10 @@
1344
1345 def show
1346 @address = Address.geocode("#{params[:address]}, #{params[:city_state]}")
1347- unless @address.blank?
1348- respond_with @address
1349+ if @address.blank?
1350+ render(json: {errors: {address: [t('errors.not_found', thing: t('defaults.address'))]}}, status: 404)
1351 else
1352- render(:json => {"errors" => {"address" => [t("errors.not_found", :thing => t("defaults.address"))]}}, :status => 404)
1353+ respond_with @address
1354 end
1355 end
1356 end
1357diff -ru adopt-oakland/app/controllers/application_controller.rb adopt-sf/app/controllers/application_controller.rb
1358--- adopt-oakland/app/controllers/application_controller.rb 2016-10-27 23:28:23.000000000 -0400
1359+++ adopt-sf/app/controllers/application_controller.rb 2016-10-27 23:28:03.000000000 -0400
1360@@ -1,22 +1,35 @@
1361 class ApplicationController < ActionController::Base
1362- protect_from_forgery
1363- before_filter :set_flash_from_params
1364- before_filter :set_locale
1365+ # Prevent CSRF attacks by raising an exception.
1366+ # For APIs, you may want to use :null_session instead.
1367+ protect_from_forgery with: :exception
1368+ before_action :set_flash_from_params
1369+ before_action :set_locale
1370+
1371+ force_ssl if: :ssl_configured?
1372
1373 protected
1374
1375+ def require_admin
1376+ return if user_signed_in? && current_user.admin?
1377+
1378+ flash[:error] = 'You must be an admin'
1379+ redirect_to root_path
1380+ end
1381+
1382 def set_flash_from_params
1383- if params[:flash]
1384- params[:flash].each do |key, message|
1385- flash.now[key.to_sym] = message
1386- end
1387+ params.fetch(:flash, []).each do |key, message|
1388+ flash.now[key.to_sym] = message
1389 end
1390 end
1391
1392 def set_locale
1393- available_languages = Dir.glob(Rails.root + "config/locales/??.yml").map do |file|
1394- File.basename(file, ".yml")
1395+ available_languages = Dir.glob(Rails.root + 'config/locales/??.yml').collect do |file|
1396+ File.basename(file, '.yml')
1397 end
1398- I18n.locale = request.compatible_language_from(available_languages) || I18n.default_locale
1399+ I18n.locale = http_accept_language.compatible_language_from(available_languages) || I18n.default_locale
1400+ end
1401+
1402+ def ssl_configured?
1403+ Rails.env.production?
1404 end
1405 end
1406Only in adopt-sf/app/controllers: concerns
1407diff -ru adopt-oakland/app/controllers/info_window_controller.rb adopt-sf/app/controllers/info_window_controller.rb
1408--- adopt-oakland/app/controllers/info_window_controller.rb 2016-10-27 23:28:23.000000000 -0400
1409+++ adopt-sf/app/controllers/info_window_controller.rb 2016-10-27 23:28:03.000000000 -0400
1410@@ -1,18 +1,13 @@
1411 class InfoWindowController < ApplicationController
1412 def index
1413 @thing = Thing.find_by_id(params[:thing_id])
1414- if @thing.adopted?
1415- if user_signed_in? && @thing.adopted_by(current_user.id)
1416- render("users/thank_you", :locals => {:thing => @thing})
1417+ view = begin
1418+ if @thing.adopted?
1419+ user_signed_in? && current_user == @thing.user ? 'users/thank_you' : 'users/profile'
1420 else
1421- render("users/profile")
1422- end
1423- else
1424- if user_signed_in?
1425- render("things/adopt")
1426- else
1427- render("users/sign_in")
1428+ user_signed_in? ? 'things/adopt' : 'users/sign_in'
1429 end
1430 end
1431+ render view
1432 end
1433 end
1434Only in adopt-oakland/app/controllers: javascripts_controller.rb
1435diff -ru adopt-oakland/app/controllers/passwords_controller.rb adopt-sf/app/controllers/passwords_controller.rb
1436--- adopt-oakland/app/controllers/passwords_controller.rb 2016-10-27 23:28:23.000000000 -0400
1437+++ adopt-sf/app/controllers/passwords_controller.rb 2016-10-27 23:28:03.000000000 -0400
1438@@ -1,21 +1,39 @@
1439 class PasswordsController < Devise::PasswordsController
1440 def create
1441- self.resource = resource_class.send_reset_password_instructions(params[resource_name])
1442- if resource.errors.empty?
1443- render(:json => {"success" => true})
1444+ self.resource = resource_class.send_reset_password_instructions(resource_params)
1445+ yield resource if block_given?
1446+ if successfully_sent?(resource)
1447+ render(json: {success: true})
1448 else
1449- render(:json => {"errors" => resource.errors}, :status => 500)
1450+ render(json: {errors: resource.errors}, status: 500)
1451 end
1452 end
1453
1454 def edit
1455 self.resource = resource_class.new
1456 resource.reset_password_token = params[:reset_password_token]
1457- render("edit", :layout => "info_window")
1458+ @reset_password_token = params[:reset_password_token]
1459+
1460+ render('main/index')
1461 end
1462
1463 def update
1464- self.resource = resource_class.reset_password_by_token(params[resource_name])
1465- redirect_to(:controller => "main", :action => "index")
1466+ self.resource = resource_class.reset_password_by_token(resource_params)
1467+
1468+ yield resource if block_given?
1469+
1470+ return render(json: {errors: resource.errors}, status: 500) unless resource.errors.empty?
1471+
1472+ resource.unlock_access! if unlockable?(resource)
1473+ sign_in(resource_name, resource)
1474+
1475+ flash[:notice] = 'Password updated!'
1476+ render json: {}
1477+ end
1478+
1479+private
1480+
1481+ def resource_params
1482+ params.require(:user).permit(:email, :password, :password_confirmation, :reset_password_token)
1483 end
1484 end
1485diff -ru adopt-oakland/app/controllers/reminders_controller.rb adopt-sf/app/controllers/reminders_controller.rb
1486--- adopt-oakland/app/controllers/reminders_controller.rb 2016-10-27 23:28:23.000000000 -0400
1487+++ adopt-sf/app/controllers/reminders_controller.rb 2016-10-27 23:28:03.000000000 -0400
1488@@ -1,14 +1,23 @@
1489 class RemindersController < ApplicationController
1490 respond_to :json
1491
1492+ before_action :require_admin
1493+
1494 def create
1495- @reminder = Reminder.new(params[:reminder])
1496+ @reminder = Reminder.new(reminder_params)
1497+ @reminder.from_user = current_user
1498 if @reminder.save
1499- ThingMailer.reminder(@reminder.thing).deliver
1500+ ThingMailer.reminder(@reminder.thing).deliver_later
1501 @reminder.update_attribute(:sent, true)
1502- render(:json => @reminder)
1503+ render(json: @reminder)
1504 else
1505- render(:json => {"errors" => @reminder.errors}, :status => 500)
1506+ render(json: {errors: @reminder.errors}, status: 500)
1507 end
1508 end
1509+
1510+private
1511+
1512+ def reminder_params
1513+ params.require(:reminder).permit(:thing_id, :to_user_id)
1514+ end
1515 end
1516diff -ru adopt-oakland/app/controllers/sessions_controller.rb adopt-sf/app/controllers/sessions_controller.rb
1517--- adopt-oakland/app/controllers/sessions_controller.rb 2016-10-27 23:28:23.000000000 -0400
1518+++ adopt-sf/app/controllers/sessions_controller.rb 2016-10-27 23:28:03.000000000 -0400
1519@@ -1,21 +1,26 @@
1520 class SessionsController < Devise::SessionsController
1521+ skip_before_action :verify_authenticity_token, only: [:destroy]
1522+
1523 def new
1524- redirect_to root_path
1525+ redirect_to(root_path)
1526 end
1527
1528 def create
1529- resource = warden.authenticate(:scope => resource_name)
1530+ self.resource = warden.authenticate!(auth_options)
1531 if resource
1532 sign_in(resource_name, resource)
1533- render(:json => resource)
1534+ yield resource if block_given?
1535+ render(json: resource)
1536 else
1537- render(:json => {"errors" => {:password => [t("errors.password")]}}, :status => 401)
1538+ render(json: {errors: {password: [t('errors.password')]}}, status: 401)
1539 end
1540 end
1541
1542 def destroy
1543 signed_in = signed_in?(resource_name)
1544 sign_out(resource_name) if signed_in
1545- render(:json => {"success" => signed_in})
1546+ Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name)
1547+ yield resource if block_given?
1548+ render(json: {success: signed_in})
1549 end
1550 end
1551Only in adopt-oakland/app/controllers: statuses_controller.rb
1552diff -ru adopt-oakland/app/controllers/things_controller.rb adopt-sf/app/controllers/things_controller.rb
1553--- adopt-oakland/app/controllers/things_controller.rb 2016-10-27 23:28:23.000000000 -0400
1554+++ adopt-sf/app/controllers/things_controller.rb 2016-10-27 23:28:03.000000000 -0400
1555@@ -2,37 +2,37 @@
1556 respond_to :json
1557
1558 def show
1559- @things = Thing.where("lat < ? AND lat > ? AND lng < ? AND lng > ? ", params[:NE][:lat], params[:SW][:lat], params[:NE][:lng], params[:SW][:lng])
1560-
1561-
1562-
1563-
1564- unless @things.blank?
1565- for t in @things
1566- if user_signed_in? && t.adopted_by(current_user.id) then
1567- t.owned_by_you = true
1568- else
1569- t.owned_by_you = false
1570- end
1571- end
1572- render(:json => @things.to_json(:methods => :owned_by_you, :include => :users))
1573+ @things = Thing.find_closest(params[:lat], params[:lng], params[:limit] || 10)
1574+ if @things.blank?
1575+ render(json: {errors: {address: [t('errors.not_found', thing: t('defaults.thing'))]}}, status: 404)
1576 else
1577- render(:json => {"errors" => {"address" => [t("errors.not_found", :thing => t("defaults.thing"))]}}, :status => 404)
1578+ respond_with @things
1579 end
1580 end
1581
1582 def update
1583 @thing = Thing.find(params[:id])
1584- if params[:thing][:user_id] == ""
1585- @thing.users.delete(current_user)
1586+ if @thing.update_attributes(thing_params)
1587+ send_adoption_email(@thing.user, @thing) if @thing.adopted?
1588+
1589+ respond_with @thing
1590 else
1591- if @thing.users.length == 0
1592- @thing.update_attributes({:name=>params[:thing][:name]})
1593- end
1594- if !@thing.adopted_by(params[:thing][:user_id])
1595- @thing.users << current_user
1596- end
1597+ render(json: {errors: @thing.errors}, status: 500)
1598 end
1599- render(:json => @thing.to_json(:include => :users), :status => 200)
1600+ end
1601+
1602+private
1603+
1604+ def send_adoption_email(user, thing)
1605+ case user.things.count
1606+ when 1
1607+ ThingMailer.first_adoption_confirmation(thing).deliver_later
1608+ when 2
1609+ ThingMailer.second_adoption_confirmation(thing).deliver_later
1610+ end
1611+ end
1612+
1613+ def thing_params
1614+ params.require(:thing).permit(:name, :user_id)
1615 end
1616 end
1617diff -ru adopt-oakland/app/controllers/users_controller.rb adopt-sf/app/controllers/users_controller.rb
1618--- adopt-oakland/app/controllers/users_controller.rb 2016-10-27 23:28:23.000000000 -0400
1619+++ adopt-sf/app/controllers/users_controller.rb 2016-10-27 23:28:03.000000000 -0400
1620@@ -1,27 +1,40 @@
1621 class UsersController < Devise::RegistrationsController
1622 def edit
1623- render("sidebar/edit_profile", :layout => "sidebar")
1624+ render('sidebar/edit_profile', layout: 'sidebar')
1625 end
1626
1627 def update
1628- if resource.update_with_password(params[resource_name])
1629- sign_in(resource_name, resource, :bypass => true)
1630- flash[:notice] = "Profile updated!"
1631- redirect_to(:controller => "sidebar", :action => "search")
1632+ self.resource = resource_class.to_adapter.get!(send(:"current_#{resource_name}").to_key)
1633+ if update_resource(resource, account_update_params)
1634+ yield resource if block_given?
1635+ sign_in(resource_name, resource, bypass: true)
1636+ flash[:notice] = 'Profile updated!'
1637+ redirect_to(controller: 'sidebar', action: 'search')
1638 else
1639 clean_up_passwords(resource)
1640- render(:json => {"errors" => resource.errors}, :status => 500)
1641+ render(json: {errors: resource.errors}, status: 500)
1642 end
1643 end
1644
1645 def create
1646- build_resource
1647+ build_resource(sign_up_params)
1648 if resource.save
1649+ yield resource if block_given?
1650 sign_in(resource_name, resource)
1651- render(:json => resource)
1652+ render(json: resource)
1653 else
1654 clean_up_passwords(resource)
1655- render(:json => {"errors" => resource.errors}, :status => 500)
1656+ render(json: {errors: resource.errors}, status: 500)
1657 end
1658 end
1659-end
1660\ No newline at end of file
1661+
1662+private
1663+
1664+ def sign_up_params
1665+ params.require(:user).permit(:email, :first_name, :last_name, :organization, :password, :password_confirmation, :sms_number, :voice_number)
1666+ end
1667+
1668+ def account_update_params
1669+ params.require(:user).permit(:address_1, :address_2, :city, :current_password, :email, :first_name, :last_name, :organization, :password, :password_confirmation, :remember_me, :sms_number, :state, :voice_number, :zip)
1670+ end
1671+end
1672diff -ru adopt-oakland/app/helpers/application_helper.rb adopt-sf/app/helpers/application_helper.rb
1673--- adopt-oakland/app/helpers/application_helper.rb 2016-10-27 23:28:23.000000000 -0400
1674+++ adopt-sf/app/helpers/application_helper.rb 2016-10-27 23:28:03.000000000 -0400
1675@@ -1,5 +1,5 @@
1676 module ApplicationHelper
1677- def us_states
1678+ def us_states # rubocop:disable MethodLength
1679 [
1680 ['Massachusetts', 'MA'],
1681 ['Alabama', 'AL'],
1682@@ -53,7 +53,7 @@
1683 ['Washington', 'WA'],
1684 ['West Virginia', 'WV'],
1685 ['Wisconsin', 'WI'],
1686- ['Wyoming', 'WY']
1687+ ['Wyoming', 'WY'],
1688 ]
1689 end
1690 end
1691Only in adopt-oakland/app/mailers: .gitkeep
1692Only in adopt-sf/app/mailers: .keep
1693Only in adopt-sf/app/mailers: application_mailer.rb
1694Only in adopt-sf/app/mailers: devise_mailer.rb
1695diff -ru adopt-oakland/app/mailers/thing_mailer.rb adopt-sf/app/mailers/thing_mailer.rb
1696--- adopt-oakland/app/mailers/thing_mailer.rb 2016-10-27 23:28:23.000000000 -0400
1697+++ adopt-sf/app/mailers/thing_mailer.rb 2016-10-27 23:28:03.000000000 -0400
1698@@ -1,28 +1,26 @@
1699-class ThingMailer < ActionMailer::Base
1700- default :from => "noreply@oaklandnet.com"
1701+class ThingMailer < ApplicationMailer
1702+ def first_adoption_confirmation(thing)
1703+ @thing = thing
1704+ @user = thing.user
1705
1706- def send_personalized
1707- if ENV.include? 'FORCE_EMAIL' or ['2012-04-27', '2012-05-01', '2012-06-01', '2012-07-02', '2012-08-01', '2012-09-04', '2012-10-01', '2012-11-01', '2012-12-03'].include? Date.current.to_s
1708- things = Thing.joins(:users)
1709-
1710- things.each do |t|
1711- t.users.each do |u|
1712- emails = u.email
1713- print emails
1714- @thing_name = t.name
1715- @thingid = t.id
1716- @userid = u.id
1717- mail(:to => emails, :subject => "Please remember to check your drain").deliver
1718- end
1719- end
1720- else
1721- print "skipping"
1722- end
1723-
1724+ mail(to: @user.email, subject: ["Thanks for adopting a drain, #{@user.name.split.first}! Here’s important info"])
1725 end
1726-
1727- def send_city_notification (user)
1728- mail(:to => ENV['ADMIN_SUBCRIPTION_NOTIFICATION_EMAIL'], :subject => "A drain has been adopted by #{user.email}").deliver
1729- end
1730
1731+ def second_adoption_confirmation(thing)
1732+ @thing = thing
1733+ @user = thing.user
1734+ mail(to: @user.email, subject: ["Thanks for adopting another drain, #{@user.name.split.first}!"])
1735+ end
1736+
1737+ def third_adoption_confirmation(thing)
1738+ @thing = thing
1739+ @user = thing.user
1740+ mail(to: @user.email, subject: ["We really do love you, #{@user.name.split.first}!"])
1741+ end
1742+
1743+ def reminder(thing)
1744+ @thing = thing
1745+ @user = thing.user
1746+ mail(to: @user.email, subject: ['Remember to clear your adopted drain'])
1747+ end
1748 end
1749Only in adopt-oakland/app/models: .gitkeep
1750Only in adopt-sf/app/models: .keep
1751diff -ru adopt-oakland/app/models/address.rb adopt-sf/app/models/address.rb
1752--- adopt-oakland/app/models/address.rb 2016-10-27 23:28:23.000000000 -0400
1753+++ adopt-sf/app/models/address.rb 2016-10-27 23:28:03.000000000 -0400
1754@@ -2,7 +2,6 @@
1755 include Geokit::Geocoders
1756
1757 def self.geocode(address)
1758- Geokit::Geocoders::GoogleGeocoder3.geocode(address).ll.split(',').map{|s| s.to_f}
1759- # MultiGeocoder.geocode(address).ll.split(',').map{|s| s.to_f}
1760+ MultiGeocoder.geocode(address).ll.split(',').collect(&:to_f)
1761 end
1762 end
1763Only in adopt-sf/app/models: concerns
1764diff -ru adopt-oakland/app/models/reminder.rb adopt-sf/app/models/reminder.rb
1765--- adopt-oakland/app/models/reminder.rb 2016-10-27 23:28:23.000000000 -0400
1766+++ adopt-sf/app/models/reminder.rb 2016-10-27 23:28:03.000000000 -0400
1767@@ -1,6 +1,9 @@
1768 class Reminder < ActiveRecord::Base
1769- validates_presence_of :from_user, :to_user, :thing
1770- belongs_to :from_user, :class_name => "User"
1771- belongs_to :to_user, :class_name => "User"
1772+ include ActiveModel::ForbiddenAttributesProtection
1773+ belongs_to :from_user, class_name: 'User'
1774 belongs_to :thing
1775+ belongs_to :to_user, class_name: 'User'
1776+ validates :from_user, presence: true
1777+ validates :thing, presence: true
1778+ validates :to_user, presence: true
1779 end
1780Only in adopt-oakland/app/models: status.rb
1781diff -ru adopt-oakland/app/models/thing.rb adopt-sf/app/models/thing.rb
1782--- adopt-oakland/app/models/thing.rb 2016-10-27 23:28:23.000000000 -0400
1783+++ adopt-sf/app/models/thing.rb 2016-10-27 23:28:03.000000000 -0400
1784@@ -1,72 +1,41 @@
1785 class Thing < ActiveRecord::Base
1786- include Geokit::Geocoders
1787- validates_uniqueness_of :city_id, :allow_nil => true
1788- validates_presence_of :lat, :lng
1789- has_and_belongs_to_many :users
1790+ extend Forwardable
1791+ include ActiveModel::ForbiddenAttributesProtection
1792+ belongs_to :user
1793+ def_delegators :reverse_geocode, :city, :country, :country_code,
1794+ :full_address, :state, :street_address, :street_name,
1795+ :street_number, :zip
1796 has_many :reminders
1797- attr_accessor :owned_by_you
1798- # attr_accessible :city_id, :lat, :lng
1799- @owned_by_you
1800- def self.find_closest(lat, lng, limit=200)
1801+ validates :city_id, uniqueness: true, allow_nil: true
1802+ validates :lat, presence: true
1803+ validates :lng, presence: true
1804+ validates :name, obscenity: true
1805+
1806+ def self.find_closest(lat, lng, limit = 10)
1807 query = <<-SQL
1808- SELECT *, (3959 * ACOS(COS(RADIANS(?)) * COS(RADIANS(lat)) * COS(radians(lng) - RADIANS(?)) + SIN(RADIANS(?)) * SIN(RADIANS(lat)))) AS distance
1809+ SELECT *, (3959 * ACOS(COS(RADIANS(?)) * COS(RADIANS(lat)) * COS(RADIANS(lng) - RADIANS(?)) + SIN(RADIANS(?)) * SIN(RADIANS(lat)))) AS distance
1810 FROM things
1811 ORDER BY distance
1812 LIMIT ?
1813 SQL
1814- find_by_sql([query, lat.to_f, lng.to_f, lat.to_f, 200])
1815+ find_by_sql([query, lat.to_f, lng.to_f, lat.to_f, limit.to_i])
1816 end
1817
1818 def reverse_geocode
1819- @reverse_geocode ||= MultiGeocoder.reverse_geocode([lat, lng])
1820- end
1821-
1822- def street_number
1823- reverse_geocode.street_number
1824- end
1825-
1826- def street_name
1827- reverse_geocode.street_name
1828+ @reverse_geocode ||= Geokit::Geocoders::MultiGeocoder.reverse_geocode([lat, lng])
1829 end
1830
1831- def street_address
1832- reverse_geocode.street_address
1833- end
1834-
1835- def city
1836- reverse_geocode.city
1837- end
1838-
1839- def state
1840- reverse_geocode.state
1841- end
1842-
1843- def zip
1844- reverse_geocode.zip
1845- end
1846-
1847- def country_code
1848- reverse_geocode.country_code
1849- end
1850-
1851- def country
1852- reverse_geocode.country
1853+ def adopted?
1854+ !user.nil?
1855 end
1856
1857- def full_address
1858- reverse_geocode.full_address
1859- end
1860+ # Link to more details about type of Thing
1861+ #
1862+ # Currently hardcoding since we only have one special case, but we should
1863+ # move this into the database if we add an additional
1864+ def detail_link
1865+ return 'http://sfwater.org/index.aspx?page=399' if system_use_code == 'MS4'
1866
1867- def adopted_by(user_id)
1868- for u in users do
1869- if u.id == user_id then
1870- return true
1871- end
1872- end
1873- return false
1874- end
1875-
1876- def adopted?
1877- users.length != 0
1878+ nil
1879 end
1880 end
1881diff -ru adopt-oakland/app/models/user.rb adopt-sf/app/models/user.rb
1882--- adopt-oakland/app/models/user.rb 2016-10-27 23:28:23.000000000 -0400
1883+++ adopt-sf/app/models/user.rb 2016-10-27 23:28:03.000000000 -0400
1884@@ -1,20 +1,23 @@
1885 class User < ActiveRecord::Base
1886+ include ActiveModel::ForbiddenAttributesProtection
1887 devise :database_authenticatable, :registerable, :recoverable, :rememberable,
1888- :trackable, :validatable
1889- attr_accessible :address_1, :address_2, :city, :email, :subscribed_at, :name, :organization,
1890- :password, :password_confirmation, :remember_me, :sms_number, :state,
1891- :voice_number, :zip
1892- validates_formatting_of :email, :using => :email
1893- validates_formatting_of :sms_number, :using => :us_phone, :allow_blank => true
1894- validates_formatting_of :voice_number, :using => :us_phone, :allow_blank => true
1895- validates_formatting_of :zip, :using => :us_zip, :allow_blank => true
1896- validates_presence_of :name
1897- has_many :reminders_to, :class_name => "Reminder", :foreign_key => "to_user_id"
1898- has_many :reminders_from, :class_name => "Reminder", :foreign_key => "from_user_id"
1899- has_and_belongs_to_many :things
1900+ :trackable, :validatable
1901 before_validation :remove_non_digits_from_phone_numbers
1902+ has_many :reminders_from, class_name: 'Reminder', foreign_key: 'from_user_id'
1903+ has_many :reminders_to, class_name: 'Reminder', foreign_key: 'to_user_id'
1904+ has_many :things
1905+ validates :first_name, presence: true
1906+ validates_formatting_of :email, using: :email
1907+ validates_formatting_of :sms_number, using: :us_phone, allow_blank: true
1908+ validates_formatting_of :voice_number, using: :us_phone, allow_blank: true
1909+ validates_formatting_of :zip, using: :us_zip, allow_blank: true
1910+
1911 def remove_non_digits_from_phone_numbers
1912- self.sms_number = self.sms_number.to_s.gsub(/\D/, '').to_i if self.sms_number.present?
1913- self.voice_number = self.voice_number.to_s.gsub(/\D/, '').to_i if self.voice_number.present?
1914+ self.sms_number = sms_number.to_s.gsub(/\D/, '').to_i if sms_number.present?
1915+ self.voice_number = voice_number.to_s.gsub(/\D/, '').to_i if voice_number.present?
1916+ end
1917+
1918+ def name
1919+ [first_name, last_name].reject(&:blank?).join(' ')
1920 end
1921 end
1922Only in adopt-oakland/app/views: javascripts
1923diff -ru adopt-oakland/app/views/layouts/_flash.html.haml adopt-sf/app/views/layouts/_flash.html.haml
1924--- adopt-oakland/app/views/layouts/_flash.html.haml 2016-10-27 23:28:23.000000000 -0400
1925+++ adopt-sf/app/views/layouts/_flash.html.haml 2016-10-27 23:28:03.000000000 -0400
1926@@ -1,18 +1,24 @@
1927 - if flash[:notice]
1928- .alert-message.block-message.info.fade.in{:"data-alert" => true}
1929+ .alert.alert-info.fade.in{:"data-alert" => true}
1930 %a{:class => "close", :"data-dismiss" => "alert", :href => "#"}
1931 ×
1932 %p
1933 = flash[:notice]
1934 - if flash[:warning]
1935- .alert-message.block-message.warning.fade.in{:"data-alert" => true}
1936+ .alert.alert-warning.fade.in{:"data-alert" => true}
1937 %a{:class => "close", :"data-dismiss" => "alert", :href => "#"}
1938 ×
1939 %p
1940 = flash[:warning]
1941 - if flash[:error]
1942- .alert-message.block-message.error.fade.in{:"data-alert" => true}
1943+ .alert.alert-danger.fade.in{:"data-alert" => true}
1944 %a{:class => "close", :"data-dismiss" => "alert", :href => "#"}
1945 ×
1946 %p
1947 = flash[:error]
1948+- if flash[:alert]
1949+ .alert.alert-danger.fade.in{:"data-alert" => true}
1950+ %a{:class => "close", :"data-dismiss" => "alert", :href => "#"}
1951+ ×
1952+ %p
1953+ = flash[:alert]
1954diff -ru adopt-oakland/app/views/layouts/application.html.haml adopt-sf/app/views/layouts/application.html.haml
1955--- adopt-oakland/app/views/layouts/application.html.haml 2016-10-27 23:28:23.000000000 -0400
1956+++ adopt-sf/app/views/layouts/application.html.haml 2016-10-27 23:28:03.000000000 -0400
1957@@ -4,34 +4,38 @@
1958 %title
1959 = t("titles.main", :thing => t("defaults.thing").titleize)
1960 = csrf_meta_tag
1961- %meta{:name => "viewport", :content => "width=800, user-scalable=no"}
1962+ %meta{:name => "viewport", :content => "width=device-width, initial-scale=1"}
1963+ %meta{:name => "twitter:card", :content => "summary"}
1964+ %meta{:name => "twitter:site", :content => "@SFWater"}
1965+ %meta{:name => "twitter:title", :content => t("titles.main", :thing => t("defaults.thing").titleize)}
1966+ %meta{:name => "twitter:description", :content => t("site.description")}
1967+ %meta{:name => "twitter:image", :content => image_url('logos/adopt-a-drain-horizontal.png')}
1968+ %meta{:property => "og:description", :content => t("site.description")}
1969+ %meta{:property => "og:type", :content => "article"}
1970+ %meta{:property => "og:url", :content => root_url}
1971+ %meta{:property => "og:title", :content => t("titles.main", :thing => t("defaults.thing").titleize)}
1972+ %meta{:property => "og:site_name", :content => t("titles.main", :thing => t("defaults.thing").titleize)}
1973+ %meta{:property => "og:image", :content => image_url('logos/adopt-a-drain-horizontal.png')}
1974+ %meta{:property => "og:locale", :content => "en_US"}
1975 / HTML5 shim, for IE6-8 support of HTML5 elements
1976 /[if lt IE 9]
1977 = javascript_include_tag "//html5shim.googlecode.com/svn/trunk/html5.js"
1978 = javascript_include_tag "//maps.google.com/maps/api/js?sensor=false&language=#{I18n.locale}"
1979- = javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"
1980- = javascript_include_tag "//ajax.googleapis.com/ajax/libs/jqueryui/1.8.24/jquery-ui.min.js"
1981- = javascript_include_tag "/assets/bootstrap-twipsy.js"
1982- = javascript_include_tag "/assets/bootstrap-alerts.js"
1983- = javascript_include_tag "/assets/bootstrap-modal.js"
1984- = javascript_include_tag javascript_path
1985-
1986-
1987-
1988-
1989- :javascript
1990- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
1991- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
1992- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
1993- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
1994-
1995- ga('create', 'UA-35908939-7', 'adoptadrainoakland.com');
1996- ga('send', 'pageview');
1997-
1998- = stylesheet_link_tag "/assets/bootstrap.min.css"
1999- = stylesheet_link_tag "screen"
2000- /[if lt IE 8]
2001- = stylesheet_link_tag "ie6"
2002+ = javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"
2003+ = javascript_include_tag "//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"
2004+ = javascript_include_tag "application"
2005+ - if Rails.env.production? && ENV['GOOGLE_ANALYTICS_ID'].present?
2006+ %script{:type => "text/javascript"}
2007+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
2008+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
2009+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
2010+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
2011
2012+ ga('create', '#{ENV['GOOGLE_ANALYTICS_ID']}', '#{ENV['GOOGLE_ANALYTICS_DOMAIN']}');
2013+ ga('send', 'pageview');
2014+ = stylesheet_link_tag "//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"
2015+ %script{:type => "text/javascript"}
2016+ if (!window.console) window.console = {log: function() {}};
2017+ = stylesheet_link_tag "application"
2018 %body
2019 = yield
2020Only in adopt-sf/app/views/layouts: mailer.text.erb
2021diff -ru adopt-oakland/app/views/main/index.html.haml adopt-sf/app/views/main/index.html.haml
2022--- adopt-oakland/app/views/main/index.html.haml 2016-10-27 23:28:23.000000000 -0400
2023+++ adopt-sf/app/views/main/index.html.haml 2016-10-27 23:28:03.000000000 -0400
2024@@ -1,39 +1,75 @@
2025-.table
2026- .table-row
2027- .table-cell.sidebar
2028- %a{:href => "http://www2.oaklandnet.com/"}
2029- = image_tag "logos/citytree_green_small.jpg", :style => "margin-top:10px", :width => '90px', :alt => t("sponsors.city"), :title => t("sponsors.city")
2030- %h1
2031- Adopt a Drain
2032- %h4
2033- Part of
2034- %a{:href => 'http://www.oaklandadoptaspot.org'}Oakland Adopt a Spot
2035-
2036- %p.alert-message.block-message#tagline
2037- = t("defaults.tagline")
2038- #content
2039- = render :partial => "layouts/flash", :locals => {:flash => flash}
2040- - if signed_in?
2041- = render :partial => "sidebar/search"
2042- - else
2043- = render :partial => "sidebar/combo_form"
2044- #logos
2045- %a{:href => "http://openoakland.org/"}
2046- = image_tag "logos/openoakland.png", :width => '180px', :alt => t("sponsors.cfa"), :title => t("sponsors.cfa")
2047-
2048- #feedback
2049- %br
2050- %br
2051- %br
2052- %p
2053- Report maintenance needs to the
2054- %a{:href => URI.escape("http://www2.oaklandnet.com/Government/o/PWA/Connect/ReportaProblem/index.htm")} City of Oakland Public Works Agency
2055- or visit
2056- %a{:href => "http://www.seeclickfix.com/oakland"}www.seeclickfix.com/oakland
2057- %p{:style => "font-size: 120%"}
2058- %a{:href => URI.escape("mailto:pboylerodriguez@oaklandnet.com?subject=#{t("titles.main", :thing => t("defaults.thing").titleize)} #{t("links.feedback").titleize}")}
2059- = t("links.feedback")
2060- .table-cell.map-container
2061- #map
2062+.container-fluid{:class => (signed_in? ? "signed-in" : nil)}
2063+ .row
2064+ .sidebar
2065+ .navbar.navbar-default
2066+ %a{href: root_url}
2067+ = image_tag "logos/adopt-a-drain.png", :alt => t("titles.main", :thing => t("defaults.thing").titleize), :title => t("titles.main", :thing => t("defaults.thing").titleize)
2068+ %button.navbar-toggle{"data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", :type => "button"}
2069+ %span.sr-only Toggle navigation
2070+ %span.icon-bar
2071+ %span.icon-bar
2072+ %span.icon-bar
2073+ .sidebar-content
2074+ -# Corresponds to guideline div below
2075+ %div.hidden-xs
2076+ %a.guidelines{:href => "#guidelines", :"data-toggle" => "modal", :"data-target" => "#guidelines"}
2077+ %p.alert-message.block-message#tagline
2078+ = t("defaults.tagline")
2079+ #content
2080+ = render :partial => "layouts/flash", :locals => {:flash => flash}
2081+ - if signed_in?
2082+ = render :partial => "sidebar/search"
2083+ - elsif @reset_password_token.present?
2084+ = render :partial => 'passwords/edit'
2085+ - else
2086+ = render :partial => "sidebar/combo_form"
2087+ -# Corresponds to guideline div above
2088+ %div.hidden.visible-xs-block
2089+ %a.guidelines{:href => "#guidelines", :"data-toggle" => "modal", :"data-target" => "#guidelines"}
2090+ %p.alert-message.block-message#tagline
2091+ = t("defaults.tagline")
2092+ #logos
2093+ .row
2094+ .col-xs-6
2095+ %a{:href => "http://sfwater.org/"}
2096+ = image_tag "logos/sfpuc.png", :alt => t("sponsors.sfpuc"), :title => t("sponsors.sfpuc"), :class => "puc"
2097+ .col-xs-6
2098+ %a{:href => "http://sfdpw.org/"}
2099+ = image_tag "logos/sfpw.jpg", :alt => t("sponsors.sfpw"), :title => t("sponsors.sfpw"), :class => "dpw"
2100+ .col-xs-6
2101+ %a{:href => "http://datasf.org/"}
2102+ = image_tag "logos/DataSFLogo.png", :alt => t("sponsors.datasf"), :title => t("sponsors.datasf"), :class => "datasf"
2103+ .col-xs-6
2104+ %a{:href => "http://codeforsanfrancisco.org/"}
2105+ = image_tag "logos/codeforsanfrancisco.png", :alt => t("sponsors.built"), :title => t("sponsors.built"), :class => "cfsf"
2106+ .col-xs-6.col-xs-offset-3
2107+ %a{:href => "http://codeforamerica.org/"}
2108+ = image_tag "logos/cfa.jpg", :alt => t("sponsors.cfa"), :title => t("sponsors.cfa"), :class => "cfa"
2109+ #feedback
2110+ .row
2111+ .col-md-6
2112+ %p
2113+ %a{:href => "#background", :"data-toggle" => "modal", :"data-target" => "#background"}
2114+ = t("links.learn_more_background")
2115+ .col-md-6
2116+ %p.pull-right
2117+ %a{:href => URI.escape("mailto:info@sfwater.org?subject=#{t("titles.main", :thing => t("defaults.thing").titleize)} - #{t("links.feedback").titleize}")}
2118+ = t("links.feedback")
2119+ .col-md-9.map-container
2120+ #map
2121
2122 #legend
2123+ .title
2124+ Legend
2125+ .show-hide
2126+ %a#toggleLegend{:href=>"#"}
2127+ Hide
2128+ = render :partial => "sidebar/tos"
2129+ = render :partial => "sidebar/guidelines"
2130+ = render :partial => "sidebar/background"
2131+:javascript
2132+ $(function() {
2133+ $('.navbar-toggle').on('click', function(){
2134+ $('div.sidebar').toggleClass('sidebar-full');
2135+ });
2136+ });
2137diff -ru adopt-oakland/app/views/main/unauthenticated.html.haml adopt-sf/app/views/main/unauthenticated.html.haml
2138--- adopt-oakland/app/views/main/unauthenticated.html.haml 2016-10-27 23:28:23.000000000 -0400
2139+++ adopt-sf/app/views/main/unauthenticated.html.haml 2016-10-27 23:28:03.000000000 -0400
2140@@ -1,19 +1,19 @@
2141 .table
2142 .table-row
2143 .table-cell.sidebar
2144- %h2
2145- %br
2146- Adopt a Drain
2147- %h5
2148- Part of the
2149- %a{:href => 'http://www.oaklandadoptaspot.org'}Oakland Adopt a Spot
2150- Program
2151+ %h1
2152+ = image_tag "logos/adopt-a-drain.png", :alt => t("titles.main", :thing => t("defaults.thing").titleize), :title => t("titles.main", :thing => t("defaults.thing").titleize)
2153 %p.alert-message.block-message#tagline
2154 = t("defaults.tagline")
2155 #content
2156 = render :partial => "sidebar/combo_form"
2157 #logos
2158- %a{:href => "http://openoakland.org/"}
2159- = image_tag "logos/openoakland.png", :width => '180px', :alt => t("sponsors.cfa"), :title => t("sponsors.cfa")
2160+ %a{:href => "http://codeforamerica.org/"}
2161+ = image_tag "logos/cfa.png", :alt => t("sponsors.cfa"), :title => t("sponsors.cfa")
2162+ %a{:href => "http://bostonbuilt.org/"}
2163+ = image_tag "logos/boston.png", :alt => t("sponsors.city"), :title => t("sponsors.city")
2164+ #feedback
2165+ %a{:href => URI.escape("mailto:adoptadrain@cityofboston.gov?subject=#{t("titles.main", :thing => t("defaults.thing").titleize)} #{t("links.feedback").titleize}")}
2166+ = t("links.feedback")
2167 .table-cell#map
2168
2169Only in adopt-sf/app/views/passwords: _edit.html.haml
2170diff -ru adopt-oakland/app/views/passwords/edit.html.haml adopt-sf/app/views/passwords/edit.html.haml
2171--- adopt-oakland/app/views/passwords/edit.html.haml 2016-10-27 23:28:23.000000000 -0400
2172+++ adopt-sf/app/views/passwords/edit.html.haml 2016-10-27 23:28:03.000000000 -0400
2173@@ -1,9 +1,9 @@
2174 %h2
2175 = t("titles.edit_profile")
2176-= form_for resource, :as => resource_name, :url => password_path(resource_name), :html => {:id => "edit_form", :class => "form-stacked", :method => :put} do |f|
2177+= form_for resource, :as => resource_name, :url => password_path(resource_name), :html => {:id => "edit_form", :method => :put} do |f|
2178 = f.hidden_field "reset_password_token"
2179 %fieldset.control-group
2180- = f.label "password", t("labels.password_new"), :id => "user_password_label"
2181+ = f.label "password", t("labels.password_new"), :id => "user_password_label", :class => "control-label"
2182 = f.password_field "password"
2183 %fieldset.form-actions
2184 = f.submit t("buttons.change_password"), :class => "btn"
2185Only in adopt-sf/app/views/sidebar: _background.html.haml
2186diff -ru adopt-oakland/app/views/sidebar/_combo_form.html.haml adopt-sf/app/views/sidebar/_combo_form.html.haml
2187--- adopt-oakland/app/views/sidebar/_combo_form.html.haml 2016-10-27 23:28:23.000000000 -0400
2188+++ adopt-sf/app/views/sidebar/_combo_form.html.haml 2016-10-27 23:28:03.000000000 -0400
2189@@ -1,96 +1,72 @@
2190-= form_for :user, :html => {:id => "combo-form", :class => "form-stacked"} do |f|
2191- #common_fields
2192- %fieldset.control-group
2193- %label{:for => "user_email", :id => "user_email_label"}
2194+%iframe{ :width => "100%", :src => "https://www.youtube.com/embed/Z1Vjrx3IAH0", :frameborder => "0", :allowfullscreen => "allowfullscreen" }
2195+= form_for :user, :html => {:id => "combo-form", :class => "form-vertical"} do |f|
2196+ %fieldset#common_fields
2197+ .form-group
2198+ %label.control-label{:for => "user_email", :id => "user_email_label"}
2199 = t("labels.email")
2200 %small
2201- = image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
2202- = f.email_field "email", :value => params[:user] ? params[:user][:email] : nil
2203- %fieldset.control-group.radio
2204+ = t("captions.private")
2205+ = f.email_field "email", :value => params[:user] ? params[:user][:email] : nil, :class => "form-control"
2206+ .radio
2207 = f.label "new" , radio_button_tag("user", "new", true).html_safe + t("labels.user_new")
2208+ .radio
2209 = f.label "existing", radio_button_tag("user", "existing").html_safe + t("labels.user_existing")
2210- #user_sign_up_fields
2211- %fieldset.control-group
2212- %label{:for => "user_name", :id => "user_name_label"}
2213- = t("labels.name")
2214+ %fieldset#user_sign_up_fields
2215+ .form-group
2216+ %label.control-label{:for => "user_first_name", :id => "user_first_name_label"}
2217+ = t("labels.first_name")
2218 %small
2219 = t("captions.public")
2220- = f.text_field "name"
2221- %fieldset.control-group
2222- %label{:for => "user_organization", :id => "user_organization_label"}
2223+ = f.text_field "first_name", :class => "form-control"
2224+ .form-group
2225+ %label.control-label{:for => "user_last_name", :id => "user_last_name_label"}
2226+ = t("labels.last_name")
2227+ %small
2228+ = t("captions.public_optional")
2229+ = f.text_field "last_name", :class => "form-control"
2230+ .form-group
2231+ %label.control-label{:for => "user_organization", :id => "user_organization_label"}
2232 = t("labels.organization")
2233 %small
2234- = t("captions.public")
2235- = f.text_field "organization"
2236- %fieldset.control-group
2237- %label{:for => "user_voice_number", :id => "user_voice_number_label"}
2238+ = t("captions.public_optional")
2239+ = f.text_field "organization", :class => "form-control"
2240+ .form-group.hidden
2241+ %label.control-label{:for => "user_voice_number", :id => "user_voice_number_label"}
2242 = t("labels.voice_number")
2243 %small
2244- = image_tag "lock.png", :alt => t("captions.private"), :title => t("captions.private")
2245- = f.telephone_field "voice_number", :placeholder => t("defaults.voice_number")
2246- %fieldset.control-group
2247- %label{:for => "user_sms_number", :id => "user_sms_number_label"}
2248+ = image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
2249+ = f.telephone_field "voice_number", :placeholder => t("defaults.voice_number"), :class => "form-control"
2250+ .form-group
2251+ %label.control-label{:for => "user_sms_number", :id => "user_sms_number_label"}
2252 = t("labels.sms_number")
2253 %small
2254- = image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
2255- = f.telephone_field "sms_number", :placeholder => t("defaults.sms_number")
2256- %fieldset.control-group
2257- %label{:for => "user_password_confirmation", :id => "user_password_confirmation_label"}
2258+ = t("captions.private_optional")
2259+ = f.telephone_field "sms_number", :placeholder => t("defaults.sms_number"), :class => "form-control"
2260+ .form-group
2261+ %label.control-label{:for => "user_password_confirmation", :id => "user_password_confirmation_label"}
2262 = t("labels.password_choose")
2263- %small
2264- = image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
2265- = f.password_field "password_confirmation"
2266-
2267- %p
2268-
2269- =check_box_tag :tos_agreement, :disabled => true
2270-
2271- = t("defaults.tos", :tos => link_to(t("titles.tos"), "#tos", :id => "tos_link", "data-target"=>"#tos", "data-toggle"=>"modal")).html_safe
2272-
2273- %fieldset.form-actions
2274- = f.submit t("buttons.sign_up"), :class => "btn primary", :id => "sign-up-button"
2275- #user_sign_in_fields{:style => "display: none;"}
2276- %fieldset.control-group
2277- %label{:for => "user_password", :id => "user_password_label"}
2278+ = f.password_field "password_confirmation", :class => "form-control"
2279+ .help-block
2280+ %p.tos
2281+ = t("defaults.tos", :tos => link_to(t("titles.tos"), "#tos", :id => "tos_link", :"data-toggle" => "modal", :"data-target" => "#tos")).html_safe
2282+ .form-actions
2283+ = f.submit t("buttons.sign_up"), :class => "btn btn-primary btn-block"
2284+ %fieldset#user_sign_in_fields{:style => "display: none;"}
2285+ .form-group
2286+ %label.control-label{:for => "user_password", :id => "user_password_label"}
2287 = t("labels.password")
2288 %small
2289 = image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
2290- = f.password_field "password"
2291- %fieldset.control-group
2292+ = f.password_field "password", :class => "form-control"
2293+ .help-block
2294+ .form-group
2295 = f.label "remember_me" , f.check_box("remember_me", :checked => true).html_safe + t("labels.remember_me")
2296- %fieldset.form-actions
2297- = f.submit t("buttons.sign_in"), :class => "btn primary"
2298 %p
2299 = link_to t("links.forgot_password"), "#", :id => "user_forgot_password_link"
2300- #user_forgot_password_fields{:style => "display: none;"}
2301- %fieldset.form-actions
2302- = f.submit t("buttons.email_password"), :class => "btn primary"
2303+ .form-actions
2304+ = f.submit t("buttons.sign_in"), :class => "btn btn-primary btn-block"
2305+ %fieldset#user_forgot_password_fields{:style => "display: none;"}
2306 %p
2307 = link_to t("links.remembered_password"), "#", :id => "user_remembered_password_link"
2308-= render :partial => "sidebar/tos"
2309-:javascript
2310- $(function() {
2311- $('#user_email').focus();
2312-
2313-
2314- $(document).ready(function(){
2315-
2316- var tos_agreement_checkbox = function(){
2317-
2318- if ($('#tos_agreement').is(':checked')) {
2319- $('#sign-up-button').removeAttr('disabled');
2320- } else {
2321-
2322- $('#sign-up-button').attr('disabled','disabled');
2323- }
2324-
2325- }
2326-
2327- tos_agreement_checkbox();
2328- $('#tos_agreement').click(function(){
2329- tos_agreement_checkbox();
2330- });
2331- });
2332-
2333-
2334- });
2335+ .form-actions
2336+ = f.submit t("buttons.email_password"), :class => "btn btn-primary btn-block"
2337Only in adopt-sf/app/views/sidebar: _guidelines.html.haml
2338diff -ru adopt-oakland/app/views/sidebar/_search.html.haml adopt-sf/app/views/sidebar/_search.html.haml
2339--- adopt-oakland/app/views/sidebar/_search.html.haml 2016-10-27 23:28:23.000000000 -0400
2340+++ adopt-sf/app/views/sidebar/_search.html.haml 2016-10-27 23:28:03.000000000 -0400
2341@@ -1,18 +1,25 @@
2342-= form_tag "/address", :method => "get", :id => "address_form", :class => "search-form form-stacked" do
2343- = hidden_field_tag "limit", params[:limit] || 10
2344- %fieldset.control-group{:style => "display: none"}
2345- = label_tag "city_state", t("labels.city_state"), :id => "city_state_label"
2346- = select_tag "city_state", "<option value=\"#{t("defaults.city_state")}\" selected=\"selected\">#{t("defaults.city_state")}</option>".html_safe
2347- %fieldset.control-group
2348- = label_tag "address", t("labels.address"), :id => "address_label"
2349- = search_field_tag "address", params[:address], :placeholder => [t("defaults.address_1"), t("defaults.neighborhood")].join(", "), :class => "search-query"
2350+= form_tag "/address", :method => "get", :id => "address_form", :class => "search-form" do
2351+ = hidden_field_tag "limit", params[:limit] || 25
2352+ = hidden_field_tag "current_user_id", current_user.id
2353+ %fieldset.form-group.hidden
2354+ = label_tag "city_state", t("labels.city_state"), :id => "city_state_label", :class => 'control-label'
2355+ = select_tag "city_state", "<option value=\"#{t("defaults.city_state")}\" selected=\"selected\">#{t("defaults.city_state")}</option>".html_safe, :class => "form-control"
2356+ %fieldset.form-group
2357+ = label_tag "address", t("labels.address"), :id => "address_label", :class => 'control-label'
2358+ = search_field_tag "address", params[:address], :placeholder => [t("defaults.address_1"), t("defaults.neighborhood")].join(", "), :class => "search-query form-control"
2359+ .help-block
2360 %fieldset.form-actions
2361- = submit_tag t("buttons.find", :thing => t("defaults.thing").pluralize), :class => "btn primary"
2362- %a{:href => edit_user_registration_path, :id => "edit_profile_link", :class => "btn"}
2363+ = submit_tag t("buttons.find", :thing => t("defaults.thing").pluralize), :class => "btn btn-primary btn-block"
2364+ .break
2365+ %div.user-things
2366+ %h5.my-things= t('labels.my_things', :things => t('defaults.things'))
2367+ %dl
2368+ - current_user.things.each do |thing|
2369+ %dt
2370+ %a.thing-link{ :data => { :lng => thing.lng, :lat => thing.lat } }=thing.name
2371+ %dd=thing.street_address
2372+ .break
2373+ %a{:href => edit_user_registration_path, :id => "edit_profile_link", :class => "btn btn-default btn-block"}
2374 = t("buttons.edit_profile")
2375- %a{:href => destroy_user_session_path, :id => "sign_out_link", :class => "btn danger"}
2376+ %a{:href => destroy_user_session_path, :id => "sign_out_link", :class => "btn btn-danger btn-block"}
2377 = t("buttons.sign_out")
2378-:javascript
2379- $(function() {
2380- $('#address').focus();
2381- });
2382diff -ru adopt-oakland/app/views/sidebar/_tos.html.haml adopt-sf/app/views/sidebar/_tos.html.haml
2383--- adopt-oakland/app/views/sidebar/_tos.html.haml 2016-10-27 23:28:23.000000000 -0400
2384+++ adopt-sf/app/views/sidebar/_tos.html.haml 2016-10-27 23:28:03.000000000 -0400
2385@@ -1,87 +1,254 @@
2386-.modal.hide.fade#tos{:tabindex=>"-1", :role=>"dialog", "aria-labelledby"=>"tos", "aria-hidden"=>"true"}
2387- .modal-header
2388- %a{:class => "close", :"data-dismiss" => "modal", :href => "#"}
2389- ×
2390- %h2
2391- = t("titles.tos")
2392- .modal-body{:style => "text-align:left"}
2393- %h1
2394- Volunteer Guidelines
2395- %p
2396- Thank you for your dedication to Oakland! Your well-being and enjoyment are important to us. All volunteers are expected to conduct themselves in a safe, courteous and legal manner while participating in activities on City property or right-of-way. Please follow these guidelines:
2397- General Safety
2398- %ul{:style => "text-align:left" }
2399- %li Wear appropriate footwear, clothing, sunscreen and eye protection (when necessary).
2400- %li Keep hydrated.
2401- %li Call 911 for emergencies.
2402-
2403- %h3
2404- Traffic Safety
2405- %ul{:style => "text-align:left" }
2406-
2407- %li When possible, stay out of the street.
2408- %li When working in or around a gutter, work from the sidewalk.
2409- %li If working near traffic, wear a bright reflective work vest or bright-colored clothing. x
2410- %li Cross streets at signals or crosswalks, not mid-block.
2411-
2412- %h3
2413- Working Near Waterways
2414- %ul{:style => "text-align:left" }
2415-
2416- %li Always work with a partner near water.
2417- %li Watch for poison oak and blackberry thorns.
2418- %li Watch your footing on slopes and shorelines.
2419- %li Never allow children to work on steep slopes or near shorelines without adult supervision.
2420-
2421- %h3
2422- Tool Safety
2423- %ul{:style => "text-align:left" }
2424- %li Do not use power tools.
2425- %li Carry tools carefully to avoid hitting others.
2426- %li Always use the right tools for the job. Ask a team leader or City staff if you are unsure.
2427- %li Never allow children to play with tools or to use sharp tools.
2428- %li Always keep your tools close to you.
2429- %li Count and clean your tools after an activity/cleanup.
2430- %li Return borrowed tools and supplies, as agreed. A copy of the Tool Request Form is available at www.oaklandadoptaspot.org.
2431-
2432- %h3
2433- Debris Removal
2434- %ul{:style => "text-align:left" }
2435- %li Always sweep, rake or shovel glass. Never pick up sharp objects with your hands.
2436- %li Separate collected materials into recycling, greenwaste and garbage.
2437- %li To the extent practicable, place recyclables and smaller garbage bags into home refuse containers.
2438- %li Contact the PWA Call Center at (510) 615-5566 or pwacallcenter@oaklandnet.com for pickup of City-issued debris bags. Tell them the quantity of bags, type of debris and the nearest address.
2439- %li Never touch hazardous or medical waste (including automotive fluids and hypodermic needles). Report items to the Public Works Call Center or to a City employee, if present.
2440-
2441- %h3
2442- General Conduct
2443- %ul{:style => "text-align:left" }
2444- %li Always be courteous to fellow volunteers and City employees.
2445- %li Never use vulgar language or engage in threatening or disruptive actions.
2446- %li Never make unauthorized changes to City property or right-of-way, including landscaping.
2447- %li Keep foreign mulch and soils off City property and right-of-way, unless pre-authorized by the Public Works Environmental Services Division.
2448-
2449-
2450- %p
2451- Note: The City reserves the right to immediately withdraw support for any volunteer if, at the sole discretion of the City, the volunteer’s conduct while participating in volunteer activities on City property or right-of-way is determined to be inconsistent with these Volunteer Guidelines or violates any local, state or federal law. Withdrawal of support may include repossession of loaned tools and revocation of related Adopt a Spot Agreements.
2452-
2453-
2454- %h1
2455- VOLUNTEER WAIVER & RELEASE OF LIABILITY
2456-
2457- %p
2458- I am voluntarily participating in the City of Oakland’s Public Works Agency volunteer program at. I have read and agree to follow the Volunteer Guidelines, below. I acknowledge my participation in these events does not come without the risk of injury or harm; I accept this risk, and assume responsibility for all liability and risk associated with my participation.
2459- %p
2460- I agree to hold harmless, release, waive and forever discharge the City of Oakland, its employees, departments, officers and agents, from any and all claims or demands I may have by reason of any accident, illness, injury, loss, destruction or damage to property, arising or resulting directly or indirectly from my participation in this activity. I further covenant not to bring any legal action against the City of Oakland, its employees, departments, officers and agents, for any injury, loss or damage resulting from my participation in this activity.
2461- %p
2462- This Waiver and Release is contractual and not a mere recital and applies whether or not injury or loss resulting from this activity is caused by an act or omission of the City, its employees, departments, officers or agents, negligent or otherwise.
2463- %p
2464- This Waiver and Release is binding on my heirs, executors, administrators, assigns, and all of my family members, and applies to all losses, whether known or unknown, suspected or unsuspected, related to my participation in this activity.
2465- %p
2466- I hereby grant permission to the City of Oakland to use photographs of me taken during this activity on its website and in other publications, at the City’s sole discretion and without further consideration.
2467-
2468-
2469- %p
2470- %input{:type=>"submit", :value => "I've read it", :class => "btn primary", "data-dismiss"=>"modal", "aria-hidden"=>"true"}
2471-
2472-
2473+.modal.fade#tos
2474+ .modal-dialog.modal-lg
2475+ .modal-content
2476+ .modal-header
2477+ %button{:class => "close", :"data-dismiss" => "modal", :href => "#", :type => "button", :"aria-label" => "Close"}
2478+ %span{:"aria-hidden" =>"true"}
2479+ ×
2480+ %h2
2481+ = t("titles.tos")
2482+ .modal-body
2483+ %ol
2484+ %li
2485+ %h3
2486+ Acceptance of Terms
2487+ %p
2488+ The City of San Francisco ("City") provides the Adopt-a-Drain program ("AAD") to you subject to the following Terms of Service Agreement ("Agreement") which may be updated by us from time to time without notice to you. By accessing and using AAD, you accept and agree to be bound by the terms and provision of this Agreement.
2489+ %li
2490+ %h3
2491+ Description of Adopt-a-Drain
2492+ %p
2493+ Adopt-a-Drain is an initiative of the City to encourage residents to clear out blocked storm drains. The AAD website allows users to "adopt" a storm drain, or state that you intend to help clear that storm drain out if it gets blocked by debris.
2494+ %p
2495+ Unless explicitly stated otherwise, any new features that augment or enhance AAD are covered by this Agreement.
2496+ %li
2497+ %h3
2498+ Obligations
2499+ %p
2500+ If you choose to adopt a storm drain using the AAD website, you are under no obligation and have no responsibility to actually clear out that storm drain or any storm drain.
2501+ %li
2502+ %h3
2503+ Termination of Obligations
2504+ %p
2505+ If you provide any information that is untrue, inaccurate, offensive, not current, or incomplete, or the City has reasonable grounds to suspect that such information is untrue, inaccurate, offensive, not current, or incomplete, the City has the right to suspend or terminate your account and refuse any and all current or future use of the AAD services (or any portion thereof).
2506+ %p
2507+ Accounts that consistently adopt storm drains without clearing them out may also be terminated.
2508+ %p
2509+ Additionally, you agree that the City may, without prior notice, immediately terminate, limit your access to, or suspend your AAD service. Cause for such termination, limitation of access, or suspension shall include but not be limited to:
2510+ %ol.alpha
2511+ %li
2512+ breaches or violations of this Agreement or other incorporated agreements or guidelines,
2513+ %li
2514+ requests by law enforcement or other government agencies,
2515+ %li
2516+ discontinuance or material modification to AAD (or any part thereof),
2517+ %li
2518+ unexpected technical or security issues or problems,
2519+ %li
2520+ extended periods of inactivity,
2521+ %li
2522+ engagement by you in fraudulent or illegal activities.
2523+ %p
2524+ Further, you agree that all terminations, limitations of access, and suspensions for cause shall be made in the City's sole discretion and that the City shall not be liable to you or any third party for any termination of your account, any associated email address, or access to AAD.
2525+ %li
2526+ %h3
2527+ City Public Records Policy
2528+ %p
2529+ Registration data, as well as data you submit using AAD, are subject to all applicable City, State and Federal public records laws.
2530+ %li
2531+ %h3
2532+ Member Conduct
2533+ %p
2534+ You understand that all information entered by the user is the sole responsibility of the person from whom such Content originated. This means that you, and not the City, are entirely responsible for all Content that you submit or otherwise make available via AAD. The City does not control the sign-in content posted and, as such, does not guarantee the accuracy, integrity, or quality of such Content. You understand that by using AAD, you may be exposed to Content that is offensive, indecent, or objectionable. Under no circumstances will the City be liable in any way for any Content, including, but not limited to, any errors or omissions in any Content, or any loss or damage of any kind incurred as a result of the use of any Content submitted or otherwise made available via AAD.
2535+ %p
2536+ We are under no obligation to enforce this Agreement on your behalf against another user. While we encourage you to let us know if you believe another user violated this Agreement, we reserve the right to investigate and take appropriate action at the City's sole discretion.
2537+ %p
2538+ You agree to not use AAD to:
2539+ %ol.alpha
2540+ %li
2541+ submit Content that is false or inaccurate;
2542+ %li
2543+ submit Content that does not generally pertain to the designated topic or theme;
2544+ %li
2545+ submit or otherwise make available any Content that is unlawful, harmful, threatening, abusive, harassing, tortuous, defamatory, vulgar, obscene, libelous, invasive of another's privacy, hateful, or racially, ethnically, or otherwise objectionable;
2546+ %li
2547+ harm minors in any way;
2548+ %li
2549+ impersonate any person or entity, or falsely state or otherwise misrepresent your affiliation with a person or entity;
2550+ %li
2551+ submit or otherwise make available any Content that you do not have a right to make available under any law or under contractual or fiduciary relationships (such as inside information, proprietary and confidential information learned or disclosed as part of employment relationships or under nondisclosure agreements);
2552+ %li
2553+ submit or otherwise make available any Content that infringes any patent, trademark, trade secret, copyright, or other proprietary rights ("Rights") of any party;
2554+ %li
2555+ submit or otherwise make available any unsolicited or unauthorized advertising, promotional materials, "junk mail," "spam," "chain letters," "pyramid schemes," or any other form of communication not relevant to specific City service requests;
2556+ %li
2557+ submit or otherwise make available any material that contains software viruses or any other computer code, files or programs designed to interrupt, destroy or limit the functionality of any computer software or hardware or telecommunications equipment;
2558+ %li
2559+ intentionally or unintentionally violate any applicable local, state, national or international law;
2560+ %li
2561+ "stalk" or otherwise harass another; or
2562+ %li
2563+ collect or store personal data about other users in connection with the prohibited conduct and activities set forth in paragraphs (a) through (k) above.
2564+ %p
2565+ You acknowledge that the City may or may not pre-screen Content that is shared, but that the City and its designees shall have the right (but not the obligation) in their sole discretion to pre-screen, refuse, or remove any Content that is available via AAD. Without limiting the foregoing, the City and its designees shall have the right to remove any Content that violates this Agreement or is otherwise objectionable. You agree that you must evaluate, and bear all risks associated with, the use of any Content, including any reliance on the accuracy, completeness, or usefulness of such Content.
2566+ %p
2567+ You acknowledge, consent and agree that the City may access, preserve and disclose your account information and Content if required to do so by law or in a good faith belief that such access preservation or disclosure is reasonably necessary to:
2568+ %ol.roman
2569+ %li
2570+ comply with legal process;
2571+ %li
2572+ enforce this Agreement;
2573+ %li
2574+ respond to claims that any Content violates the rights of third parties;
2575+ %li
2576+ respond to your requests for customer service;
2577+ %li
2578+ protect the rights, property or personal safety of the City, its users and the public.
2579+ %p
2580+ You may not attempt to override or circumvent any of the usage rules embedded into AAD.
2581+ %p
2582+ You may not trace any information of any other AAD user or visitor or otherwise use AAD for the purpose of obtaining information of any other AAD user.
2583+ %p
2584+ You may not attempt to gain unauthorized access to AAD or the computer systems and networks connected to AAD through hacking, password mining, or any other means.
2585+ %p
2586+ You may not release the results of any performance or functional evaluation of AAD to any third party without prior written approval of the City for each such release.
2587+ %p
2588+ You may not take any action that imposes, or may impose, in the City's sole discretion, an unreasonable or disproportionately large load on the City's technology infrastructure or otherwise make excessive traffic demands of AAD.
2589+ %li
2590+ %h3
2591+ Interstate Nature of Communications on Adopt-a-Drain
2592+ %p
2593+ When you use the application, you acknowledge that in using AAD, you will be causing communications to be sent potentially through a variety of networks (Internet service provider, wireless phone network, etc.) As a result, even communications that seem to be intrastate in nature can result in the transmission of interstate communications regardless of where you are physically located at the time of transmission. Accordingly, you agree that use of the AAD may result in interstate data transmissions.
2594+ %li
2595+ %h3
2596+ Submissions to the City
2597+ %p
2598+ By submitting feedback ("Submissions") to the City through the AAD feedback function, you acknowledge and agree that:
2599+ %ol.alpha
2600+ %li
2601+ your Submissions do not contain confidential or proprietary information;
2602+ %li
2603+ the City is not under any obligation of confidentiality, express or implied, with respect to the Submissions;
2604+ %li
2605+ the City shall be entitled to use or disclose (or choose not to use or disclose) such Submissions for any purpose, in any way, in any media worldwide;
2606+ %li
2607+ the City may have something similar to the Submissions already under consideration or in development;
2608+ %li
2609+ your Submissions automatically become the property of the City without any obligation of the City to you;
2610+ %li
2611+ you are not entitled to any compensation or reimbursement of any kind from the City under any circumstances.
2612+ %li
2613+ %h3
2614+ Indemnity
2615+ %p
2616+ You agree to indemnify and hold the City and its subsidiaries, affiliates, officers, agents, employees, partners, and licensors harmless from any claim or demand (including reasonable attorneys' fees) made by any third party due to or arising out of:
2617+ %ol.alpha
2618+ %li
2619+ Content you submit or otherwise make available through AAD,
2620+ %li
2621+ your use of AAD,
2622+ %li
2623+ your connection to AAD,
2624+ %li
2625+ your violation of this Agreement,
2626+ %li
2627+ your violation of any Rights of another.
2628+ %li
2629+ %h3
2630+ Modifications to Adopt-a-Drain
2631+ %p
2632+ The City reserves the right at any time and from time to time to modify or discontinue, temporarily or permanently, AAD (or any part thereof) with or without notice. You agree that the City shall not be liable to you or to any third party for any modification, suspension or discontinuance of the AAD (or any part thereof).
2633+ %li
2634+ %h3
2635+ Links
2636+ %p
2637+ The City may provide links to other World Wide Web sites or resources. You acknowledge and agree that the City is not responsible for the availability of such external sites or resources.
2638+ %p
2639+ AAD may facilitate your use of third party services not provided by the City ("Third Party Services"). The City makes no representations or warranties regarding the performance of such Third Party Services, their compliance with applicable laws and regulations, or any other aspects of such Third Party Services. Your use of Third Party Services is at your own risk and you are solely responsible for complying with all legal and contractual requirements necessary for using Third Party Services.
2640+ %li
2641+ %h3
2642+ The City's Proprietary Rights
2643+ %p
2644+ You acknowledge and agree that AAD contains proprietary and confidential information that is owned by the City and protected by applicable intellectual property and other laws. You will not use such proprietary information in any way whatsoever except for use of AAD in compliance with the provisions of this Agreement.
2645+ %h4.upcase
2646+ Disclaimer of Warranties
2647+ %p.upcase
2648+ You expressly understand and agree that:
2649+ %ol.alpha.upcase
2650+ %li
2651+ Your use of AAD is at your sole risk. The application is provided on an "as is" and "as available" basis. The city expressly disclaims all warranties of any kind, whether express or implied, including, but not limited to the implied warranties of title, merchantability, fitness for a particular purpose and non-infringement.
2652+ %li
2653+ The city and its subsidiaries, affiliates, officers, employees, agents, partners, and licensors make no warrany that:
2654+ %ol.roman
2655+ %li
2656+ AAD will meet your requirements;
2657+ %li
2658+ AAD will be uninterrupted, timely, secore, or error-free;
2659+ %li
2660+ the results that may be obtained from the use of AAD will be accurate or reliable;
2661+ %li
2662+ any errors in the software will be corrected;
2663+ %li
2664+ AAD will be free from corruption, viruses, hacking, or other security intrusion.
2665+ %li
2666+ %h3
2667+ Limitation of Liability
2668+ %p.upcase
2669+ You expressly understand and agree that the city shall not be liable to you for any punitive, indirect, incidental, special, consequential, or exemplary damages, including, but not limtied to, damages for loss of profits, goodwill, use, data, or other intangible losses resulting from:
2670+ %ol.alpha.upcase
2671+ %li
2672+ Your access to or use of or inability to access or use the services;
2673+ %li
2674+ any conduct or content or any third party on the services, including without limitation, any defamatory, offensive or illegal conduct of other users or third parties;
2675+ %li
2676+ any content obtained from the services;
2677+ %li
2678+ unauthorized access, use or alteration of your transmissions or content, whether based on warranty, contract, tort (including negligence) or any other legal theory, whether or not the city has been informed of the possibility of such damage, and even if a remedy set forth herein is found to have failed of its essential purpose.
2679+ %p.upcase
2680+ You expressly agree that the city is not responsible for any contact or interaction between you and any other user of AAD and that you bear the sole risk of transmitting through the application any content, including information which identifies you or your location.
2681+ %p.upcase
2682+ You agree that the negation of damages set forth above is a fundamental element of the basis of the bargain between the city and you and that the foregoing limitation of liability is an agreed upon allocation of risk between you and the city. You acknowledge that absent your agreement to this limitation of liability the city would not provide AAD to you.
2683+ %li
2684+ %h3
2685+ Notice
2686+ %p
2687+ The City may provide you with notices regarding AAD, including changes to this Agreement, by email, SMS, text message, postings on AAD, or any other reasonable means now known or hereafter developed. Notices shall be effective immediately.
2688+ %p
2689+ Such notices may not be received if you violate this Agreement by accessing the AAD in an unauthorized manner. You agree that you will be deemed to have received any and all notices that would have been delivered had you accessed AAD in an authorized manner.
2690+ %li
2691+ %h3
2692+ Minor
2693+ %p
2694+ You represent that you are 13 years of age or older and, if you are under the age of 18, you either are an emancipated minor, or have obtained the legal consent of your parent or legal guardian to accept and agree to be bound by the terms and provisions of this Agreement.
2695+ %p
2696+ If you have agreed to allow your minor child, or a child for whom you are legal guardian ("Minor"), to use AAD, you agree that you shall be solely responsible for:
2697+ %ol.alpha
2698+ %li
2699+ the online conduct of such Minor,
2700+ %li
2701+ monitoring such Minor’s access to and use of AAD, and
2702+ %li
2703+ the consequences of any use of AAD by such Minor.
2704+ %li
2705+ %h3
2706+ Governing Law and Venue
2707+ %p
2708+ This Agreement is governed by the laws of the State of California without regard to any conflict of law provisions. You agree that any claim or dispute with the City relating in any way to your use of AAD shall be brought exclusively before a state or federal court sitting in San Francisco, California, and you irrevocably waive any jurisdictional, venue, or inconvenient forum objections to such courts.
2709+ %li
2710+ %h3
2711+ Miscellaneous
2712+ %p
2713+ This Agreement constitutes the entire agreement between you and the City with respect to your use of AAD, superseding any prior version of this Agreement between you and the City with respect to AAD.
2714+ %p
2715+ If any provision of this Agreement shall be unlawful, void, or unenforceable, then that provision shall be deemed severed from this Agreement and shall not affect the validity or enforceability of the remaining provisions of this Agreement.
2716+ %p
2717+ The City's failure to assert any right or provision under this Agreement shall not constitute a waiver of such right or provision.
2718+ %p
2719+ You agree that any cause of action arising out of or related to your use of AAD must commence within one year after the cause of action accrues. Otherwise, such cause of action is permanently barred.
2720+ %p
2721+ The section titles in this Agreement are for convenience only and have no legal or contractual effect.
2722+ %p
2723+ Last updated October 22, 2015.
2724+ .modal-footer
2725+ %button.btn.btn-default{:type => "button", :"data-dismiss" => "modal"}
2726+ Close
2727diff -ru adopt-oakland/app/views/sidebar/edit_profile.html.haml adopt-sf/app/views/sidebar/edit_profile.html.haml
2728--- adopt-oakland/app/views/sidebar/edit_profile.html.haml 2016-10-27 23:28:23.000000000 -0400
2729+++ adopt-sf/app/views/sidebar/edit_profile.html.haml 2016-10-27 23:28:03.000000000 -0400
2730@@ -1,80 +1,86 @@
2731-= form_for resource, :as => resource_name, :url => registration_path(resource_name), :html => {:id => "edit_form", :class => "form-stacked", :method => :put} do |f|
2732+= form_for resource, :as => resource_name, :url => registration_path(resource_name), :html => {:id => "edit_form", :method => :put} do |f|
2733 = f.hidden_field "id"
2734- %fieldset.control-group
2735- %label{:for => "user_email", :id => "user_email_label"}
2736+ %fieldset.form-group
2737+ %label{:for => "user_email", :id => "user_email_label", :class => 'control-label'}
2738 = t("labels.email")
2739 %small
2740 = image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
2741- = f.email_field "email"
2742- %fieldset.control-group
2743- %label{:for => "user_name", :id => "user_name_label"}
2744- = t("labels.name")
2745+ = f.email_field "email", :class => "form-control"
2746+ %fieldset.form-group
2747+ %label{:for => "user_first_name", :id => "user_first_name_label", :class => 'control-label'}
2748+ = t("labels.first_name")
2749 %small
2750 = t("captions.public")
2751- = f.text_field "name"
2752- %fieldset.control-group
2753- %label{:for => "user_organization", :id => "user_organization_label"}
2754+ = f.text_field "first_name", :class => "form-control"
2755+ %fieldset.form-group
2756+ %label{:for => "user_last_name", :id => "user_last_name_label", :class => 'control-label'}
2757+ = t("labels.last_name")
2758+ %small
2759+ = t("captions.public")
2760+ = f.text_field "last_name", :class => "form-control"
2761+ %fieldset.form-group
2762+ %label{:for => "user_organization", :id => "user_organization_label", :class => 'control-label'}
2763 = t("labels.organization")
2764 %small
2765 = t("captions.public")
2766- = f.text_field "organization"
2767- %fieldset.control-group
2768- %label{:for => "user_voice_number", :id => "user_voice_number_label"}
2769+ = f.text_field "organization", :class => "form-control"
2770+ %fieldset.form-group
2771+ %label{:for => "user_voice_number", :id => "user_voice_number_label", :class => 'control-label'}
2772 = t("labels.voice_number")
2773 %small
2774 = image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
2775- = f.telephone_field "voice_number", :placeholder => t("defaults.voice_number"), :value => number_to_phone(f.object.voice_number)
2776- %fieldset.control-group
2777- %label{:for => "user_sms_number", :id => "user_sms_number_label"}
2778+ = f.telephone_field "voice_number", :placeholder => t("defaults.voice_number"), :value => number_to_phone(f.object.voice_number), :class => "form-control"
2779+ %fieldset.form-group
2780+ %label{:for => "user_sms_number", :id => "user_sms_number_label", :class => 'control-label'}
2781 = t("labels.sms_number")
2782 %small
2783 = image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
2784- = f.telephone_field "sms_number", :placeholder => t("defaults.sms_number"), :value => number_to_phone(f.object.sms_number)
2785- %fieldset.control-group
2786- %label{:for => "user_address_1", :id => "user_address_1_label"}
2787+ = f.telephone_field "sms_number", :placeholder => t("defaults.sms_number"), :value => number_to_phone(f.object.sms_number), :class => "form-control"
2788+ %fieldset.form-group
2789+ %label{:for => "user_address_1", :id => "user_address_1_label", :class => 'control-label'}
2790 = t("labels.address_1")
2791 %small
2792 = image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
2793- = f.text_field "address_1", :placeholder => t("defaults.address_1")
2794- %fieldset.control-group
2795- %label{:for => "user_address_2", :id => "user_address_2_label"}
2796+ = f.text_field "address_1", :placeholder => t("defaults.address_1"), :class => "form-control"
2797+ %fieldset.form-group
2798+ %label{:for => "user_address_2", :id => "user_address_2_label", :class => 'control-label'}
2799 = t("labels.address_2")
2800 %small
2801 = image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
2802- = f.text_field "address_2", :placeholder => t("defaults.address_2")
2803- %fieldset.control-group
2804- %label{:for => "user_city", :id => "user_city_label"}
2805+ = f.text_field "address_2", :placeholder => t("defaults.address_2"), :class => "form-control"
2806+ %fieldset.form-group
2807+ %label{:for => "user_city", :id => "user_city_label", :class => 'control-label'}
2808 = t("labels.city")
2809 %small
2810 = image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
2811- = f.text_field "city", :placeholder => t("defaults.city")
2812- %fieldset.control-group
2813- %label{:for => "user_state", :id => "user_state_label"}
2814+ = f.text_field "city", :placeholder => t("defaults.city"), :class => "form-control"
2815+ %fieldset.form-group
2816+ %label{:for => "user_state", :id => "user_state_label", :class => 'control-label'}
2817 = t("labels.state")
2818 %small
2819 = image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
2820- = f.select "state", us_states, :include_blank => true
2821- %fieldset.control-group
2822- %label{:for => "user_zip", :id => "user_zip_label"}
2823+ = f.select "state", us_states, {:include_blank => true}, {:class => "form-control"}
2824+ %fieldset.form-group
2825+ %label{:for => "user_zip", :id => "user_zip_label", :class => 'control-label'}
2826 = t("labels.zip")
2827 %small
2828 = image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
2829- = f.text_field "zip", :placeholder => t("defaults.zip")
2830- %fieldset.control-group
2831- %label{:for => "user_password", :id => "user_password_label"}
2832+ = f.text_field "zip", :placeholder => t("defaults.zip"), :class => "form-control"
2833+ %fieldset.form-group
2834+ %label{:for => "user_password", :id => "user_password_label", :class => 'control-label'}
2835 = t("labels.password_new")
2836 %small
2837 = t("captions.optional")
2838- = f.password_field "password"
2839- %fieldset.control-group
2840- %label{:for => "user_current_password", :id => "user_current_password_label"}
2841- = t("labels.current_password")
2842+ = f.password_field "password", :class => "form-control"
2843+ %fieldset.form-group
2844+ %label{:for => "user_current_password", :id => "user_current_password_label", :class => 'control-label'}
2845+ = t("labels.password_current")
2846 %small
2847 = t("captions.required")
2848- = f.password_field "current_password"
2849+ = f.password_field "current_password", :class => "form-control"
2850 %fieldset.form-actions
2851- = f.submit t("buttons.update"), :class => "btn primary"
2852- %a{:href => root_path, :id => "back_link", :class => "btn"}
2853+ = f.submit t("buttons.update"), :class => "btn btn-primary btn-block"
2854+ %a{:href => search_path, :id => "back_link", :class => "btn btn-default"}
2855 = t("buttons.back")
2856 :javascript
2857 $(function() {
2858Only in adopt-oakland/app/views: statuses
2859Only in adopt-sf/app/views/thing_mailer: first_adoption_confirmation.html.erb
2860diff -ru adopt-oakland/app/views/thing_mailer/reminder.text.erb adopt-sf/app/views/thing_mailer/reminder.text.erb
2861--- adopt-oakland/app/views/thing_mailer/reminder.text.erb 2016-10-27 23:28:23.000000000 -0400
2862+++ adopt-sf/app/views/thing_mailer/reminder.text.erb 2016-10-27 23:28:03.000000000 -0400
2863@@ -0,0 +1,7 @@
2864+Hello <%= @user.name.split.first %>,
2865+
2866+Did you remember to clear the drain you adopted at <%= @thing.street_address %>? If not, please maintain it as soon as possible!
2867+
2868+If you've already cleared it, thank you for serving your city!
2869+
2870+The Adopt-a-Drain Team
2871Only in adopt-sf/app/views/thing_mailer: second_adoption_confirmation.html.erb
2872Only in adopt-oakland/app/views/thing_mailer: send_personalized.html.erb
2873Only in adopt-sf/app/views/thing_mailer: third_adoption_confirmation.text.erb
2874diff -ru adopt-oakland/app/views/things/_abandon.html.haml adopt-sf/app/views/things/_abandon.html.haml
2875--- adopt-oakland/app/views/things/_abandon.html.haml 2016-10-27 23:28:23.000000000 -0400
2876+++ adopt-sf/app/views/things/_abandon.html.haml 2016-10-27 23:28:03.000000000 -0400
2877@@ -1,6 +1,6 @@
2878-= form_for :thing, :url => things_path, :method => :put, :html => {:id => "abandon_form", :class => "form-stacked"} do |f|
2879+= form_for :thing, :url => things_path, :method => :put, :html => {:id => "abandon_form"} do |f|
2880 = f.hidden_field "id"
2881 = f.hidden_field "user_id", :value => ""
2882 = f.hidden_field "name", :value => ""
2883- %fieldset.form-actions
2884- = f.submit t("buttons.abandon", :thing => t("defaults.thing")), :class => "btn danger"
2885+ %fieldset.form-group
2886+ = f.submit t("buttons.abandon", :thing => t("defaults.thing")), :class => "btn btn-danger btn-block"
2887diff -ru adopt-oakland/app/views/things/adopt.html.haml adopt-sf/app/views/things/adopt.html.haml
2888--- adopt-oakland/app/views/things/adopt.html.haml 2016-10-27 23:28:23.000000000 -0400
2889+++ adopt-sf/app/views/things/adopt.html.haml 2016-10-27 23:28:03.000000000 -0400
2890@@ -1,10 +1,15 @@
2891 %h2
2892 = t("titles.adopt", :thing => t("defaults.thing").titleize)
2893-= form_for :thing, :url => things_path, :method => :put, :html => {:id => "adoption_form", :class => "form-stacked"} do |f|
2894+= form_for :thing, :url => things_path, :method => :put, :html => {:id => "adoption_form"} do |f|
2895 = f.hidden_field "id"
2896 = f.hidden_field "user_id", :value => current_user.id
2897- / %fieldset.control-group
2898- / = f.label "name", t("labels.name_thing", :thing => t("defaults.thing")), :id => "thing_name_label"
2899- / = f.text_field "name"
2900- %fieldset.form-actions
2901- = f.submit t("buttons.adopt"), :class => "btn primary"
2902+ %fieldset.form-group
2903+ = f.label "name", t("labels.name_thing", :thing => t("defaults.thing")), :id => "thing_name_label", :class => "control-label"
2904+ = f.text_field "name", :class => "form-control"
2905+ %fieldset.form-group
2906+ = f.submit t("buttons.adopt"), :class => "btn btn-primary btn-block"
2907+
2908+ - unless @thing.detail_link.blank?
2909+ %p
2910+ %a{href: "#{@thing.detail_link}", target: '_blank'}
2911+ = t("links.thing_details", :thing => t("defaults.thing"))
2912Only in adopt-oakland/app/views/things: adopt_again.html.haml
2913diff -ru adopt-oakland/app/views/users/_reminder.html.haml adopt-sf/app/views/users/_reminder.html.haml
2914--- adopt-oakland/app/views/users/_reminder.html.haml 2016-10-27 23:28:23.000000000 -0400
2915+++ adopt-sf/app/views/users/_reminder.html.haml 2016-10-27 23:28:03.000000000 -0400
2916@@ -1,6 +1,6 @@
2917-= form_for :reminder, :url => reminders_path, :html => {:id => "reminder_form", :class => "form-stacked", :method => "post"} do |f|
2918+= form_for :reminder, :url => reminders_path, :html => {:id => "reminder_form", :method => "post"} do |f|
2919 = f.hidden_field "from_user_id", :value => current_user.id
2920 = f.hidden_field "to_user_id", :value => @thing.user.id
2921 = f.hidden_field "thing_id", :value => @thing.id
2922- %fieldset.form-actions
2923+ %fieldset.control-group
2924 = f.submit t("buttons.send_reminder"), :class => "btn"
2925diff -ru adopt-oakland/app/views/users/profile.html.haml adopt-sf/app/views/users/profile.html.haml
2926--- adopt-oakland/app/views/users/profile.html.haml 2016-10-27 23:28:23.000000000 -0400
2927+++ adopt-sf/app/views/users/profile.html.haml 2016-10-27 23:28:03.000000000 -0400
2928@@ -1,6 +1,5 @@
2929 %h4
2930- = t("titles.adopted", :thing_name => @thing.name ? @thing.name.titleize : t("defaults.this_thing", :thing => t("defaults.thing")))
2931-- @thing.users.each do |u|
2932- = t("titles.byline", :name => u.name)
2933- = t("titles.ofline", :organization => u.organization) unless u.organization.blank?
2934- %br
2935+ = t("titles.adopted", :thing_name => @thing.name != "" ? @thing.name.titleize : t("defaults.this_thing", :thing => t("defaults.thing")))
2936+%div
2937+ = t("titles.byline", :name => @thing.user.name)
2938+ = t("titles.ofline", :organization => @thing.user.organization) unless @thing.user.organization.blank?
2939diff -ru adopt-oakland/app/views/users/sign_in.html.haml adopt-sf/app/views/users/sign_in.html.haml
2940--- adopt-oakland/app/views/users/sign_in.html.haml 2016-10-27 23:28:23.000000000 -0400
2941+++ adopt-sf/app/views/users/sign_in.html.haml 2016-10-27 23:28:03.000000000 -0400
2942@@ -1,2 +1,4 @@
2943-%h2
2944- = t("titles.sign_in", :thing => t("defaults.thing").titleize)
2945+%h3
2946+ = t("titles.sign_in", :thing => t("defaults.thing"))
2947+%a.guidelines{:href => "#guidelines", :"data-toggle" => "modal", :"data-target" => "#guidelines"}
2948+ %p= t("links.learn_more", :thing => t("defaults.thing"))
2949diff -ru adopt-oakland/app/views/users/thank_you.html.haml adopt-sf/app/views/users/thank_you.html.haml
2950--- adopt-oakland/app/views/users/thank_you.html.haml 2016-10-27 23:28:23.000000000 -0400
2951+++ adopt-sf/app/views/users/thank_you.html.haml 2016-10-27 23:28:03.000000000 -0400
2952@@ -1,4 +1,9 @@
2953 %h2
2954- = t("titles.thank_you", :thing => t("defaults.thing"))
2955-%p
2956- = render :partial => 'things/abandon'
2957+ = t("titles.thank_you", thing: t("defaults.thing"))
2958+ %a{ target: '_blank', href: "mailto:?subject=#{URI.encode(t("titles.main", thing: t("defaults.thing")))}&body=#{URI.encode(t("titles.email_text", root_url: root_url, thing: t("defaults.thing")))}" }
2959+ %i.fa.fa-envelope-square.fa-2x
2960+ %a{ target: '_blank', href: "https://www.facebook.com/sharer/sharer.php?u=#{root_url}" }
2961+ %i.fa.fa-facebook-square.fa-2x
2962+ %a{ target: '_blank', href: "https://twitter.com/intent/tweet?text=#{URI.encode(t("titles.tweet_text", root_url: root_url, thing: t("defaults.thing")))}"}
2963+ %i.fa.fa-twitter-square.fa-2x
2964+= render :partial => 'things/abandon'
2965Only in adopt-sf: bin
2966diff -ru adopt-oakland/config/application.rb adopt-sf/config/application.rb
2967--- adopt-oakland/config/application.rb 2016-10-27 23:28:23.000000000 -0400
2968+++ adopt-sf/config/application.rb 2016-10-27 23:28:03.000000000 -0400
2969@@ -1,13 +1,11 @@
2970 require File.expand_path('../boot', __FILE__)
2971
2972 require 'rails/all'
2973+require 'obscenity/active_model'
2974
2975-if defined?(Bundler)
2976- # If you precompile assets before deploying to production, use this line
2977- Bundler.require(*Rails.groups(:assets => %w(development test)))
2978- # If you want your assets lazily compiled in production, use this line
2979- # Bundler.require(:default, :assets, Rails.env)
2980-end
2981+# Require the gems listed in Gemfile, including any gems
2982+# you've limited to :test, :development, or :production.
2983+Bundler.require(*Rails.groups)
2984
2985 module AdoptAThing
2986 class Application < Rails::Application
2987@@ -15,16 +13,6 @@
2988 # Application configuration should go into files in config/initializers
2989 # -- all .rb files in that directory are automatically loaded.
2990
2991- # Custom directories with classes and modules you want to be autoloadable.
2992- # config.autoload_paths += %W(#{config.root}/extras)
2993-
2994- # Only load the plugins named here, in the order given (default is alphabetical).
2995- # :all can be used as a placeholder for all plugins not explicitly named.
2996- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
2997-
2998- # Activate observers that should always be running.
2999- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
3000-
3001 # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
3002 # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
3003 # config.time_zone = 'Central Time (US & Canada)'
3004@@ -33,33 +21,7 @@
3005 # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
3006 # config.i18n.default_locale = :de
3007
3008- # Configure the default encoding used in templates for Ruby 1.9.
3009- config.encoding = "utf-8"
3010-
3011- # Configure sensitive parameters which will be filtered from the log file.
3012- config.filter_parameters += [:password]
3013-
3014- # Use SQL instead of Active Record's schema dumper when creating the database.
3015- # This is necessary if your schema can't be completely dumped by the schema dumper,
3016- # like if you have constraints or database-specific column types
3017- # config.active_record.schema_format = :sql
3018-
3019- # Enforce whitelist mode for mass assignment.
3020- # This will create an empty whitelist of attributes available for mass-assignment for all models
3021- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
3022- # parameters by using an attr_accessible or attr_protected declaration.
3023- # config.active_record.whitelist_attributes = true
3024-
3025- # Enable the asset pipeline
3026- config.assets.enabled = true
3027- config.assets.initialize_on_precompile = false
3028-
3029-
3030- Geokit::Geocoders::google = ENV['GOOGLE_GEOCODE_API_KEY']
3031- # Version of your assets, change this if you want to expire all your assets
3032- config.assets.version = '1.0'
3033-
3034- # Limit on number of things to be returned from the database
3035- config.things_limit = 100
3036+ # Do not swallow errors in after_commit/after_rollback callbacks.
3037+ config.active_record.raise_in_transactional_callbacks = true
3038 end
3039 end
3040diff -ru adopt-oakland/config/boot.rb adopt-sf/config/boot.rb
3041--- adopt-oakland/config/boot.rb 2016-10-27 23:28:23.000000000 -0400
3042+++ adopt-sf/config/boot.rb 2016-10-27 23:28:03.000000000 -0400
3043@@ -1,6 +1,3 @@
3044-require 'rubygems'
3045-
3046-# Set up gems listed in the Gemfile.
3047 ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3048
3049-require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
3050+require 'bundler/setup' # Set up gems listed in the Gemfile.
3051diff -ru adopt-oakland/config/database.yml adopt-sf/config/database.yml
3052--- adopt-oakland/config/database.yml 2016-10-27 23:28:23.000000000 -0400
3053+++ adopt-sf/config/database.yml 2016-10-27 23:28:03.000000000 -0400
3054@@ -2,8 +2,6 @@
3055 adapter: postgresql
3056 database: adopt_a_thing_development
3057 host: localhost
3058- # password: devme
3059- username: postgres
3060
3061 # Warning: The database defined as "test" will be erased and
3062 # re-generated from your development database when you run "rake".
3063@@ -13,4 +11,4 @@
3064 database: adopt_a_thing_test
3065
3066 production:
3067- <<: *DEVELOPMENT
3068\ No newline at end of file
3069+ <<: *DEVELOPMENT
3070diff -ru adopt-oakland/config/environment.rb adopt-sf/config/environment.rb
3071--- adopt-oakland/config/environment.rb 2016-10-27 23:28:23.000000000 -0400
3072+++ adopt-sf/config/environment.rb 2016-10-27 23:28:03.000000000 -0400
3073@@ -1,5 +1,15 @@
3074-# Load the rails application
3075+# Load the Rails application.
3076 require File.expand_path('../application', __FILE__)
3077
3078-# Initialize the rails application
3079-AdoptAThing::Application.initialize!
3080+ActionMailer::Base.smtp_settings = {
3081+ address: 'smtp.sendgrid.net',
3082+ port: '587',
3083+ authentication: :plain,
3084+ user_name: ENV['SENDGRID_USERNAME'],
3085+ password: ENV['SENDGRID_PASSWORD'],
3086+ domain: 'heroku.com',
3087+ enable_starttls_auto: true,
3088+}
3089+
3090+# Initialize the Rails application.
3091+Rails.application.initialize!
3092diff -ru adopt-oakland/config/environments/development.rb adopt-sf/config/environments/development.rb
3093--- adopt-oakland/config/environments/development.rb 2016-10-27 23:28:23.000000000 -0400
3094+++ adopt-sf/config/environments/development.rb 2016-10-27 23:28:03.000000000 -0400
3095@@ -1,38 +1,46 @@
3096-AdoptAThing::Application.configure do
3097- # Settings specified here will take precedence over those in config/application.rb
3098+Rails.application.configure do
3099+ # Settings specified here will take precedence over those in config/application.rb.
3100
3101 # In the development environment your application's code is reloaded on
3102 # every request. This slows down response time but is perfect for development
3103 # since you don't have to restart the web server when you make code changes.
3104 config.cache_classes = false
3105
3106- # Log error messages when you accidentally call methods on nil.
3107- config.whiny_nils = true
3108+ # Do not eager load code on boot.
3109+ config.eager_load = false
3110
3111- # Show full error reports and disable caching
3112+ # Show full error reports and disable caching.
3113 config.consider_all_requests_local = true
3114 config.action_controller.perform_caching = false
3115
3116- # Don't care if the mailer can't send
3117+ # Don't care if the mailer can't send.
3118 config.action_mailer.raise_delivery_errors = false
3119- config.action_mailer.default_url_options = {:host => 'localhost:3000'}
3120+ config.action_mailer.default_url_options = {host: 'localhost:3000'}
3121
3122- # Print deprecation notices to the Rails logger
3123+ # Print deprecation notices to the Rails logger.
3124 config.active_support.deprecation = :log
3125
3126- # Only use best-standards-support built into browsers
3127- config.action_dispatch.best_standards_support = :builtin
3128+ # Raise an error on page load if there are pending migrations.
3129+ config.active_record.migration_error = :page_load
3130
3131- # Raise exception on mass assignment protection for Active Record models
3132- config.active_record.mass_assignment_sanitizer = :strict
3133-
3134- # Log the query plan for queries taking more than this (works
3135- # with SQLite, MySQL, and PostgreSQL)
3136- config.active_record.auto_explain_threshold_in_seconds = 0.5
3137-
3138- # Do not compress assets
3139- config.assets.compress = false
3140-
3141- # Expands the lines which load the assets
3142+ # Debug mode disables concatenation and preprocessing of assets.
3143+ # This option may cause significant delays in view rendering with a large
3144+ # number of complex assets.
3145 config.assets.debug = true
3146+
3147+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
3148+ # yet still be able to expire them through the digest params.
3149+ config.assets.digest = true
3150+
3151+ # Adds additional error checking when serving assets at runtime.
3152+ # Checks for improperly declared sprockets dependencies.
3153+ # Raises helpful error messages.
3154+ config.assets.raise_runtime_errors = true
3155+
3156+ # Raises error for missing translations
3157+ # config.action_view.raise_on_missing_translations = true
3158+
3159+ # For Mailcatcher
3160+ config.action_mailer.delivery_method = :smtp
3161+ config.action_mailer.smtp_settings = {address: 'localhost', port: 1025}
3162 end
3163diff -ru adopt-oakland/config/environments/production.rb adopt-sf/config/environments/production.rb
3164--- adopt-oakland/config/environments/production.rb 2016-10-27 23:28:23.000000000 -0400
3165+++ adopt-sf/config/environments/production.rb 2016-10-27 23:28:03.000000000 -0400
3166@@ -1,82 +1,90 @@
3167-AdoptAThing::Application.configure do
3168- # Settings specified here will take precedence over those in config/application.rb
3169+Rails.application.configure do
3170+ # Settings specified here will take precedence over those in config/application.rb.
3171
3172- # Code is not reloaded between requests
3173+ # Code is not reloaded between requests.
3174 config.cache_classes = true
3175
3176- # Full error reports are disabled and caching is turned on
3177+ # Eager load code on boot. This eager loads most of Rails and
3178+ # your application in memory, allowing both threaded web servers
3179+ # and those relying on copy on write to perform better.
3180+ # Rake tasks automatically ignore this option for performance.
3181+ config.eager_load = true
3182+
3183+ # Full error reports are disabled and caching is turned on.
3184 config.consider_all_requests_local = false
3185 config.action_controller.perform_caching = true
3186
3187- # Disable Rails's static asset server (Apache or nginx will already do this)
3188- config.serve_static_assets = false
3189-
3190- # Compress JavaScripts and CSS
3191- config.assets.compress = true
3192-
3193- # Don't fallback to assets pipeline if a precompiled asset is missed
3194- # config.assets.compile = false
3195+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
3196+ # Add `rack-cache` to your Gemfile before enabling this.
3197+ # For large-scale production use, consider using a caching reverse proxy like
3198+ # NGINX, varnish or squid.
3199+ # config.action_dispatch.rack_cache = true
3200+
3201+ # Disable serving static files from the `/public` folder by default since
3202+ # Apache or NGINX already handles this.
3203+ config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
3204+
3205+ # Compress JavaScripts and CSS.
3206+ config.assets.js_compressor = :uglifier
3207+ # config.assets.css_compressor = :sass
3208
3209- # Fallback to assets pipeline if a precompiled asset is missed
3210- config.assets.compile = true
3211+ # Do not fallback to assets pipeline if a precompiled asset is missed.
3212+ config.assets.compile = false
3213
3214- # Generate digests for assets URLs
3215+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
3216+ # yet still be able to expire them through the digest params.
3217 config.assets.digest = true
3218
3219- # Defaults to Rails.root.join("public/assets")
3220- # config.assets.manifest = YOUR_PATH
3221+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
3222
3223- # Specifies the header that your server uses for sending files
3224- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
3225- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
3226+ # Specifies the header that your server uses for sending files.
3227+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
3228+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
3229
3230 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
3231 # config.force_ssl = true
3232
3233- # See everything in the log (default is :info)
3234- # config.log_level = :debug
3235+ # Use the lowest log level to ensure availability of diagnostic information
3236+ # when problems arise.
3237+ config.log_level = :debug
3238
3239- # Prepend all log lines with the following tags
3240+ # Prepend all log lines with the following tags.
3241 # config.log_tags = [ :subdomain, :uuid ]
3242
3243- # Use a different logger for distributed setups
3244+ # Use a different logger for distributed setups.
3245 # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
3246
3247- # Use a different cache store in production
3248+ # Use a different cache store in production.
3249 # config.cache_store = :mem_cache_store
3250
3251- # Enable serving of images, stylesheets, and JavaScripts from an asset server
3252- # config.action_controller.asset_host = "http://assets.example.com"
3253+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
3254+ # config.action_controller.asset_host = 'http://assets.example.com'
3255
3256- # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
3257- # config.assets.precompile += %w( search.js )
3258-
3259- # Disable delivery errors, bad email addresses will be ignored
3260- # config.action_mailer.raise_delivery_errors = false
3261+ # Ignore bad email addresses and do not raise email delivery errors.
3262+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
3263 config.action_mailer.raise_delivery_errors = true
3264 config.action_mailer.delivery_method = :smtp
3265- config.action_mailer.default_url_options = {:host => 'adoptadrainoakland.com'}
3266-
3267- # Enable threaded mode
3268- # config.threadsafe!
3269+ config.action_mailer.default_url_options = {host: 'adoptadrain.sfwater.org'}
3270
3271 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
3272- # the I18n.default_locale when a translation can not be found)
3273+ # the I18n.default_locale when a translation cannot be found).
3274 config.i18n.fallbacks = true
3275
3276- # Send deprecation notices to registered listeners
3277+ # Send deprecation notices to registered listeners.
3278 config.active_support.deprecation = :notify
3279
3280- # Log the query plan for queries taking more than this (works
3281- # with SQLite, MySQL, and PostgreSQL)
3282- # config.active_record.auto_explain_threshold_in_seconds = 0.5
3283+ # Use default logging formatter so that PID and timestamp are not suppressed.
3284+ config.log_formatter = ::Logger::Formatter.new
3285+
3286+ # Do not dump schema after migrations.
3287+ config.active_record.dump_schema_after_migration = false
3288 end
3289
3290 ActionMailer::Base.smtp_settings = {
3291- :address => "smtp.sendgrid.net",
3292- :port => "25",
3293- :authentication => :plain,
3294- :user_name => ENV['SENDGRID_USERNAME'],
3295- :password => ENV['SENDGRID_PASSWORD'],
3296- :domain => ENV['SENDGRID_DOMAIN'],
3297+ address: 'smtp.sendgrid.net',
3298+ port: '25',
3299+ authentication: :plain,
3300+ user_name: ENV['SENDGRID_USERNAME'],
3301+ password: ENV['SENDGRID_PASSWORD'],
3302+ domain: ENV['SENDGRID_DOMAIN'],
3303 }
3304diff -ru adopt-oakland/config/environments/test.rb adopt-sf/config/environments/test.rb
3305--- adopt-oakland/config/environments/test.rb 2016-10-27 23:28:23.000000000 -0400
3306+++ adopt-sf/config/environments/test.rb 2016-10-27 23:28:03.000000000 -0400
3307@@ -1,5 +1,5 @@
3308-AdoptAThing::Application.configure do
3309- # Settings specified here will take precedence over those in config/application.rb
3310+Rails.application.configure do
3311+ # Settings specified here will take precedence over those in config/application.rb.
3312
3313 # The test environment is used exclusively to run your application's
3314 # test suite. You never need to work with it otherwise. Remember that
3315@@ -7,32 +7,37 @@
3316 # and recreated between test runs. Don't rely on the data there!
3317 config.cache_classes = true
3318
3319- # Configure static asset server for tests with Cache-Control for performance
3320- config.serve_static_assets = true
3321- config.static_cache_control = "public, max-age=3600"
3322+ # Do not eager load code on boot. This avoids loading your whole application
3323+ # just for the purpose of running a single test. If you are using a tool that
3324+ # preloads Rails for running tests, you may have to set it to true.
3325+ config.eager_load = false
3326+
3327+ # Configure static file server for tests with Cache-Control for performance.
3328+ config.serve_static_files = true
3329+ config.static_cache_control = 'public, max-age=3600'
3330
3331- # Log error messages when you accidentally call methods on nil
3332- config.whiny_nils = true
3333-
3334- # Show full error reports and disable caching
3335+ # Show full error reports and disable caching.
3336 config.consider_all_requests_local = true
3337 config.action_controller.perform_caching = false
3338
3339- # Raise exceptions instead of rendering exception templates
3340+ # Raise exceptions instead of rendering exception templates.
3341 config.action_dispatch.show_exceptions = false
3342
3343- # Disable request forgery protection in test environment
3344- config.action_controller.allow_forgery_protection = false
3345+ # Disable request forgery protection in test environment.
3346+ config.action_controller.allow_forgery_protection = false
3347
3348 # Tell Action Mailer not to deliver emails to the real world.
3349 # The :test delivery method accumulates sent emails in the
3350 # ActionMailer::Base.deliveries array.
3351 config.action_mailer.delivery_method = :test
3352- config.action_mailer.default_url_options = {:host => 'localhost:3000'}
3353+ config.action_mailer.default_url_options = {host: 'localhost:3000'}
3354
3355- # Raise exception on mass assignment protection for Active Record models
3356- config.active_record.mass_assignment_sanitizer = :strict
3357+ # Randomize the order test cases are executed.
3358+ config.active_support.test_order = :random
3359
3360- # Print deprecation notices to the stderr
3361+ # Print deprecation notices to the stderr.
3362 config.active_support.deprecation = :stderr
3363+
3364+ # Raises error for missing translations
3365+ # config.action_view.raise_on_missing_translations = true
3366 end
3367Only in adopt-sf/config/initializers: airbrake.rb
3368Only in adopt-sf/config/initializers: assets.rb
3369Only in adopt-sf/config/initializers: cookies_serializer.rb
3370diff -ru adopt-oakland/config/initializers/devise.rb adopt-sf/config/initializers/devise.rb
3371--- adopt-oakland/config/initializers/devise.rb 2016-10-27 23:28:23.000000000 -0400
3372+++ adopt-sf/config/initializers/devise.rb 2016-10-27 23:28:03.000000000 -0400
3373@@ -1,16 +1,19 @@
3374 # Use this hook to configure devise mailer, warden hooks and so forth.
3375 # Many of these configuration options can be set straight in your model.
3376 Devise.setup do |config|
3377+ # The secret key used by Devise. Devise uses this key to generate
3378+ # random tokens. Changing this key will render invalid all existing
3379+ # confirmation, reset password and unlock tokens in the database.
3380+ config.secret_key = 'e642a15001ccf8126bf88426c41497c97d28084fd1de3b2f136ef897257e3e6de525fb751199e439cbefc9c93bc643c59426852c44f4c108dfcb87fdf7cfd503'
3381+
3382 # ==> Mailer Configuration
3383 # Configure the e-mail address which will be shown in Devise::Mailer,
3384- # note that it will be overwritten if you use your own mailer class with default "from" parameter.
3385- config.mailer_sender = "noreply@oaklandnet.com"
3386+ # note that it will be overwritten if you use your own mailer class
3387+ # with default "from" parameter.
3388+ config.mailer_sender = 'no-reply@sfwater.org'
3389
3390 # Configure the class responsible to send e-mails.
3391- # config.mailer = "Devise::Mailer"
3392-
3393- # Automatically apply schema changes in tableless databases
3394- # config.apply_schema = false
3395+ config.mailer = 'DeviseMailer'
3396
3397 # ==> ORM configuration
3398 # Load and configure the ORM. Supports :active_record (default) and
3399@@ -38,12 +41,12 @@
3400 # Configure which authentication keys should be case-insensitive.
3401 # These keys will be downcased upon creating or modifying a user and when used
3402 # to authenticate or find a user. Default is :email.
3403- config.case_insensitive_keys = [ :email ]
3404+ config.case_insensitive_keys = [:email]
3405
3406 # Configure which authentication keys should have whitespace stripped.
3407 # These keys will have whitespace before and after removed upon creating or
3408 # modifying a user and when used to authenticate or find a user. Default is :email.
3409- config.strip_whitespace_keys = [ :email ]
3410+ config.strip_whitespace_keys = [:email]
3411
3412 # Tell if authentication through request.params is enabled. True by default.
3413 # It can be set to an array that will enable params authentication only for the
3414@@ -51,17 +54,18 @@
3415 # enable it only for database (email + password) authentication.
3416 # config.params_authenticatable = true
3417
3418- # Tell if authentication through HTTP Basic Auth is enabled. False by default.
3419+ # Tell if authentication through HTTP Auth is enabled. False by default.
3420 # It can be set to an array that will enable http authentication only for the
3421- # given strategies, for example, `config.http_authenticatable = [:token]` will
3422- # enable it only for token authentication.
3423+ # given strategies, for example, `config.http_authenticatable = [:database]` will
3424+ # enable it only for database authentication. The supported strategies are:
3425+ # :database = Support basic authentication with authentication key + password
3426 # config.http_authenticatable = false
3427
3428 # If http headers should be returned for AJAX requests. True by default.
3429 # config.http_authenticatable_on_xhr = true
3430
3431- # The realm used in Http Basic Authentication. "Application" by default.
3432- # config.http_authentication_realm = "Application"
3433+ # The realm used in Http Basic Authentication. 'Application' by default.
3434+ # config.http_authentication_realm = 'Application'
3435
3436 # It will change confirmation, password recovery and other workflows
3437 # to behave the same regardless if the e-mail provided was right or wrong.
3438@@ -69,12 +73,18 @@
3439 # config.paranoid = true
3440
3441 # By default Devise will store the user in session. You can skip storage for
3442- # :http_auth and :token_auth by adding those symbols to the array below.
3443+ # particular strategies by setting this option.
3444 # Notice that if you are skipping storage for all authentication paths, you
3445 # may want to disable generating routes to Devise's sessions controller by
3446 # passing :skip => :sessions to `devise_for` in your config/routes.rb
3447 config.skip_session_storage = [:http_auth]
3448
3449+ # By default, Devise cleans up the CSRF token on authentication to
3450+ # avoid CSRF token fixation attacks. This means that, when using AJAX
3451+ # requests for sign in and sign up, you need to get a new CSRF token
3452+ # from the server. You can disable this option at your own risk.
3453+ # config.clean_up_csrf_token_on_authentication = true
3454+
3455 # ==> Configuration for :database_authenticatable
3456 # For bcrypt, this is the cost for hashing the password and defaults to 10. If
3457 # using other encryptors, it sets how many times you want the password re-encrypted.
3458@@ -85,7 +95,7 @@
3459 config.stretches = Rails.env.test? ? 1 : 10
3460
3461 # Setup a pepper to generate the encrypted password.
3462- config.pepper = "d0ce05a602094357144e8d2ce90258904f8cb26fb943cefd6fe0b824752616a9254fadabed3a47ba5c0de66a359513768ab1ab233d9cfef893f376a9b5ebcf68"
3463+ config.pepper = 'd0ce05a602094357144e8d2ce90258904f8cb26fb943cefd6fe0b824752616a9254fadabed3a47ba5c0de66a359513768ab1ab233d9cfef893f376a9b5ebcf68'
3464
3465 # ==> Configuration for :confirmable
3466 # A period that the user is allowed to access the website even without
3467@@ -95,7 +105,15 @@
3468 # the user cannot access the website without confirming his account.
3469 # config.allow_unconfirmed_access_for = 2.days
3470
3471- # If true, requires any email changes to be confirmed (exctly the same way as
3472+ # A period that the user is allowed to confirm their account before their
3473+ # token becomes invalid. For example, if set to 3.days, the user can confirm
3474+ # their account within 3 days after the mail was sent, but on the fourth day
3475+ # their account can't be confirmed with the token any more.
3476+ # Default is nil, meaning there is no restriction on how long a user can take
3477+ # before confirming their account.
3478+ # config.confirm_within = 3.days
3479+
3480+ # If true, requires any email changes to be confirmed (exactly the same way as
3481 # initial account confirmation) to be applied. Requires additional unconfirmed_email
3482 # db field (see migrations). Until confirmed new email is stored in
3483 # unconfirmed email column, and copied to email column on successful confirmation.
3484@@ -111,20 +129,16 @@
3485 # If true, extends the user's remember period when remembered via cookie.
3486 config.extend_remember_period = true
3487
3488- # If true, uses the password salt as remember token. This should be turned
3489- # to false if you are not using database authenticatable.
3490- # config.use_salt_as_remember_token = true
3491-
3492 # Options to be passed to the created cookie. For instance, you can set
3493 # :secure => true in order to force SSL only cookies.
3494- # config.cookie_options = {}
3495+ # config.rememberable_options = {}
3496
3497 # ==> Configuration for :validatable
3498- # Range for password length. Default is 6..128.
3499- # config.password_length = 6..128
3500+ # Range for password length. Default is 8..128.
3501+ # config.password_length = 8..128
3502
3503 # Email regex used to validate email formats. It simply asserts that
3504- # an one (and only one) @ exists in the given string. This is mainly
3505+ # one (and only one) @ exists in the given string. This is mainly
3506 # to give user feedback and not to assert the e-mail validity.
3507 # config.email_regexp = /\A[^@]+@[^@]+\z/
3508
3509@@ -133,6 +147,9 @@
3510 # time the user will be asked for credentials again. Default is 30 minutes.
3511 # config.timeout_in = 30.minutes
3512
3513+ # If true, expires auth token on session timeout.
3514+ # config.expire_auth_token_on_timeout = false
3515+
3516 # ==> Configuration for :lockable
3517 # Defines which strategy will be used to lock an account.
3518 # :failed_attempts = Locks an account after a number of failed attempts to sign in.
3519@@ -156,6 +173,9 @@
3520 # Time interval to unlock the account if :time is enabled as unlock_strategy.
3521 # config.unlock_in = 1.hour
3522
3523+ # Warn on the last attempt before the account is locked.
3524+ # config.last_attempt_warning = false
3525+
3526 # ==> Configuration for :recoverable
3527 #
3528 # Defines which key will be used when recovering the password for an account
3529@@ -171,13 +191,11 @@
3530 # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
3531 # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
3532 # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
3533- # REST_AUTH_SITE_KEY to pepper)
3534+ # REST_AUTH_SITE_KEY to pepper).
3535+ #
3536+ # Require the `devise-encryptable` gem when using anything other than bcrypt
3537 # config.encryptor = :sha512
3538
3539- # ==> Configuration for :token_authenticatable
3540- # Defines name of the authentication token params key
3541- # config.token_authentication_key = :auth_token
3542-
3543 # ==> Scopes configuration
3544 # Turn scoped views on. Before rendering "sessions/new", it will first check for
3545 # "users/sessions/new". It's turned off by default because it's slower if you
3546@@ -188,9 +206,8 @@
3547 # devise role declared in your routes (usually :user).
3548 # config.default_scope = :user
3549
3550- # Configure sign_out behavior.
3551- # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
3552- # The default is true, which means any logout action will sign out all active scopes.
3553+ # Set this configuration to false if you want /users/sign_out to sign out
3554+ # only the current scope. By default, Devise signs out all scopes.
3555 # config.sign_out_all_scopes = true
3556
3557 # ==> Navigation configuration
3558@@ -202,7 +219,7 @@
3559 # should add them to the navigational formats lists.
3560 #
3561 # The "*/*" below is required to match Internet Explorer requests.
3562- # config.navigational_formats = ["*/*", :html]
3563+ # config.navigational_formats = ['*/*', :html]
3564
3565 # The default HTTP method used to sign out a resource. Default is :delete.
3566 config.sign_out_via = :delete
3567@@ -220,4 +237,18 @@
3568 # manager.intercept_401 = false
3569 # manager.default_strategies(:scope => :user).unshift :some_external_strategy
3570 # end
3571+
3572+ # ==> Mountable engine configurations
3573+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
3574+ # is mountable, there are some extra configurations to be taken into account.
3575+ # The following options are available, assuming the engine is mounted as:
3576+ #
3577+ # mount MyEngine, at: '/my_engine'
3578+ #
3579+ # The router that invoked `devise_for`, in the example above, would be:
3580+ # config.router_name = :my_engine
3581+ #
3582+ # When using omniauth, Devise cannot automatically set Omniauth path,
3583+ # so you need to do it manually. For the users scope, it would be:
3584+ # config.omniauth_path_prefix = '/my_engine/users/auth'
3585 end
3586Only in adopt-sf/config/initializers: filter_parameter_logging.rb
3587Only in adopt-oakland/config/initializers: geokit.rb
3588diff -ru adopt-oakland/config/initializers/inflections.rb adopt-sf/config/initializers/inflections.rb
3589--- adopt-oakland/config/initializers/inflections.rb 2016-10-27 23:28:23.000000000 -0400
3590+++ adopt-sf/config/initializers/inflections.rb 2016-10-27 23:28:03.000000000 -0400
3591@@ -1,15 +1,16 @@
3592 # Be sure to restart your server when you modify this file.
3593
3594-# Add new inflection rules using the following format
3595-# (all these examples are active by default):
3596-# ActiveSupport::Inflector.inflections do |inflect|
3597+# Add new inflection rules using the following format. Inflections
3598+# are locale specific, and you may define rules for as many different
3599+# locales as you wish. All of these examples are active by default:
3600+# ActiveSupport::Inflector.inflections(:en) do |inflect|
3601 # inflect.plural /^(ox)$/i, '\1en'
3602 # inflect.singular /^(ox)en/i, '\1'
3603 # inflect.irregular 'person', 'people'
3604 # inflect.uncountable %w( fish sheep )
3605 # end
3606-#
3607+
3608 # These inflection rules are supported but not enabled by default:
3609-# ActiveSupport::Inflector.inflections do |inflect|
3610+# ActiveSupport::Inflector.inflections(:en) do |inflect|
3611 # inflect.acronym 'RESTful'
3612 # end
3613diff -ru adopt-oakland/config/initializers/mime_types.rb adopt-sf/config/initializers/mime_types.rb
3614--- adopt-oakland/config/initializers/mime_types.rb 2016-10-27 23:28:23.000000000 -0400
3615+++ adopt-sf/config/initializers/mime_types.rb 2016-10-27 23:28:03.000000000 -0400
3616@@ -2,4 +2,3 @@
3617
3618 # Add new mime types for use in respond_to blocks:
3619 # Mime::Type.register "text/richtext", :rtf
3620-# Mime::Type.register_alias "text/html", :iphone
3621diff -ru adopt-oakland/config/initializers/rails_admin.rb adopt-sf/config/initializers/rails_admin.rb
3622--- adopt-oakland/config/initializers/rails_admin.rb 2016-10-27 23:28:23.000000000 -0400
3623+++ adopt-sf/config/initializers/rails_admin.rb 2016-10-27 23:28:03.000000000 -0400
3624@@ -1,5 +1,9 @@
3625 RailsAdmin.config do |config|
3626 config.authenticate_with do
3627- redirect_to(main_app.root_path, :flash => {:warning => "You must be signed-in as an administrator to access that page"}) unless signed_in? && current_user.admin?
3628+ redirect_to(main_app.root_path, flash: {warning: 'You must be signed-in as an administrator to access that page'}) unless signed_in? && current_user.admin?
3629+ end
3630+
3631+ config.model 'Thing' do
3632+ label I18n.t('defaults.thing')
3633 end
3634 end
3635diff -ru adopt-oakland/config/initializers/secret_token.rb adopt-sf/config/initializers/secret_token.rb
3636--- adopt-oakland/config/initializers/secret_token.rb 2016-10-27 23:28:23.000000000 -0400
3637+++ adopt-sf/config/initializers/secret_token.rb 2016-10-27 23:28:03.000000000 -0400
3638@@ -1,7 +1,17 @@
3639 # Be sure to restart your server when you modify this file.
3640
3641-# Your secret key for verifying the integrity of signed cookies.
3642+# Your secret key is used for verifying the integrity of signed cookies.
3643 # If you change this key, all old signed cookies will become invalid!
3644+
3645 # Make sure the secret is at least 30 characters and all random,
3646 # no regular words or you'll be exposed to dictionary attacks.
3647-AdoptAThing::Application.config.secret_token = ENV['RAILS_SECRET_TOKEN'].nil? ? ('x' * 30) : ENV['RAILS_SECRET_TOKEN']
3648+# You can use `rake secret` to generate a secure secret key.
3649+
3650+if Rails.env.production? && ENV['SECRET_TOKEN'].blank?
3651+ raise 'The SECRET_TOKEN environment variable is not set.\n
3652+ To generate it, run "rake secret", then set it with "heroku config:set SECRET_TOKEN=the_token_you_generated"'
3653+end
3654+
3655+# Make sure your secret_key_base is kept private
3656+# if you're sharing your code publicly.
3657+AdoptAThing::Application.config.secret_key_base = ENV['SECRET_TOKEN'] || 'cfc501e00aeb29750826f86459cccec45ea2c7dd84e8fc0b800dced308be95059b51c3402d215d267cfc09f03bd6f1f531a65456212b3531ef2b10cf605dc39a'
3658diff -ru adopt-oakland/config/initializers/session_store.rb adopt-sf/config/initializers/session_store.rb
3659--- adopt-oakland/config/initializers/session_store.rb 2016-10-27 23:28:23.000000000 -0400
3660+++ adopt-sf/config/initializers/session_store.rb 2016-10-27 23:28:03.000000000 -0400
3661@@ -1,8 +1,3 @@
3662 # Be sure to restart your server when you modify this file.
3663
3664-AdoptAThing::Application.config.session_store :cookie_store, :key => '_adopt-a-thing_session'
3665-
3666-# Use the database for sessions instead of the cookie-based default,
3667-# which shouldn't be used to store highly confidential information
3668-# (create the session table with "rails generate session_migration")
3669-# AdoptAThing::Application.config.session_store :active_record_store
3670+Rails.application.config.session_store :cookie_store, key: '_adopt-a-thing_session'
3671Only in adopt-oakland/config/initializers: smtp_settings.rb
3672diff -ru adopt-oakland/config/initializers/wrap_parameters.rb adopt-sf/config/initializers/wrap_parameters.rb
3673--- adopt-oakland/config/initializers/wrap_parameters.rb 2016-10-27 23:28:23.000000000 -0400
3674+++ adopt-sf/config/initializers/wrap_parameters.rb 2016-10-27 23:28:03.000000000 -0400
3675@@ -1,14 +1,14 @@
3676 # Be sure to restart your server when you modify this file.
3677-#
3678+
3679 # This file contains settings for ActionController::ParamsWrapper which
3680 # is enabled by default.
3681
3682 # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
3683 ActiveSupport.on_load(:action_controller) do
3684- wrap_parameters :format => [:json]
3685+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
3686 end
3687
3688-# Disable root element in JSON by default.
3689-ActiveSupport.on_load(:active_record) do
3690- self.include_root_in_json = false
3691-end
3692+# To enable root element in JSON for ActiveRecord objects.
3693+# ActiveSupport.on_load(:active_record) do
3694+# self.include_root_in_json = true
3695+# end
3696diff -ru adopt-oakland/config/locales/de.yml adopt-sf/config/locales/de.yml
3697--- adopt-oakland/config/locales/de.yml 2016-10-27 23:28:23.000000000 -0400
3698+++ adopt-sf/config/locales/de.yml 2016-10-27 23:28:03.000000000 -0400
3699@@ -2,42 +2,42 @@
3700
3701 de:
3702 buttons:
3703- abandon: "Abandon diesem %{thing}"
3704- adopt: "Adopt!"
3705+ abandon: "Diesen %{thing} aufgeben"
3706+ adopt: "Adoptieren"
3707 back: "Zurück"
3708 change_password: "Mein Passwort ändern"
3709 close: "Schließen"
3710 edit_profile: "Profil bearbeiten"
3711 email_password: "Bitte schicken Sie mir mein Passwort"
3712- find: "Finden Sie %{thing}"
3713+ find: "Finden Sie einen %{thing}"
3714 send_reminder: "Send Erinnerung zu schaufeln"
3715- sign_in: "Anmelden"
3716- sign_out: "Austragen"
3717+ sign_in: "Einloggen"
3718+ sign_out: "Ausloggen"
3719 sign_up: "Registrieren"
3720 update: "Aktualisierung"
3721 captions:
3722- optional: "(fakultativ)"
3723+ optional: "(optional)"
3724 private: "(privat)"
3725- public: "(für andere sichtbar)"
3726+ public: "(für Andere sichtbar)"
3727 required: "(erforderlich)"
3728 defaults:
3729 address: "Adresse"
3730- address_1: "1 Frank H. Ogawa Plaza, Oakland, CA"
3731- address_2: ""
3732- city: "Oakland"
3733- city_state: "Oakland, California"
3734+ address_1: "1 City Hall Plaza"
3735+ address_2: "Suite 500"
3736+ city: "Boston"
3737+ city_state: "Boston, Massachusetts"
3738 neighborhood: "Downtown"
3739- sms_number: "510-555-1212"
3740- state: "CA"
3741- thing: "Gully"
3742+ sms_number: "857-555-1212"
3743+ state: "MA"
3744+ thing: "Drain"
3745 this_thing: "Dieser %{thing}"
3746- tagline: "Claim Verantwortung für die Führung der %{thing} Eingang klar."
3747- tos: "Mit der Anmeldung erklären Sie sich mit den %{tos}."
3748- voice_number: "510-555-1212"
3749- zip: "94612"
3750+ tagline: "Verantwortung dafür übernehmen, einen Drainen auszubuddeln, nachdem es geschneit hat."
3751+ tos: "Mit der Anmeldung erklären Sie sich mit den %{tos} einverstanden."
3752+ voice_number: "617-555-1212"
3753+ zip: "02201-2013"
3754 errors:
3755- password: "Sie müssen sich einloggen oder registrieren, bevor Sie fortfahren."
3756- not_found: "Konnte nicht gefunden werden %{thing}."
3757+ password: "Sie müssen sich einloggen oder registrieren, um fortzufahren."
3758+ not_found: "%{thing} konnte nicht gefunden werden."
3759 labels:
3760 address: "Adresse, Stadtviertel"
3761 address_1: "Adresszeile 1"
3762@@ -46,17 +46,17 @@
3763 city_state: "Stadt"
3764 email: "E-Mail-Adresse"
3765 name: "Name"
3766- name_thing: "Geben Sie diese %{thing} einen Namen"
3767+ name_thing: "Geben Sie diesem %{thing} einen Namen"
3768 organization: "Organisation"
3769- password: "Kennwort"
3770+ password: "Passwort"
3771 password_choose: "Wählen Sie ein Passwort"
3772 password_current: "Aktuelles Passwort"
3773 password_new: "Neues Passwort"
3774 remember_me: "Eingeloggt bleiben"
3775 sms_number: "Handy-Nummer"
3776 state: "Zustand"
3777- user_existing: "Ich habe schon unterschrieben"
3778- user_new: "Ich habe noch nicht registriert"
3779+ user_existing: "Ich habe mich bereits registriert"
3780+ user_new: "Ich habe mich noch nicht registriert"
3781 voice_number: "Startseite Telefonnummer"
3782 zip: "Postleitzahl"
3783 links:
3784@@ -65,7 +65,7 @@
3785 remembered_password: "Das macht nichts. Ich erinnerte mich an mein Passwort vergessen."
3786 notices:
3787 abandoned: "%{thing} verlassen!"
3788- adopted: "Sie haben soeben verabschiedete einen %{thing}!"
3789+ adopted: "Sie haben soeben einen %{thing} adoptiert!"
3790 password_reset: "Password Reset Anleitung geschickt! Überprüfen Sie Ihre E-Mail."
3791 reminder_sent: "Reminder versendet!"
3792 signed_in: "Unterzeichnet in!"
3793@@ -73,19 +73,19 @@
3794 signed_up: "Vielen Dank für Ihre Anmeldung!"
3795 stolen: "%{thing} gestohlen!"
3796 titles:
3797- adopt: "Adopt diesem %{thing}"
3798- adopted: "{thing_name} wurde verabschiedet"
3799+ adopt: "Adoptieren diesen %{thing}"
3800+ adopted: "{thing_name} wurde adoptiert"
3801 byline: "von %{name}"
3802 edit_profile: "Ihr Profil bearbeiten"
3803- main: "Adopt-a-%{thing}"
3804- ofline: "der %{organization}"
3805- sign_in: "Melden Sie sich in diesem %{thing} übernehmen"
3806+ main: "%{thing} adoptieren"
3807+ ofline: "von %{organization}"
3808+ sign_in: "Melden Sie sich an um diesen %{thing} zu übernehmen"
3809 thank_you: "Vielen Dank für die Annahme dieser %{thing}!"
3810 tos: "Nutzungsbedingungen"
3811 sponsors:
3812 built: "Erbaut in Boston"
3813- cfa: "Code für Amerika"
3814- city: "City of Oakland"
3815+ cfa: "Code for Amerika"
3816+ city: "City of Boston"
3817 mayor:
3818- name: "Jean Quan"
3819+ name: "Martin J. Walsh"
3820 title: "Mayor"
3821diff -ru adopt-oakland/config/locales/devise.en.yml adopt-sf/config/locales/devise.en.yml
3822--- adopt-oakland/config/locales/devise.en.yml 2016-10-27 23:28:23.000000000 -0400
3823+++ adopt-sf/config/locales/devise.en.yml 2016-10-27 23:28:03.000000000 -0400
3824@@ -1,57 +1,59 @@
3825 # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
3826
3827 en:
3828+ devise:
3829+ confirmations:
3830+ confirmed: "Your account was successfully confirmed."
3831+ send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
3832+ send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
3833+ failure:
3834+ already_authenticated: "You are already signed in."
3835+ inactive: "Your account is not activated yet."
3836+ invalid: "Invalid email or password."
3837+ locked: "Your account is locked."
3838+ last_attempt: "You have one more attempt before your account will be locked."
3839+ not_found_in_database: "Invalid email or password."
3840+ timeout: "Your session expired. Please sign in again to continue."
3841+ unauthenticated: "You need to sign in or sign up before continuing."
3842+ unconfirmed: "You have to confirm your account before continuing."
3843+ mailer:
3844+ confirmation_instructions:
3845+ subject: "Confirmation instructions"
3846+ reset_password_instructions:
3847+ subject: "%{title} reset password instructions"
3848+ unlock_instructions:
3849+ subject: "Unlock Instructions"
3850+ omniauth_callbacks:
3851+ failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
3852+ success: "Successfully authenticated from %{kind} account."
3853+ passwords:
3854+ no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
3855+ send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes."
3856+ send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
3857+ updated: "Your password was changed successfully. You are now signed in."
3858+ updated_not_active: "Your password was changed successfully."
3859+ registrations:
3860+ destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
3861+ signed_up: "Welcome! You have signed up successfully."
3862+ signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
3863+ signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
3864+ signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
3865+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
3866+ updated: "You updated your account successfully."
3867+ sessions:
3868+ signed_in: "Signed in successfully."
3869+ signed_out: "Signed out successfully."
3870+ unlocks:
3871+ send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
3872+ send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
3873+ unlocked: "Your account has been unlocked successfully. Please sign in to continue."
3874 errors:
3875 messages:
3876+ already_confirmed: "was already confirmed, please try signing in"
3877+ confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
3878 expired: "has expired, please request a new one"
3879 not_found: "not found"
3880- already_confirmed: "was already confirmed, please try signing in"
3881 not_locked: "was not locked"
3882 not_saved:
3883 one: "1 error prohibited this %{resource} from being saved:"
3884 other: "%{count} errors prohibited this %{resource} from being saved:"
3885-
3886- devise:
3887- failure:
3888- already_authenticated: 'You are already signed in.'
3889- unauthenticated: 'You need to sign in or sign up before continuing.'
3890- unconfirmed: 'You have to confirm your account before continuing.'
3891- locked: 'Your account is locked.'
3892- invalid: 'Invalid email or password.'
3893- invalid_token: 'Invalid authentication token.'
3894- timeout: 'Your session expired, please sign in again to continue.'
3895- inactive: 'Your account was not activated yet.'
3896- sessions:
3897- signed_in: 'Signed in successfully.'
3898- signed_out: 'Signed out successfully.'
3899- passwords:
3900- send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
3901- updated: 'Your password was changed successfully. You are now signed in.'
3902- updated_not_active: 'Your password was changed successfully.'
3903- send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail"
3904- confirmations:
3905- send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
3906- send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
3907- confirmed: 'Your account was successfully confirmed. You are now signed in.'
3908- registrations:
3909- signed_up: 'Welcome! You have signed up successfully.'
3910- signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
3911- signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
3912- signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'
3913- updated: 'You updated your account successfully.'
3914- update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
3915- destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
3916- unlocks:
3917- send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
3918- unlocked: 'Your account has been unlocked successfully. Please sign in to continue.'
3919- send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
3920- omniauth_callbacks:
3921- success: 'Successfully authorized from %{kind} account.'
3922- failure: 'Could not authorize you from %{kind} because "%{reason}".'
3923- mailer:
3924- confirmation_instructions:
3925- subject: 'Confirmation instructions'
3926- reset_password_instructions:
3927- subject: 'Reset password instructions'
3928- unlock_instructions:
3929- subject: 'Unlock Instructions'
3930diff -ru adopt-oakland/config/locales/en.yml adopt-sf/config/locales/en.yml
3931--- adopt-oakland/config/locales/en.yml 2016-10-27 23:28:23.000000000 -0400
3932+++ adopt-sf/config/locales/en.yml 2016-10-27 23:28:03.000000000 -0400
3933@@ -8,9 +8,9 @@
3934 change_password: "Change my password"
3935 close: "Close"
3936 edit_profile: "Edit profile"
3937- email_password: "Email me my password"
3938+ email_password: "Reset my password"
3939 find: "Find %{thing}"
3940- send_reminder: "Send reminder to listen"
3941+ send_reminder: "Send reminder to maintain"
3942 sign_in: "Sign in"
3943 sign_out: "Sign out"
3944 sign_up: "Sign up"
3945@@ -18,40 +18,46 @@
3946 captions:
3947 optional: "(optional)"
3948 private: "(private)"
3949+ private_optional: "(private, optional)"
3950 public: "(visible to others)"
3951+ public_optional: "(visible to others, optional)"
3952 required: "(required)"
3953 defaults:
3954 address: "address"
3955- address_1: "1 Frank H. Ogawa Plaza, Oakland, CA"
3956- address_2: ""
3957- city: "Oakland"
3958- city_state: "Oakland, California"
3959- neighborhood: "Downtown"
3960- sms_number: "510-555-1212"
3961+ address_1: "1 Dr Carlton B Goodlett Pl."
3962+ address_2: "Suite 500"
3963+ city: "San Francisco"
3964+ city_state: "San Francisco, California"
3965+ neighborhood: "Civic Center"
3966+ sms_number: "415-555-1212"
3967 state: "CA"
3968 thing: "drain"
3969+ things: "drains"
3970 this_thing: "This %{thing}"
3971- tagline: "Volunteer to keep a drain clear and report any problems!"
3972- tos: "By signing up you agree to the %{tos}"
3973- voice_number: "510-555-1212"
3974- zip: "94612"
3975+ tagline: "Help the city avoid flooding by clearing drains of debris. Click to learn what this means."
3976+ tos: "By signing up, you agree to the %{tos}."
3977+ voice_number: "415-555-1212"
3978+ zip: "94015-2013"
3979 errors:
3980 password: "You need to sign in or sign up before continuing."
3981 not_found: "Could not find %{thing}."
3982 labels:
3983- address: "Enter an Oakland, CA address"
3984+ address: "Address, Neighborhood"
3985 address_1: "Address Line 1"
3986 address_2: "Address Line 2"
3987 city: "City"
3988 city_state: "City"
3989 email: "Email address"
3990- name: "Name"
3991+ first_name: "First name"
3992+ last_name: "Last name"
3993 name_thing: "Give this %{thing} a name"
3994+ my_things: "My %{things}"
3995 organization: "Organization"
3996 password: "Password"
3997 password_choose: "Choose a password"
3998 password_current: "Current password"
3999 password_new: "New password"
4000+ password_reset: "Reset password"
4001 remember_me: "Stay signed in"
4002 sms_number: "Mobile phone number"
4003 state: "State"
4004@@ -63,9 +69,20 @@
4005 feedback: "Send feedback"
4006 forgot_password: "Forgot your password?"
4007 remembered_password: "Never mind. I remembered my password."
4008+ click_for_more: "Click to learn more"
4009+ learn_more: "Learn more about adopting a %{thing}"
4010+ thing_details: "This %{thing} is special! Learn why."
4011+ learn_more_background: "Learn more"
4012 notices:
4013 abandoned: "%{thing} abandoned!"
4014 adopted: "You just adopted a %{thing}!"
4015+ alpha: >
4016+ We're just getting started! We'd love to get your <a
4017+ href='%{feedback_url}'>feedback</a> or your help with the <a
4018+ href='%{code_url}'>code</a>.
4019+
4020+ <a href='%{background_target}' data-toggle='modal'
4021+ data-target='%{background_target}'>Learn more about the project.</a>
4022 password_reset: "Password reset instructions sent! Check your email."
4023 reminder_sent: "Reminder sent!"
4024 signed_in: "Signed in!"
4025@@ -77,14 +94,22 @@
4026 adopted: "%{thing_name} has been adopted"
4027 byline: "by %{name}"
4028 edit_profile: "Edit your Profile"
4029- main: "City of Oakland: Adopt-a-%{thing}"
4030+ main: "Adopt-a-%{thing} San Francisco"
4031 ofline: "of %{organization}"
4032 sign_in: "Sign in to adopt this %{thing}"
4033 thank_you: "Thank you for adopting this %{thing}!"
4034- tos: "Terms of Service & Volunteer Guidelines"
4035+ email_text: "I just adopted one of San Francisco's 25,000+ storm drains and pledged to help keep it clear of leaves and debris. You, too, can Adopt a Drain and help the City avoid flooding at %{root_url}."
4036+ tweet_text: "Flooded streets aren't fun. I adopted my own SF storm drain at %{root_url}. Claim and name yours #sfsewer @sfwater"
4037+ tos: "Terms of Service"
4038+ site:
4039+ description: "You can adopt one of San Francisco's 25,000+ storm drains and pledge to help keep it clear of leaves and debris this rainy season. Lend a hand and help the City avoid flooding."
4040 sponsors:
4041+ built: "Code for San Francisco"
4042 cfa: "Code for America"
4043- city: "City of Oakland"
4044+ city: "City of San Francisco"
4045+ datasf: "DataSF"
4046+ sfpw: "San Francisco Public Works"
4047+ sfpuc: "San Francisco Public Utilities Commission"
4048 mayor:
4049- name: "Jean Quan"
4050+ name: "Edwin M. Lee"
4051 title: "Mayor"
4052diff -ru adopt-oakland/config/locales/es.yml adopt-sf/config/locales/es.yml
4053--- adopt-oakland/config/locales/es.yml 2016-10-27 23:28:23.000000000 -0400
4054+++ adopt-sf/config/locales/es.yml 2016-10-27 23:28:03.000000000 -0400
4055@@ -22,19 +22,19 @@
4056 required: "(necesario)"
4057 defaults:
4058 address: "dirección"
4059- address_1: "1 Frank H. Ogawa Plaza, Oakland, CA"
4060- address_2: ""
4061- city: "Oakland"
4062- city_state: "Oakland, California"
4063+ address_1: "1 City Hall Plaza"
4064+ address_2: "Suite 500"
4065+ city: "Boston"
4066+ city_state: "Boston, Massachusetts"
4067 neighborhood: "Downtown"
4068- sms_number: "510-555-1212"
4069- state: "CA"
4070- thing: "drenaje pluvial"
4071+ sms_number: "857-555-1212"
4072+ state: "MA"
4073+ thing: "boca de incendio"
4074 this_thing: "Esta %{thing}"
4075- tagline: "Reclamar la responsabilidad para limpiar la entrada drenaje pluvial."
4076+ tagline: "Reclamar la responsabilidad para palear un hidrante de incendios después de que las nieves."
4077 tos: "Al registrarse, usted está de acuerdo con los %{tos}."
4078- voice_number: "510-555-1212"
4079- zip: "94612"
4080+ voice_number: "617-555-1212"
4081+ zip: "02201-2013"
4082 errors:
4083 password: "Es necesario iniciar sesión o registrarse antes de continuar."
4084 not_found: "No se pudo encontrar %{thing}."
4085@@ -85,7 +85,7 @@
4086 sponsors:
4087 built: "Construido en Boston"
4088 cfa: "Código de los Estados Unidos"
4089- city: "Ciudad de Oakland"
4090+ city: "Ciudad de Boston"
4091 mayor:
4092- name: "Jean Quan"
4093+ name: "Martin J. Walsh"
4094 title: "Mayor"
4095diff -ru adopt-oakland/config/locales/fr.yml adopt-sf/config/locales/fr.yml
4096--- adopt-oakland/config/locales/fr.yml 2016-10-27 23:28:23.000000000 -0400
4097+++ adopt-sf/config/locales/fr.yml 2016-10-27 23:28:03.000000000 -0400
4098@@ -22,19 +22,19 @@
4099 required: "(nécessaire)"
4100 defaults:
4101 address: "Adresse"
4102- address_1: "1 Frank H. Ogawa Plaza, Oakland, CA"
4103- address_2: ""
4104- city: "Oakland"
4105- city_state: "Oakland, California"
4106+ address_1: "1 City Hall Plaza"
4107+ address_2: "Suite 500"
4108+ city: "Boston"
4109+ city_state: "Boston, Massachusetts"
4110 neighborhood: "Downtown"
4111- sms_number: "510-555-1212"
4112- state: "CA"
4113- thing: "collecteur d'eaux pluviales"
4114+ sms_number: "857-555-1212"
4115+ state: "MA"
4116+ thing: "bouche d'incendie"
4117 this_thing: "Cette %{thing}"
4118- tagline: "La responsabilité Réclamation de dégager une entrée d'eaux pluviales."
4119+ tagline: "La responsabilité Réclamation pour pelleter une %{thing} le feu après qu'il neige."
4120 tos: "En vous inscrivant, vous acceptez les %{tos}."
4121- voice_number: "510-555-1212"
4122- zip: "94612"
4123+ voice_number: "617-555-1212"
4124+ zip: "02201-2013"
4125 errors:
4126 password: "Vous devez vous identifier ou vous inscrire avant de continuer."
4127 not_found: "Impossible de trouver %{thing}."
4128@@ -83,8 +83,9 @@
4129 thank_you: "Merci pour l'adoption de cette %{thing}!"
4130 tos: "Conditions d'utilisation"
4131 sponsors:
4132+ built: "Construit à Boston"
4133 cfa: "Code pour l'Amérique"
4134- city: "Ville de Oakland"
4135+ city: "Ville de Boston"
4136 mayor:
4137- name: "Jean Quan"
4138+ name: "Martin J. Walsh"
4139 title: "Mayor"
4140Only in adopt-sf/config/locales: it.yml
4141diff -ru adopt-oakland/config/locales/pt.yml adopt-sf/config/locales/pt.yml
4142--- adopt-oakland/config/locales/pt.yml 2016-10-27 23:28:23.000000000 -0400
4143+++ adopt-sf/config/locales/pt.yml 2016-10-27 23:28:03.000000000 -0400
4144@@ -22,19 +22,19 @@
4145 required: "(exigido)"
4146 defaults:
4147 address: "endereço"
4148- address_1: "1 Frank H. Ogawa Plaza, Oakland, CA"
4149- address_2: ""
4150- city: "Oakland"
4151- city_state: "Oakland, California"
4152+ address_1: "1 City Hall Plaza"
4153+ address_2: "Suite 500"
4154+ city: "Boston"
4155+ city_state: "Boston, Massachusetts"
4156 neighborhood: "Downtown"
4157- sms_number: "510-555-1212"
4158- state: "CA"
4159+ sms_number: "857-555-1212"
4160+ state: "MA"
4161 thing: "hidrante"
4162 this_thing: "Este %{thing}"
4163 tagline: "Responsabilidade pedido de pá para fora um %{thing} de incêndio depois que neva."
4164 tos: "Ao inscrever-se, você concorda com os %{tos}."
4165- voice_number: "510-555-1212"
4166- zip: "94612"
4167+ voice_number: "617-555-1212"
4168+ zip: "02201-2013"
4169 errors:
4170 password: "Você precisa fazer login ou inscreva-se antes de continuar."
4171 not_found: "Não foi possÃvel encontrar %{thing}."
4172@@ -85,7 +85,7 @@
4173 sponsors:
4174 built: "ConstruÃdo em Boston"
4175 cfa: "Código para a América"
4176- city: "Cidade de Oakland"
4177+ city: "Cidade de Boston"
4178 mayor:
4179- name: "Jean Quan"
4180+ name: "Martin J. Walsh"
4181 title: "Mayor"
4182Only in adopt-oakland/config: newrelic.yml
4183diff -ru adopt-oakland/config/routes.rb adopt-sf/config/routes.rb
4184--- adopt-oakland/config/routes.rb 2016-10-27 23:28:23.000000000 -0400
4185+++ adopt-sf/config/routes.rb 2016-10-27 23:28:03.000000000 -0400
4186@@ -1,25 +1,22 @@
4187-AdoptAThing::Application.routes.draw do
4188- devise_for :users, :controllers => {
4189- :passwords => 'passwords',
4190- :registrations => 'users',
4191- :sessions => 'sessions',
4192+Rails.application.routes.draw do
4193+ devise_for :users, controllers: {
4194+ passwords: 'passwords',
4195+ registrations: 'users',
4196+ sessions: 'sessions',
4197 }
4198
4199- get 'address' => 'addresses#show', :as => 'address'
4200- get 'info_window' => 'info_window#index', :as => 'info_window'
4201- get 'status/info' => 'statuses#info', :as => 'status/info'
4202- get 'sitemap' => 'sitemaps#index', :as => 'sitemap'
4203- get 'javascripts/main(.:format)' => 'javascripts#main', :as => 'javascript'
4204+ get '/address', to: 'addresses#show', as: 'address'
4205+ get '/info_window', to: 'info_window#index', as: 'info_window'
4206+ get '/sitemap', to: 'sitemaps#index', as: 'sitemap'
4207
4208- scope "sidebar", :controller => :sidebar do
4209- get :search, :as => 'search'
4210- get :combo_form, :as => 'combo_form'
4211- get :edit_profile , :as => 'edit_profile'
4212+ scope '/sidebar', controller: :sidebar do
4213+ get :search, as: 'search'
4214+ get :combo_form, as: 'combo_form'
4215+ get :edit_profile, as: 'edit_profile'
4216 end
4217
4218 resource :reminders
4219 resource :things
4220- resource :status
4221 mount RailsAdmin::Engine => '/admin', :as => 'rails_admin'
4222- root :to => 'main#index'
4223-end
4224\ No newline at end of file
4225+ root to: 'main#index'
4226+end
4227Only in adopt-sf/config: secrets.yml
4228Only in adopt-sf/config: unicorn.rb
4229diff -ru adopt-oakland/config.ru adopt-sf/config.ru
4230--- adopt-oakland/config.ru 2016-10-27 23:28:23.000000000 -0400
4231+++ adopt-sf/config.ru 2016-10-27 23:28:03.000000000 -0400
4232@@ -1,4 +1,4 @@
4233 # This file is used by Rack-based servers to start the application.
4234
4235-require ::File.expand_path('../config/environment', __FILE__)
4236-run AdoptAThing::Application
4237+require ::File.expand_path('../config/environment', __FILE__)
4238+run Rails.application
4239Only in adopt-sf/db/migrate: 00000000000001_create_users.rb
4240Only in adopt-oakland/db/migrate: 00000000000001_devise_create_users.rb
4241Only in adopt-sf/db/migrate: 00000000000002_add_devise_to_users.rb
4242Only in adopt-oakland/db/migrate: 00000000000002_create_things.rb
4243Only in adopt-oakland/db/migrate: 00000000000003_create_reminders.rb
4244Only in adopt-sf/db/migrate: 00000000000003_create_things.rb
4245Only in adopt-oakland/db/migrate: 00000000000004_create_rails_admin_histories_table.rb
4246Only in adopt-sf/db/migrate: 00000000000004_create_reminders.rb
4247Only in adopt-oakland/db/migrate: 00000000000005_add_address_to_users.rb
4248Only in adopt-sf/db/migrate: 00000000000005_create_rails_admin_histories_table.rb
4249Only in adopt-oakland/db/migrate: 00000000000006_add_remember_password_sent_at_to_users.rb
4250Only in adopt-oakland/db/migrate: 20120429185242_create_thing_user_join_table.rb
4251Only in adopt-oakland/db/migrate: 20120605230246_create_statuses.rb
4252Only in adopt-oakland/db/migrate: 20130225055407_add_subscribed_at_to_users.rb
4253Only in adopt-sf/db/migrate: 20160111062953_add_system_use_code_to_things.rb
4254Only in adopt-sf/db/migrate: 20160326200455_user_split_name.rb
4255diff -ru adopt-oakland/db/schema.rb adopt-sf/db/schema.rb
4256--- adopt-oakland/db/schema.rb 2016-10-27 23:28:23.000000000 -0400
4257+++ adopt-sf/db/schema.rb 2016-10-27 23:28:03.000000000 -0400
4258@@ -9,108 +9,80 @@
4259 # from scratch. The latter is a flawed and unsustainable approach (the more migrations
4260 # you'll amass, the slower it'll run and the greater likelihood for issues).
4261 #
4262-# It's strongly recommended to check this file into your version control system.
4263+# It's strongly recommended that you check this file into your version control system.
4264
4265-ActiveRecord::Schema.define(:version => 20130225055407) do
4266+ActiveRecord::Schema.define(version: 20160326200455) do
4267
4268- create_table "geometry_columns", :id => false, :force => true do |t|
4269- t.string "f_table_catalog", :limit => 256, :null => false
4270- t.string "f_table_schema", :limit => 256, :null => false
4271- t.string "f_table_name", :limit => 256, :null => false
4272- t.string "f_geometry_column", :limit => 256, :null => false
4273- t.integer "coord_dimension", :null => false
4274- t.integer "srid", :null => false
4275- t.string "type", :limit => 30, :null => false
4276- end
4277+ # These are extensions that must be enabled in order to support this database
4278+ enable_extension "plpgsql"
4279
4280- create_table "rails_admin_histories", :force => true do |t|
4281+ create_table "rails_admin_histories", force: :cascade do |t|
4282 t.string "message"
4283 t.string "username"
4284 t.integer "item"
4285 t.string "table"
4286- t.integer "month"
4287- t.integer "year", :limit => 8
4288+ t.integer "month", limit: 2
4289+ t.integer "year", limit: 8
4290 t.datetime "created_at"
4291 t.datetime "updated_at"
4292 end
4293
4294- add_index "rails_admin_histories", ["item", "table", "month", "year"], :name => "index_rails_admin_histories"
4295+ add_index "rails_admin_histories", ["item", "table", "month", "year"], name: "index_rails_admin_histories", using: :btree
4296
4297- create_table "reminders", :force => true do |t|
4298+ create_table "reminders", force: :cascade do |t|
4299 t.datetime "created_at"
4300 t.datetime "updated_at"
4301- t.integer "from_user_id", :null => false
4302- t.integer "to_user_id", :null => false
4303- t.integer "thing_id", :null => false
4304- t.boolean "sent", :default => false
4305- end
4306-
4307- add_index "reminders", ["from_user_id"], :name => "index_reminders_on_from_user_id"
4308- add_index "reminders", ["sent"], :name => "index_reminders_on_sent"
4309- add_index "reminders", ["thing_id"], :name => "index_reminders_on_thing_id"
4310- add_index "reminders", ["to_user_id"], :name => "index_reminders_on_to_user_id"
4311-
4312- create_table "spatial_ref_sys", :id => false, :force => true do |t|
4313- t.integer "srid", :null => false
4314- t.string "auth_name", :limit => 256
4315- t.integer "auth_srid"
4316- t.string "srtext", :limit => 2048
4317- t.string "proj4text", :limit => 2048
4318+ t.integer "from_user_id", null: false
4319+ t.integer "to_user_id", null: false
4320+ t.integer "thing_id", null: false
4321+ t.boolean "sent", default: false
4322 end
4323
4324- create_table "statuses", :force => true do |t|
4325- t.string "statusCode"
4326- t.text "reason"
4327- t.integer "user_id"
4328- t.integer "thing_id"
4329- t.datetime "created_at", :null => false
4330- t.datetime "updated_at", :null => false
4331- end
4332+ add_index "reminders", ["from_user_id"], name: "index_reminders_on_from_user_id", using: :btree
4333+ add_index "reminders", ["sent"], name: "index_reminders_on_sent", using: :btree
4334+ add_index "reminders", ["thing_id"], name: "index_reminders_on_thing_id", using: :btree
4335+ add_index "reminders", ["to_user_id"], name: "index_reminders_on_to_user_id", using: :btree
4336
4337- create_table "things", :force => true do |t|
4338+ create_table "things", force: :cascade do |t|
4339 t.datetime "created_at"
4340 t.datetime "updated_at"
4341 t.string "name"
4342- t.decimal "lat", :precision => 16, :scale => 14, :null => false
4343- t.decimal "lng", :precision => 17, :scale => 14, :null => false
4344+ t.decimal "lat", precision: 16, scale: 14, null: false
4345+ t.decimal "lng", precision: 17, scale: 14, null: false
4346 t.integer "city_id"
4347+ t.integer "user_id"
4348+ t.string "system_use_code"
4349 end
4350
4351- add_index "things", ["city_id"], :name => "index_things_on_city_id", :unique => true
4352-
4353- create_table "things_users", :id => false, :force => true do |t|
4354- t.integer "user_id"
4355- t.integer "thing_id"
4356- end
4357+ add_index "things", ["city_id"], name: "index_things_on_city_id", unique: true, using: :btree
4358
4359- create_table "users", :force => true do |t|
4360+ create_table "users", force: :cascade do |t|
4361 t.datetime "created_at"
4362 t.datetime "updated_at"
4363- t.string "name", :null => false
4364 t.string "organization"
4365- t.string "email", :default => "", :null => false
4366+ t.string "email", null: false
4367 t.string "voice_number"
4368 t.string "sms_number"
4369- t.boolean "admin", :default => false
4370- t.string "encrypted_password", :limit => 128, :default => "", :null => false
4371- t.string "reset_password_token"
4372- t.string "remember_token"
4373- t.datetime "remember_created_at"
4374- t.integer "sign_in_count", :default => 0
4375- t.datetime "current_sign_in_at"
4376- t.datetime "last_sign_in_at"
4377- t.string "current_sign_in_ip"
4378- t.string "last_sign_in_ip"
4379 t.string "address_1"
4380 t.string "address_2"
4381 t.string "city"
4382 t.string "state"
4383 t.string "zip"
4384+ t.boolean "admin", default: false
4385+ t.string "encrypted_password", default: "", null: false
4386+ t.string "reset_password_token"
4387 t.datetime "reset_password_sent_at"
4388- t.datetime "subscribed_at"
4389+ t.datetime "remember_created_at"
4390+ t.integer "sign_in_count", default: 0, null: false
4391+ t.datetime "current_sign_in_at"
4392+ t.datetime "last_sign_in_at"
4393+ t.string "current_sign_in_ip"
4394+ t.string "last_sign_in_ip"
4395+ t.string "first_name"
4396+ t.string "last_name"
4397 end
4398
4399- add_index "users", ["email"], :name => "index_users_on_email", :unique => true
4400- add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
4401+ add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
4402+ add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
4403
4404 end
4405diff -ru adopt-oakland/db/seeds.rb adopt-sf/db/seeds.rb
4406--- adopt-oakland/db/seeds.rb 2016-10-27 23:28:23.000000000 -0400
4407+++ adopt-sf/db/seeds.rb 2016-10-27 23:28:03.000000000 -0400
4408@@ -1,252 +1,17 @@
4409-require 'csv'
4410-require 'open-uri'
4411-
4412-
4413-
4414-# url = '/Users/eddie/Downloads/drainswgs84.csv'
4415-# url = 'http://data.openoakland.org/storage/f/2012-11-01T014902/Inlets.csv'
4416-url = 'http://data.openoakland.org/en/storage/f/2013-12-08T214045/drainswgs84.csv'
4417-
4418-# puts 'removing old things data'
4419-# Thing.destroy_all
4420-create_thing = 0
4421-update_thing = 0
4422-failed_update = 0
4423-nil_thing = 0
4424-puts 'connecting'
4425-open(url) do |f|
4426- puts 'downloading'
4427- f.each_line do |l|
4428- CSV.parse(l) do |row|
4429-
4430- if(row[0] == "OBJECTID_1")
4431- next
4432- else
4433- city_id = row[0].to_i
4434- lat = row[6].to_f
4435- lng = row[7].to_f
4436- puts "#{row} "
4437-
4438- if city_id > 1
4439-
4440-
4441-
4442- drain = Thing.find_by_city_id( city_id )
4443-
4444- puts "#{city_id} #{lng} #{lat}"
4445-
4446- if drain
4447- puts "UPDATING #{city_id} #{lng} #{lat} "
4448- update_thing = update_thing + 1
4449- else
4450- puts "CREATING NEW #{city_id} #{lng} #{lat} "
4451- drain = Thing.new({:city_id => city_id, :lng => lng, :lat => lat})
4452- create_thing = create_thing + 1
4453- end
4454-
4455-
4456- updated_successul = false
4457- if !lng.nil? && !lat.nil?
4458- drain.update_attributes({:lng => lng, :lat => lat})
4459- updated_successul = drain.save!
4460- else
4461- nil_thing = nil_thing + 1
4462-
4463- end
4464-
4465-
4466-
4467- if updated_successul
4468- puts "SAVED"
4469- else
4470- puts "FAILED"
4471- failed_update = failed_update + 1
4472- end
4473-
4474-
4475- end
4476- end
4477- end
4478- end
4479+User.where(email: 'john@example.com').first_or_initialize.tap do |user|
4480+ user.first_name = 'John'
4481+ user.last_name = 'Doe'
4482+ user.password = 'password'
4483 end
4484
4485-puts "Total created #{create_thing} and #{update_thing} updated, #{failed_update} failed and #{nil_thing} were nil"
4486+r = Random.new
4487
4488-
4489-# Thing.create(:city_id => 1, :lng => -157.74898782223062, :lat=> 21.376607020832314)
4490-# Thing.create(:city_id => 2, :lng => -157.83260982529868, :lat=> 21.44316202186285)
4491-# Thing.create(:city_id => 3, :lng => -157.92847782520883, :lat=> 21.375356017001515)
4492-# Thing.create(:city_id => 4, :lng => -157.93160082521447, :lat=> 21.384862017273573)
4493-# Thing.create(:city_id => 5, :lng => -157.75111682330962, :lat=> 21.4261480229591)
4494-# Thing.create(:city_id => 6, :lng => -157.85067582165888, :lat=> 21.290883014655773)
4495-# Thing.create(:city_id => 7, :lng => -157.8321548213673, :lat=> 21.28912701501561)
4496-# Thing.create(:city_id => 8, :lng => -157.84043682093125, :lat=> 21.2828820146399)
4497-# Thing.create(:city_id => 9, :lng => -157.8461798226548, :lat=> 21.34414801740725)
4498-# Thing.create(:city_id => 10, :lng => -157.9101168243043, :lat=> 21.35915801667744)
4499-# Thing.create(:city_id => 11, :lng => -157.91368982433966, :lat=> 21.365030016584047)
4500-# Thing.create(:city_id => 12, :lng => -158.11012782689667, :lat=> 21.3231000102485)
4501-# Thing.create(:city_id => 13, :lng => -157.71133482131077, :lat=> 21.376248021485782)
4502-# Thing.create(:city_id => 14, :lng => -157.71622082087887, :lat=> 21.358244020940564)
4503-# Thing.create(:city_id => 15, :lng => -157.843143822069, :lat=> 21.32076001619144)
4504-# Thing.create(:city_id => 16, :lng => -158.22406683573888, :lat=> 21.577878019617877)
4505-# Thing.create(:city_id => 17, :lng => -157.90418582495636, :lat=> 21.388264018119706)
4506-# Thing.create(:city_id => 18, :lng => -158.10009782648797, :lat=> 21.308143009715533)
4507-# Thing.create(:city_id => 19, :lng => -157.79582882326815, :lat=> 21.40411802098645)
4508-# Thing.create(:city_id => 20, :lng => -157.75538982259908, :lat=> 21.40366502201616)
4509-# Thing.create(:city_id => 21, :lng => -157.994118826769, :lat=> 21.409028016575462)
4510-# Thing.create(:city_id => 22, :lng => -157.81234081986355, :lat=> 21.256238013877024)
4511-# Thing.create(:city_id => 23, :lng => -158.21779483543156, :lat=> 21.577765019680786)
4512-# Thing.create(:city_id => 24, :lng => -157.79435481970012, :lat=> 21.268150015055905)
4513-# Thing.create(:city_id => 25, :lng => -157.82160482136467, :lat=> 21.296877015457156)
4514-# Thing.create(:city_id => 26, :lng => -158.01948182682628, :lat=> 21.38003601492668)
4515-# Thing.create(:city_id => 27, :lng => -158.01373082505435, :lat=> 21.31599401218161)
4516-# Thing.create(:city_id => 28, :lng => -158.03355982594744, :lat=> 21.34514501322552)
4517-# Thing.create(:city_id => 29, :lng => -158.02361582970087, :lat=> 21.49873602006822)
4518-# Thing.create(:city_id => 30, :lng => -157.8322488210979, :lat=> 21.28242101499991)
4519-# Thing.create(:city_id => 31, :lng => -157.79617581994086, :lat=> 21.259485014564294)
4520-# Thing.create(:city_id => 32, :lng => -157.88092882305372, :lat=> 21.339637016274896)
4521-# Thing.create(:city_id => 33, :lng => -157.87718582357948, :lat=> 21.35031401673813)
4522-# Thing.create(:city_id => 34, :lng => -157.7087988189692, :lat=> 21.295935017970496)
4523-# Thing.create(:city_id => 35, :lng => -158.1038018339511, :lat=> 21.600452023316592)
4524-# Thing.create(:city_id => 36, :lng => -158.10391883350616, :lat=> 21.58411702262625)
4525-# Thing.create(:city_id => 37, :lng => -157.6964498181775, :lat=> 21.274650017721303)
4526-# Thing.create(:city_id => 38, :lng => -157.91192483045373, :lat=> 21.613120028166456)
4527-# Thing.create(:city_id => 39, :lng => -157.809880824759, :lat=> 21.443964022766856)
4528-# Thing.create(:city_id => 40, :lng => -157.80985682416656, :lat=> 21.418354021260043)
4529-# Thing.create(:city_id => 41, :lng => -158.0187138308728, :lat=> 21.535475022203023)
4530-# Thing.create(:city_id => 42, :lng => -157.95290482465077, :lat=> 21.34174101470715)
4531-# Thing.create(:city_id => 43, :lng => -157.95586182403216, :lat=> 21.320893013539422)
4532-# Thing.create(:city_id => 44, :lng => -157.94165282440127, :lat=> 21.33671701481102)
4533-# Thing.create(:city_id => 45, :lng => -157.93241882383276, :lat=> 21.334976014734213)
4534-# Thing.create(:city_id => 46, :lng => -157.9608628245134, :lat=> 21.33610801416671)
4535-# Thing.create(:city_id => 47, :lng => -157.9616758240671, :lat=> 21.3262770136546)
4536-# Thing.create(:city_id => 48, :lng => -157.9356038238304, :lat=> 21.318621014141154)
4537-# Thing.create(:city_id => 49, :lng => -158.10570882742553, :lat=> 21.341345011002286)
4538-# Thing.create(:city_id => 50, :lng => -157.86818582257328, :lat=> 21.320691015531366)
4539-# Thing.create(:city_id => 51, :lng => -157.90697882348084, :lat=> 21.33183801541621)
4540-# Thing.create(:city_id => 52, :lng => -157.9135758236346, :lat=> 21.333161015065652)
4541-# Thing.create(:city_id => 53, :lng => -157.8549128220964, :lat=> 21.30432101504991)
4542-# Thing.create(:city_id => 54, :lng => -158.02778682653891, :lat=> 21.36314001383917)
4543-# Thing.create(:city_id => 55, :lng => -157.97687982427408, :lat=> 21.32304301347066)
4544-# Thing.create(:city_id => 56, :lng => -157.84150782582262, :lat=> 21.45931802271594)
4545-# Thing.create(:city_id => 57, :lng => -157.87634982862264, :lat=> 21.558734026080284)
4546-# Thing.create(:city_id => 58, :lng => -158.13000582800763, :lat=> 21.352261011126284)
4547-# Thing.create(:city_id => 59, :lng => -157.94790283263714, :lat=> 21.676660030011078)
4548-# Thing.create(:city_id => 60, :lng => -157.72633082215856, :lat=> 21.396294022466314)
4549-# Thing.create(:city_id => 61, :lng => -157.74026282215934, :lat=> 21.39574502173133)
4550-# Thing.create(:city_id => 62, :lng => -157.7300948215248, :lat=> 21.370650021011514)
4551-# Thing.create(:city_id => 63, :lng => -157.74954182313948, :lat=> 21.41290902240102)
4552-# Thing.create(:city_id => 64, :lng => -157.845896827792, :lat=> 21.544900026440732)
4553-# Thing.create(:city_id => 65, :lng => -157.87834582288363, :lat=> 21.32783901583794)
4554-# Thing.create(:city_id => 66, :lng => -157.86118982312033, :lat=> 21.351972017133857)
4555-# Thing.create(:city_id => 67, :lng => -157.87227382314913, :lat=> 21.334155016363432)
4556-# Thing.create(:city_id => 68, :lng => -157.68445981870823, :lat=> 21.293361018510986)
4557-# Thing.create(:city_id => 69, :lng => -157.75683082394616, :lat=> 21.447908023669775)
4558-# Thing.create(:city_id => 70, :lng => -157.81725482032934, :lat=> 21.27515801483637)
4559-# Thing.create(:city_id => 71, :lng => -157.80369282025674, :lat=> 21.27657801503768)
4560-# Thing.create(:city_id => 72, :lng => -158.0647048268991, :lat=> 21.349226012593128)
4561-# Thing.create(:city_id => 73, :lng => -157.80319182388092, :lat=> 21.407617021281787)
4562-# Thing.create(:city_id => 74, :lng => -157.75568381937035, :lat=> 21.278311016489358)
4563-# Thing.create(:city_id => 75, :lng => -158.0739128341717, :lat=> 21.62733602534101)
4564-# Thing.create(:city_id => 76, :lng => -158.08982483413348, :lat=> 21.613963024208562)
4565-# Thing.create(:city_id => 77, :lng => -158.0078448344824, :lat=> 21.695416029877496)
4566-# Thing.create(:city_id => 78, :lng => -157.80271582359893, :lat=> 21.399295020525663)
4567-# Thing.create(:city_id => 79, :lng => -157.85795282154297, :lat=> 21.294624014740002)
4568-# Thing.create(:city_id => 80, :lng => -157.80739882451016, :lat=> 21.427984021889692)
4569-# Thing.create(:city_id => 81, :lng => -158.01268682889688, :lat=> 21.460383018619094)
4570-# Thing.create(:city_id => 82, :lng => -157.85055582135453, :lat=> 21.297385015068834)
4571-# Thing.create(:city_id => 83, :lng => -157.83472282726564, :lat=> 21.526015025442213)
4572-# Thing.create(:city_id => 84, :lng => -157.72445281964025, :lat=> 21.295102017846556)
4573-# Thing.create(:city_id => 85, :lng => -158.06447182949844, :lat=> 21.461427017522674)
4574-# Thing.create(:city_id => 86, :lng => -158.0519738299445, :lat=> 21.475950018505653)
4575-# Thing.create(:city_id => 87, :lng => -157.83214482529525, :lat=> 21.45939702289368)
4576-# Thing.create(:city_id => 88, :lng => -157.7135378219587, :lat=> 21.388976022461602)
4577-# Thing.create(:city_id => 89, :lng => -158.01077982968604, :lat=> 21.498587020417453)
4578-# Thing.create(:city_id => 90, :lng => -158.17845583067609, :lat=> 21.424877013505082)
4579-# Thing.create(:city_id => 91, :lng => -158.17699783010798, :lat=> 21.404381012424786)
4580-# Thing.create(:city_id => 92, :lng => -158.196644832502, :lat=> 21.4752320152021)
4581-# Thing.create(:city_id => 93, :lng => -158.0835458272797, :lat=> 21.348993012026142)
4582-# Thing.create(:city_id => 94, :lng => -157.83750682147138, :lat=> 21.302775015747844)
4583-# Thing.create(:city_id => 95, :lng => -158.20611183223983, :lat=> 21.45979301453494)
4584-# Thing.create(:city_id => 96, :lng => -157.79011682079684, :lat=> 21.295470016522497)
4585-# Thing.create(:city_id => 97, :lng => -157.71603781878292, :lat=> 21.283257017424443)
4586-# Thing.create(:city_id => 98, :lng => -157.76356982235515, :lat=> 21.37254202059158)
4587-# Thing.create(:city_id => 99, :lng => -158.01522782827166, :lat=> 21.451293018202275)
4588-# Thing.create(:city_id => 100, :lng => -157.98983882843382, :lat=> 21.471167019577646)
4589-# Thing.create(:city_id => 101, :lng => -157.99885982831643, :lat=> 21.463277019229132)
4590-# Thing.create(:city_id => 102, :lng => -158.00645882895915, :lat=> 21.47088901933723)
4591-# Thing.create(:city_id => 103, :lng => -157.99672182900528, :lat=> 21.479559020205272)
4592-# Thing.create(:city_id => 104, :lng => -158.01887182820258, :lat=> 21.43231801727201)
4593-# Thing.create(:city_id => 105, :lng => -158.0143588290843, :lat=> 21.48198901944057)
4594-# Thing.create(:city_id => 106, :lng => -157.8902628236568, :lat=> 21.349338016466824)
4595-# Thing.create(:city_id => 107, :lng => -157.88046282397227, :lat=> 21.37424101763897)
4596-# Thing.create(:city_id => 108, :lng => -157.77135582325556, :lat=> 21.410547021858594)
4597-# Thing.create(:city_id => 109, :lng => -158.19669383494892, :lat=> 21.58087402044294)
4598-# Thing.create(:city_id => 110, :lng => -158.1512158341522, :lat=> 21.57340702075577)
4599-# Thing.create(:city_id => 111, :lng => -158.18046183454405, :lat=> 21.579834020437964)
4600-# Thing.create(:city_id => 112, :lng => -158.1426468289115, :lat=> 21.378572011948677)
4601-# Thing.create(:city_id => 113, :lng => -158.15981782945417, :lat=> 21.394275012640936)
4602-# Thing.create(:city_id => 114, :lng => -157.9094558251303, :lat=> 21.39477701826225)
4603-# Thing.create(:city_id => 115, :lng => -158.07360882546814, :lat=> 21.299189009743564)
4604-# Thing.create(:city_id => 116, :lng => -157.8327688223107, :lat=> 21.342877017412988)
4605-# Thing.create(:city_id => 117, :lng => -157.9520558266261, :lat=> 21.42574301853092)
4606-# Thing.create(:city_id => 118, :lng => -157.79689882075843, :lat=> 21.299517016144886)
4607-# Thing.create(:city_id => 119, :lng => -157.9694428262645, :lat=> 21.393374016645687)
4608-# Thing.create(:city_id => 120, :lng => -157.96301582625452, :lat=> 21.402912017268495)
4609-# Thing.create(:city_id => 121, :lng => -157.95582882669225, :lat=> 21.415251017883918)
4610-# Thing.create(:city_id => 122, :lng => -157.8788028225911, :lat=> 21.320769015416566)
4611-# Thing.create(:city_id => 123, :lng => -157.92233583137326, :lat=> 21.636515028602346)
4612-# Thing.create(:city_id => 124, :lng => -157.99820782452016, :lat=> 21.314119012371098)
4613-# Thing.create(:city_id => 125, :lng => -157.87585142246277, :lat=> 21.56928305686768)
4614-# Thing.create(:city_id => 126, :lng => -157.88335982928228, :lat=> 21.577647026730236)
4615-# Thing.create(:city_id => 127, :lng => -158.04663283393126, :lat=> 21.64552502662107)
4616-# Thing.create(:city_id => 128, :lng => -157.8246358213948, :lat=> 21.31030101608435)
4617-# Thing.create(:city_id => 129, :lng => -158.1330238339621, :lat=> 21.581169021905904)
4618-# Thing.create(:city_id => 130, :lng => -157.89957142357613, :lat=> 21.603323058055302)
4619-# Thing.create(:city_id => 131, :lng => -157.91047582414865, :lat=> 21.352961016285786)
4620-# Thing.create(:city_id => 132, :lng => -157.88722682321992, :lat=> 21.328377015388227)
4621-# Thing.create(:city_id => 133, :lng => -157.87128082224936, :lat=> 21.30311401501926)
4622-# Thing.create(:city_id => 134, :lng => -157.67354781829516, :lat=> 21.28831601863615)
4623-# Thing.create(:city_id => 135, :lng => -158.05870283034758, :lat=> 21.499077019254226)
4624-# Thing.create(:city_id => 136, :lng => -158.04929483019527, :lat=> 21.48773001897003)
4625-# Thing.create(:city_id => 137, :lng => -158.06195983032302, :lat=> 21.489631018941324)
4626-# Thing.create(:city_id => 138, :lng => -158.080082830953, :lat=> 21.491899018696458)
4627-# Thing.create(:city_id => 139, :lng => -158.07019983092889, :lat=> 21.501769019235088)
4628-# Thing.create(:city_id => 140, :lng => -157.66153357545718, :lat=> 21.311734787240624)
4629-# Thing.create(:city_id => 141, :lng => -157.88982282360212, :lat=> 21.336857015856182)
4630-# Thing.create(:city_id => 142, :lng => -158.0631398340273, :lat=> 21.646076026298616)
4631-# Thing.create(:city_id => 143, :lng => -158.04004283456464, :lat=> 21.674241028026643)
4632-# Thing.create(:city_id => 144, :lng => -158.05160383434702, :lat=> 21.66341002720093)
4633-# Thing.create(:city_id => 145, :lng => -157.85265682835822, :lat=> 21.55599902655402)
4634-# Thing.create(:city_id => 146, :lng => -157.89665882389028, :lat=> 21.35976001659018)
4635-# Thing.create(:city_id => 147, :lng => -157.88473082409124, :lat=> 21.3656500174639)
4636-# Thing.create(:city_id => 148, :lng => -157.98661583388738, :lat=> 21.697613030142982)
4637-# Thing.create(:city_id => 149, :lng => -158.02784082743034, :lat=> 21.389938014933648)
4638-# Thing.create(:city_id => 150, :lng => -157.99563282983857, :lat=> 21.509711021468043)
4639-# Thing.create(:city_id => 151, :lng => -157.77757281971574, :lat=> 21.27049301559295)
4640-# Thing.create(:city_id => 152, :lng => -158.12391783381614, :lat=> 21.576042021558642)
4641-# Thing.create(:city_id => 153, :lng => -158.19220083164953, :lat=> 21.450976014465105)
4642-# Thing.create(:city_id => 154, :lng => -158.2011158318622, :lat=> 21.45685601444641)
4643-# Thing.create(:city_id => 155, :lng => -158.18469183120425, :lat=> 21.437443013927464)
4644-# Thing.create(:city_id => 156, :lng => -157.84521582644632, :lat=> 21.483165023383712)
4645-# Thing.create(:city_id => 157, :lng => -157.75456981965175, :lat=> 21.293383017135724)
4646-# Thing.create(:city_id => 158, :lng => -157.94906082582506, :lat=> 21.390490017165284)
4647-# Thing.create(:city_id => 159, :lng => -157.73942982074732, :lat=> 21.34259401980951)
4648-# Thing.create(:city_id => 160, :lng => -157.69488782005618, :lat=> 21.331240019963758)
4649-# Thing.create(:city_id => 161, :lng => -157.7149768202957, :lat=> 21.342226020236374)
4650-# Thing.create(:city_id => 162, :lng => -158.06830683422734, :lat=> 21.633542025295704)
4651-# Thing.create(:city_id => 163, :lng => -157.9947748264404, :lat=> 21.389103015915467)
4652-# Thing.create(:city_id => 164, :lng => -157.99972682741034, :lat=> 21.41751801731743)
4653-# Thing.create(:city_id => 165, :lng => -158.01945083005862, :lat=> 21.510946021049175)
4654-# Thing.create(:city_id => 166, :lng => -157.78429982008112, :lat=> 21.281191015653494)
4655-# Thing.create(:city_id => 167, :lng => -157.80305482135455, :lat=> 21.316619017048804)
4656-# Thing.create(:city_id => 168, :lng => -157.70420151822051, :lat=> 21.26312934688229)
4657-# Thing.create(:city_id => 169, :lng => -157.68383481898852, :lat=> 21.306896019196543)
4658-# Thing.create(:city_id => 170, :lng => -158.03283482553962, :lat=> 21.329912682456115)
4659-# Thing.create(:city_id => 171, :lng => -158.17710153050268, :lat=> 21.416179343209556)
4660-# Thing.create(:city_id => 172, :lng => -158.07565152660166, :lat=> 21.333712681485853)
4661-# Thing.create(:city_id => 173, :lng => -158.05665152554553, :lat=> 21.305562680724595)
4662-# Thing.create(:city_id => 174, :lng => -157.92276813168795, :lat=> 21.64734602947919)
4663-# Thing.create(:city_id => 175, :lng => -158.22261813326296, :lat=> 21.47887601489222)
4664-# Thing.create(:city_id => 176, :lng => -158.2162848324896, :lat=> 21.470246014598548)
4665-# Thing.create(:city_id => 177, :lng => -158.01736615525047, :lat=> 21.33226754604477)
4666+500.times do |i|
4667+ Thing.where(city_id: i).first_or_initialize.tap do |thing|
4668+ thing.name = "Some Drain #{i}"
4669+ thing.lat = r.rand(37.75..37.78)
4670+ thing.lng = r.rand(-122.43..-122.41)
4671+ thing.system_use_code = ['MS4', 'STORM', 'COMB', 'UNK'].sample
4672+ thing.save!
4673+ end
4674+end
4675Only in adopt-oakland/lib/assets: .gitkeep
4676Only in adopt-sf/lib/assets: .keep
4677Only in adopt-oakland/lib/tasks: .gitkeep
4678Only in adopt-sf/lib/tasks: .keep
4679Only in adopt-sf/lib/tasks: data.rake
4680Only in adopt-oakland/lib/tasks: scheduler.rake
4681Only in adopt-oakland/log: .gitkeep
4682Only in adopt-sf/log: .keep
4683diff -ru adopt-oakland/public/404.html adopt-sf/public/404.html
4684--- adopt-oakland/public/404.html 2016-10-27 23:28:23.000000000 -0400
4685+++ adopt-sf/public/404.html 2016-10-27 23:28:03.000000000 -0400
4686@@ -2,25 +2,66 @@
4687 <html>
4688 <head>
4689 <title>The page you were looking for doesn't exist (404)</title>
4690- <style type="text/css">
4691- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
4692- div.dialog {
4693- width: 25em;
4694- padding: 0 4em;
4695- margin: 4em auto 0 auto;
4696- border: 1px solid #ccc;
4697- border-right-color: #999;
4698- border-bottom-color: #999;
4699- }
4700- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
4701+ <meta name="viewport" content="width=device-width,initial-scale=1">
4702+ <style>
4703+ body {
4704+ background-color: #EFEFEF;
4705+ color: #2E2F30;
4706+ text-align: center;
4707+ font-family: arial, sans-serif;
4708+ margin: 0;
4709+ }
4710+
4711+ div.dialog {
4712+ width: 95%;
4713+ max-width: 33em;
4714+ margin: 4em auto 0;
4715+ }
4716+
4717+ div.dialog > div {
4718+ border: 1px solid #CCC;
4719+ border-right-color: #999;
4720+ border-left-color: #999;
4721+ border-bottom-color: #BBB;
4722+ border-top: #B00100 solid 4px;
4723+ border-top-left-radius: 9px;
4724+ border-top-right-radius: 9px;
4725+ background-color: white;
4726+ padding: 7px 12% 0;
4727+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
4728+ }
4729+
4730+ h1 {
4731+ font-size: 100%;
4732+ color: #730E15;
4733+ line-height: 1.5em;
4734+ }
4735+
4736+ div.dialog > p {
4737+ margin: 0 0 1em;
4738+ padding: 1em;
4739+ background-color: #F7F7F7;
4740+ border: 1px solid #CCC;
4741+ border-right-color: #999;
4742+ border-left-color: #999;
4743+ border-bottom-color: #999;
4744+ border-bottom-left-radius: 4px;
4745+ border-bottom-right-radius: 4px;
4746+ border-top-color: #DADADA;
4747+ color: #666;
4748+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
4749+ }
4750 </style>
4751 </head>
4752
4753 <body>
4754 <!-- This file lives in public/404.html -->
4755 <div class="dialog">
4756- <h1>The page you were looking for doesn't exist.</h1>
4757- <p>You may have mistyped the address or the page may have moved.</p>
4758+ <div>
4759+ <h1>The page you were looking for doesn't exist.</h1>
4760+ <p>You may have mistyped the address or the page may have moved.</p>
4761+ </div>
4762+ <p>If you are the application owner check the logs for more information.</p>
4763 </div>
4764 </body>
4765 </html>
4766diff -ru adopt-oakland/public/422.html adopt-sf/public/422.html
4767--- adopt-oakland/public/422.html 2016-10-27 23:28:23.000000000 -0400
4768+++ adopt-sf/public/422.html 2016-10-27 23:28:03.000000000 -0400
4769@@ -2,25 +2,66 @@
4770 <html>
4771 <head>
4772 <title>The change you wanted was rejected (422)</title>
4773- <style type="text/css">
4774- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
4775- div.dialog {
4776- width: 25em;
4777- padding: 0 4em;
4778- margin: 4em auto 0 auto;
4779- border: 1px solid #ccc;
4780- border-right-color: #999;
4781- border-bottom-color: #999;
4782- }
4783- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
4784+ <meta name="viewport" content="width=device-width,initial-scale=1">
4785+ <style>
4786+ body {
4787+ background-color: #EFEFEF;
4788+ color: #2E2F30;
4789+ text-align: center;
4790+ font-family: arial, sans-serif;
4791+ margin: 0;
4792+ }
4793+
4794+ div.dialog {
4795+ width: 95%;
4796+ max-width: 33em;
4797+ margin: 4em auto 0;
4798+ }
4799+
4800+ div.dialog > div {
4801+ border: 1px solid #CCC;
4802+ border-right-color: #999;
4803+ border-left-color: #999;
4804+ border-bottom-color: #BBB;
4805+ border-top: #B00100 solid 4px;
4806+ border-top-left-radius: 9px;
4807+ border-top-right-radius: 9px;
4808+ background-color: white;
4809+ padding: 7px 12% 0;
4810+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
4811+ }
4812+
4813+ h1 {
4814+ font-size: 100%;
4815+ color: #730E15;
4816+ line-height: 1.5em;
4817+ }
4818+
4819+ div.dialog > p {
4820+ margin: 0 0 1em;
4821+ padding: 1em;
4822+ background-color: #F7F7F7;
4823+ border: 1px solid #CCC;
4824+ border-right-color: #999;
4825+ border-left-color: #999;
4826+ border-bottom-color: #999;
4827+ border-bottom-left-radius: 4px;
4828+ border-bottom-right-radius: 4px;
4829+ border-top-color: #DADADA;
4830+ color: #666;
4831+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
4832+ }
4833 </style>
4834 </head>
4835
4836 <body>
4837 <!-- This file lives in public/422.html -->
4838 <div class="dialog">
4839- <h1>The change you wanted was rejected.</h1>
4840- <p>Maybe you tried to change something you didn't have access to.</p>
4841+ <div>
4842+ <h1>The change you wanted was rejected.</h1>
4843+ <p>Maybe you tried to change something you didn't have access to.</p>
4844+ </div>
4845+ <p>If you are the application owner check the logs for more information.</p>
4846 </div>
4847 </body>
4848 </html>
4849diff -ru adopt-oakland/public/500.html adopt-sf/public/500.html
4850--- adopt-oakland/public/500.html 2016-10-27 23:28:23.000000000 -0400
4851+++ adopt-sf/public/500.html 2016-10-27 23:28:03.000000000 -0400
4852@@ -2,24 +2,65 @@
4853 <html>
4854 <head>
4855 <title>We're sorry, but something went wrong (500)</title>
4856- <style type="text/css">
4857- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
4858- div.dialog {
4859- width: 25em;
4860- padding: 0 4em;
4861- margin: 4em auto 0 auto;
4862- border: 1px solid #ccc;
4863- border-right-color: #999;
4864- border-bottom-color: #999;
4865- }
4866- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
4867+ <meta name="viewport" content="width=device-width,initial-scale=1">
4868+ <style>
4869+ body {
4870+ background-color: #EFEFEF;
4871+ color: #2E2F30;
4872+ text-align: center;
4873+ font-family: arial, sans-serif;
4874+ margin: 0;
4875+ }
4876+
4877+ div.dialog {
4878+ width: 95%;
4879+ max-width: 33em;
4880+ margin: 4em auto 0;
4881+ }
4882+
4883+ div.dialog > div {
4884+ border: 1px solid #CCC;
4885+ border-right-color: #999;
4886+ border-left-color: #999;
4887+ border-bottom-color: #BBB;
4888+ border-top: #B00100 solid 4px;
4889+ border-top-left-radius: 9px;
4890+ border-top-right-radius: 9px;
4891+ background-color: white;
4892+ padding: 7px 12% 0;
4893+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
4894+ }
4895+
4896+ h1 {
4897+ font-size: 100%;
4898+ color: #730E15;
4899+ line-height: 1.5em;
4900+ }
4901+
4902+ div.dialog > p {
4903+ margin: 0 0 1em;
4904+ padding: 1em;
4905+ background-color: #F7F7F7;
4906+ border: 1px solid #CCC;
4907+ border-right-color: #999;
4908+ border-left-color: #999;
4909+ border-bottom-color: #999;
4910+ border-bottom-left-radius: 4px;
4911+ border-bottom-right-radius: 4px;
4912+ border-top-color: #DADADA;
4913+ color: #666;
4914+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
4915+ }
4916 </style>
4917 </head>
4918
4919 <body>
4920 <!-- This file lives in public/500.html -->
4921 <div class="dialog">
4922- <h1>We're sorry, but something went wrong.</h1>
4923+ <div>
4924+ <h1>We're sorry, but something went wrong.</h1>
4925+ </div>
4926+ <p>If you are the application owner check the logs for more information.</p>
4927 </div>
4928 </body>
4929 </html>
4930Binary files adopt-oakland/public/favicon.ico and adopt-sf/public/favicon.ico differ
4931diff -ru adopt-oakland/public/robots.txt adopt-sf/public/robots.txt
4932--- adopt-oakland/public/robots.txt 2016-10-27 23:28:23.000000000 -0400
4933+++ adopt-sf/public/robots.txt 2016-10-27 23:28:03.000000000 -0400
4934@@ -1,5 +1,5 @@
4935-# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
4936+# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
4937 #
4938 # To ban all spiders from the entire site uncomment the next two lines:
4939-# User-Agent: *
4940+# User-agent: *
4941 # Disallow: /
4942Binary files adopt-oakland/screenshot.png and adopt-sf/screenshot.png differ
4943diff -ru adopt-oakland/script/rails adopt-sf/script/rails
4944--- adopt-oakland/script/rails 2016-10-27 23:28:23.000000000 -0400
4945+++ adopt-sf/script/rails 2016-10-27 23:28:03.000000000 -0400
4946@@ -1,6 +1,6 @@
4947 #!/usr/bin/env ruby
4948 # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
4949
4950-APP_PATH = File.expand_path('../../config/application', __FILE__)
4951-require File.expand_path('../../config/boot', __FILE__)
4952+APP_PATH = File.expand_path('../../config/application', __FILE__)
4953+require File.expand_path('../../config/boot', __FILE__)
4954 require 'rails/commands'
4955Only in adopt-sf/test: controllers
4956Only in adopt-oakland/test/fixtures: .gitkeep
4957Only in adopt-sf/test/fixtures: .keep
4958Only in adopt-sf/test/fixtures: city_hall.json
4959Only in adopt-oakland/test/fixtures: city_hall.kml
4960diff -ru adopt-oakland/test/fixtures/things.yml adopt-sf/test/fixtures/things.yml
4961--- adopt-oakland/test/fixtures/things.yml 2016-10-27 23:28:23.000000000 -0400
4962+++ adopt-sf/test/fixtures/things.yml 2016-10-27 23:28:03.000000000 -0400
4963@@ -3,12 +3,15 @@
4964 city_id: 1
4965 lat: 42.383339
4966 lng: -71.049226
4967+ name: ""
4968+ system_use_code: 'ABC'
4969
4970 thing_2:
4971 city_id: 2,
4972 lat: 42.381021
4973 lng: -71.075964
4974
4975+
4976 thing_3:
4977 city_id: 3
4978 lat: 42.380106
4979Only in adopt-sf/test/fixtures: unknown_address.json
4980Only in adopt-oakland/test/fixtures: unknown_address.kml
4981diff -ru adopt-oakland/test/fixtures/users.yml adopt-sf/test/fixtures/users.yml
4982--- adopt-oakland/test/fixtures/users.yml 2016-10-27 23:28:23.000000000 -0400
4983+++ adopt-sf/test/fixtures/users.yml 2016-10-27 23:28:03.000000000 -0400
4984@@ -1,6 +1,7 @@
4985 ---
4986 erik:
4987- name: Erik Michaels-Ober
4988+ first_name: Erik
4989+ last_name: Michaels-Ober
4990 organization: Code for America
4991 email: erik@example.com
4992 voice_number: 1234567890
4993@@ -8,10 +9,20 @@
4994 encrypted_password: "$2a$10$KF/JMZ494ZLhWLgHZeBTf.cSL4l0Wjij4gIZP7BzkueAC1p4nW0ma"
4995
4996 dan:
4997- name: Dan Melton
4998+ first_name: Dan
4999+ last_name: Melton
5000 organization: Code for America
5001 email: dan@example.com
5002 voice_number: 1234567890
5003 sms_number: 1234567890
5004 encrypted_password: "$2a$10$KF/JMZ494ZLhWLgHZeBTf.cSL4l0Wjij4gIZP7BzkueAC1p4nW0ma"
5005
5006+admin:
5007+ first_name: Admin
5008+ last_name: User
5009+ organization: Code for America
5010+ email: admin@example.com
5011+ voice_number: 1234567890
5012+ sms_number: 1234567890
5013+ encrypted_password: "$2a$10$KF/JMZ494ZLhWLgHZeBTf.cSL4l0Wjij4gIZP7BzkueAC1p4nW0ma"
5014+ admin: true
5015Only in adopt-oakland/test/functional: addresses_controller_test.rb
5016Only in adopt-oakland/test/functional: info_window_controller_test.rb
5017Only in adopt-oakland/test/functional: main_controller_test.rb
5018Only in adopt-oakland/test/functional: passwords_controller_test.rb
5019Only in adopt-oakland/test/functional: reminders_controller_test.rb
5020Only in adopt-oakland/test/functional: sessions_controller_test.rb
5021Only in adopt-oakland/test/functional: sitemaps_controller_test.rb
5022Only in adopt-oakland/test/functional: things_controller_test.rb
5023Only in adopt-oakland/test/functional: users_controller_test.rb
5024Only in adopt-sf/test: helpers
5025Only in adopt-oakland/test/integration: .gitkeep
5026Only in adopt-sf/test/integration: .keep
5027Only in adopt-sf/test: mailers
5028Only in adopt-sf/test: models
5029Only in adopt-oakland/test: performance
5030diff -ru adopt-oakland/test/test_helper.rb adopt-sf/test/test_helper.rb
5031--- adopt-oakland/test/test_helper.rb 2016-10-27 23:28:23.000000000 -0400
5032+++ adopt-sf/test/test_helper.rb 2016-10-27 23:28:03.000000000 -0400
5033@@ -1,16 +1,28 @@
5034-ENV["RAILS_ENV"] = "test"
5035+ENV['RAILS_ENV'] ||= 'test'
5036+
5037 require 'simplecov'
5038-SimpleCov.start 'rails'
5039+require 'coveralls'
5040+require 'minitest/mock'
5041+
5042+SimpleCov.formatters = [SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter]
5043+SimpleCov.start('rails') do
5044+ minimum_coverage(97)
5045+end
5046+
5047 require File.expand_path('../../config/environment', __FILE__)
5048 require 'rails/test_help'
5049-require 'webmock/test_unit'
5050+require 'webmock/minitest'
5051+
5052+module ActiveSupport
5053+ class TestCase
5054+ ActiveRecord::Migration.check_pending!
5055
5056-class ActiveSupport::TestCase
5057- # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
5058- #
5059- # Note: You'll currently still have to declare fixtures explicitly in integration tests
5060- # -- they do not yet inherit this setting
5061- fixtures :all
5062+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
5063+ #
5064+ # Note: You'll currently still have to declare fixtures explicitly in integration tests
5065+ # -- they do not yet inherit this setting
5066+ fixtures :all
5067
5068- # Add more helper methods to be used by all tests here...
5069+ # Add more helper methods to be used by all tests here...
5070+ end
5071 end
5072Only in adopt-oakland/test: unit
5073Only in adopt-sf: vendor