Compare commits

..

6 Commits

Author SHA1 Message Date
Godwin
b956a97461 Merge branch 'development' of https://github.com/bikebike/BikeBike into development 2017-09-06 19:11:22 -07:00
Godwin
dc92aa9013 Added i18n debugging 2017-09-06 19:11:10 -07:00
Godwin
f7000e41fa Added a text-shadow to survey numbers 2017-09-06 14:37:10 -07:00
Godwin
a54546976d Fixed failing tests 2017-09-04 20:25:22 -07:00
Godwin
95db14ad5e Updated location cache 2017-09-04 19:01:43 -07:00
Godwin
b4685a972e Moved to JSON location cache 2017-09-04 18:46:36 -07:00
58 changed files with 653 additions and 2562 deletions

1
.gitattributes vendored
View File

@ -1 +0,0 @@
*.tar.gz filter=lfs diff=lfs merge=lfs -text

9
.gitignore vendored
View File

@ -8,9 +8,7 @@
!.openshift
*~
# Docker.gitignore
.env
bike_bike_advanced_environment
# OSX.gitignore
.DS_Store
@ -81,7 +79,4 @@ brakeman.html
/config/settings/local.rb
/nbproject/private/
/config/database.yml
# Ignore node_module & public/stylesheets
node_modules/*
public/stylesheets
/config/app_config.yml

View File

@ -1,35 +0,0 @@
############
# BikeBike #
############
FROM ruby:2.5
MAINTAINER Jonathan Rosenbaum <bike@bikelover.org>
COPY . /app/BikeBike
RUN apt-get update && apt-get install -y nodejs postgresql-client vim less git-lfs
RUN curl -fsSL https://get.pnpm.io/install.sh | bash - && /root/.local/share/pnpm/pnpm add browserslist
# Note: phantomjs has been deprecated in favor of headless chrome
WORKDIR /app/BikeBike
RUN mkdir -p public/stylesheets/application \
-p public/stylesheets/web-fonts \
-p public/stylesheets/admin \
&& tar xvfz bumbleberry-application.tar.gz -C public/stylesheets/application \
&& tar xvfz bumbleberry-web-fonts.tar.gz -C public/stylesheets/web-fonts \
&& tar xvfz bumbleberry-admin.tar.gz -C public/stylesheets/admin \
&& /app/BikeBike/caniuse.js
RUN bundle install
# Add a script to be executed every time the container starts.
COPY entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 3000
# Configure the main process to run when running the image
CMD ["rails", "server", "-b", "0.0.0.0"]

16
Gemfile
View File

@ -1,9 +1,9 @@
source 'http://rubygems.org'
gem 'rails', '4.2.8'
gem 'pg', '0.21.0'
gem 'rake', '12.3.3'
gem 'ruby_dep', '1.4' # Lock at 1.3.1 since 1.4 requires ruby 2.5. We should unlock once we upgrade the ruby version on our server
gem 'rails', '4.2.0'
gem 'pg'
gem 'rake', '11.1.2'
gem 'ruby_dep', '1.3.1' # Lock at 1.3.1 since 1.4 requires ruby 2.5. We should unlock once we upgrade the ruby version on our server
gem 'rack-mini-profiler'
@ -41,18 +41,17 @@ gem 'sitemap_generator'
gem 'sass-json-vars'
gem 'redcarpet'
gem 'to_spreadsheet', git: 'https://github.com/glebm/to_spreadsheet.git'
gem 'net-ssh', '4.1.0'
group :development do
gem 'better_errors', '2.2.0'
gem 'binding_of_caller'
gem 'meta_request'
gem 'capistrano', '~> 3.1'
gem 'capistrano-rails', '~> 1.1'
gem 'capistrano-faster-assets', '~> 1.0'
gem 'eventmachine', git: 'https://github.com/eventmachine/eventmachine', :branch => 'master'
gem 'eventmachine', git: 'https://github.com/krzcho/eventmachine', :branch => 'master'
gem 'thin'
gem 'rubocop', require: false
gem 'haml-lint', require: false
@ -68,7 +67,6 @@ group :test do
gem 'guard-cucumber'
gem 'poltergeist'
gem 'capybara', '2.15.1'
gem 'capybara-email'
gem 'guard-rspec'
gem 'factory_girl_rails'
@ -95,7 +93,7 @@ end
platforms 'mswin', 'mingw' do
gem 'tzinfo-data'
group :test do
gem 'wdm', '>= 0.1.0'
gem 'win32console', require: false

View File

@ -1,696 +0,0 @@
GIT
remote: https://github.com/bikebike/bikecollectives_core.git
revision: 308dd1f8a8dae5232a77ba16e7c0725ba41bb874
branch: master
specs:
bikecollectives_core (0.1.0)
activerecord-session_store
carrierwave
carrierwave-imageoptimizer
haml
launchy
letter_opener
mini_magick
pg
premailer-rails
rails (~> 4.2.0)
redcarpet
sass
sass-json-vars
sass-rails
sidekiq
uglifier (>= 1.3.0)
GIT
remote: https://github.com/bumbleberry/bumbleberry.git
revision: 0ab0762a118c096886eee85e93b5da2d2c6a314a
branch: master
specs:
bumbleberry (0.0.1)
blockspring
cairo
railties
rsvg2
sass-json-vars
sass-rails
GIT
remote: https://github.com/eventmachine/eventmachine
revision: df4ab0068e5e9f504096584093a74510d0dac6c8
branch: master
specs:
eventmachine (1.3.0.dev.1)
GIT
remote: https://github.com/glebm/to_spreadsheet.git
revision: 80203fd1f4e57a6fe83ea9d677e42bf7cb8188d3
specs:
to_spreadsheet (1.1.0)
caxlsx
chronic
nokogiri
rails
responders
GIT
remote: https://github.com/lingua-franca/lingua_franca.git
revision: 49dd2d0ada3754d35d8fbd020378e770b9a99476
branch: master
specs:
lingua_franca (0.0.1)
diffy
forgery
http_accept_language
i18n
rails (~> 4.2.0.rc2)
rails-i18n
rubyzip
GIT
remote: https://github.com/lingua-franca/marmara.git
revision: 76e2406fcdb793e6ca1946e5d3f9125cf0076485
branch: master
specs:
marmara (1.0.2)
css_parser (>= 1.5.0.pre)
GIT
remote: https://github.com/tg90nor/sorcery.git
revision: 79b69a87ce168c47fab76921874aa7e8cb727002
branch: make-facebook-provider-use-json-token-parser
specs:
sorcery (0.10.3)
bcrypt (~> 3.1)
oauth (~> 0.4, >= 0.4.4)
oauth2 (~> 1.0, >= 0.8.0)
GEM
remote: http://rubygems.org/
specs:
actionmailer (4.2.8)
actionpack (= 4.2.8)
actionview (= 4.2.8)
activejob (= 4.2.8)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.8)
actionview (= 4.2.8)
activesupport (= 4.2.8)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.8)
activesupport (= 4.2.8)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (4.2.8)
activesupport (= 4.2.8)
globalid (>= 0.3.0)
activemodel (4.2.8)
activesupport (= 4.2.8)
builder (~> 3.1)
activerecord (4.2.8)
activemodel (= 4.2.8)
activesupport (= 4.2.8)
arel (~> 6.0)
activerecord-session_store (1.1.3)
actionpack (>= 4.0)
activerecord (>= 4.0)
multi_json (~> 1.11, >= 1.11.2)
rack (>= 1.5.2, < 3)
railties (>= 4.0)
activesupport (4.2.8)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
airbrussh (1.4.1)
sshkit (>= 1.6.1, != 1.7.0)
arel (6.0.4)
ast (2.4.2)
attr_required (1.0.1)
bcrypt (3.1.19)
better_errors (2.2.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
rack (>= 0.9.0)
binding_of_caller (1.0.0)
debug_inspector (>= 0.0.1)
blockspring (0.1.4)
rest-client (> 1.6.7)
builder (3.2.4)
cairo (1.17.12)
native-package-installer (>= 1.0.3)
pkg-config (>= 1.2.2)
red-colors
cairo-gobject (4.1.8)
cairo (>= 1.16.2)
glib2 (= 4.1.8)
capistrano (3.17.3)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
sshkit (>= 1.9.0)
capistrano-bundler (2.1.0)
capistrano (~> 3.1)
capistrano-faster-assets (1.1.0)
capistrano (>= 3.1)
capistrano-rails (1.6.3)
capistrano (~> 3.1)
capistrano-bundler (>= 1.1, < 3)
capybara (2.15.1)
addressable
mini_mime (>= 0.1.3)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
capybara-email (3.0.2)
capybara (>= 2.4, < 4.0)
mail
carrierwave (1.3.3)
activemodel (>= 4.0.0)
activesupport (>= 4.0.0)
mime-types (>= 1.16)
ssrf_filter (~> 1.0, < 1.1.0)
carrierwave-imageoptimizer (1.6.0)
carrierwave (>= 0.8, < 3.0)
image_optimizer (~> 1.6)
caxlsx (3.4.1)
htmlentities (~> 4.3, >= 4.3.4)
marcel (~> 1.0)
nokogiri (~> 1.10, >= 1.10.4)
rubyzip (>= 1.3.0, < 3)
childprocess (3.0.0)
chronic (0.10.2)
cliver (0.3.2)
coderay (1.1.3)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
coveralls (0.7.1)
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
term-ansicolor
thor
crack (0.4.5)
rexml
crass (1.0.6)
css_parser (1.12.0)
addressable
cucumber (7.1.0)
builder (~> 3.2, >= 3.2.4)
cucumber-core (~> 10.1, >= 10.1.0)
cucumber-create-meta (~> 6.0, >= 6.0.1)
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
cucumber-gherkin (~> 22.0, >= 22.0.0)
cucumber-html-formatter (~> 17.0, >= 17.0.0)
cucumber-messages (~> 17.1, >= 17.1.1)
cucumber-wire (~> 6.2, >= 6.2.0)
diff-lcs (~> 1.4, >= 1.4.4)
mime-types (~> 3.3, >= 3.3.1)
multi_test (~> 0.1, >= 0.1.2)
sys-uname (~> 1.2, >= 1.2.2)
cucumber-core (10.1.1)
cucumber-gherkin (~> 22.0, >= 22.0.0)
cucumber-messages (~> 17.1, >= 17.1.1)
cucumber-tag-expressions (~> 4.1, >= 4.1.0)
cucumber-create-meta (6.0.4)
cucumber-messages (~> 17.1, >= 17.1.1)
sys-uname (~> 1.2, >= 1.2.2)
cucumber-cucumber-expressions (14.0.0)
cucumber-gherkin (22.0.0)
cucumber-messages (~> 17.1, >= 17.1.1)
cucumber-html-formatter (17.0.0)
cucumber-messages (~> 17.1, >= 17.1.0)
cucumber-messages (17.1.1)
cucumber-rails (1.4.0)
capybara (>= 1.1.2)
cucumber (>= 1.2.0)
nokogiri (>= 1.5.0)
rails (>= 3.0.0)
cucumber-tag-expressions (4.1.0)
cucumber-wire (6.2.1)
cucumber-core (~> 10.1, >= 10.1.0)
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
daemon-spawn (0.4.2)
daemons (1.4.1)
database_cleaner (1.99.0)
debug_inspector (1.1.0)
diff-lcs (1.5.0)
diffy (3.4.2)
digest (3.1.1)
docile (1.4.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
erubis (2.7.0)
execjs (2.8.1)
factory_girl (4.9.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.9.0)
factory_girl (~> 4.9.0)
railties (>= 3.0.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
ffi (1.15.5)
fiddle (1.1.1)
forgery (0.8.1)
formatador (1.1.0)
gdk_pixbuf2 (4.1.8)
gio2 (= 4.1.8)
geocoder (1.8.1)
gherkin3 (3.1.2)
gio2 (4.1.8)
fiddle
gobject-introspection (= 4.1.8)
glib2 (4.1.8)
native-package-installer (>= 1.0.3)
pkg-config (>= 1.3.5)
globalid (0.4.2)
activesupport (>= 4.2.0)
gobject-introspection (4.1.8)
glib2 (= 4.1.8)
guard (2.18.0)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.13.0)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-cucumber (3.0.0)
cucumber (>= 3.1)
nenv (>= 0.1)
guard-rspec (4.7.3)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
haml (6.1.1)
temple (>= 0.8.2)
thor
tilt
haml-lint (0.999.999)
haml_lint
haml_lint (0.45.0)
haml (>= 4.0, < 6.2)
parallel (~> 1.10)
rainbow
rubocop (>= 0.50.0)
sysexits (~> 1.1)
hashdiff (1.0.1)
hashie (5.0.0)
htmlentities (4.3.4)
http-accept (1.7.0)
http-cookie (1.0.5)
domain_name (~> 0.5)
http_accept_language (2.1.1)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
ianfleeton-paypal-express (0.8.7)
activesupport (>= 2.3, < 8)
attr_required (~> 1.0)
rest-client (~> 2.0)
image_optimizer (1.9.0)
io-wait (0.3.0)
jwt (2.7.1)
kgio (2.11.4)
launchy (2.5.2)
addressable (~> 2.8)
letter_opener (1.8.1)
launchy (>= 2.2, < 3)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.21.3)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
lumberjack (1.2.8)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.2)
matrix (0.4.2)
meta_request (0.7.4)
rack-contrib (>= 1.1, < 3)
railties (>= 3.0.0, < 7.1)
method_source (1.0.0)
mime-types (3.4.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1)
mini_magick (4.12.0)
mini_mime (1.1.2)
mini_portile2 (2.6.1)
minitest (5.15.0)
mocha (2.0.4)
ruby2_keywords (>= 0.0.5)
multi_json (1.15.0)
multi_test (0.1.2)
multi_xml (0.6.0)
multipart-post (2.3.0)
native-package-installer (1.1.8)
nenv (0.3.0)
net-imap (0.2.2)
digest
net-protocol
strscan
net-pop (0.1.2)
net-protocol
net-protocol (0.1.2)
io-wait
timeout
net-scp (4.0.0)
net-ssh (>= 2.6.5, < 8.0.0)
net-smtp (0.3.0)
digest
net-protocol
timeout
net-ssh (4.1.0)
netrc (0.11.0)
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
oauth (0.6.2)
snaky_hash (~> 2.0)
version_gem (~> 1.1)
oauth2 (1.4.11)
faraday (>= 0.17.3, < 3.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 4)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
racc
pg (0.21.0)
pkg-config (1.5.2)
poltergeist (1.18.1)
capybara (>= 2.1, < 4)
cliver (~> 0.3.1)
websocket-driver (>= 0.2.0)
premailer (1.15.0)
addressable
css_parser (>= 1.6.0)
htmlentities (>= 4.0.0)
premailer-rails (1.12.0)
actionmailer (>= 3)
net-smtp
premailer (~> 1.7, >= 1.7.9)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.7)
racc (1.7.1)
rack (1.6.13)
rack-contrib (1.8.0)
rack (~> 1.4)
rack-mini-profiler (3.0.0)
rack (>= 1.2.0)
rack-protection (2.2.4)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.8)
actionmailer (= 4.2.8)
actionpack (= 4.2.8)
actionview (= 4.2.8)
activejob (= 4.2.8)
activemodel (= 4.2.8)
activerecord (= 4.2.8)
activesupport (= 4.2.8)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.8)
sprockets-rails
rails-deprecated_sanitizer (1.0.4)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.9)
activesupport (>= 4.2.0, < 5.0)
nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
rails-i18n (4.0.9)
i18n (~> 0.7)
railties (~> 4.0)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (4.2.8)
actionpack (= 4.2.8)
activesupport (= 4.2.8)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (3.1.1)
raindrops (0.20.1)
rake (12.3.3)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
red-colors (0.3.0)
matrix
redcarpet (3.6.0)
redis (4.8.1)
regexp_parser (2.8.1)
responders (2.4.1)
actionpack (>= 4.2.0, < 6.0)
railties (>= 4.2.0, < 6.0)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.5)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-rails (4.1.2)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
rspec-core (~> 3.10)
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.12.1)
rsvg2 (4.1.8)
cairo-gobject (= 4.1.8)
gdk_pixbuf2 (= 4.1.8)
rubocop (1.28.2)
parallel (~> 1.10)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.17.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.17.0)
parser (>= 3.1.1.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
ruby_dep (1.4.0)
rubyzip (2.3.2)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-json-vars (0.3.3)
sass (>= 3.1)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
shellany (0.0.1)
sidekiq (5.2.8)
connection_pool (~> 2.2, >= 2.2.2)
rack (< 2.1.0)
rack-protection (>= 1.5.0)
redis (>= 3.3.5, < 5)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
sitemap_generator (6.3.0)
builder (~> 3.0)
snaky_hash (2.0.1)
hashie
version_gem (~> 1.1, >= 1.1.1)
sprockets (4.1.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sshkit (1.21.5)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
ssrf_filter (1.0.8)
strscan (3.0.6)
sync (0.5.0)
sys-uname (1.2.3)
ffi (~> 1.1)
sysexits (1.2.0)
temple (0.10.2)
term-ansicolor (1.7.1)
tins (~> 1.0)
thin (1.8.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (1.2.2)
thread_safe (0.3.6)
tilt (2.2.0)
timeout (0.4.0)
tins (1.32.1)
sync
tzinfo (1.2.11)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.4.2)
unicorn (6.1.0)
kgio (~> 2.6)
raindrops (~> 0.7)
version_gem (1.1.3)
webmock (3.18.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (2.1.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
activerecord-session_store
better_errors (= 2.2.0)
bikecollectives_core!
binding_of_caller
bumbleberry!
capistrano (~> 3.1)
capistrano-faster-assets (~> 1.0)
capistrano-rails (~> 1.1)
capybara (= 2.15.1)
capybara-email
carrierwave
carrierwave-imageoptimizer
coveralls
cucumber
cucumber-core
cucumber-rails
daemon-spawn
daemons
database_cleaner
eventmachine!
factory_girl_rails
geocoder
gherkin3 (>= 3.1.0)
guard-cucumber
guard-rspec
haml
haml-lint
ianfleeton-paypal-express
launchy
letter_opener
lingua_franca!
marmara!
meta_request
mini_magick
mocha
net-ssh (= 4.1.0)
nokogiri
pg (= 0.21.0)
poltergeist
premailer-rails
rack-mini-profiler
rails (= 4.2.8)
rails_12factor
rake (= 12.3.3)
redcarpet
rspec
rspec-rails
rubocop
ruby_dep (= 1.4)
sass
sass-json-vars
sass-rails
selenium-webdriver
sidekiq
simplecov
sitemap_generator
sorcery!
thin
to_spreadsheet!
tzinfo-data
uglifier (>= 1.3.0)
unicorn
wdm (>= 0.1.0)
webmock
win32console
BUNDLED WITH
1.17.3

90
LICENSE
View File

@ -1,47 +1,65 @@
BSD 2-Clause License
Copyright (c) Bike Collectives Network
Copyright (c) 2013, diowa
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================================================
This project includes the following third-party dependencies:
airbrake is licensed by Airbrake
- airbrake (Airbrake)
- FontAwesome (MIT License, SIL Open Font License, CC BY 3.0)
- haml (MIT License)
- google-analytics-rails (MIT License)
- http_accept_language (MIT License)
- i18n-js (MIT License)
- jquery-rails, jquery (MIT License)
- kaminari (MIT License)
- newrelic_rpm (New Relic)
- nokogiri (MIT License)
- pg (2-clause BSD License)
- resque (MIT License)
- rabl (MIT License)
- rest-client (MIT License)
- simpleconfig (MIT License)
- Twitter Bootstrap (Apache License 2.0)
- unicorn (GPLv2 License)
- validates_timeliness (MIT License)
FontAwesome is licensed under the MIT License
FontAwesome font is licensed under the SIL Open Font License
FontAwesome pictograms are licensed under the CC BY 3.0 License
haml is licensed under the MIT License
google-analytics-rails is licensed under the MIT license
http_accept_language is licensed under the MIT License
i18n-js is licensed under the MIT License
jquery-rails is licensed under the MIT License
jquery is licensed under the MIT License
kaminari is licensed under the MIT License
newrelic_rpm is licensed by New Relic
nokogiri is licensed under the MIT License
pg is licensed under the 2-clause BSD License
resque is licensed under the MIT License
rabl is licensed under the MIT License
rest-client is licensed under the MIT License
simpleconfig is licensed under the MIT License
Twitter Bootstrap is licensed under the Apache License, Version 2.0
unicorn is licensed under the GPLv2 License
validates_timeliness is licensed under the MIT License

526
README.md
View File

@ -1,374 +1,152 @@
# Bike!Bike! #
| Environment | Build Status |
| ----------- |:------------:|
| Development | [![Development Build Status](https://travis-ci.org/bikebike/BikeBike.svg?branch=development)](https://travis-ci.org/bikebike/BikeBike) |
| Production | It works with this Fork! |
## About this Fork
The Tech group for BikeBike!Everywhere! decided to utilize this conferencing/scheduling software for the next BikeBike.
This repository creates a test environment so that we can test/fix issues before manually committing them to the live site.
Instructions can be found in docker-compose.yml, and docker-compose.build.
### Install git-lfs
This repository utilizes git-lfs. You will want git-lfs installed:
`apt-get install git-lfs`
then
`git lfs pull`
You can learn more about git-lfs commands at https://sabicalija.github.io/git-lfs-intro/
### About that letsencrypt network in docker-compose.yml
This network provides a nginx proxy and an automatic generation of letsencrypt certificates.
#### The bike_bike_advanced_environment file
This file allows you to insert custom environmental variables, but primarily so that [ACME Companion](https://github.com/nginx-proxy/acme-companion) can be utilized to automate the creation, renewal and use of SSL certificates for proxied Docker containers through the ACME protocol. This is useful to seamlessly handle the secure translation urls. The example variables below communicate to an available external acme (letsencrypt) network to properly setup this proxied environment.
```
VIRTUAL_HOST=bb.bikelover.org,en.bikelover.org,en.bb.bikelover.org,es.bb.bikelover.org,fr.bb.bikelover.org
LETSENCRYPT_HOST=bb.bikelover.org,en.bikelover.org,en.bb.bikelover.org,es.bb.bikelover.org,fr.bb.bikelover.org
LETSENCRYPT_EMAIL=bike@bikelover.org
VIRTUAL_PORT=3000
```
This is an example docker-compose.yml file handling the letsencrypt network.
<details>
<summary>
```
docker-compose.yml (acme-companion & nginx-proxy)
```
</summary>
```
version: '3'
# LetsEncrypt
# If you need a custome nginx.conf, remember to copy it over
services:
letsencrypt:
image: nginxproxy/acme-companion
container_name: letsencrypt
#volumes_from:
# - nginx-proxy
volumes:
- certs:/etc/nginx/certs:rw
- acme:/etc/acme.sh
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- NGINX_PROXY_CONTAINER=nginx-proxy
#network_mode: "bridge"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
restart: always
networks:
letsencrypt:
nginx-proxy:
image: nginxproxy/nginx-proxy
container_name: nginx-proxy
volumes:
- conf:/etc/nginx/conf.d
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
ports:
- "80:80"
- "443:443"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
restart: always
networks:
letsencrypt:
volumes:
certs:
vhost:
html:
conf:
acme:
networks:
letsencrypt:
external: true
````
</details>
### Commonly used environmental variables in .env
```
RAILS_ENV={production | development | customized environment in config/environments}
PORT={usually 3000}
SMTP_ADDRESS={your SMTP server address}
SMTP_DOMAIN={The domain you want to link back in emails, usually the website itself, but not any translation subdomains}
SMTP_PORT={465 | ..}
SMTP_USER_NAME={SMTP username}
SMTP_PASSWORD={SMTP password}
SMTP_SSL={true | false}
ADMIN_EMAIL={administrator email address}
DEFAULT_URL={the website itself}
```
### After successful installation
There isn't much to do until the first conference is created. But you will need an adminstrator to make that happen.
First create a user for yourself at /user . If you properly setup SMTP via docker, you will receive a confirmation email, which allows you to setup a session on your respective browser.
Then go to the database container (db), and utilizing psql, update your user.
`UPDATE users SET role = 'administrator' WHERE firstname = 'Jonathan Rosenbaum';`
Now go to /conferences , create your first conference, and the fun begins!
The commandline psql interacts with the database with 'strict' sql statements, so use single quotes around strings, not double quotes, and all should be good.
Here's a good link to bring you up to speed with the power of psql: [https://phili.pe/posts/postgresql-on-the-command-line/](https://phili.pe/posts/postgresql-on-the-command-line/)
### Job Scheduler for caniuse.js
[Caniuse.js](caniuse.js) uses browserslist to query the caniuse-lite database. This is the substitute program for the now defunct Bumbleberry. Ofelia is used as an independent scheduler, and ofelia labels in [services](docker-compose.yml) establish the job requirements.
<details>
<summary>
```
docker-compose.yml for Ofelia job scheduler
```
</summary>
```
# This service provides ofelia, which is a job scheduler (cron).
#
# There should be at least on job in one of the services to make this
# meaningfull to run.
#
# It is accessible everywhere since it is bound to the docker socket.
# Cron jobs can be conveniently created with labels.
#
# https://github.com/mcuadros/ofelia
#
# When you add/change a cron job simply -
# docker compose restart
services:
ofelia:
container_name: ofelia
image: mcuadros/ofelia:latest
command: daemon --docker
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
```
</details>
### Production and Development mode
You may easily switch between the production and development environment in the .env file.
`RAILS_ENV=production`
One good reason for doing this is that some system administration tasks are handled differently in production. For instance, mail is delayed in production.
Realize you can always do things in the container .. the commands without docker-compose, or automate it all with a docker-compose script:
`docker-compose exec bikebike /bin/bash`
#### From production to development after changing .env
```
docker-compose down
docker-compose up -d
rake assets:clobber
rake assets:precompile
```
#### From development to production after changing .env
```
docker-compose down
docker-compose up -d
rake assets:clobber
rake assets:precompile
rake db:sessions:clear
docker-compose restart bikebike
```
## From bikebike/bikebike
This is the repository for the Bike!Bike! website. It can be found in development at [preview.bikebike.org](https://preview-en.bikebike.org/) and in production at [bikebike.org](https://bikebike.org/)
Feel free to clone or fork the repository any time to start working on new features or fixes. To get help create an issue or contact Godwin: `goodgodwin` `@` `hotmail.com` any time.
![Screenshot of Bike!Bike!](https://workbench.bikecollectives.org/apps/bikebike/screenshots/application/home/3/desktop.png)
## Technologies ##
* [Ruby 2.3.0][1]
* [Rails 4.2.0][2] _([Project to upgrade to Rails 5](https://github.com/orgs/bikebike/projects/13))_
* [PostgreSQL][3]
* [HAML][4]
* [SCSS][5]
* [NGinx][6] _([We may switch to Caddy](https://github.com/bikebike/bikecollectives_core/issues/1))_
* [DigitalOcean][7] _([We may switch to Linode](https://github.com/bikebike/bikecollectives_core/issues/2))_
[1]: http://www.ruby-lang.org/en/
[2]: http://rubyonrails.org/
[3]: http://www.postgresql.org/
[4]: http://haml.info/
[5]: http://sass-lang.com/
[6]: https://www.nginx.com/
[7]: https://digitalocean.com
## Internal Gems ##
We will make a commitment to extract any functionality that makes sense to do so, into separate gems in order to share functionality with others, with our other projects (such as bikecollectives.org), and to enable easier collaboration amongst ourselves.
It is recommended that you at least use also clone `bikecollectives_core` into you workspace. To override the gem location execute:
```bash
bundle config local.bikecollectives_core PATH_TO/bikecollectives_core
```
Here is a list of the gems we have created so far, if you are a collaborator on this project you may need to become a collaborator on these gems as well. Don't hesitate to make a request, it won't be denied:
### Bike Collectives Core ###
[Bike Collectives Core](https://github.com/bikebike/bikecollectives_core) is where models, migrations, and some common controllers and helpers live. This Gem is shared between [Bike Collectives](https://github.com/bikebike/bikecollectives) and [Bike Collectives Workbench](https://github.com/bikebike/bikecollectives_workbench).
### Lingua Franca ###
[Lingua Franca](https://github.com/lingua-franca/lingua_franca) provides an easy way to include translatable content and provides a user interface for translators to provide translations. See [Translations](#translations) for best practices on the Bike!Bike! website.
### Bumbleberry ###
[Bumbleberry](https://github.com/bumbleberry/bumbleberry) provides cross-browser support with little effort and minimum file sizes. Basically it creates a different stylesheet for every known browser and only includes supported rules for each using information obtained from [caniuse.com](caniuse.com).
## Github Workflow ##
If you are a git wiz, feel free to adjust the steps below slightly, otherwise follow these steps until you are familiar enough to stray. What should remain constant is that we need to branch, code review, and merge with master.
1. Before you start working on a new feature, start working on a new branch (alternatively you can fork): `git checkout -b myname_new_feature`
1. Write your new feature
1. Add tests and execute them using `bundle exec i18n`
1. Make any adjustments, make sure you have included comments and abided other coding conventions
1. Check your git status to make sure you are on the correct branch and have any new files to add: `git status`
1. Add any new files using: `git add [myfile]`
1. Commit your changes: `git commit -am 'My commit message'`
1. Switch back to the development branch and pull the latest: `git checkout master && git pull`
1. Switch back to your branch: `git checkout myname_new_feature`
1. If there were any changes, rebase. This merges in the new code with your new code: `git rebase -i origin/development`
1. Push your changes: `git push origin myname_new_feature`
1. Make a pull request and wait for your code to be reviewed
1. If any changes are required, make them commit your changes, and rebase again. This time you need to make sure that you squash your commits (makes sure you only add one commit in the end). Where you see your commit message, change 'pick' to 'fixup' or 'f'.
1. Push your code again and repeat 12 and 13 until your code gets merged with development
1. Once your code is in development it will be released to our development site, once new translations are added and the site is manually tested it will be moved to master and the production site
## Deployment Process ##
Please note, we currently don't have this process set up, we're working to get here.
1. Write code and get it pulled into master
2. Your changes will be automatically be deployed to our preview site
3. Your changes will be tested there, if tests fail deployers will be notified
4. Once that deployment process completes and tests pass, translators will be notified if there are new translations
4. Once translators have completed translations, translations will be committed to master and your changes will be deployed to production
## Translations ##
Translating our site into multiple languages is a key part of opening it up to the world. When coding, never include any English text as in a string or Haml. Instead, we shall always use the underscore helper method `_`. The method takes a translation key and some optional parameters.
All translation is done in a collaborative, volunteer based system on the site itself, even the English text. If a user has sufficient permissions, the underscore method will produce highlighted text which can be edited directly by the user.
The method can be used as follows:
```haml
%h1=_'basename.my_title'
%p=_'basename.my_key', :paragraph
%button=_'basename.click_me'
```
Assuming none of the keys map to translations, this will be rendered into the following HTML:
```html
<h1>
Lorem ipsum dolor sit amet
</h1>
<p>
Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Proin eget tortor risus. Donec sollicitudin molestie malesuada. Donec rutrum congue leo eget malesuada.
</p>
<button>
click me
</button>
```
By default, the key will be translated using the last key part ('click me' in this example), however if a context is provided, some appropriate lorem ipsum text. Available contexts are:
* `title` (alias: `t`): title text, a few words in upper case
* `word` (alias: `words`, `w`): A word, if a second parameter is provided a numbr of words will be rendered (for example `_'key',:w,3`)
* `sentence` (alias: `sentences`, `s`): A sentence or multiple sentence
* `paragraph` (alias: `p`): A paragraph
If actual translations are not provided by the time the code hits production, fatals will occur.
### Entering translations
Translations can be provided directly by editing [`en.yml`](https://github.com/bikebike/BikeBike/blob/master/config/locales/en.yml) but will also be directly using the [workbench](https://github.com/bikebike/bikecollectives_workbench):
![Screenshot of the Bike Collectives Workbench](https://i.imgur.com/y8Ezjeg.png)
### Collecting translations
Translations, along with screenshots and HTML page captures are collected during testing so that the workbench will have up to date translations and context for each to make it easier for translators to provide relevant translations. To collect these translations yourself, execute `rake i18n`.
## Testing Practices ##
Our focus will be on integration testing using Capybara. While testing the app records all translations that it finds, whether or not they exist, and which pages that they were found on.
Before commiting you shuold always run:
```bash
bundle exec rake cucumber:run
```
and:
```bash
bundle exec rake i18n
```
The former is going to be faster but does not perform checks for untranslated content, it is recommneded that you run this regularily while developing while running the `i18n` check will ensure that you have not missed translations.
If you are creating any new content you will also want to add a new feature or scenario to ensure the new translations are picked up.
# Bike!Bike! #
| Environment | Build Status |
| ----------- |:------------:|
| Development | [![Development Build Status](https://travis-ci.org/bikebike/BikeBike.svg?branch=development)](https://travis-ci.org/bikebike/BikeBike) |
| Production | [![Production Build Status](https://travis-ci.org/bikebike/BikeBike.svg?branch=master)](https://travis-ci.org/bikebike/BikeBike) |
This is the repository for the Bike!Bike! website. It can be found in development at [preview.bikebike.org](https://preview-en.bikebike.org/) and in production at [bikebike.org](https://bikebike.org/)
Feel free to clone or fork the repository any time to start working on new features or fixes. To get help create an issue or contact Godwin: `goodgodwin` `@` `hotmail.com` any time.
![Screenshot of Bike!Bike!](https://workbench.bikecollectives.org/apps/bikebike/screenshots/application/home/3/desktop.png)
## Technologies ##
* [Ruby 2.3.0][1]
* [Rails 4.2.0][2] _([Project to upgrade to Rails 5](https://github.com/orgs/bikebike/projects/13))_
* [PostgreSQL][3]
* [HAML][4]
* [SCSS][5]
* [NGinx][6] _([We may switch to Caddy](https://github.com/bikebike/bikecollectives_core/issues/1))_
* [DigitalOcean][7] _([We may switch to Linode](https://github.com/bikebike/bikecollectives_core/issues/2))_
[1]: http://www.ruby-lang.org/en/
[2]: http://rubyonrails.org/
[3]: http://www.postgresql.org/
[4]: http://haml.info/
[5]: http://sass-lang.com/
[6]: https://www.nginx.com/
[7]: https://digitalocean.com
## Internal Gems ##
We will make a commitment to extract any functionality that makes sense to do so, into separate gems in order to share functionality with others, with our other projects (such as bikecollectives.org), and to enable easier collaboration amongst ourselves.
It is recommended that you at least use also clone `bikecollectives_core` into you workspace. To override the gem location execute:
```bash
bundle config local.bikecollectives_core PATH_TO/bikecollectives_core
```
Here is a list of the gems we have created so far, if you are a collaborator on this project you may need to become a collaborator on these gems as well. Don't hesitate to make a request, it won't be denied:
### Bike Collectives Core ###
[Bike Collectives Core](https://github.com/bikebike/bikecollectives_core) is where models, migrations, and some common controllers and helpers live. This Gem is shared between [Bike Collectives](https://github.com/bikebike/bikecollectives) and [Bike Collectives Workbench](https://github.com/bikebike/bikecollectives_workbench).
### Lingua Franca ###
[Lingua Franca](https://github.com/lingua-franca/lingua_franca) provides an easy way to include translatable content and provides a user interface for translators to provide translations. See [Translations](#translations) for best practices on the Bike!Bike! website.
### Bumbleberry ###
[Bumbleberry](https://github.com/bumbleberry/bumbleberry) provides cross-browser support with little effort and minimum file sizes. Basically it creates a different stylesheet for every known browser and only includes supported rules for each using information obtained from [caniuse.com](caniuse.com).
## Github Workflow ##
If you are a git wiz, feel free to adjust the steps below slightly, otherwise follow these steps until you are familiar enough to stray. What should remain constant is that we need to branch, code review, and merge with master.
1. Before you start working on a new feature, start working on a new branch (alternatively you can fork): `git checkout -b myname_new_feature`
1. Write your new feature
1. Add tests and execute them using `bundle exec i18n`
1. Make any adjustments, make sure you have included comments and abided other coding conventions
1. Check your git status to make sure you are on the correct branch and have any new files to add: `git status`
1. Add any new files using: `git add [myfile]`
1. Commit your changes: `git commit -am 'My commit message'`
1. Switch back to the development branch and pull the latest: `git checkout master && git pull`
1. Switch back to your branch: `git checkout myname_new_feature`
1. If there were any changes, rebase. This merges in the new code with your new code: `git rebase -i origin/development`
1. Push your changes: `git push origin myname_new_feature`
1. Make a pull request and wait for your code to be reviewed
1. If any changes are required, make them commit your changes, and rebase again. This time you need to make sure that you squash your commits (makes sure you only add one commit in the end). Where you see your commit message, change 'pick' to 'fixup' or 'f'.
1. Push your code again and repeat 12 and 13 until your code gets merged with development
1. Once your code is in development it will be released to our development site, once new translations are added and the site is manually tested it will be moved to master and the production site
## Deployment Process ##
Please note, we currently don't have this process set up, we're working to get here.
1. Write code and get it pulled into master
2. Your changes will be automatically be deployed to our preview site
3. Your changes will be tested there, if tests fail deployers will be notified
4. Once that deployment process completes and tests pass, translators will be notified if there are new translations
4. Once translators have completed translations, translations will be committed to master and your changes will be deployed to production
## Translations ##
Translating our site into multiple languages is a key part of opening it up to the world. When coding, never include any English text as in a string or Haml. Instead, we shall always use the underscore helper method `_`. The method takes a translation key and some optional parameters.
All translation is done in a collaborative, volunteer based system on the site itself, even the English text. If a user has sufficient permissions, the underscore method will produce highlighted text which can be edited directly by the user.
The method can be used as follows:
```haml
%h1=_'basename.my_title'
%p=_'basename.my_key', :paragraph
%button=_'basename.click_me'
```
Assuming none of the keys map to translations, this will be rendered into the following HTML:
```html
<h1>
Lorem ipsum dolor sit amet
</h1>
<p>
Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Proin eget tortor risus. Donec sollicitudin molestie malesuada. Donec rutrum congue leo eget malesuada.
</p>
<button>
click me
</button>
```
By default, the key will be translated using the last key part ('click me' in this example), however if a context is provided, some appropriate lorem ipsum text. Available contexts are:
* `title` (alias: `t`): title text, a few words in upper case
* `word` (alias: `words`, `w`): A word, if a second parameter is provided a numbr of words will be rendered (for example `_'key',:w,3`)
* `sentence` (alias: `sentences`, `s`): A sentence or multiple sentence
* `paragraph` (alias: `p`): A paragraph
If actual translations are not provided by the time the code hits production, fatals will occur.
### Entering translations
Translations can be provided directly by editing [`en.yml`](https://github.com/bikebike/BikeBike/blob/master/config/locales/en.yml) but will also be directly using the [workbench](https://github.com/bikebike/bikecollectives_workbench):
![Screenshot of the Bike Collectives Workbench](https://i.imgur.com/y8Ezjeg.png)
### Collecting translations
Translations, along with screenshots and HTML page captures are collected during testing so that the workbench will have up to date translations and context for each to make it easier for translators to provide relevant translations. To collect these translations yourself, execute `rake i18n`.
## Testing Practices ##
Our focus will be on integration testing using Capybara. While testing the app records all translations that it finds, whether or not they exist, and which pages that they were found on.
Before commiting you shuold always run:
```bash
bundle exec rake cucumber:run
```
and:
```bash
bundle exec rake i18n
```
The former is going to be faster but does not perform checks for untranslated content, it is recommneded that you run this regularily while developing while running the `i18n` check will ensure that you have not missed translations.
If you are creating any new content you will also want to add a new feature or scenario to ensure the new translations are picked up.

View File

@ -71,6 +71,12 @@ task :i18n do
end
end
task 'i18n:debug' do
ENV['I18N_DEBUG'] = '1'
Rake::Task['i18n'].execute
ENV['I18N_DEBUG'] = '0'
end
task :css do
ENV['CSS_TEST'] = '1'
Rake::Task['cucumber:run'].execute

View File

@ -1,4 +0,0 @@
//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .scss
//= link_directory ../fonts

View File

@ -166,20 +166,6 @@
if (!window.initNodeFunctions) {
window.initNodeFunctions = [];
}
// this code is used to hide columns with class "column-set" on small screens
// but is not really necessary, was fixed with bumbleberry_overridehelp.rb
function handleColumnSetVisibility() {
var isMobile = window.innerWidth <= 679;
var elements = document.querySelectorAll('.table-th.column-set, th.column-set');
elements.forEach(function(el) {
el.style.display = isMobile ? 'none' : '';
});
}
window.initNodeFunctions.push(handleColumnSetVisibility);
window.addEventListener('resize', handleColumnSetVisibility);
window.initNodeFunctions.push(function(node) {
forEachElement('.number-field,.email-field,.text-field,.password-field,.search-field', function(field) {
var input = field.querySelector('input');

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
body{background-color:#fff;color:#333;font-family:verdana, arial, helvetica, sans-serif;font-size:13px;line-height:18px}p,ol,ul,td{font-family:verdana, arial, helvetica, sans-serif;font-size:13px;line-height:18px}pre{background-color:#eee;padding:10px;font-size:11px}a{color:#000}a:visited{color:#666}a:hover{color:#fff;background-color:#000}div.field,div.actions{margin-bottom:10px}#notice{color:green}.field_with_errors{padding:2px;background-color:red;display:table}#error_explanation{width:450px;border:2px solid red;padding:7px;padding-bottom:0;margin-bottom:20px;background-color:#f0f0f0}#error_explanation h2{text-align:left;font-weight:bold;padding:5px 5px 5px 15px;font-size:12px;margin:-7px;margin-bottom:0px;background-color:#c00;color:#fff}#error_explanation ul li{font-size:12px;list-style:square}

View File

@ -1,8 +1,4 @@
require 'net/https'
class ApplicationController < BaseController
include BumbleberryOverrideHelper
protect_from_forgery with: :exception, except: [:do_confirm, :js_error, :admin_update]
before_filter :application_setup
@ -10,19 +6,6 @@ class ApplicationController < BaseController
helper_method :protect, :policies
RECAPTCHA_MINIMUM_SCORE = 0.5
def verify_recaptcha?(token, recaptcha_action)
recaptcha_secret_key = ENV['RECAPTCHA_SECRET_KEY']
uri = URI.parse("https://www.google.com/recaptcha/api/siteverify?secret=#{recaptcha_secret_key}&response=#{token}")
response = Net::HTTP.get_response(uri)
json = JSON.parse(response.body)
# json['success'] && json['score'] > RECAPTCHA_MINIMUM_SCORE && json['action'] == recaptcha_action
puts json.inspect
json['success'] && json['score'] > RECAPTCHA_MINIMUM_SCORE
end
def default_url_options
{ host: "#{request.protocol}#{request.host_with_port}", trailing_slash: true }
end
@ -118,7 +101,6 @@ class ApplicationController < BaseController
end
def confirmation_sent(user)
template = 'login_confirmation_sent'
@page_title ||= 'page_titles.403.Please_Check_Email'
@ -231,7 +213,7 @@ class ApplicationController < BaseController
end
def contact_send
email_list = [ENV['ADMIN_EMAIL']]
email_list = ['Godwin <goodgodwin@hotmail.com>']
if params[:reason] == 'conference' && logged_in?
@ -250,23 +232,20 @@ class ApplicationController < BaseController
request_info['env'][key.to_s] = value.to_s
end
if !(params[:subject] =~ /^\s*[a-z]{10}\s*$/i)
send_delayed_mail(:contact,
current_user || params[:email],
params[:subject],
params[:message],
email_list
)
send_delayed_mail(:contact,
current_user || params[:email],
params[:subject],
params[:message],
email_list
)
send_delayed_mail(:contact_details,
current_user || params[:email],
params[:subject],
params[:message],
request_info,
params
)
end
send_delayed_mail(:contact_details,
current_user || params[:email],
params[:subject],
params[:message],
request_info,
params
)
redirect_to contact_sent_path
end
@ -326,9 +305,6 @@ class ApplicationController < BaseController
end
def error_500(exception = nil)
return if response_body.present?
return if response.committed?
@page_title = 'page_titles.500.An_Error_Occurred'
@main_title = 'error.500.title'
@original_params = params.clone
@ -662,14 +638,6 @@ class ApplicationController < BaseController
# send the confirmation email and make sure it get sent as quickly as possible
def send_confirmation(confirmation)
# puts lookup_context.find_all(params[:action], params[:controller]).inspect
unless verify_recaptcha?(params[:recaptcha_token], 'sign_in')
flash.now[:error] = 'recaptcha.errors.verification_failed'
return render 'about'
end
send_mail(:email_confirmation, confirmation.id)
end

View File

@ -310,60 +310,51 @@ class ConferenceAdministrationController < ApplicationController
unregistered: 1
}
@registration_data = []
registrations = ConferenceRegistration.where(conference_id: @this_conference.id).includes(:user, :user => :organizations)
registrations.each do |registration|
user = registration.user
next unless user&.email.present?
new_data = {
user_id: user.id,
email: user.email,
name: user.firstname
}
organization = user.organizations.first
new_data[:organization] = organization.present? ? organization.name : ''
if registration.city_id.present?
new_data[:location] = registration.city.to_s
status = registration.status
else
new_data[:location] = user.last_location.to_s
status = :unregistered
end
new_data[:status] = I18n.t("articles.conference_registration.terms.registration_status.#{status}")
new_data[:sort_weight] = sort_weight[status]
@registration_data << new_data
end
@registration_data = []
User.all.each do |user|
if user.email.present?
new_data = {
user_id: user.id,
email: user.email,
name: user.firstname
}
organization = user.organizations.first
new_data[:organization] = organization.present? ? organization.name : ''
registration = @this_conference.registration_for(user)
if registration.present? && registration.city_id.present?
new_data[:location] = registration.city.to_s
status = registration.status
else
new_data[:location] = user.last_location.to_s
status = :unregistered
end
new_data[:status] = I18n.t("articles.conference_registration.terms.registration_status.#{status}")
new_data[:sort_weight] = sort_weight[status]
@registration_data << new_data
end
end
@registration_data.sort! { |a, b| b[:sort_weight] <=> a[:sort_weight] }
end
def administrate_stats
if @this_conference.start_date.blank? || @this_conference.end_date.blank?
@warning_message = :no_date_warning
return
end
get_stats(!request.format.xlsx?)
if request.format.xlsx?
get_stats
logger.info "Generating stats.xls"
return respond_to do |format|
format.xlsx { render xlsx: '../conferences/stats', filename: "stats-#{DateTime.now.strftime('%Y-%m-%d')}" }
end
else
@past_conferences = []
Conference.all.order("start_date DESC").each do |conference|
@past_conferences << conference if conference.is_public && @this_conference.id != conference.id
end
if @this_conference.start_date.blank? || @this_conference.end_date.blank?
@warning_message = :no_date_warning
return
end
get_stats(true)
@registration_count = @registrations.size
@completed_registrations = 0
@bikes = 0
@ -387,6 +378,11 @@ class ConferenceAdministrationController < ApplicationController
end
end
end
@past_conferences = []
Conference.all.order("start_date DESC").each do |conference|
@past_conferences << conference if conference.is_public && @this_conference.id != conference.id
end
end
end

View File

@ -2,37 +2,6 @@ require 'geocoder/calculations'
require 'rest_client'
require 'registration_controller_helper'
module RegistrationSteps
def available_steps(registration = self)
if conference.city_name.present? && Conference.find_by(id: registration.conference_id).city_id == 433
all_southpole_steps = [
:policy, # agree to the policy
:name, # enter your name
:languages, # select spoken languages
:org_member, # Do you work for or volunteer with a bike collective?
:org_location, # Where is your collective located?
:org_location_confirm, # Confirm your location
:org_non_member_interest, # What is your interest in attending Bike!Bike!?
:org_select, # Which organization in [city] are you associated with?
:org_create_name, # What is the name of your organization?
:org_create_address, # Where in [city] is your organization located?
:org_create_email, # What is the organization's email address
:org_create_mailing_address, # How can we contact your organization by snail mail?
:housing_arrival_date, # When will you be arriving in [city]?
:housing_departure_date, # When are you planning to leave [city]?
:review
]
available = all_southpole_steps.select { |step| send("#{step}_available?", registration) }
else available = RegistrationSteps.all_registration_steps.select { |step| send("#{step}_available?", registration) }
end
return available
end
end
class ConferencesController < ApplicationController
include RegistrationControllerHelper
@ -109,7 +78,7 @@ class ConferencesController < ApplicationController
return redirect_to pp_response.redirect_uri
end
end
begin
# get the current step
@step = current_registration_step(@this_conference, current_user)
@ -128,6 +97,11 @@ class ConferencesController < ApplicationController
result = registration_step(@step, @this_conference, current_user)
# pass any data on to the view
data_to_instance_variables(result)
rescue Exception => e
puts e
puts e.backtrace.join("\n")
raise e
end
end
if request.xhr?
@ -189,7 +163,6 @@ class ConferencesController < ApplicationController
helper_method :registration_complete?
def registration_steps(conference = nil)
File.write('testingdebug', "in registration_steps (conferences_controller_\n", mode: 'a')
conference ||= @this_conference || @conference
status = conference.registration_status
@ -217,13 +190,9 @@ class ConferencesController < ApplicationController
steps -= [:hosting, :questions]
end
if conference.city_id == 433 # if this conference is being held in the "South Pole" (it's a virtual/"Everywhere" event)
steps -= [:hosting, :payment, :questions] # skip hosting b/c there is none & skip payment because we're using OpenCollective
end
return steps
end
def required_steps(conference = nil)
# return the intersection of current steps and required steps
registration_steps(conference || @this_conference || @conference) & # current steps

View File

@ -10,8 +10,6 @@ module ApplicationHelper
include TableHelper
include AdminHelper
RECAPTCHA_SITE_KEY = ENV['RECAPTCHA_SITE_KEY']
def is_production?
Rails.env == 'production' || Rails.env == 'preview'
end
@ -23,38 +21,4 @@ module ApplicationHelper
def generate_confirmation(user, url, expiry = nil)
ApplicationController::generate_confirmation(user, url, expiry)
end
def include_recaptcha_js
raw %Q{
<script src="https://www.google.com/recaptcha/api.js?render=#{RECAPTCHA_SITE_KEY}"></script>
}
end
def recaptcha_execute(action)
id = "recaptcha_token_#{SecureRandom.hex(10)}"
raw %Q{
<input name="recaptcha_token" type="hidden" id="#{id}"/>
<script>
if (typeof grecaptcha !== 'undefined') {
grecaptcha.ready(function() {
grecaptcha.execute('#{RECAPTCHA_SITE_KEY}', {action: '#{action}'}).then(function(token) {
document.getElementById("#{id}").value = token;
}).catch(function(error) {
console.error('reCAPTCHA execution error:', error);
});
});
} else {
document.addEventListener('grecaptcha-ready', function() {
grecaptcha.execute('#{RECAPTCHA_SITE_KEY}', {action: '#{action}'}).then(function(token) {
document.getElementById("#{id}").value = token;
}).catch(function(error) {
console.error('reCAPTCHA execution error:', error);
});
});
}
</script>
}
end
end

View File

@ -1,11 +0,0 @@
module BumbleberryOverrideHelper
MODERN_FEATURES = [:css3_boxsizing, :css_sel3, :flexbox, :css_grid, :svg].freeze
def capable_of(capability)
if MODERN_FEATURES.include?(capability)
true
else
super
end
end
end

View File

@ -714,7 +714,8 @@ module FormHelper
:unregistered,
:workshop_facilitators,
:housing_providers,
:guests
:guests,
:all
]
if conference.registration_status != :open

View File

@ -5,8 +5,8 @@ module I18nHelper
url ||= current_path(true)
return url if Rails.env.development? || Rails.env.test?
return "https://preview-#{locale.to_s}." + ENV['DEFAULT_URL'] + "#{url}" if Rails.env.preview?
"https://#{locale.to_s}." + ENV['DEFAULT_URL'] + "#{url}"
return "https://preview-#{locale.to_s}.bikebike.org#{url}" if Rails.env.preview?
"https://#{locale.to_s}.bikebike.org#{url}"
end
def current_path(relative = false)
@ -21,13 +21,13 @@ module I18nHelper
return url_for(new_params) if relative
subdomain = Rails.env.preview? ? "preview-#{locale.to_s}" : locale.to_s
url_for(new_params.merge(host: "#{subdomain}." + ENV['DEFAULT_URL']))
url_for(new_params.merge(host: "#{subdomain}.bikebike.org"))
end
def canonical_url
url = current_path
return url if Rails.env.development? || Rails.env.test?
return ENV['DEFAULT_URL'] + "#{url}" if Rails.env.preview?
return "https://preview.bikebike.org#{url}" if Rails.env.preview?
"https://bikebike.org#{url}"
end

View File

@ -1,14 +1,9 @@
module RegistrationHelper
def registration_steps(conference = @conference)
File.write('testingdebug', "in registration_steps (registration_helper\n", mode: 'a')
if conference.city_name.present? && conference.city_id == 433
[:policy, :contact_info, :workshops]
else
{
pre: [:policy, :contact_info, :workshops],
open: [:policy, :contact_info, :questions, :hosting, :payment, :workshops]
}[@this_conference.registration_status]
end
{
pre: [:policy, :contact_info, :workshops],
open: [:policy, :contact_info, :questions, :hosting, :payment, :workshops]
}[@this_conference.registration_status]
end
def registration_status(registration)
@ -18,7 +13,6 @@ module RegistrationHelper
end
def current_registration_steps(registration = @registration)
File.write('testingdebug', 'in current_registration_steps', mode: 'a')
return nil unless registration.present?
steps = registration_steps(registration.conference)
@ -32,7 +26,8 @@ module RegistrationHelper
steps -= [:hosting]
end
steps -= [:payment, :workshops] if registration.is_attending == 'n'
steps -= [:payment] unless registration.conference.paypal_email_address.present? && registration.conference.paypal_username.present? && registration.conference.paypal_password.present? && registration.conference.paypal_signature.present?
steps -= [:payment, :workshops] if registration.is_attending == 'n'
steps.each do |step|
# disable the step if we've already found an incomplete step

View File

@ -6,16 +6,13 @@ class UserMailer < ActionMailer::Base
before_filter :set_host
default from: "Bike!Bike! <" + ENV['SMTP_USER_NAME'] + ">"
default from: "Bike!Bike! <info@bikebike.org>"
def email_confirmation(confirmation)
@confirmation = EmailConfirmation.find_by_id(confirmation) if confirmation.present?
if @confirmation.present?
I18n.locale = @confirmation.user.locale if @confirmation.user.locale.present?
mail to: @confirmation.user.named_email, subject: clean_subject(_'email.subject.confirm_email','Please confirm your email address')
File.write('mailerdebug', @confirmation.user.named_email, mode: 'a')
File.write('mailerdebug', " (in user_mailer.rb at " + Time.now.strftime("%d/%m/%Y %H:%M") + ")\n", mode: 'a')
end
end
@ -148,14 +145,10 @@ class UserMailer < ActionMailer::Base
@user = User.find(@request.data['user'].to_i) if @request.data['user'].present?
File.write('mailerdebug', report_signature, mode: 'a')
File.write('mailerdebug', " (in user_mailer.rb at " + Time.now.strftime("%d/%m/%Y %H:%M") + ")\n", mode: 'a')
mail to: administrators, subject: clean_subject(subject), reply_to: @user.present? ? @user.named_email : nil
end
def contact(from, subject, message, email_list)
return if subject =~ /^[a-z]{10}$/
@message = message
@from = from.is_a?(Integer) ? User.find(from) : from
@ -163,26 +156,25 @@ class UserMailer < ActionMailer::Base
end
def contact_details(from, subject, message, request, params)
return if subject =~ /^[a-z]{10}$/
@message = message
@from = from.is_a?(Integer) ? User.find(from) : from
@request = request
@params = params
mail to: ENV['ADMIN_EMAIL'], subject: clean_subject("Details for: \"#{subject}\"")
mail to: 'goodgodwin@hotmail.com', subject: clean_subject("Details for: \"#{subject}\"")
end
def server_startup(environment)
@environment = environment
mail to: ENV['ADMIN_EMAIL'], subject: clean_subject("Deployment to #{environment} complete")
mail to: 'goodgodwin@hotmail.com', subject: clean_subject("Deployment to #{environment} complete")
end
private
def set_host(*args)
if Rails.env.production?
@host = "https://#{I18n.locale.to_s}." + ENV['DEFAULT_URL']
@host = "https://#{I18n.locale.to_s}.bikebike.org"
elsif Rails.env.preview?
@host = "https://preview-#{I18n.locale.to_s}." + ENV['DEFAULT_URL']
@host = "https://preview-#{I18n.locale.to_s}.bikebike.org"
else
@host = UserMailer.default_url_options[:host]
end

View File

@ -1,6 +1,6 @@
-#- contact_reason ||= nil
-#- locale ||= nil
-#= form_tag (locale.present? ? contact_send_url : url_for_locale(locale, contact_send_path)), class: 'contact-form' do
- contact_reason ||= nil
- locale ||= nil
= form_tag (locale.present? ? contact_send_url : url_for_locale(locale, contact_send_path)), class: 'contact-form' do
= emailfield :email, nil, big: true, required: true unless logged_in?
- if contact_reason.present?
= hidden_field_tag :reason, contact_reason

View File

@ -6,5 +6,4 @@
= hidden_field_tag :dest, settings_path if dest.present?
= emailfield :email, nil, big: true, required: true
= button :continue, value: :confirm_email
= recaptcha_execute('login')
= link_to (_'forms.actions.generic.facebook_sign_in','Facebook Sign In'), auth_at_provider_path(provider: :facebook, dest: dest), class: [:button, :facebook]

View File

@ -6,6 +6,5 @@
%h2=_'articles.contact.headings.sent', :t
%p=_'articles.contact.paragraphs.sent', :p
- else
%h2=_'Email info@bikebike.org & bikebikeeverywhere@gmail.com'
-#%h2=_'articles.contact.headings.contact'
-# = render 'contact', cancel_btn: false
%h2=_'articles.contact.headings.contact'
= render 'contact', cancel_btn: false

View File

@ -3,15 +3,15 @@
= data_set(:h3, 'articles.admin.stats.headings.completed_registrations') do
= (@completed_registrations || 0).to_s
= data_set(:h3, 'articles.admin.stats.headings.incomplete_registrations') do
= ((@registration_count || 0) - (@completed_registrations || 0)).to_s
= ((@registration_count - @completed_registrations) || 0).to_s
= data_set(:h3, 'articles.admin.stats.headings.bikes') do
= (@completed_registrations || 0) > 0 ? "#{@bikes} (#{number_to_percentage(@bikes / @completed_registrations.to_f * 100.0)})" : "0"
= data_set(:h3, 'articles.admin.stats.headings.food.meat') do
= @food && (@food[:all] || 0) > 0 ? "#{@food[:meat]} (#{number_to_percentage(@food[:meat] / @food[:all].to_f * 100.0)})" : "0"
= (@food[:all] || 0) > 0 ? "#{@food[:meat]} (#{number_to_percentage(@food[:meat] / @food[:all].to_f * 100.0)})" : "0"
= data_set(:h3, 'articles.admin.stats.headings.food.vegetarian') do
= @food && (@food[:all] || 0) > 0 ? "#{@food[:vegetarian]} (#{number_to_percentage(@food[:vegetarian] / @food[:all].to_f * 100.0)})" : "0"
= (@food[:all] || 0) > 0 ? "#{@food[:vegetarian]} (#{number_to_percentage(@food[:vegetarian] / @food[:all].to_f * 100.0)})" : "0"
= data_set(:h3, 'articles.admin.stats.headings.food.vegan') do
= @food && (@food[:all] || 0) > 0 ? "#{@food[:vegan]} (#{number_to_percentage(@food[:vegan] / @food[:all].to_f * 100.0)})" : "0"
= (@food[:all] || 0) > 0 ? "#{@food[:vegan]} (#{number_to_percentage(@food[:vegan] / @food[:all].to_f * 100.0)})" : "0"
= data_set(:h3, 'articles.admin.stats.headings.donation_count') do
= (@completed_registrations || 0) > 0 ? "#{@donation_count} (#{number_to_percentage(@donation_count / @completed_registrations.to_f * 100.0)})" : "0"
= data_set(:h3, 'articles.admin.stats.headings.donation_total') do
@ -22,5 +22,5 @@
= columns(medium: 12) do
%h3=_'articles.admin.stats.headings.past_stats'
%ul.actions.center
- (@past_conferences || []).each do |conference|
- @past_conferences.each do |conference|
= link_to conference.title, previous_stats_path(@this_conference.slug, conference.slug, format: :xlsx), class: [:button, :download]

View File

@ -6,7 +6,7 @@
.title
%h1=_!conference.title
.details
%h2.primary=location(conference.city || conference.location) if conference.city_name.present? && conference.city_id != 433
%h2.primary=location(conference.city || conference.location) if conference.city_name.present?
- if conference.start_date.present? && conference.end_date.present?
.secondary
= date_span(conference.start_date.to_date, conference.end_date.to_date)

View File

@ -8,7 +8,6 @@
= email_field_tag :email, nil, required: true
= label_tag :email
= button :continue, value: :confirm_email
= recaptcha_execute('conferences_confirm')
= columns(medium: 12, class: 'flex-column') do
%p.stretch-item=_'articles.conference_registration.paragraphs.facebook_sign_in'
= link_to (_'forms.actions.generic.facebook_sign_in','Facebook Sign In'), auth_at_provider_path(:provider => :facebook), class: [:button, :facebook]

View File

@ -10,7 +10,7 @@
= stylesheets
%link{ href: asset_path(@favicon), rel: 'shortcut icon', type: 'image/x-icon' }
%link{ href: asset_path(@favicon), rel: 'icon', type: 'image/x-icon' }
- (@alt_lang_urls || []).each do |locale, url|
- @alt_lang_urls.each do |locale, url|
%link{ rel: :alternate, hreflang: locale, href: url }
%link{ href: canonical_url, rel: :canonical }
- if content_for?(:og_image)
@ -20,7 +20,6 @@
%meta{property: 'og:type', content: 'website'}
%meta{property: 'og:image', content: og_image}
%meta{name: "theme-color", content: @theme_colour}
%script{src: "https://www.google.com/recaptcha/api.js?render=#{ENV['RECAPTCHA_SITE_KEY']}" }
= yield :head
%body{ class: page_style }
@ -54,7 +53,7 @@
.dlg-inner
%p.message=''
%a.button.confirm=_'modals.yes_button'
%button.delete.close=_'modals.no_button'
%button.delete.close=_'modals.no_button'
- if @info_dlg.present?
.dlg#info-dlg
.dlg-content
@ -69,7 +68,7 @@
.dlg-inner
.message=''
%button.close=_'modals.done_button'
- if @login_dlg.present?
- if @login_dlg.present?
.dlg#login-dlg
.dlg-content
%h2.title=_'forms.actions.generic.login'
@ -78,11 +77,10 @@
= hidden_field_tag :dest, settings_path
= emailfield :email, nil, big: true
= button :continue, value: :confirm_email
= recaptcha_execute('sign_in')
.flex-form
= link_to (_'forms.actions.generic.facebook_sign_in','Facebook Sign In'), auth_at_provider_path(provider: :facebook, dest: settings_path), class: [:button, :facebook]
%button.close.subdued=_'forms.actions.generic.cancel'
- if @event_dlg.present?
.event-dlg#event-dlg{ data: { type: :event } }
.event-details

View File

@ -10,21 +10,17 @@
- unless @currencies.present? && @currencies.length > 1
%p.center=_"articles.conference_registration.paragraphs.currency_details", :p, vars: { currency: (_"currencies.#{(@currencies || [@currency]).first}.displayName-count-other") }
= save_registration_step do
- if @this_conference.slug == "South2022"
%iframe{:src => "https://opencollective.com/embed/bikebike-everywhere/donate?email=#{current_user.email}&name=#{current_user.firstname} #{current_user.lastname}", :style => "width: 100%; min-height: 100vh;"}
= textfield :notes, @notes, required: true
- else
.registration-step-options
.options.graded-options{class: "option-count-#{@amounts.size}"}
- @amounts.each_with_index do |option, i|
= button "#{number_to_currency option, unit: '$'} #{_!@currency}".html_safe, value: option, name: :value, class: [:unstyled, "option-#{i + 1}"]
.registration-step-options
.options.graded-options{class: "option-count-#{@amounts.size}"}
- @amounts.each_with_index do |option, i|
= button "#{number_to_currency option, unit: '$'} #{_!@currency}".html_safe, value: option, name: :value, class: [:unstyled, "option-#{i + 1}"]
.option-space
.custom-option
= number_field_tag :custom_value, 50.0, step: 0.05, min: 0.05
= button :custom_amount, name: :custom_amount, value: :custom, class: :unstyled
- if @currencies.present? && @currencies.length > 1
.option-space
.custom-option
= number_field_tag :custom_value, 50.0, step: 0.05, min: 0.05
= button :custom_amount, name: :custom_amount, value: :custom, class: :unstyled
- if @currencies.present? && @currencies.length > 1
.option-space
.setting-option
%p Change currency to:
- (@currencies - [@currency]).each do |c|
= button (_"currencies.#{c}.displayName-count-other"), name: :currency, value: c, class: :unstyled
.setting-option
%p Change currency to:
- (@currencies - [@currency]).each do |c|
= button (_"currencies.#{c}.displayName-count-other"), name: :currency, value: c, class: :unstyled

View File

@ -4,19 +4,7 @@
= save_registration_step do
.vertical-registration-step-options
.options
- paypal_configured = @this_conference.paypal_email_address.present? && @this_conference.paypal_username.present? && @this_conference.paypal_password.present? && @this_conference.paypal_signature.present?
- @payment_methods.each do |option|
- if option.to_sym == :paypal
- if paypal_configured
- class_name = [:unstyled]
- class_name << :selected if @payment_method.present? && @payment_method.to_sym == option
= button "payment_#{option}".to_sym, value: option, class: class_name
- elsif option.to_sym == :on_arrival
- class_name = [:unstyled]
- class_name << :selected if @payment_method.present? && @payment_method.to_sym == option
- label_key = paypal_configured ? "payment_on_arrival" : "payment_on_arrival_with_link"
= button label_key.to_sym, value: option, class: class_name
- elsif option.to_sym != :paypal
- class_name = [:unstyled]
- class_name << :selected if @payment_method.present? && @payment_method.to_sym == option
= button "payment_#{option}".to_sym, value: option, class: class_name
- class_name = [:unstyled]
- class_name << :selected if @payment_method.present? && @payment_method.to_sym == option
= button "payment_#{option}".to_sym, value: option, class: class_name

View File

@ -76,14 +76,7 @@
- if guest.housing_data['other'].present?
%td{colspan: 3, lang: guest.user.locale.to_s == I18n.locale.to_s ? nil : guest.user.locale}
= paragraph guest.housing_data['other']
= row do
= columns(medium: 12) do
- if @this_conference.city_name.present? && @this_conference.city_id == 433
- if @this_conference.payment_message.present?
= richtext @this_conference.payment_message
%iframe{:src => "https://opencollective.com/embed/bikebike-everywhere/donate?amount=30&email=#{current_user.email}&name=#{current_user.firstname} #{current_user.lastname}", :style => "width: 100%; min-height: 100vh;"}
- if @this_conference.registration_open
= row do
= columns(medium: 12) do

View File

@ -8,7 +8,6 @@
= email_field_tag :email, nil, required: true
= label_tag :email
= button :continue, value: :confirm_email
= recaptcha_execute('registration_sign_in')
= columns(medium: 12, class: 'flex-column') do
%p.stretch-item=_'articles.conference_registration.paragraphs.facebook_sign_in'
= link_to (_'forms.actions.generic.facebook_sign_in','Facebook Sign In'), auth_at_provider_path(:provider => :facebook), class: [:button, :facebook]

View File

@ -6,7 +6,7 @@
= svg 'facebook', 'facebook logo'
.github
=_'links.footer.text.Help_contribute' do |title|
%a{href: 'https://git.bikeshopi.dev/bike/BikeBikeBike', target: :_blank, title: title}
%a{href: 'https://github.com/bikebike/BikeBike', target: :_blank, title: title}
= svg 'github', 'github logo'
.user-controls
- if logged_in?
@ -17,9 +17,7 @@
= signin_link
%ul.locales
.site-info
-# Commented the line below because the contact form was getting so much spam it was overwhelming the gmail smtp service
-#.contact-us=link_to (_'links.footer.help_text.contact'), contact_path, id: 'contact-link'
.contact-us=link_to 'bikebikeeverywhere@gmail.com', 'mailto:bikebikeeverywhere@gmail.com', id: 'contact-link'
.contact-us=link_to (_'links.footer.help_text.contact'), contact_path, id: 'contact-link'
.copy
=_'links.footer.help_text.contributors', 'Who contributed to building this website' do |title|
=link_to :humans_txt, {title: title} do

View File

@ -23,9 +23,8 @@
= checkboxes :languages, User.AVAILABLE_LANGUAGES, @languages, 'languages', vertical: true, heading: 'articles.workshops.headings.languages', help: 'articles.workshops.paragraphs.languages'
= radiobuttons :theme, Workshop.all_themes, @workshop.theme, 'workshop.options.theme', vertical: true, heading: 'articles.workshops.headings.theme', help: 'articles.workshops.paragraphs.theme', other: true
= columns(medium: 6) do
- if @this_conference.city_name.present? && @this_conference.city_id != 433
= checkboxes :needs, Workshop.all_needs, JSON.parse(@workshop.needs || '[]'), 'workshop.options.needs', vertical: true, heading: 'articles.workshops.headings.needs', help: 'articles.workshops.paragraphs.needs'
= radiobuttons :space, Workshop.all_spaces, @workshop.space, 'workshop.options.space', vertical: true, heading: 'articles.workshops.headings.space', help: 'articles.workshops.paragraphs.space'
= checkboxes :needs, Workshop.all_needs, JSON.parse(@workshop.needs || '[]'), 'workshop.options.needs', vertical: true, heading: 'articles.workshops.headings.needs', help: 'articles.workshops.paragraphs.needs'
= radiobuttons :space, Workshop.all_spaces, @workshop.space, 'workshop.options.space', vertical: true, heading: 'articles.workshops.headings.space', help: 'articles.workshops.paragraphs.space'
%h3#needs_facilitators-label=_'articles.workshops.headings.needs_facilitators','Looking for help?'
.input-field-help#needs_facilitators-desc=_'articles.workshops.paragraphs.needs_facilitators', :s, 2

BIN
bumbleberry-admin.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
bumbleberry-application.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
bumbleberry-web-fonts.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@ -1,151 +0,0 @@
#!/usr/bin/node
/* Bumbleberry broke when BikeBike was dockerized, and was updated to more recent and secure Ruby libraries.
This means that it no longer updates properly without breaking BikeBike. In the absense of using Bumbleberry
directly to update the css, when browser version are identified by BikeBike, if they don't exist in /public/stylesheets/*
the browser renders a responsive view, which doesn't look right for normal size screens.
Godwin recommended using the most recent css for the newer versions. This works well for modern browsers.
To enable this feat, the most recent browsers have to be identified, and the css from the most recent version
has to be copied over to the newer version. The irony is we could avoid this exercise, and only support modern browsers
with one css file, but in the spirit of browser justice let's not assume obscure browsers are not being used anymore.
The only disadvantage to this approach would be if a new browser with unknown css arose. Fortunately, this
probably won't be an issue for a long time to come, since new browsers projects almost always adopt the identity of a major
engine: and_chr, and_ff, and_qq, and_uc, android, baidu, bb, chrome, edge, firefox, ie, ie_mob, ios_saf, kaios, op_mini,
op_mobm, opera, safari, samsung
If a new engine does arise, we will deal with that issue when it occurs.
*/
/* retrieves all relevant browers - using default - https://browsersl.ist/
baidu:
{
name: 'baidu',
versions: [ '13.18' ],
released: [ '13.18' ],
releaseDate: { '13.18': 1663027200 }
}
*/
const browserlist = require('browserslist');
const path = require('path');
const fs = require('fs');
const { version } = require('process');
// three directories will be parsed: application, admin, web-fonts
const regex = /.css$/g;
const d = ["admin", "application", "web-fonts"];
d.forEach((dir) => {
caniuse(dir);
});
function caniuse(dir) {
const directory = path.join(__dirname, 'public/stylesheets', dir);
const directoryFiles = {};
fs.readdir(directory, function (err, files) {
//handling error
if (err) {
return console.log('Unable to scan directory: ' + err);
}
//listing all files using forEach
files.forEach((file) => {
if (file.match(regex)) {
//console.log(file)
const browserType = file.split('-', 2)[0];
const bv = file.split('-', 2)[1];
const browserVersion = bv.split('.css', 2)[0];
if (directoryFiles[browserType] === undefined) {
directoryFiles[browserType] = [browserVersion];
} else {
directoryFiles[browserType].push(browserVersion);
}
}
});
// Here's where we process the files according to these rules
// RULES
//
// Find all versions that don't exist for each browser, by comparing to browserlist versions for each browser.
// The most recent css version of the browser will be copied over to each of those newer caniuse versions.
// Fortunately, caniuse versions are sequential in order, so they can be compared easily by beginning at the most recent
// caniuse version, and stepping down to a version that matches an existing version
//
// In some cases, one or more versions of a browser exist, but they don't exist in the browserlist versions.
// This can be tested if a browser file exists with no matching version. In this case, copy the most recent file
// to any new browserlist versions. Example: and_chr, and_ff
//
// If all versions of a browser exists in browerlist, and are exact matches,
// no copying is required. Example: op_mini-all and (bb-7 & bb-10).
// We assume we know all engines that ever existed :)
for (const browser in directoryFiles) {
// This finds the differences between browserlist and the files in the directory
difference = browserlist.data[browser].versions.filter(x => !directoryFiles[browser].includes(x));
// This estables if there are any common items between the two arrays
const commonality = browserlist.data[browser].versions.some(item => directoryFiles[browser].includes(item));
// we only have to copy the most recent css when there is a difference
const browserVersions = browserlist.data[browser].versions;
if (difference.length) {
// console.log(browser + ":")
// console.log("Commonality is", commonality);
// console.log("Directory Files", directoryFiles[browser]);
// console.log("Difference", difference);
// Step down from caniuse versions until there is a match in the directory.
let c = 1;
if (commonality) {
while (browserVersions[browserVersions.length - c]) {
let bV = browserVersions[browserVersions.length - c];
// Use this as the file in the directory to be copied over to the different versions if there is a match.
if (directoryFiles[browser].includes(bV)) {
// console.log("Found", browser + " " + bV);
const recentFile = path.join(directory, browser + "-" + bV + ".css");
// console.log(recentFile)
difference.forEach((ver) => {
let newFile = path.join(__dirname, "public/stylesheets", dir, browser + "-" + ver + ".css");
fs.copyFile(recentFile, newFile, (err) => {
if (err) {
console.log("Error Found:", err);
} else {
// console.log("copied " + recentFile + " to " + newFile);
}
});
});
break;
}
// console.log(browserVersions[browserVersions.length - c]);
c++;
}
}
// If there is no match, use the most recent version in the directory to copy over to the different versions
// It's a safe choice to use the last element as the most recent version
else {
const rV = directoryFiles[browser][directoryFiles[browser].length - 1];
const recentFile = path.join(directory, browser + "-" + rV + ".css");
difference.forEach((ver) => {
let newFile = path.join(__dirname, "public/stylesheets", dir, browser + "-" + ver + ".css");
fs.copyFile(recentFile, newFile, (err) => {
if (err) {
console.log("Error Found:", err);
} else {
// console.log("copied " + recentFile + " to " + newFile);
}
});
});
}
}
}
});
}

View File

@ -1,22 +0,0 @@
default: &default
smtp_address: <%= ENV['SMTP_ADDRESS'] %>
smtp_domain: <%= ENV['SMTP_DOMAIN'] %>
smtp_port: <%= ENV['SMTP_PORT'] %>
smtp_user_name: <%= ENV['SMTP_USER_NAME'] %>
smtp_password: <%= ENV['SMTP_PASSWORD'] %>
smtp_ssl: <%= ENV['SMTP_SSL'] %>
default_url: <%= ENV['DEFAULT_URL'] %>
recaptcha_secret_key: <%= ENV['RECAPTCHA_SECRET_KEY'] %>
recaptcha_site_key: <%= ENV['RECAPTCHA_SITE_KEY'] %>
development:
<<: *default
test:
<<: *default
preview:
<<: *default
production:
<<: *default

View File

@ -1,7 +1,4 @@
BikeBike::Application.configure do
config.app_config = config_for(:app_config)
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
@ -29,47 +26,19 @@ BikeBike::Application.configure do
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
config.assets.digest = true
config.assets.digest = true
config.assets.compile = true
config.assets.unknown_asset_fallback = false
config.assets.precompile = ["manifest.js"]
config.assets.check_precompiled_asset = false
# Version of your assets, change this if you want to expire all your assets.
config.assets.version = '1.01'
config.serve_static_files = true
config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif *.json *.ttf *.otf *.woff *.woff2 *.svg *.json)
# to deliver to the browser instead of email
#config.action_mailer.delivery_method = :letter_opener
#config.action_mailer.raise_delivery_errors = true
#config.action_mailer.perform_deliveries = true
# SMTP real-world test
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: config.app_config['smtp_address'],
domain: config.app_config['smtp_domain'],
port: config.app_config['smtp_port'],
ssl: config.app_config['smtp_ssl'],
authentication: :plain,
enable_starttls_auto: true,
openssl_verify_mode: 'none',
user_name: config.app_config['smtp_user_name'],
password: config.app_config['smtp_password']
}
config.action_mailer.delivery_method = :letter_opener
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
config.serve_static_files = true
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found).
config.i18n.fallbacks = true
I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_SUBDOMAIN
config.action_controller.default_url_options = { host: config.app_config['default_url'], trailing_slash: true }
Sidekiq::Extensions.enable_delay!
I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_URL_PARAM
#Paypal.sandbox!
#config.action_controller.default_url_options = { trailing_slash: true }
Paypal.sandbox!
config.action_controller.default_url_options = { trailing_slash: true }
end

View File

@ -28,7 +28,7 @@ BikeBike::Application.configure do
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = true
#config.assets.compile = true
# Generate digests for assets URLs.
config.assets.digest = true
@ -46,6 +46,8 @@ BikeBike::Application.configure do
# Set to :debug to see everything in the log.
config.log_level = :info
config.assets.compile = false
# Prepend all log lines with the following tags.
config.log_tags = [ :subdomain, :uuid ]
@ -59,8 +61,7 @@ BikeBike::Application.configure do
# config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets.
#config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif *.json *.ttf *.otf *.woff *.woff2 *.svg *.json)
config.assets.precompile = ["manifest.js"]
config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif *.json *.ttf *.otf *.woff *.woff2 *.svg *.json)
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
@ -81,19 +82,18 @@ BikeBike::Application.configure do
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: config.app_config['smtp_address'],
domain: config.app_config['smtp_domain'],
port: config.app_config['smtp_port'],
ssl: config.app_config['smtp_ssl'],
address: 'smtp.gmail.com',
domain: 'bikebike.org',
port: 587,
authentication: :plain,
enable_starttls_auto: true,
openssl_verify_mode: 'none',
user_name: config.app_config['smtp_user_name'],
password: config.app_config['smtp_password']
user_name: 'info@bikebike.org',
password: config.app_config['email_password']
}
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_SUBDOMAIN
config.action_controller.default_url_options = { host: config.app_config['default_url'], trailing_slash: true }
config.action_controller.default_url_options = { host: 'https://bikebike.org', trailing_slash: true }
Sidekiq::Extensions.enable_delay!
end

View File

@ -4,17 +4,7 @@
Twitter: @__Godwin__
From:Seattle, Washington, USA
Senior System Administrator, Developer and Dockerizer: Jonathan Rosenbaum
Contact: bike [at] bikelover.org
From:Morgantown, West Virginia, USA
Tech Tinkerer and Developer: April Wick
Contact: april [at] aprilwick.com
Current Developers: See our new Git with lfs
Website: https://git.bikeshopi.dev/bike/BikeBikeBike/
Other Historic Developers:See our Github
Other Developers:See our Github
Website: https://github.com/bikebike/BikeBike
Primary ES Translators:Jim Mayerstein; Ollin Monroy
@ -29,7 +19,7 @@
Thanks to everyone else who contributed translations, code, copy, photography, and general support!
/* SITE */
Last update:2023/07/18
Last update:2015/09/15
Language: English
Doctype:HTML5
IDE: Visual Studio Code, Sublime Text, Photoshop
IDE: Sublime Text, Photoshop

View File

@ -1,93 +0,0 @@
# Monkey-patch for bikecollectives_core gem to gracefully handle missing PayPal credentials
# This allows users to select "I can pay via host provided link" when PayPal isn't configured
if defined?(RegistrationControllerHelper)
module PayPalFallback
def paypal_configured?(conference)
conference.paypal_email_address.present? &&
conference.paypal_username.present? &&
conference.paypal_password.present? &&
conference.paypal_signature.present?
end
def payment_type_step(registration)
conference = registration.conference
payment_method = (registration.data || {})['payment_method']
available_methods = ConferenceRegistration.all_payment_methods.dup
available_methods.delete(:paypal) unless paypal_configured?(conference)
if !paypal_configured?(conference) && payment_method == 'paypal'
payment_method = 'host_payment'
end
{
payment_method: payment_method,
payment_methods: available_methods
}
end
def payment_type_step_update(registration, params)
return { status: :complete } if params[:button] == 'back'
conference = registration.conference
payment_type = params[:button].try(:to_sym)
available_methods = ConferenceRegistration.all_payment_methods.dup
available_methods.delete(:paypal) unless paypal_configured?(conference)
unless available_methods.include?(payment_type)
raise "Invalid payment type #{params[:button]}"
end
registration.data ||= {}
registration.data['payment_method'] = payment_type.to_s
registration.save!
{ status: :complete }
end
def payment_form_step(registration)
payment_method = (registration.data || {})['payment_method'].present? ? registration.data['payment_method'].to_sym : nil
if payment_method == :host_payment
return {
method: payment_method,
amount: (registration.data || {})['payment_amount'],
amounts: registration.conference.payment_amounts || Conference.default_payment_amounts,
currencies: [registration.conference.default_currency],
currency: registration.conference.default_currency,
no_ajax: true,
show_amount_form: true
}
end
super
end
def payment_form_step_update(registration, params)
payment_method = (registration.data || {})['payment_method'].to_sym
if payment_method == :host_payment
if params[:button] == 'back' || params[:button] == 'review'
return { status: :complete }
end
value = (params[:value] || params[:custom_value] || 0).to_f
unless value > 0
return {
status: :error,
message: 'amount_required'
}
end
registration.data ||= {}
registration.data['payment_amount'] = value
registration.data['payment_status'] = 'pending_manual'
registration.save!
return { status: :complete, message: 'manual_payment_pending' }
end
super
end
end
RegistrationControllerHelper.prepend(PayPalFallback)
end

View File

@ -1375,10 +1375,10 @@ en:
payment_message: Registration
schedule_info: Schedule
travel_info: Getting To %{city}
city_info: A little about %{city}
city_info: Weather and Crime in %{city}
what_to_bring: What to Bring
volunteering_info: Volunteering
conferences: International and Regional Conferences
conferences: National and Regional Conferences
Conference_List: Conferences
edit: Edit Conference
new: New Conference
@ -1388,10 +1388,8 @@ en:
future: Upcoming conferences
passed: Passed conferences
paragraphs:
conferences: Bike!Bike! conferences are held internationally once a year in a
different city; regional conferences can be held anywhere, anytime. Bike!Bike!
Everywhere events are virtual gatherings that may be international, regional,
or focused on specific topics.
conferences: Bike!Bike! conferences are held nationally once a year in a different
city in North America; regional conferences can be held anywhere, anytime.
admin:
headings:
back: Back to Administration
@ -1799,7 +1797,7 @@ en:
payment_form: Registration Fee Amount
org_select: Which organization are you a member of?
payment_type: Registration Fee Method
housing_other: Information for organizers
housing_other: Other considerations
housing_allergies: Do you have any allergies?
housing_food: What are your eating habits?
housing_bike: Would you like to borrow a bike?
@ -1948,16 +1946,16 @@ en:
to populate the list of known organizations that will be displayed on bikecollectives.org.
If you are involved with multiple organizations, please select one for now,
you will be able to add more organizations at a later date.
payment_type: If you can, please pay now online. We collect the registration
payment_type: If you can, please pay now via PayPal. We collect the registration
fee as a donation. Your donation pays for spaces, food, equipment, and much
more. Paying now enables us to prepare for the conference without paying
out of our own pockets. Otherwise, please pledge to pay on arrival. Your
pledge will help us make a rough plan for what we can and cannot afford.
Thank you.
housing_other: Please enter any information you would like organizers to consider
when preparing for your visit. If you have restrictions in terms of mobility,
diet or allergies, or preferences on the accommodations or guests that we will
place you with, please list them here.
housing_other: Do you have any special needs or considerations that we should
know about for your stay such as allergies, disabilities, or a need for
child care? Letting us know in advance will help us determine the best place
for you to stay and make any necessary preparations for the conference itself.
housing_allergies: Let us know if you have any allergies that we should be
made aware of.
housing_food: Please let us know your eating habits by selecting the option
@ -1974,13 +1972,11 @@ en:
housing_departure_date: When will you be leaving %{city}? If you wish to stay
in town longer and need housing or a bike after %{max_date}, please select
this date on the calendar below and contact us after you complete your registration.
We cannot guarantee that we can accommodate you but we will do our best.
(For virtual conferences select the last day you are available.)
We cannot guarantee that we can accommodate you but we will do our best.
housing_arrival_date: When will you be arriving in %{city}? If you will be
in town and need housing or a bike before %{min_date}, please select this
date on the calendar below and contact us after you complete your registration.
We cannot guarantee that we can accommodate you but we will do our best.
(For virtual conferences select the first day you are available.)
We cannot guarantee that we can accommodate you but we will do our best.
org_create_mailing_address: Please provide the organization's mailing address
so that we can send your organization a personal invite and poster for next
year's Bike!Bike!.
@ -2080,8 +2076,7 @@ en:
Verify_Account: In order to confirm that you are a real person and that we
will be able to contact you later, please verify your email address. We
will send you an email that will allow you to continue with the registration
process. If you don't receive the email in your inbox, please check your spam
or junk folder.
process.
facebook_sign_in: Alternatively you can sign in using your Facebook account
and skip waiting for us to send you an email.
can_provide_housing: Hosting visiting conference attendees is an important
@ -2443,18 +2438,15 @@ en:
reopen_registration: Re-open my registration
cancel_registration: Cancel my registration
organization_none: None of the above
payment_paypal: I can pay now online
payment_paypal_fallback: I can pay via host provided link
payment_host_payment: I can pay via host provided link
payment_paypal: I can pay now with PayPal
payment_on_arrival: I can pledge to pay on arrival
payment_on_arrival_with_link: I can pledge to pay on arrival or via host provided link
payment_none: Not now
food_meat: I eat meat and dairy
food_vegetarian: I am vegetarian
food_vegan: I am vegan
housing_none: I don't need a place to stay
housing_tent: I would like a tent spot
housing_house: Yes, I would like a place to stay
housing_tent: I would like a place to tent
housing_house: Yes, I would like to place to stay
'yes': 'Yes'
'no': 'No'
maybe: Maybe
@ -2462,7 +2454,7 @@ en:
back: Back
upload: Upload
select_file: Select a file
administrate: Administer
administrate: Administrate
login: Sign In
Log_out: Sign out
agree: I Agree

View File

@ -1301,11 +1301,9 @@ es:
payment_message: Registro
group_ride_info: Paseo en Grupo
paragraphs:
conferences: Las conferencias de Bike!Bike! se llevan a cabo internacionalmente
una vez al año en una ciudad diferente; Las conferencias regionales pueden
celebrarse en cualquier lugar y en cualquier momento. Los eventos Bike!Bike!
Everywhere son reuniones virtuales que pueden ser internacionales, regionales
o centradas en temas específicos.
conferences: Las conferencias de Bike!Bike! se llevan a cabo nacionalmente
una vez al año en una ciudad diferente en América del Norte; Las conferencias
regionales pueden celebrarse en cualquier lugar y en cualquier momento.
conference_registration:
headings:
Workshops_Looking_For_Facilitators: Talleres que necesitan facilitadorxs
@ -1348,7 +1346,7 @@ es:
can_provide_housing: "¿Puedes proporcionar hospedaje a quienes visitan la
ciudad?"
Verify_Account: Verifica tu cuenta
policy: Normas
policy: Normatividad
Contact_Info: Información de contacto
contact_info: Información de contacto
Administration: Administrar cuenta
@ -1386,7 +1384,7 @@ es:
housing_companion_email: Correo electrónico de tu acompañante
housing_departure_date: Fecha de partida
housing_food: Cuáles son tus hábitos alimenticios?
housing_other: Información para organizadores
housing_other: Otras consideraciones
housing_type: Hospedaje
org_create_address: Dirección de tu organización
org_create_email: Correo electrónico de tu organización
@ -1458,8 +1456,7 @@ es:
Verify_Account: Con el fin de confirmar que eres una persona real y que podremos
contactarte posteriormente, te pedimos que por favor verifiques tu dirección
de correo electrónico. Te enviaremos un mensaje para que puedas continuar
con el proceso de pre-registro. Si no recibes el mensaje en tu bandeja de entrada,
por favor revisa tu carpeta de spam o correo no deseado.
con el proceso de pre-registro.
Pre_Registration_Details: Al completar el proceso de pre-registro nos estás
haciendo saber que estás interesad@ en asistir, lo que nos permite contactarte
cuando tengamos noticias, y planear mejor [el evento] sabiendo quienes podrían
@ -1553,8 +1550,7 @@ es:
housing_arrival_date: Cuándo llegarás a %{city}? Si vas a llegar a la ciudad
antes de %{min_date} y necesitas hospedaje o una bici, por favor selecciona
la fecha en el calendario que está abajo y contáctanos después de que termines
tu registro. No podemos garantizarte hospedaje, pero haremos lo posible.
(Para conferencias virtuales seleccione el primer día que esté disponible.)
tu registro. No podemos garantizarte hospedaje, pero haremos lo posible.
housing_bike: Para hacernos una idea de cuántas bicicletas necesitamos preparar,
por favor avísanos si te gustaría que te prestáramos una bicicleta.
housing_companion_check: Viajas con tu pareja o con alguien que definitivamente
@ -1566,16 +1562,17 @@ es:
tiempo y necesitas hospedaje o una bici después de %{max_date}, por favor
selecciona las fechas en el calendario de bajo y contáctanos después de
concluir tu registro. No podemos garantizarte hospedaje pero haremos lo
posible.
(Para conferencias virtuales seleccione el ultimo día que esté disponible.)
posible.
housing_food: Por favor cuéntanos de tus hábitos alimenticios seleccionando
la opción que mejor describa el tipo de comida que comes. Usaremos esto
para decidir el tipo de comidas que prepararemos y la cantidad de alimentos
que necesitaremos.
housing_other: Ingrese cualquier información que le gustaría que los organizadores
consideren para su visita. Si tiene restricciones de movilidad, dieta o alergias,
o preferencias de alojamiento (ej. preferencia de huéspedes para compartir
alojamiento), indíquelos aquí por favor.
housing_other: Tienes algún requerimiento especial o consideraciones que creas
que debamos tener respecto a tu estadía, tales como alergias, limitaciones
de movilidad o discapacidades, o si necesitas guardería? Hacérnoslo saber
por adelantado nos ayudará a determinar mejor el lugar en el que te hospedarás
y si es necesario, preparar los mismos lugares en los que se realizará la
conferencia para tu mejor accesibilidad a ellos.
housing_type: Necesitas un lugar para quedarte en %{city} ? Haremos lo posible
por ubicarte con un(a) anfitrión(a) local y con lxs visitantes que mejor
coincidan con tus necesidades. 
@ -1738,7 +1735,7 @@ es:
org_select: Organización
payment_form: Cantidad a pagar por registro
payment_type: Método de pago para el registro
policy: Normas
policy: Normatividad
housing_bike: Necesitas bici?
warning:
companion_unregistered: Tu acompañante no se ha registrado. Por favor aseguráte
@ -2013,9 +2010,7 @@ es:
organization_none: Ningunx de lxs anteriores
payment_none: Por ahora no
payment_on_arrival: Puedo comprometerme a pagar a mi llegada
payment_on_arrival_with_link: Puedo comprometerme a pagar a mi llegada o mediante un enlace proporcionado por el anfitrión
payment_paypal: Puedo pagar ahora con Paypal
payment_paypal_fallback: Puedo pagar mediante un enlace proporcionado por el anfitrión
reopen_registration: Re-abrir mi registro
review: Revisar
'yes':
@ -2066,7 +2061,7 @@ es:
Locale_Not_Available: Locale no disponible
'500':
An_Error_Occurred: Ocurrió un error
Policy: Normas
Policy: Normatividad
About: Acerca de
Register: Regístrate
Pre_Register: Pre-Regístrate

View File

@ -1212,7 +1212,7 @@ fr:
hosting_space_tent: Hébergement sous tente
hosting_start_date: Date de début de lhébergement
housing_bike: Souhaitez-vous emprunter un vélo?
housing_other: Informations pour les organisateurs
housing_other: Autres précisions
housing_type: Hébergement
hosting_end_date: Date de fin de lhébergement
housing_companion_check: Hébergement pour deux personnes
@ -1294,11 +1294,9 @@ fr:
questions ou nous donner des renseignements que nous n''avons pas demandés,
venez écrire dans le champ en bas de cette page ou communiquer avec nous. '
Verify_Account: 'Pour confirmer que vous n''êtes pas un robot, et que nous
serons effectivement en mesure de communiquer avec vous ultérieurement, veuillez vérifier
votre adresse de messagerie électronique. Nous vous enverrons un message qui
vous permettra de poursuivre le processus d''inscription. Si vous ne recevez pas
le courriel dans votre boîte de réception, veuillez vérifier votre dossier de
courrier indésirables ou spam. '
pourrons effectivement communiquer avec vous ultérieurement, veuillez consulter
votre boîte de messagerie électronique. Nous vous enverrons un message qui
vous permettra de poursuivre votre inscription. '
can_provide_housing: Héberger des participants et des partipantes est une
composante essentielle de Bike!Bike! Cela permet à des gens qui n'auraient
pas les moyens de se payer un hébergement de prendre part au Congrès et
@ -1378,23 +1376,20 @@ fr:
et que vous avez besoin dun hébergement ou dun vélo avant %{min_date},
veuillez sélectionnez vos dates dans le calendrier ci-dessous et nous contacter
afin de compléter votre inscription. Nous ne pouvons garantir que nous pourrons
vous accommoder, mais nous ferons de notre mieux.
(Pour les conférences virtuelles, sélectionnez le premier jour où vous êtes disponible.)
vous accommoder, mais nous ferons de notre mieux.
housing_departure_date: Quand allez-vous quitter %{city}? Si vous voulez rester
plus longtemps et que vous avez besoin d'un hébergement et d'un vélo après
%{max_date}, veuillez sélectionner cette date dans le calendrier ci-dessous
et nous joindre une fois que vous avez fini de vous inscrire. Nous ne pouvons
vous promettre un hébergement, mais nous ferons notre possible pour vous
aider.
(Pour les conférences virtuelles, sélectionnez le dernier jour où vous êtes disponible.)
aider.
housing_food: Veuillez nous renseigner sur vos habitudes alimentaires en choisissant
l'option qui vous correspond le mieux. Cela nous aidera à préparer de meilleurs
repas et à prévoir des quantités de nourriture adaptées.
housing_other: "Merci d'indiquer toutes les informations que vous désirez porter à
l'attention des organisateurs, afin qu'elles puissent être prises en compte dans
l'organisation de votre séjour. Si vous avez des besoins en matière d'accessibilité,
un régime particulier ou des allergies, ou si vous avez des préférences concernant
votre hébergement et votre hôte : listez tout celà ici."
housing_other: Avez-vous des besoins spéciaux ou d'autres besoins à prendre
en compte, tel que des allergies, des incapacités ou du gardiennage d'enfants?
Veuillez le préciser ici afin de nous aider à vous trouver un hébergement
adapté et à organiser le congrès.
housing_type: Avez-vous besoin d'un hébergement à %{city}? Nous ferons notre
possible pour trouver des hébergements adaptés aux besoins de tous et de
toutes.
@ -1659,7 +1654,7 @@ fr:
types:
future: Congrès à venir
passed: Congrès passés
conferences: Congrès internationaux et régionaux
conferences: Congrès nationaux et régionaux
travel_info: Se rendre à %{city}
city_info: Météo et crime à %{city}
schedule_info: Calendrier
@ -1672,8 +1667,7 @@ fr:
paragraphs:
conferences: Les congrès Bike!Bike! sont tenus dans une ville nord-américaine
différente tous les ans. Les congrès régionaux ont lieu n'importe où et
à tout moment. Les événements Bike!Bike! Everywhere sont des rencontres virtuelles
qui peuvent être internationales, régionales ou axées sur des sujets spécifiques.
à tout moment.
permission_denied:
headings:
confirm_email: Merci de confirmer votre adresse de courriel
@ -1853,7 +1847,6 @@ fr:
'no': Non
maybe: Peut-être
payment_paypal: Je peux payer à l'instant avec Paypal
payment_paypal_fallback: Je peux payer via un lien fourni par l'hôte
food_vegan: Je suis végétalien
food_vegetarian: Je suis végétarien
food_meat: Je mange de la viande et des produits laitiers
@ -1863,8 +1856,7 @@ fr:
back: Retour
'yes': Oui
review: Revoir
payment_on_arrival: Je m'engage à payer après mon arrivée
payment_on_arrival_with_link: Je m'engage à payer à mon arrivée ou via un lien fourni par l'hôte
payment_on_arrival: Je mengage à payer après mon arrivée
organization_none: Aucune
housing_tent: Je voudrais un emplacement pour planter ma tente
housing_none: Je nai pas besoin dun hébergement

View File

@ -1,6 +1,3 @@
require 'sidekiq/web'
Sidekiq::Web.set :sessions, false
BikeBike::Application.routes.draw do
# Conferences
@ -10,7 +7,7 @@ BikeBike::Application.routes.draw do
get 'new' => 'administration#new', as: :new_conference
post 'save' => 'administration#save', as: :save_conference
scope ':slug', constraints: { slug: /[^\/]+/ } do
scope ':slug' do
root 'conferences#view', as: :conference
get 'edit' => 'administration#edit', as: :edit_conference
@ -74,12 +71,12 @@ BikeBike::Application.routes.draw do
end
# Contact
# scope :contact do
# root 'application#contact', as: :contact
scope :contact do
root 'application#contact', as: :contact
# post 'send' => 'application#contact_send', as: :contact_send
# get 'sent' => 'application#contact_sent', as: :contact_sent
# end
post 'send' => 'application#contact_send', as: :contact_send
get 'sent' => 'application#contact_sent', as: :contact_sent
end
# Static pages
get 'about' => 'application#about', as: :about
@ -99,7 +96,4 @@ BikeBike::Application.routes.draw do
# Home page
root 'application#home', as: :home
# Sidkiq Web UI
mount Sidekiq::Web => "/sidekiq"
end

View File

@ -1,6 +1,6 @@
rails_env = ENV['RAILS_ENV'] || 'production'
dir = 'BikeBike'
dir = 'rails'
if ENV['RAILS_ENV'] == 'preview'
worker_processes 1
@ -8,7 +8,7 @@ if ENV['RAILS_ENV'] == 'preview'
port = 8081
else
worker_processes 2
directory = '/app/BikeBike'
directory = '/home/rails'
port = 8080
end

View File

@ -27,9 +27,9 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end
create_table "authentications", force: :cascade do |t|
t.integer "user_id", null: false
t.string "provider", limit: 255, null: false
t.string "uid", limit: 255, null: false
t.integer "user_id", null: false
t.string "provider", null: false
t.string "uid", null: false
t.datetime "created_at"
t.datetime "updated_at"
end
@ -103,18 +103,18 @@ ActiveRecord::Schema.define(version: 20170817000540) do
create_table "conference_registrations", force: :cascade do |t|
t.integer "conference_id"
t.integer "user_id"
t.string "is_attending", limit: 255
t.string "is_attending"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "is_confirmed"
t.boolean "is_participant"
t.boolean "is_volunteer"
t.string "confirmation_token", limit: 255
t.string "email", limit: 255
t.string "confirmation_token"
t.string "email"
t.boolean "complete"
t.boolean "completed"
t.string "payment_confirmation_token", limit: 255
t.string "payment_info", limit: 255
t.string "payment_confirmation_token"
t.string "payment_info"
t.integer "registration_fees_paid"
t.string "city"
t.datetime "arrival"
@ -135,21 +135,21 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end
create_table "conference_types", force: :cascade do |t|
t.string "title", limit: 255
t.string "info", limit: 255
t.string "title"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
t.string "slug", limit: 255
t.string "slug"
end
create_table "conferences", force: :cascade do |t|
t.string "title", limit: 255
t.string "slug", limit: 255
t.string "title"
t.string "slug"
t.date "start_date"
t.date "end_date"
t.text "info"
t.string "poster", limit: 255
t.string "cover", limit: 255
t.string "poster"
t.string "cover"
t.boolean "workshop_schedule_published"
t.boolean "registration_open"
t.boolean "meals_provided"
@ -162,8 +162,8 @@ ActiveRecord::Schema.define(version: 20170817000540) do
t.text "registration_info"
t.text "postregistration_info"
t.integer "cover_attribution_id"
t.string "cover_attribution_name", limit: 255
t.string "cover_attribution_src", limit: 255
t.string "cover_attribution_name"
t.string "cover_attribution_src"
t.integer "cover_attribution_user_id"
t.string "locale"
t.string "email_address"
@ -241,15 +241,15 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end
create_table "event_types", force: :cascade do |t|
t.string "slug", limit: 255
t.string "slug"
t.text "info"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "events", force: :cascade do |t|
t.string "title", limit: 255
t.string "slug", limit: 255
t.string "title"
t.string "slug"
t.integer "event_type_id"
t.integer "conference_id"
t.text "info"
@ -272,16 +272,16 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end
create_table "locations", force: :cascade do |t|
t.string "title", limit: 255
t.string "title"
t.float "latitude"
t.float "longitude"
t.datetime "created_at"
t.datetime "updated_at"
t.string "country", limit: 255
t.string "territory", limit: 255
t.string "city", limit: 255
t.string "street", limit: 255
t.string "postal_code", limit: 255
t.string "country"
t.string "territory"
t.string "city"
t.string "street"
t.string "postal_code"
t.integer "city_id"
end
@ -295,33 +295,33 @@ ActiveRecord::Schema.define(version: 20170817000540) do
add_index "locations_organizations", ["organization_id", "location_id"], name: "loc_org_index", using: :btree
create_table "organization_statuses", force: :cascade do |t|
t.string "name", limit: 255
t.string "slug", limit: 255
t.string "info", limit: 255
t.string "name"
t.string "slug"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "organizations", force: :cascade do |t|
t.string "name", limit: 255
t.string "slug", limit: 255
t.string "email_address", limit: 255
t.string "url", limit: 255
t.string "name"
t.string "slug"
t.string "email_address"
t.string "url"
t.integer "year_founded"
t.text "info"
t.string "logo", limit: 255
t.string "avatar", limit: 255
t.string "logo"
t.string "avatar"
t.boolean "requires_approval"
t.string "secret_question", limit: 255
t.string "secret_answer", limit: 255
t.string "secret_question"
t.string "secret_answer"
t.integer "user_organization_replationship_id"
t.datetime "created_at"
t.datetime "updated_at"
t.string "cover", limit: 255
t.string "cover"
t.integer "cover_attribution_id"
t.string "cover_attribution_name", limit: 255
t.string "cover_attribution_src", limit: 255
t.string "phone", limit: 255
t.string "cover_attribution_name"
t.string "cover_attribution_src"
t.string "phone"
t.integer "organization_status_id"
t.integer "cover_attribution_user_id"
t.string "status"
@ -352,11 +352,11 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end
create_table "registration_form_fields", force: :cascade do |t|
t.string "title", limit: 255
t.string "title"
t.text "help"
t.boolean "required"
t.string "field_type", limit: 255
t.string "options", limit: 255
t.string "field_type"
t.string "options"
t.boolean "is_retired"
t.datetime "created_at"
t.datetime "updated_at"
@ -383,7 +383,7 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end
create_table "sessions", force: :cascade do |t|
t.string "session_id", limit: 255, null: false
t.string "session_id", null: false
t.text "data"
t.datetime "created_at"
t.datetime "updated_at"
@ -417,11 +417,11 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end
create_table "translations", force: :cascade do |t|
t.string "locale", limit: 255
t.string "key", limit: 255
t.string "locale"
t.string "key"
t.text "value"
t.text "interpolations"
t.boolean "is_proc", default: false
t.boolean "is_proc", default: false
t.datetime "created_at"
t.datetime "updated_at"
end
@ -429,34 +429,34 @@ ActiveRecord::Schema.define(version: 20170817000540) do
create_table "user_organization_relationships", force: :cascade do |t|
t.integer "user_id"
t.integer "organization_id"
t.string "relationship", limit: 255
t.string "relationship"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "users", force: :cascade do |t|
t.string "username"
t.string "email", limit: 255
t.string "crypted_password", limit: 255
t.string "salt", limit: 255
t.string "email"
t.string "crypted_password"
t.string "salt"
t.datetime "created_at"
t.datetime "updated_at"
t.string "remember_me_token", limit: 255
t.string "remember_me_token"
t.datetime "remember_me_token_expires_at"
t.string "reset_password_token", limit: 255
t.string "reset_password_token"
t.datetime "reset_password_token_expires_at"
t.datetime "reset_password_email_sent_at"
t.string "activation_state", limit: 255
t.string "activation_token", limit: 255
t.string "activation_state"
t.string "activation_token"
t.datetime "activation_token_expires_at"
t.integer "failed_logins_count", default: 0
t.integer "failed_logins_count", default: 0
t.datetime "lock_expires_at"
t.string "unlock_token", limit: 255
t.string "avatar", limit: 255
t.string "unlock_token"
t.string "avatar"
t.text "about_me"
t.string "role", limit: 255
t.string "firstname", limit: 255
t.string "lastname", limit: 255
t.string "role"
t.string "firstname"
t.string "lastname"
t.boolean "is_translator"
t.json "languages"
t.string "locale"
@ -473,19 +473,19 @@ ActiveRecord::Schema.define(version: 20170817000540) do
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", using: :btree
create_table "versions", force: :cascade do |t|
t.string "item_type", limit: 255
t.string "item_type"
t.integer "item_id"
t.string "event", limit: 255
t.string "whodunnit", limit: 255
t.string "event"
t.string "whodunnit"
t.text "object"
t.datetime "created_at"
t.string "value", limit: 255
t.string "value"
end
create_table "workshop_facilitators", force: :cascade do |t|
t.integer "user_id"
t.integer "workshop_id"
t.string "role", limit: 255
t.string "role"
t.datetime "created_at"
t.datetime "updated_at"
end
@ -498,9 +498,9 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end
create_table "workshop_presentation_styles", force: :cascade do |t|
t.string "name", limit: 255
t.string "slug", limit: 255
t.string "info", limit: 255
t.string "name"
t.string "slug"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "order"
@ -509,31 +509,31 @@ ActiveRecord::Schema.define(version: 20170817000540) do
create_table "workshop_requested_resources", force: :cascade do |t|
t.integer "workshop_id"
t.integer "workshop_resource_id"
t.string "status", limit: 255
t.string "status"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "workshop_resources", force: :cascade do |t|
t.string "name", limit: 255
t.string "slug", limit: 255
t.string "info", limit: 255
t.string "name"
t.string "slug"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "workshop_streams", force: :cascade do |t|
t.string "name", limit: 255
t.string "slug", limit: 255
t.string "info", limit: 255
t.string "name"
t.string "slug"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "order"
end
create_table "workshops", force: :cascade do |t|
t.string "title", limit: 255
t.string "slug", limit: 255
t.string "title"
t.string "slug"
t.text "info"
t.integer "conference_id"
t.integer "workshop_stream_id"

View File

@ -1,12 +0,0 @@
#!/bin/bash
# This assume docker compose build, which takes a long time and builds the image, has already happened,
# it should on up -d.
# Also, you may need to remove and create the external volumes again for the steps
# below to work correctly.
docker compose up -d
docker compose run --rm bikebike rake db:setup
docker compose run --rm bikebike rake db:migrate
docker compose run --rm bikebike rake assets:precompile
docker compose down
docker compose up -d

View File

@ -1,149 +0,0 @@
# BikeBike
#
# ENV DATABASE_URL string = https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
#
# docker-compose.build:
#
# docker compose up -d
# docker compose run --rm bikebike rake db:setup
# docker compose run --rm bikebike rake db:migrate
# docker compose run --rm bikebike rake assets:precompile
# docker compose down
# docker compose up -d
#
# Never do this because new sprockets and manifest.js isn't precompiling to *css, and breaks the container
# -- docker-compose run bikebike rake bumbleberry:update --
#
# This is why we resort to git lfs, and utilize precompiled css,
# which is updated as requuired to newest modern browsers with caniuse.js
#
# exporting database: pg_dump -c -U bike_bike bike_bike > bike_bike.sql
services:
redis:
# container_name: bikebikebike-redis
image: redis:6.2-alpine
ports:
- "6379"
restart: always
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
#volumes:
# -
# Run sidekiq as it's own process using the same image that bikbike uses!
sidekiq:
image: bikebikebike
# container_name: bikebikebike-sidekiq
command: sidekiq -q production
environment:
- REDIS_URL=redis://redis:6379
- DATABASE_URL=${DATABASE_URL:-postgresql://bike_bike:password@db/bike_bike?encoding=unicode&pool=5}
- PORT=3000
- RAILS_ENV=${RAILS_ENV:-production}
- SMTP_ADDRESS=${SMTP_ADDRESS:-fake-smtp.bikebike.org}
- SMTP_DOMAIN=${SMTP_DOMAIN:-bikebike.org}
- SMTP_PORT=${SMTP_PORT:-587}
- SMTP_USER_NAME=${SMTP_USER_NAME:-info@bikebike.org}
- SMTP_PASSWORD=${SMTP_PASSWORD:-fake}
- SMTP_SSL=${SMTP_SSL:-false}
- ADMIN_EMAIL=${ADMIN_EMAIL:-info@bikebike.org}
- DEFAULT_URL=${DEFAULT_URL:-bikebike.org}
restart: always
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
db:
# container_name: bikebikebike-db
image: postgres:9.5
ports:
- "5432"
restart: always
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
- bikebikebike_db:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_USER=bike_bike
- POSTGRES_DB=bike_bike
bikebike:
build: .
image: bikebikebike
# container_name: bikebikebike
networks:
letsencrypt:
default:
command: /bin/sh -c "rm -f /app/BikeBike/tmp/pids/server.pid && rails server -b '0.0.0.0'"
# Add environment values that are not in .env (environment:) below in the bike_bike_advanced_environment file
# Empty file ok, too, or just comment out this section
env_file:
- bike_bike_advanced_environment
# Add your own environment values in .env, or use the default ones
environment:
- PORT=3000
- RAILS_ENV=${RAILS_ENV:-production}
- DATABASE_URL=${DATABASE_URL:-postgresql://bike_bike:password@db/bike_bike?encoding=unicode&pool=5}
- SMTP_ADDRESS=${SMTP_ADDRESS:-fake-smtp.bikebike.org}
- SMTP_DOMAIN=${SMTP_DOMAIN:-bikebike.org}
- SMTP_PORT=${SMTP_PORT:-587}
- SMTP_USER_NAME=${SMTP_USER_NAME:-info@bikebike.org}
- SMTP_PASSWORD=${SMTP_PASSWORD:-fake}
- SMTP_SSL=${SMTP_SSL:-false}
- ADMIN_EMAIL=${ADMIN_EMAIL:-info@bikebike.org}
- DEFAULT_URL=${DEFAULT_URL:-bikebike.org}
- REDIS_URL=redis://redis:6379
- RECAPTCHA_SECRET_KEY=${RECAPTCHA_SECRET_KEY:-123456789}
- RECAPTCHA_SITE_KEY=${RECAPTCHA_SITE_KEY:-123456789}
volumes:
- bikebikebike:/app/BikeBike
- bikebikebike_bundle:/usr/local/bundle
- bikebikebike_uploads:/app/BikeBike/public/uploads
expose:
- "3000"
links:
- db
# Make sure to rename container to what is being used
labels:
ofelia.enabled: "true" # in rss2email
ofelia.job-exec.bikebikebike-caniuse.schedule: "@every 6h"
ofelia.job-exec.bikebikebike-caniuse.container: "bikebikebike"
ofelia.job-exec.bikebikebike-caniuse.command: "/app/BikeBike/caniuse.js"
ofelia.job-exec.bikebikebike-caniuse.user: "root:root"
ofelia.job-exec.bikebikebike-browserlist.schedule: "@every 24h"
ofelia.job-exec.bikebikebike-browserlist.container: "bikebikebike"
ofelia.job-exec.bikebikebike-browserlist.command: "/root/.local/share/pnpm/pnpm update browserlist@latest"
ofelia.job-exec.bikebikebike-browserlist.user: "root:root"
restart: always
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Currently set to false for all volumes for development
volumes:
bikebikebike_db:
external: false
bikebikebike:
external: false
bikebikebike_bundle:
external: false
bikebikebike_uploads:
external: false
# Remove this network if you don't use it
networks:
letsencrypt:
external: true

View File

@ -1,8 +0,0 @@
#!/bin/bash
set -e
# Remove a potentially pre-existing server.pid for Rails.
rm -f /app/BikeBike/tmp/pids/server.pid
# Then exec the container's main process (what's set as CMD in the Dockerfile).
exec "$@"

View File

@ -111,6 +111,10 @@ def create_registration(user = TestState.my_account)
'group_ride' => true
}
registration.housing_data = { 'other' => '', 'companion' => false }
registration.city_id = City.search('Los Angeles').id unless City.exists?(registration.city_id)
registration.data['city_id'] = City.search('Montreal').id unless City.exists?(registration.data['city_id'])
registration.save!
if user == TestState.my_account

File diff suppressed because one or more lines are too long

View File

@ -1,51 +0,0 @@
---
Brooklyn NY: !ruby/object:Geocoder::Result::Google
data:
address_components:
- long_name: Brooklyn
short_name: Brooklyn
types:
- political
- sublocality
- sublocality_level_1
- long_name: Kings County
short_name: Kings County
types:
- administrative_area_level_2
- political
- long_name: New York
short_name: NY
types:
- administrative_area_level_1
- political
- long_name: United States
short_name: US
types:
- country
- political
formatted_address: Brooklyn, NY, USA
geometry:
bounds:
northeast:
lat: 40.739446
lng: -73.8333651
southwest:
lat: 40.551042
lng: -74.05663
location:
lat: 40.6781784
lng: -73.9441579
location_type: APPROXIMATE
viewport:
northeast:
lat: 40.739446
lng: -73.8333651
southwest:
lat: 40.551042
lng: -74.05663
place_id: ChIJCSF8lBZEwokRhngABHRcdoI
types:
- political
- sublocality
- sublocality_level_1
cache_hit:

View File

@ -1,5 +0,0 @@
{
"dependencies": {
"browserslist": "^4.28.1"
}
}

61
pnpm-lock.yaml generated
View File

@ -1,61 +0,0 @@
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
browserslist:
specifier: ^4.28.1
version: 4.28.1
packages:
/baseline-browser-mapping@2.9.19:
resolution: {integrity: sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==}
hasBin: true
dev: false
/browserslist@4.28.1:
resolution: {integrity: sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
baseline-browser-mapping: 2.9.19
caniuse-lite: 1.0.30001767
electron-to-chromium: 1.5.283
node-releases: 2.0.27
update-browserslist-db: 1.2.3(browserslist@4.28.1)
dev: false
/caniuse-lite@1.0.30001767:
resolution: {integrity: sha512-34+zUAMhSH+r+9eKmYG+k2Rpt8XttfE4yXAjoZvkAPs15xcYQhyBYdalJ65BzivAvGRMViEjy6oKr/S91loekQ==}
dev: false
/electron-to-chromium@1.5.283:
resolution: {integrity: sha512-3vifjt1HgrGW/h76UEeny+adYApveS9dH2h3p57JYzBSXJIKUJAvtmIytDKjcSCt9xHfrNCFJ7gts6vkhuq++w==}
dev: false
/escalade@3.2.0:
resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
engines: {node: '>=6'}
dev: false
/node-releases@2.0.27:
resolution: {integrity: sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==}
dev: false
/picocolors@1.1.1:
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
dev: false
/update-browserslist-db@1.2.3(browserslist@4.28.1):
resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==}
hasBin: true
peerDependencies:
browserslist: '>= 4.21.0'
dependencies:
browserslist: 4.28.1
escalade: 3.2.0
picocolors: 1.1.1
dev: false