Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
12c2846
App loads with ruby 2.4.10 and rails 4.2.11.1
thermistor Apr 7, 2020
865cba2
Remove geocode
Apr 7, 2020
c00953f
Add config for Rails 4.2
Apr 7, 2020
79cdb49
Update awesome_nested_set to 3.2.0
thermistor Apr 7, 2020
ab32f91
Remove postgres_ext
thermistor Apr 7, 2020
eff0d9f
Update ransack to 1.6.4
thermistor Apr 7, 2020
43ea2c1
Update ruby image on circleci
thermistor Apr 7, 2020
48183c9
Shuffle gems around to still support heroku for now
thermistor Apr 7, 2020
149c466
Initial capistrano config for aws
thermistor Apr 7, 2020
2e5b864
Not using dotenv
thermistor Apr 7, 2020
67d85c3
Change build branch to aws_deploy
thermistor Apr 7, 2020
6b5aa5b
Make build branch build
thermistor Apr 7, 2020
09566ac
Add Arel hack from https://github.com/rails/rails/issues/20077
Apr 7, 2020
5240903
Add package-lock from npm install
Apr 7, 2020
573cec2
Add cap to local bin stubs
thermistor Apr 7, 2020
0d0c23c
Update to newer devise permit API
Apr 7, 2020
9a222e5
Fix specs due to ruby/rails upgrade
Apr 7, 2020
e84e2ab
Temporarily skip Geocode related spec
Apr 7, 2020
5563567
Hide default sort arrow due to Ransack upgrade
Apr 7, 2020
f6d8337
More spec fixes due to upgrade
Apr 7, 2020
07a5802
Start the process of replacing figaro with dotenv
thermistor Apr 7, 2020
73dde8d
Switch Figaro to dotenv, add .env to .gitignore
Apr 7, 2020
ea73642
Merge branch 'dotenv' into ruby_upgrade_2.4.10
Apr 7, 2020
e2a033e
Fix a couple dotenv issues
Apr 7, 2020
f30f3d7
Merge branch 'dotenv' into ruby_upgrade_2.4.10
Apr 7, 2020
1d2f686
Fix order mailer spec
Apr 7, 2020
7ea94b2
Move some test overrides out to .env.test, gitignore local files if p…
thermistor Apr 7, 2020
810c852
Merge remote-tracking branch 'origin/dotenv' into ruby_upgrade_2.4.10
Apr 7, 2020
40ab078
Add PDF_ASSET_HOST
thermistor Apr 7, 2020
bcf84c1
Use proper app name for tag search
thermistor Apr 7, 2020
ae44b72
Merge remote-tracking branch 'origin/dotenv' into ruby_upgrade_2.4.10
Apr 7, 2020
70f377e
Proper domain name, tidy up
thermistor Apr 7, 2020
8716213
Need a JavaScript runtime
thermistor Apr 7, 2020
405274a
Don't have ap outside of dev/test
thermistor Apr 7, 2020
4b7ced7
Fix pricing spec, not really the right behavior but good enough for now
Apr 8, 2020
7d4a074
Fix orders controller spec for dotenv
Apr 8, 2020
9e239a8
Add dotenv/tasks to rollbar task
thermistor Apr 8, 2020
8fbff1a
Merge branch 'dotenv' into ruby_upgrade_2.4.10
thermistor Apr 8, 2020
c3210cc
Merge branch 'aws_deploy' into ruby_upgrade_2.4.10
thermistor Apr 8, 2020
256c7a3
We use yarn.lock
thermistor Apr 8, 2020
240767c
Task to restart delayed_job
thermistor Apr 8, 2020
63ca5dc
Merge branch 'aws_deploy' into ruby_upgrade_2.4.10
thermistor Apr 8, 2020
8cf99d6
Turn ROLLBAR_ACCESS_TOKEN into an ENV var
thermistor Apr 8, 2020
d0dedda
Add build config, update static assets config name
thermistor Apr 8, 2020
134d969
Try disable rack-cache
thermistor Apr 8, 2020
7448e27
Remove heroku stuff for debugging assets issue
thermistor Apr 8, 2020
9ed7594
Update skylight
thermistor Apr 8, 2020
2147767
Disable rack/cache in build
thermistor Apr 8, 2020
1b28488
Use skylight in other envs
thermistor Apr 8, 2020
c34b52a
Comment out platform-api (heroku), and skylight
thermistor Apr 8, 2020
f6c55c6
Ruby newrelic gems
thermistor Apr 8, 2020
dd0cfe4
Get pry for build env
thermistor Apr 8, 2020
c478d5b
Remove gem that broke asset compilation
thermistor Apr 8, 2020
8c2f776
Revert "Ruby newrelic gems"
thermistor Apr 8, 2020
0e02f74
Disable rack/cache in production
thermistor Apr 8, 2020
1f0076f
Reenable skylight
thermistor Apr 8, 2020
d878e01
Default DEBUG env to OFF
Apr 11, 2020
3d57b0b
Merge branch 'ruby_upgrade_2.4.10' of github.com:LocalOrbit/localorbi…
thermistor Apr 14, 2020
430039b
Update wkhtmltopdf-binary to 0.12.5.4
thermistor May 4, 2020
975e297
remove cruft
thermistor May 4, 2020
86249b4
rev assets version on staging to 3.3 to see if solves icon font issue
thermistor May 5, 2020
9d80d79
Fix for missing icon font
thermistor May 5, 2020
8b3c0cf
Update README with new deployment instructions
thermistor May 11, 2020
59918a4
Deploy from staging, as per docs
thermistor May 11, 2020
58e9636
Possible fix for pdfkit failing tests on Circle
thermistor May 11, 2020
6784130
Revert "Possible fix for pdfkit failing tests on Circle"
thermistor May 11, 2020
cc916c7
Fix two failing tests, by stubbing CreateInvoice which is well tested…
thermistor May 17, 2020
d37588f
Running them under js: true helps template request header url
thermistor May 17, 2020
f379fca
WEIRD: it seems like it was testing the wrong behavior before, check …
thermistor May 31, 2020
9ce2d23
Revert "WEIRD: it seems like it was testing the wrong behavior before…
thermistor Jun 18, 2020
6fd99ed
feat: adds 503 maintenance page
clov3r Jun 18, 2020
fba2b2e
Merge branch 'master' into ruby_upgrade_2.4.10
thermistor Jun 18, 2020
6828e16
Regenerated schema on 12.3 remove waiting_list cruft
thermistor Jun 18, 2020
076d422
Update the deployed branch for pro
thermistor Jun 18, 2020
466a56f
Update rails to 4.2.11.3
thermistor Jun 18, 2020
da1f532
Hack route back in to fix adding a product unit
Jun 19, 2020
fa6798c
Ensure product creation isn't touched
Jun 19, 2020
2e99435
Improve hack comment
Jun 19, 2020
ad4bd8a
Merge branch 'adding_unit_404' into ruby_upgrade_2.4.10
thermistor Jun 19, 2020
d1decf5
Add 'yarn install' step to cap deploy
thermistor Jul 31, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
build:
parallelism: 4
docker:
- image: circleci/ruby:2.3.8-stretch-node-browsers
- image: circleci/ruby:2.4.10-stretch-node-browsers
environment:
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
Expand Down Expand Up @@ -98,4 +98,4 @@ jobs:

- store_artifacts:
path: tmp/capybara
destination: capybara
destination: capybara
51 changes: 51 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
ADMIN_EMAIL: "service@localorbit.com"
API_ADMIN_USER_ID: <admin user id>
ASSET_HOST: "http://localhost:3000"
BI_CERT: <url to BI CERT file>
BI_CERT_KEY: <url to BI CERT KEY file>
BI_DASHBOARD_URL: <url to BI dashboard>
BI_SERVER: <qlik url>
DEBUG: OFF
DOMAIN: "localtest.me" # localtest.me points to 127.0.0.1 and lets us use subdomains. localhost does not. see http://readme.localtest.me/
# Use staging DRAGONFLY_HOST for dev and test
DRAGONFLY_HOST: 'https://d3jv177czn6wv2.cloudfront.net'
DW_DB_URL: <dw url>
ETL_DAYS: '720'
FROALA_KEY: <api key for froala>
GOOGLE_MAPS_KEY: <api key for google maps>
MAILTRAP_USERNAME: <MT username>
MAILTRAP_PASSWORD: <MT secret>
MAX_POOL_SIZE: '10'
ON_HEROKU: 'false'
PDF_ASSET_HOST: "localtest.me"
QB_ACCESS_TOKEN: <QB access token>
QB_ACCESS_TOKEN_SECRET: <QB access token secret>
QB_APP_TOKEN: <QB app token>
QB_CONSUMER_KEY: <QB consumer key>
QB_CONSUMER_SECRET: <QB consumer secret>
QB_REALM_ID: <QB realm id>
RAILS_ENABLE_TEST_LOG: ~
RECAPTCHA_SECRET_KEY: ''
RECAPTCHA_SECRET_KEY_V3: ''
RECAPTCHA_SITE_KEY: ''
RECAPTCHA_SITE_KEY_V3: ''
ROLLBAR_ACCESS_TOKEN: ''
SECRET_TOKEN: <long random string>
SMTP_PASSWORD: <mandrill smtp password>
SMTP_USERNAME: <mandrill smtp username>
STRIPE_ACCOUNT_SIGNING_SECRET: <stripe account signing secret>
STRIPE_CLIENT_ID: <stripe client key (test on local system)>
STRIPE_CONNECT_SIGNING_SECRET: <stripe connect signing secret>
STRIPE_DEV_MARKET_ACCOUNT_ID: <stripe user id of market that did oauth flow, see docs/stripe.md>
STRIPE_PUBLISHABLE_KEY: <stripe publishable key (test on local system)>
STRIPE_SECRET_KEY: <stripe secret key (test on local system)>
SUPPORT_PHONE_NUMBER: '(800) 598-3351'
TRANS_DB_URL: <transactional db>
TWITTER_WIDGET_ID: 'create-me-at-twitter-dot-com'
UPLOADS_ACCESS_KEY_ID: <S3 upload access key id>
UPLOADS_BUCKET: <S3 upload bucket (dev)>
UPLOADS_REGION: <S3 upload region>
UPLOADS_SECRET_ACCESS_KEY: <S3 upload secret access key>
USE_DELAYED_JOB: 'true'
USE_ROLLBAR: 'false'
USE_UPLOAD_QUEUE: 'true'
2 changes: 2 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CAPYBARA_WAIT_TIME: '180'
USE_UPLOAD_QUEUE: 'false'
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ dragonfly.log
/tempfiles/*

# Ignore application configuration
.env
.env.local
.env.*.local
/config/application.yml
/dragonfly
public/system/dragonfly/development
Expand All @@ -52,4 +55,4 @@ node_modules/

/snippets

.DS_Store
.DS_Store
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.8
2.4.10
41 changes: 41 additions & 0 deletions Capfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Load DSL and set up stages
require "capistrano/setup"

# Include default deployment tasks
# require "capistrano/deploy"
require 'capistrano/git_deploy'
require 'capistrano/aws'

# Load the SCM plugin appropriate to your project:
#
# require "capistrano/scm/hg"
# install_plugin Capistrano::SCM::Hg
# or
# require "capistrano/scm/svn"
# install_plugin Capistrano::SCM::Svn
# or
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git

# Include tasks from other gems included in your Gemfile
#
# For documentation on these, see for example:
#
# https://github.com/capistrano/rvm
# https://github.com/capistrano/rbenv
# https://github.com/capistrano/chruby
# https://github.com/capistrano/bundler
# https://github.com/capistrano/rails
# https://github.com/capistrano/passenger
#
# require "capistrano/rvm"
# require "capistrano/rbenv"
# require "capistrano/chruby"
require 'capistrano/bundler'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano/passenger'
require 'capistrano/yarn'

# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
58 changes: 30 additions & 28 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ git_source(:github) do |repo_name|
"https://github.com/#{repo_name}.git"
end

ruby '2.3.8'
ruby '2.4.10'

gem 'rails', '~> 4.1.11'
# This needs to load before other gems
gem 'dotenv-rails', require: 'dotenv/rails-now'

gem 'rails', '~> 4.2.11.3'

gem 'pg', '~> 0.21.0'

Expand All @@ -28,36 +31,34 @@ gem 'wysihtml5-rails'
gem 'active_model_serializers'
gem 'active_record_query_trace'
gem 'active_record_union'
gem 'acts_as_geocodable'
gem 'audited-activerecord'
gem 'awesome_nested_set'
gem 'bootsnap', require: false # TODO: Remove this when we upgrade to rails 5.2
gem 'color'
gem 'countries'
gem 'csv_builder'
gem 'delayed_job_active_record'
gem 'devise', '~> 3.5.10'
gem 'devise'
gem 'devise_invitable'
gem 'devise_masquerade'
gem 'dragonfly-s3_data_store'
gem 'draper'
gem 'figaro'
gem 'font_assets'
gem 'graticule'
gem 'groupdate', :git => 'https://github.com/trestrantham/groupdate.git', :branch => 'custom-calculations' # Waiting on https://github.com/ankane/groupdate/pull/53
gem 'interactor-rails', '< 3.0'
gem 'interactor', '< 3.0' # We are not ready for 3 yet
gem 'jbuilder'
gem 'jwt'
gem 'kaminari' # Paginator
gem 'kaminari'
gem 'mini_racer'
gem 'pdfkit'
gem 'periscope-activerecord'
gem 'pg_search'
gem 'postgres_ext'
gem 'rack-canonical-host'
gem 'ransack'
gem 'ransack', '1.6.4'
gem 'recaptcha'
# RAILS42 TODO: gem 'responders', '~> 2.0'
gem 'simpleidn'
gem 'skylight'
gem 'stripe', '5.14.0'
gem 'stripe_event', '2.3.0'
gem 'font-awesome-rails'
Expand All @@ -82,12 +83,15 @@ gem 'rschema', :git => 'https://github.com/tomdalling/rschema.git'

gem 'turbolinks'

install_if -> { RUBY_PLATFORM =~ /darwin/ } do
gem 'wkhtmltopdf-binary', '0.12.5.1'
end
install_if -> { ENV['ON_HEROKU'] == 'true' } do
gem 'wkhtmltopdf-heroku'
install_if -> { ENV['ON_HEROKU'] != 'true' } do
# Maybe try 0.12.5.4 if run into issues
gem 'wkhtmltopdf-binary', '0.12.5.4'
end
# install_if -> { ENV['ON_HEROKU'] == 'true' } do
# gem 'wkhtmltopdf-heroku'
# gem 'rails_12factor'
# gem 'platform-api'
# end

# Product import/export
gem 'rubyXL', require: false # XLSX
Expand All @@ -99,6 +103,7 @@ gem 'grape' # API v2
gem 'grape-active_model_serializers' # API v2
gem 'rack-cors', :require => 'rack/cors' # API v2
gem 'grape-swagger' # API V2, documentation
gem 'puma'

gem 'rollbar'

Expand All @@ -110,7 +115,15 @@ group :doc do
end

group :development do
gem 'aws_config'
gem 'bullet'
gem 'capistrano'
gem 'capistrano-aws', require: false
gem 'capistrano-bundler'
gem 'capistrano-git_deploy', github: 'thermistor/capistrano-git_deploy', require: false
gem 'capistrano-passenger'
gem 'capistrano-rails'
gem 'capistrano-yarn'
gem 'ultrahook'
gem 'spring'
gem 'spring-commands-rspec'
Expand All @@ -121,7 +134,6 @@ group :development do
gem 'rails_view_annotator'
gem 'rubycritic', require: false
gem 'mailcatcher'
gem 'unicorn'

# profiling, see https://github.com/MiniProfiler/rack-mini-profiler#installation
gem 'rack-mini-profiler'
Expand All @@ -130,7 +142,7 @@ group :development do
gem 'stackprof'
end

group :development, :test do
group :development, :test, :build do
gem 'factory_bot_rails'
gem 'rspec-rails', '~> 3.0'
gem 'rspec_junit_formatter', :git => 'https://github.com/sj26/rspec_junit_formatter.git'
Expand Down Expand Up @@ -164,19 +176,9 @@ group :test do
gem 'stripe-ruby-mock', '~> 2.5.8', :require => 'stripe_mock'
end

group :staging do
gem 'skylight'
end

group :production, :staging do
gem 'newrelic_rpm'
gem 'newrelic-dragonfly'
#gem 'passenger'
gem 'rack-cache', require: 'rack/cache'
gem 'rails_12factor'
gem 'platform-api'
end

group :production, :staging, :development do
gem 'puma'
# gem 'rack-cache', require: 'rack/cache'
end
Loading