Browse Source

Fixed translation, CDN, and POST issues for prod

development
Godwin 9 years ago
parent
commit
24281ad9e2
  1. 22
      Gemfile
  2. 28
      Gemfile.lock
  3. 2
      app/views/shared/_footer.html.haml
  4. 1
      config/application.rb
  5. 11
      config/environments/production.rb
  6. 29
      config/locales/en.yml
  7. 2
      config/locales/es.yml
  8. 2
      config/routes.rb

22
Gemfile

@ -6,11 +6,23 @@ gem 'haml'
gem 'jquery-rails' gem 'jquery-rails'
gem 'jquery-ui-rails' gem 'jquery-ui-rails'
gem 'coffee-rails', '~> 4.0.0' gem 'coffee-rails', '~> 4.0.0'
gem 'lingua_franca', :git => 'git://github.com/lingua-franca/lingua_franca.git'
if Dir.exists?('../lingua_franca')
gem 'lingua_franca', :path => '../lingua_franca'
else
gem 'lingua_franca', :git => 'git://github.com/lingua-franca/lingua_franca.git'
end
gem 'tzinfo-data' gem 'tzinfo-data'
gem 'sass'#, '~> 3.4.13' gem 'sass'#, '~> 3.4.13'
gem 'sass-rails'#, :git => 'git://github.com/rails/sass-rails.git', :tag => 'v4.0.5' gem 'sass-rails'
gem 'bumbleberry', :git => 'git://github.com/bumbleberry/bumbleberry.git'
if Dir.exists?('../bumbleberry')
gem 'bumbleberry', :path => "../bumbleberry"
else
gem 'bumbleberry', :git => 'git://github.com/bumbleberry/bumbleberry.git'
end
gem 'foundation-rails' gem 'foundation-rails'
gem 'uglifier', '>= 1.3.0' gem 'uglifier', '>= 1.3.0'
gem 'sorcery', '>= 0.8.1' gem 'sorcery', '>= 0.8.1'
@ -24,7 +36,7 @@ gem 'geocoder'
gem 'paper_trail', '~> 3.0.5' gem 'paper_trail', '~> 3.0.5'
gem 'font-awesome-rails' gem 'font-awesome-rails'
gem 'wysiwyg-rails' gem 'wysiwyg-rails'
gem 'rails-assets-cdn' #gem 'rails-assets-cdn'
gem 'sitemap_generator' gem 'sitemap_generator'
gem 'activerecord-session_store' gem 'activerecord-session_store'
gem 'paypal-express', '0.7.1' gem 'paypal-express', '0.7.1'
@ -68,7 +80,7 @@ group :staging, :production, :preview do
end end
group :production, :preview do group :production, :preview do
#gem 'unicorn' gem 'unicorn'
gem 'daemon-spawn' gem 'daemon-spawn'
end end

28
Gemfile.lock

@ -1,6 +1,5 @@
GIT PATH
remote: git://github.com/bumbleberry/bumbleberry.git remote: ../bumbleberry
revision: bd3f458d81305df42076e1d2512eb5eebeb050b6
specs: specs:
bumbleberry (0.0.1) bumbleberry (0.0.1)
blockspring blockspring
@ -10,9 +9,8 @@ GIT
sass-json-vars sass-json-vars
sass-rails sass-rails
GIT PATH
remote: git://github.com/lingua-franca/lingua_franca.git remote: ../lingua_franca
revision: fe9f8cdca3f7d180157086116766bb8622d0bdb3
specs: specs:
lingua_franca (0.0.1) lingua_franca (0.0.1)
diffy diffy
@ -93,7 +91,7 @@ GEM
net-sftp (>= 2.0.0) net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14) net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0) net-ssh-gateway (>= 1.1.0)
capybara (2.4.4) capybara (2.5.0)
mime-types (>= 1.16) mime-types (>= 1.16)
nokogiri (>= 1.3.3) nokogiri (>= 1.3.3)
rack (>= 1.0.0) rack (>= 1.0.0)
@ -233,6 +231,7 @@ GEM
json (1.8.3) json (1.8.3)
jwt (0.1.13) jwt (0.1.13)
multi_json (>= 1.5) multi_json (>= 1.5)
kgio (2.9.3)
launchy (2.4.3) launchy (2.4.3)
addressable (~> 2.3) addressable (~> 2.3)
listen (3.0.3) listen (3.0.3)
@ -320,8 +319,6 @@ GEM
bundler (>= 1.3.0, < 2.0) bundler (>= 1.3.0, < 2.0)
railties (= 4.2.0) railties (= 4.2.0)
sprockets-rails sprockets-rails
rails-assets-cdn (0.1.0)
rails
rails-deprecated_sanitizer (1.0.3) rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha) activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7) rails-dom-testing (1.0.7)
@ -343,6 +340,7 @@ GEM
activesupport (= 4.2.0) activesupport (= 4.2.0)
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
raindrops (0.15.0)
rake (10.4.2) rake (10.4.2)
rb-fsevent (0.9.5) rb-fsevent (0.9.5)
rb-inotify (0.9.5) rb-inotify (0.9.5)
@ -390,7 +388,7 @@ GEM
rvm-capistrano (1.5.6) rvm-capistrano (1.5.6)
capistrano (~> 2.15.4) capistrano (~> 2.15.4)
safe_yaml (1.0.4) safe_yaml (1.0.4)
sass (3.4.16) sass (3.4.18)
sass-json-vars (0.3.2) sass-json-vars (0.3.2)
sass (>= 3.1) sass (>= 3.1)
sass-rails (5.0.3) sass-rails (5.0.3)
@ -418,7 +416,7 @@ GEM
bcrypt (~> 3.1) bcrypt (~> 3.1)
oauth (~> 0.4, >= 0.4.4) oauth (~> 0.4, >= 0.4.4)
oauth2 (>= 0.8.0) oauth2 (>= 0.8.0)
sprockets (3.3.2) sprockets (3.3.3)
rack (~> 1.0) rack (~> 1.0)
sprockets-rails (2.3.2) sprockets-rails (2.3.2)
actionpack (>= 3.0) actionpack (>= 3.0)
@ -434,13 +432,17 @@ GEM
thread_safe (~> 0.1) thread_safe (~> 0.1)
tzinfo-data (1.2015.6) tzinfo-data (1.2015.6)
tzinfo (>= 1.0.0) tzinfo (>= 1.0.0)
uglifier (2.7.1) uglifier (2.7.2)
execjs (>= 0.3.0) execjs (>= 0.3.0)
json (>= 1.8.0) json (>= 1.8.0)
unf (0.1.4) unf (0.1.4)
unf_ext unf_ext
unf_ext (0.0.7.1) unf_ext (0.0.7.1)
unf_ext (0.0.7.1-x86-mingw32) unf_ext (0.0.7.1-x86-mingw32)
unicorn (4.9.0)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
wdm (0.1.1) wdm (0.1.1)
webmock (1.21.0) webmock (1.21.0)
addressable (>= 2.3.6) addressable (>= 2.3.6)
@ -498,7 +500,6 @@ DEPENDENCIES
pg pg
poltergeist poltergeist
rails (= 4.2.0) rails (= 4.2.0)
rails-assets-cdn
rails_12factor rails_12factor
redcarpet redcarpet
rspec rspec
@ -513,6 +514,7 @@ DEPENDENCIES
sorcery (>= 0.8.1) sorcery (>= 0.8.1)
tzinfo-data tzinfo-data
uglifier (>= 1.3.0) uglifier (>= 1.3.0)
unicorn
wdm (>= 0.1.0) wdm (>= 0.1.0)
webmock webmock
wysiwyg-rails wysiwyg-rails

2
app/views/shared/_footer.html.haml

@ -16,7 +16,7 @@
=_!I18n.locale.upcase =_!I18n.locale.upcase
.selector .selector
%ul %ul
-I18n.backend.available_locales.each do |locale| -I18n.backend.enabled_locales.each do |locale|
%li %li
%a{href: request.original_url.gsub(/^(https?:\/\/)(preview\-)?(..\.)?(.*)$/, '\1\2' + locale + '.\4')} %a{href: request.original_url.gsub(/^(https?:\/\/)(preview\-)?(..\.)?(.*)$/, '\1\2' + locale + '.\4')}
=_! locale.upcase =_! locale.upcase

1
config/application.rb

@ -24,6 +24,7 @@ module BikeBike
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
config.action_controller.default_url_options = { :trailing_slash => true }
config.i18n.default_locale = :en config.i18n.default_locale = :en
config.i18n.enforce_available_locales = false config.i18n.enforce_available_locales = false
self.paths['config/database'] = Rails.root.join('config', 'database.yml') self.paths['config/database'] = Rails.root.join('config', 'database.yml')

11
config/environments/production.rb

@ -65,8 +65,9 @@ BikeBike::Application.configure do
# Precompile additional assets. # Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# config.assets.precompile += %w( search.js ) # config.assets.precompile += %w( search.js )
config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif) #config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif)
config.action_controller.asset_host = "https://cdn.bikebike.org" config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif *.svg application/*.scss web-fonts/*.scss)
#config.action_controller.asset_host = "https://cdn.bikebike.org"
# Ignore bad email addresses and do not raise email delivery errors. # 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. # Set this to true and configure the email server for immediate delivery to raise delivery errors.
@ -89,13 +90,13 @@ BikeBike::Application.configure do
config.action_mailer.smtp_settings = { config.action_mailer.smtp_settings = {
:enable_starttls_auto => true, :enable_starttls_auto => true,
:address => 'mail.bikebike.org', :address => 'mail.bikebike.org',
:domain => 'bikebike.org', :domain => 'preview.bikebike.org',
:port => 587, :port => 587,
:authentication => :plain, :authentication => :plain,
:enable_starttls_auto => true, :enable_starttls_auto => true,
:openssl_verify_mode => 'none', :openssl_verify_mode => 'none',
:user_name => 'info@bikebike.org', :user_name => 'info@preview.bikebike.org',
:password => 'NewOrleans@)!#' :password => 'test'
} }
config.action_mailer.raise_delivery_errors = true config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true config.action_mailer.perform_deliveries = true

29
config/locales/en.yml

@ -5191,9 +5191,6 @@ en:
use_custom_value: Use a custom value use_custom_value: Use a custom value
explain_zero_fallback: This translation will use the plural version for the explain_zero_fallback: This translation will use the plural version for the
number 0 number 0
test:
one: Test
other: Tests
content: content:
needs_translations: This page contains untranslated content needs_translations: This page contains untranslated content
requires_translation: This %{model} is in %{language}. requires_translation: This %{model} is in %{language}.
@ -5457,17 +5454,19 @@ en:
theme: Which of the themes below best match your workshop? This will help theme: Which of the themes below best match your workshop? This will help
hosts to avoid scheduling conflicts. Select other if none of the options hosts to avoid scheduling conflicts. Select other if none of the options
match in any way. match in any way.
new_workshop: Workshops are organized and run by attendees, they can be about new_workshop: 'Workshops in the past have tended to fit into a few broad categories:
anything that might concern community bicycle projects and can be in any structural/organizational (how to start a shop, how to register a non-profit,
format including presentations, hands-on workshops, discussion groups, and consensus decision making, etc,) mechanical (how to weld two tandems to
bicycle rides. If you would like to host you own workshop you can click a tall bike, building 3-speed hubs out of fishing tackle and old socks,
on the "create workshop" button. etc,) anti-oppression (safe spaces, women’s workshops, etc,) and recreational
Workshops: Duis bibendum, felis sed interdum venenatis, turpis enim blandit (touring tips, yoga for cyclists, etc.) This year we would like to try a
mi, in porttitor pede justo eu massa. Donec dapibus. Duis at velit eu est panel, a forum, or other types of settings that you think might facilitate
congue elementum. In hac habitasse platea dictumst. Morbi vestibulum, velit learning – be inventive, let us know what you want to see!'
id pretium iaculis, diam erat fermentum justo, nec condimentum neque sapien Workshops: Do you have an exciting skill to share with us?  Want to chat about
placerat ante. Nulla justo. Aliquam quis turpis eget elit sodales scelerisque. creating safe community spaces?  Want to make sure we fit a good bike ride
Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante into the weekend?  Propose a workshop!  Don’t worry if you’re not an expert,
we want to hear about everyone’s experience within the many configurations
of community shops we’re coming from.
section_content: section_content:
bikebike: bikebike:
about_bikebike: Bike!Bike! is an international annual gathering organized by about_bikebike: Bike!Bike! is an international annual gathering organized by
@ -5521,6 +5520,8 @@ en:
Registration_Stats: Registration Stats Registration_Stats: Registration Stats
View_Workshop: View Workshop View_Workshop: View Workshop
Workshops: Workshops Workshops: Workshops
Delete_Workshop: Create Workshop
Edit_Workshop: Edit Workshop
policy: policy:
Safer_Spaces_Policy: Safer Space Agreement Safer_Spaces_Policy: Safer Space Agreement
'404': '404':

2
config/locales/es.yml

@ -791,9 +791,7 @@ es:
The_Agreement: Acuerdo del Espacio Mas Seguro The_Agreement: Acuerdo del Espacio Mas Seguro
permission_denied: permission_denied:
paragraphs: paragraphs:
translator_not_logged_in: Sorry you must be a translator to view this page
headings: headings:
login_required: Please Login
forms: forms:
labels: labels:
generic: generic:

2
config/routes.rb

@ -88,7 +88,7 @@ BikeBike::Application.routes.draw do
# #
get '/confirm/:token' => 'application#confirm', :as => :confirm get '/confirm/:token' => 'application#confirm', :as => :confirm
#post '/doconfirm' => 'application#do_confirm', :as => :do_confirm #post '/doconfirm' => 'application#do_confirm', :as => :do_confirm
match '/doconfirm' => 'application#do_confirm', :as => :do_confirm, via: [:get, :post] post '/doconfirm' => 'application#do_confirm', :as => :do_confirm
post '/logout' => 'application#user_logout', :as => :logout post '/logout' => 'application#user_logout', :as => :logout
post '/translator-request' => 'application#translator_request', :as => :translator_request post '/translator-request' => 'application#translator_request', :as => :translator_request

Loading…
Cancel
Save