Skip to content

Commit

Permalink
Merge pull request #577 from PecanProject/rails51-with-asset-pipeline…
Browse files Browse the repository at this point in the history
…-and-jquery-in-gems

Rails51 with asset pipeline and jquery in gems
  • Loading branch information
gsrohde authored Aug 7, 2018
2 parents c7f98a8 + 4323e8e commit a0aa89c
Show file tree
Hide file tree
Showing 891 changed files with 1,087 additions and 596 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ orig.public
public/maps/*
config/initializers/site_keys.rb
.Rproj.user
public/assets
script/load.bety.sh


# Ignore encrypted secrets key file.
config/secrets.yml.key
2 changes: 1 addition & 1 deletion .ruby-gemset
Original file line number Diff line number Diff line change
@@ -1 +1 @@
betydb_rails3
betydb_rails5
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.1.5
ruby-2.3.0
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ sudo: false
# versions of ruby to use
# see the list at http://rubies.travis-ci.org/
rvm:
- 2.1.5
- 2.1.8
- 2.2.4
- 2.3.0

Expand Down
21 changes: 16 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM ruby:2.1
FROM ruby:2.3
MAINTAINER Max Burnette <[email protected]>

# Install dependencies
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
curl \
git \
libgeos-dev \
netcat \
nodejs \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -15,15 +17,17 @@ WORKDIR /home/bety

# install gems (allowing for caching)
COPY /Gemfile* /home/bety/
RUN gem install bundler && \
bundle install --without javascript_testing --path vendor/bundle
RUN gem install bundler \
&& bundle install --with docker --without "test development production debug javascript_testing"


# port that is exposed (standard ruby port)
EXPOSE 3000
EXPOSE 8000

# copy rest of the files
COPY / /home/bety
COPY /docker/database.yml /home/bety/config/database.yml
COPY /docker/config.ru /home/bety/config.ru

# download dump.bety and load.bety scripts and configure app
RUN curl -LOs https://raw.githubusercontent.com/PecanProject/pecan/master/scripts/load.bety.sh \
Expand All @@ -41,11 +45,18 @@ ARG BETY_GIT_DATE="unknown"
ENV LOCAL_SERVER=99 \
REMOTE_SERVERS="0 1 2 5" \
RAILS_ENV="production" \
RAILS_RELATIVE_URL_ROOT="" \
SECRET_KEY_BASE="ThisIsNotReallySuchAGreatSecret" \
UNICORN_WORKER_PROCESSES="3" \
UNICORN_PORT="8000" \
BETY_GIT_TAGS=${BETY_GIT_TAGS} \
BETY_GIT_BRANCH=${BETY_GIT_BRANCH} \
BETY_GIT_CHECKSUM=${BETY_GIT_CHECKSUM} \
BETY_GIT_DATE=${BETY_GIT_DATE}

# expose public files
VOLUME ["/home/bety/public"]

# default command to run bety web-app
ENTRYPOINT ["/home/bety/docker/entrypoint.sh"]
CMD ["server"]
CMD ["unicorn"]
35 changes: 21 additions & 14 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
source "http://rubygems.org"

gem "rails", "4.2.10"
gem "rails", "5.1.5"
# needed for rails 3.1 and above until we phase out prototype:
gem 'prototype-rails', github: 'rails/prototype-rails', branch: '4.2' # see https://github.com/rails/prototype-rails/issues/37
gem "query_reviewer", "0.1.6"
## gem 'prototype-rails', github: 'rails/prototype-rails', branch: '4.2' # see https://github.com/rails/prototype-rails/issues/37
gem "nokogiri"
gem "narray", "0.6.0.4"
gem "choice", "0.1.6"
gem "comma", "3.0.4"
gem "json"
gem "rgeo", "~> 0.5.0"
gem "multi_json", "1.3.6"
gem "multi_json"
gem "railroad", "0.5.0"
gem "recaptcha", "4.8.0", :require => "recaptcha/rails"
gem "ruby-graphviz", "1.0.8"
Expand All @@ -25,10 +24,13 @@ gem 'rabl'
gem 'yajl-ruby', '~> 1.3.1'
gem 'rubyzip', '~> 1.2.1'
gem 'activerecord-session_store' # no longer part of Rails proper
gem 'protected_attributes' # Use this until and unless we start using Strong Parameters.
gem 'protected_attributes_continued' # Use this until and unless we start using Strong Parameters.
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'

# to-do: remove prototype dependencies so we no longer need this gem
gem 'prototype_legacy_helper', '0.0.0', :git => 'git://github.com/rails/prototype_legacy_helper.git'
gem 'jquery-rails'
gem 'jquery-ui-rails'

gem 'memoist'

Expand All @@ -53,13 +55,17 @@ group :development, :test do
gem "yard"
end


group :development, :test do
gem "pry-rails"
gem "pry-byebug"
end

group :test do
# phasing out webrat:
# gem "webrat", "0.7.1"
gem "capybara"
gem "capybara", "~> 2.8"
gem "database_cleaner"
gem "rails-controller-testing" # TO-DO: rewrite the specs that rely on this
end

# If you have difficulty installing or don't wish to install capybara-webkit,
Expand All @@ -68,7 +74,7 @@ end
# bundle install --without javascript_testing
#
group :javascript_testing do
gem "capybara-webkit", "1.7.1"
gem "capybara-webkit", "~>1.7"
end

# This group is used by RSpec if the environment variable RAILS_DEBUG is set to
Expand All @@ -78,19 +84,20 @@ group :debug do
gem "pry"
end

# Comment this out if you can't or don't wish to install capybara-webkit:

group :production do
# gem "rmagick", "2.13.1"
gem "passenger"
end

group :docker do
gem 'unicorn'
end

# API-related Gems:

gem "rspec_api_documentation"
gem "json-schema" # needed by rspec_api_documentation

gem "apipie-rails"
gem "apipie-rails", "0.5.6"

# Although it was previously noted that test-unit seems to be needed by
# apipie-rails and prototype-rails, it interferes with routing specs, so we are
Expand Down
Loading

0 comments on commit a0aa89c

Please sign in to comment.