Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
build:
working_directory: ~/firebase-auth-api
docker:
- image: circleci/ruby:2.5.0
- image: circleci/ruby:2.5.1
environment:
TZ: /usr/share/zoneinfo/Asia/Tokyo
RAILS_ENV: test
Expand Down
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
source 'https://rubygems.org'
ruby '2.5.0'
ruby '2.5.1'

git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end

gem 'rails', '~> 5.1.5'
gem 'rails', '~> 5.2.0'
gem 'pg', '>= 0.18', '< 2.0'
gem 'puma', '~> 3.7'
gem 'bootsnap', '1.3.0'
gem 'activestorage', '~> 5.2.0'

gem 'jwt', '2.1.0'

Expand Down
121 changes: 67 additions & 54 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,102 +1,113 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.5)
actionpack (= 5.1.5)
actioncable (5.2.0)
actionpack (= 5.2.0)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.5)
actionpack (= 5.1.5)
actionview (= 5.1.5)
activejob (= 5.1.5)
websocket-driver (>= 0.6.1)
actionmailer (5.2.0)
actionpack (= 5.2.0)
actionview (= 5.2.0)
activejob (= 5.2.0)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.5)
actionview (= 5.1.5)
activesupport (= 5.1.5)
actionpack (5.2.0)
actionview (= 5.2.0)
activesupport (= 5.2.0)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.5)
activesupport (= 5.1.5)
actionview (5.2.0)
activesupport (= 5.2.0)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.5)
activesupport (= 5.1.5)
activejob (5.2.0)
activesupport (= 5.2.0)
globalid (>= 0.3.6)
activemodel (5.1.5)
activesupport (= 5.1.5)
activerecord (5.1.5)
activemodel (= 5.1.5)
activesupport (= 5.1.5)
arel (~> 8.0)
activesupport (5.1.5)
activemodel (5.2.0)
activesupport (= 5.2.0)
activerecord (5.2.0)
activemodel (= 5.2.0)
activesupport (= 5.2.0)
arel (>= 9.0)
activestorage (5.2.0)
actionpack (= 5.2.0)
activerecord (= 5.2.0)
marcel (~> 0.3.1)
activesupport (5.2.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
arel (8.0.0)
arel (9.0.0)
ast (2.4.0)
bootsnap (1.3.0)
msgpack (~> 1.0)
builder (3.2.3)
byebug (10.0.0)
byebug (10.0.2)
concurrent-ruby (1.0.5)
crass (1.0.3)
crass (1.0.4)
diff-lcs (1.3)
erubi (1.7.1)
globalid (0.4.1)
activesupport (>= 4.2.0)
i18n (0.9.5)
i18n (1.0.1)
concurrent-ruby (~> 1.0)
jwt (2.1.0)
loofah (2.2.0)
loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.0)
mini_mime (>= 0.1.1)
marcel (0.3.2)
mimemagic (~> 0.3.2)
method_source (0.9.0)
mimemagic (0.3.2)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.11.3)
nio4r (2.2.0)
msgpack (1.2.4-x64-mingw32)
nio4r (2.3.1)
nokogiri (1.8.2-x64-mingw32)
mini_portile2 (~> 2.3.0)
parallel (1.12.1)
parser (2.5.0.4)
parser (2.5.1.0)
ast (~> 2.4.0)
pg (1.0.0-x64-mingw32)
powerpack (0.1.1)
puma (3.11.3)
rack (2.0.4)
rack-test (0.8.3)
puma (3.11.4)
rack (2.0.5)
rack-test (1.0.0)
rack (>= 1.0, < 3)
rails (5.1.5)
actioncable (= 5.1.5)
actionmailer (= 5.1.5)
actionpack (= 5.1.5)
actionview (= 5.1.5)
activejob (= 5.1.5)
activemodel (= 5.1.5)
activerecord (= 5.1.5)
activesupport (= 5.1.5)
rails (5.2.0)
actioncable (= 5.2.0)
actionmailer (= 5.2.0)
actionpack (= 5.2.0)
actionview (= 5.2.0)
activejob (= 5.2.0)
activemodel (= 5.2.0)
activerecord (= 5.2.0)
activestorage (= 5.2.0)
activesupport (= 5.2.0)
bundler (>= 1.3.0)
railties (= 5.1.5)
railties (= 5.2.0)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.1.5)
actionpack (= 5.1.5)
activesupport (= 5.1.5)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.2.0)
actionpack (= 5.2.0)
activesupport (= 5.2.0)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (3.0.0)
rake (12.3.0)
rake (12.3.1)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
Expand Down Expand Up @@ -134,29 +145,31 @@ GEM
timecop (0.9.1)
tzinfo (1.2.5)
thread_safe (~> 0.1)
tzinfo-data (1.2018.3)
tzinfo-data (1.2018.5)
tzinfo (>= 1.0.0)
unicode-display_width (1.3.0)
websocket-driver (0.6.5)
unicode-display_width (1.3.2)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)

PLATFORMS
x64-mingw32

DEPENDENCIES
activestorage (~> 5.2.0)
bootsnap (= 1.3.0)
byebug
jwt (= 2.1.0)
pg (>= 0.18, < 2.0)
puma (~> 3.7)
rails (~> 5.1.5)
rails (~> 5.2.0)
rspec-rails (~> 3.7)
rubocop (= 0.53.0)
timecop (= 0.9.1)
tzinfo-data

RUBY VERSION
ruby 2.5.0p0
ruby 2.5.1p57

BUNDLED WITH
1.16.1
1.16.2
2 changes: 1 addition & 1 deletion bin/bundle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby.exe
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
load Gem.bin_path('bundler', 'bundle')
4 changes: 1 addition & 3 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/usr/bin/env ruby.exe
require 'pathname'
require 'fileutils'
include FileUtils

# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
APP_ROOT = File.expand_path('..', __dir__)

def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
Expand All @@ -18,7 +17,6 @@ chdir APP_ROOT do
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')


# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')
# cp 'config/database.yml.sample', 'config/database.yml'
Expand Down
3 changes: 1 addition & 2 deletions bin/update
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/usr/bin/env ruby.exe
require 'pathname'
require 'fileutils'
include FileUtils

# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
APP_ROOT = File.expand_path('..', __dir__)

def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
Expand Down
1 change: 1 addition & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
require 'action_view/railtie'
require 'action_cable/engine'
require 'rails/test_unit/railtie'
require 'active_storage/engine'

Bundler.require(*Rails.groups)

Expand Down
1 change: 1 addition & 0 deletions config/boot.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)

require 'bundler/setup' # Set up gems listed in the Gemfile.
require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
4 changes: 2 additions & 2 deletions config/cable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ test:

production:
adapter: redis
url: redis://localhost:6379/1
channel_prefix: firebase-auth-api_production
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
channel_prefix: firebase_auth_api_production
17 changes: 8 additions & 9 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,23 @@
config.consider_all_requests_local = true

# Enable/disable caching. By default caching is disabled.
if Rails.root.join('tmp/caching-dev.txt').exist?
# Run rails dev:cache to toggle caching.
if Rails.root.join('tmp', 'caching-dev.txt').exist?
config.action_controller.perform_caching = true

config.cache_store = :memory_store
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
'Cache-Control' => "public, max-age=#{2.days.to_i}"
}
else
config.action_controller.perform_caching = false

config.cache_store = :null_store
end

# Store uploaded files on the local file system (see config/storage.yml for options)
config.active_storage.service = :local

# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false

Expand All @@ -37,11 +41,6 @@
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load


# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true

# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
# Highlight code that triggered database queries in logs.
config.active_record.verbose_query_logs = true
end
18 changes: 10 additions & 8 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,24 @@
config.consider_all_requests_local = false
config.action_controller.perform_caching = true

# Attempt to read encrypted secrets from `config/secrets.yml.enc`.
# Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
# `config/secrets.yml.key`.
config.read_encrypted_secrets = true
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
# config.require_master_key = true

# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?


# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = 'http://assets.example.com'

# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX

# Store uploaded files on the local file system (see config/storage.yml for options)
config.active_storage.service = :local

# Mount Action Cable outside main process or domain
# config.action_cable.mount_path = nil
# config.action_cable.url = 'wss://example.com/cable'
Expand All @@ -44,14 +45,15 @@
config.log_level = :debug

# Prepend all log lines with the following tags.
config.log_tags = [ :request_id ]
config.log_tags = [:request_id]

# Use a different cache store in production.
# config.cache_store = :mem_cache_store

# Use a real queuing backend for Active Job (and separate queues per environment)
# config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "firebase-auth-api_#{Rails.env}"
# config.active_job.queue_name_prefix = "firebase_auth_api_#{Rails.env}"

config.action_mailer.perform_caching = false

# Ignore bad email addresses and do not raise email delivery errors.
Expand All @@ -72,7 +74,7 @@
# require 'syslog/logger'
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')

if ENV["RAILS_LOG_TO_STDOUT"].present?
if ENV['RAILS_LOG_TO_STDOUT'].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
Expand Down
Loading