Skip to content

Commit 8d9d15a

Browse files
committed
Upgrade to Rails 5.1
1 parent cc7d2ef commit 8d9d15a

File tree

150 files changed

+1649
-1810
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+1649
-1810
lines changed

.gitignore

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
# Ignore bundler config.
88
/.bundle
99

10-
# Ignore the default SQLite database.
11-
/db/*.sqlite3
12-
/db/*.sqlite3-journal
10+
# Ignore encrypted secrets key file.
11+
config/secrets.yml.key
1312

1413
# Ignore the config files that are symlinked when deployed
1514
config/database.yml
@@ -18,24 +17,7 @@ config/secrets.yml
1817
# Ingore seeds, see db/seeds.example.rb
1918
db/seeds.rb
2019

21-
# Ignore Vagrant/Chef setup for local dev in Ubuntu using VirtualBox
22-
/cookbooks
23-
/.vagrant
24-
2520
# Ignore all logfiles and tempfiles.
2621
/log/*
2722
!/log/.keep
2823
/tmp
29-
30-
# misc
31-
*.seed
32-
*.log
33-
*.csv
34-
*.dat
35-
*.out
36-
*.pid
37-
*.gz
38-
*.lock
39-
*.swp
40-
*.bak
41-
*.DS_Store

.rspec

Lines changed: 0 additions & 2 deletions
This file was deleted.

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.2
1+
2.4.1

Cheffile

Lines changed: 0 additions & 9 deletions
This file was deleted.

Dockerfile

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#
2+
# example Dockerfile for https://docs.docker.com/examples/postgresql_service/
3+
#
4+
FROM ubuntu
5+
MAINTAINER SvenDowideit@docker.com
6+
7+
# Add the PostgreSQL PGP key to verify their Debian packages.
8+
# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc
9+
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
10+
11+
# Add PostgreSQL's repository. It contains the most recent stable release
12+
# of PostgreSQL, ``9.6``.
13+
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
14+
15+
# Install ``python-software-properties``, ``software-properties-common`` and PostgreSQL 9.6
16+
# There are some warnings (in red) that show up during the build. You can hide
17+
# them by prefixing each apt-get statement with DEBIAN_FRONTEND=noninteractive
18+
RUN apt-get update && apt-get install -y python-software-properties software-properties-common postgresql-9.6 postgresql-client-9.6 postgresql-contrib-9.6
19+
20+
# Note: The official Debian and Ubuntu images automatically ``apt-get clean``
21+
# after each ``apt-get``
22+
23+
# Run the rest of the commands as the ``postgres`` user created by the ``postgres-9.6`` package when it was ``apt-get installed``
24+
USER postgres
25+
26+
# Create a PostgreSQL role named ``docker`` with ``docker`` as the password and
27+
# then create a database `docker` owned by the ``docker`` role.
28+
# Note: here we use ``&&\`` to run commands one after the other - the ``\``
29+
# allows the RUN command to span multiple lines.
30+
RUN /etc/init.d/postgresql start &&\
31+
psql --command "CREATE USER docker WITH SUPERUSER PASSWORD 'docker';" &&\
32+
createdb -O docker docker
33+
34+
# Adjust PostgreSQL configuration so that remote connections to the
35+
# database are possible.
36+
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.6/main/pg_hba.conf
37+
38+
# And add ``listen_addresses`` to ``/etc/postgresql/9.6/main/postgresql.conf``
39+
RUN echo "listen_addresses='*'" >> /etc/postgresql/9.6/main/postgresql.conf
40+
41+
# Expose the PostgreSQL port
42+
EXPOSE 5432
43+
44+
# Add VOLUMEs to allow backup of config, logs and databases
45+
VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]
46+
47+
# Set the default command to run when starting the container
48+
CMD ["/usr/lib/postgresql/9.6/bin/postgres", "-D", "/var/lib/postgresql/9.6/main", "-c", "config_file=/etc/postgresql/9.6/main/postgresql.conf"]
49+

Gemfile

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,54 @@
11
source 'https://rubygems.org'
22

3+
git_source(:github) do |repo_name|
4+
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
5+
"https://github.com/#{repo_name}.git"
6+
end
37

4-
gem 'rails', '4.2.1'
5-
6-
gem 'rails-api'
78

8-
gem 'spring', :group => :development
9+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
10+
gem 'rails', '~> 5.1.1'
911

10-
gem 'jsonapi-resources', '0.7.0'
11-
#gem 'jsonapi-resources', :git => 'https://github.com/cerebris/jsonapi-resources.git'
12+
# http://jsonapi-resources.com/v0.8/guide/
13+
gem 'jsonapi-resources', '0.8.0'
1214

13-
gem 'pg'
15+
# Use postgresql as the database for Active Record
16+
gem 'pg', '~> 0.18'
17+
# Use Puma as the app server
18+
gem 'puma', '~> 3.7'
19+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
20+
# gem 'jbuilder', '~> 2.5'
21+
# Use Redis adapter to run Action Cable in production
22+
# gem 'redis', '~> 3.0'
1423

1524
gem 'jwt'
1625

17-
gem 'byebug', :group => :development
18-
19-
# To use ActiveModel has_secure_password
26+
# Use ActiveModel has_secure_password
2027
gem 'bcrypt', '~> 3.1.7'
2128

22-
group :development, :test do
23-
gem 'rspec-rails', '~> 3.2'
24-
end
29+
# Use Capistrano for deployment
30+
# gem 'capistrano-rails', group: :development
2531

26-
# To use Jbuilder templates for JSON
27-
# gem 'jbuilder'
32+
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
33+
# gem 'rack-cors'
2834

29-
# Use unicorn as the app server
30-
#gem 'unicorn'
35+
group :development, :test do
36+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
37+
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
38+
end
3139

32-
# Deploy with Capistrano
3340
group :development do
34-
gem 'capistrano', '~> 3.4.0'
41+
gem 'listen', '>= 3.0.5', '< 3.2'
42+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
43+
gem 'spring'
44+
gem 'spring-watcher-listen', '~> 2.0.0'
45+
46+
# Deploy with Capistrano
47+
gem 'capistrano', '~> 3.4.1'
3548
gem 'capistrano-bundler', '~> 1.1.2'
3649
gem 'capistrano-rails', '~> 1.1'
3750
gem 'capistrano-rbenv', '~> 2.0'
3851
end
3952

40-
# To use debugger
41-
# gem 'ruby-debug19', :require => 'ruby-debug'
42-
53+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
54+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

0 commit comments

Comments
 (0)