Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/yxlau/project_djello
Browse files Browse the repository at this point in the history
  • Loading branch information
yxlau committed Mar 15, 2024
2 parents e1f4a78 + e3c6e80 commit 0ef8ada
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 117 deletions.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.4.10
7 changes: 3 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ git_source(:github) do |repo_name|
"https://github.com/#{repo_name}.git"
end


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.2'
# Use postgresql as the database for Active Record
Expand All @@ -18,7 +17,7 @@ gem 'jbuilder', '~> 2.5'
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
gem 'knock'
gem 'knock', '~> 2.1.1'
gem 'jwt'
gem 'responders'

Expand All @@ -36,8 +35,8 @@ group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
gem 'jazz_fingers'
gem 'rspec-rails'
gem 'factory_bot_rails'
gem 'rspec-rails', '3.5.2'
gem 'factory_bot_rails', '4.8.2'
end

group :development do
Expand Down
212 changes: 102 additions & 110 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,96 +1,93 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (5.0.6)
actionpack (= 5.0.6)
actioncable (5.0.7.2)
actionpack (= 5.0.7.2)
nio4r (>= 1.2, < 3.0)
websocket-driver (~> 0.6.1)
actionmailer (5.0.6)
actionpack (= 5.0.6)
actionview (= 5.0.6)
activejob (= 5.0.6)
actionmailer (5.0.7.2)
actionpack (= 5.0.7.2)
actionview (= 5.0.7.2)
activejob (= 5.0.7.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.0.6)
actionview (= 5.0.6)
activesupport (= 5.0.6)
actionpack (5.0.7.2)
actionview (= 5.0.7.2)
activesupport (= 5.0.7.2)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.0.6)
activesupport (= 5.0.6)
actionview (5.0.7.2)
activesupport (= 5.0.7.2)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.0.6)
activesupport (= 5.0.6)
activejob (5.0.7.2)
activesupport (= 5.0.7.2)
globalid (>= 0.3.6)
activemodel (5.0.6)
activesupport (= 5.0.6)
activerecord (5.0.6)
activemodel (= 5.0.6)
activesupport (= 5.0.6)
activemodel (5.0.7.2)
activesupport (= 5.0.7.2)
activerecord (5.0.7.2)
activemodel (= 5.0.7.2)
activesupport (= 5.0.7.2)
arel (~> 7.0)
activesupport (5.0.6)
activesupport (5.0.7.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
arel (7.1.4)
awesome_print (1.8.0)
bcrypt (3.1.11)
builder (3.2.3)
bullet (5.5.1)
awesome_print (1.9.2)
bcrypt (3.1.20)
builder (3.2.4)
bullet (7.1.6)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.10.0)
byebug (9.1.0)
coderay (1.1.2)
concurrent-ruby (1.0.5)
uniform_notifier (~> 1.11)
byebug (11.1.3)
coderay (1.1.3)
concurrent-ruby (1.2.3)
coolline (0.5.0)
unicode_utils (~> 1.4)
crass (1.0.2)
diff-lcs (1.3)
crass (1.0.6)
diff-lcs (1.5.1)
erubis (2.7.0)
factory_bot (4.8.2)
activesupport (>= 3.0.0)
factory_bot_rails (4.8.2)
factory_bot (~> 4.8.2)
railties (>= 3.0.0)
faker (1.8.4)
i18n (~> 0.5)
ffi (1.9.18)
formatador (0.2.5)
globalid (0.4.0)
faker (2.12.0)
i18n (>= 1.6, < 2)
ffi (1.15.5)
formatador (1.1.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
guard (2.14.1)
guard (2.18.1)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (~> 1.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
pry (>= 0.13.0)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-rspec (4.7.3)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
hirb (0.7.3)
i18n (0.9.0)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
jazz_fingers (4.0.1)
jazz_fingers (5.2.2)
awesome_print (~> 1.6)
hirb (~> 0.7)
pry (~> 0.10)
pry-byebug (~> 3.4)
pry-coolline (~> 0.2)
pry-doc (~> 0.6)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
jwt (1.5.6)
knock (2.1.1)
bcrypt (~> 3.1)
Expand All @@ -99,73 +96,70 @@ GEM
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.1.1)
loofah (2.21.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.0.11)
mail (2.6.6)
mime-types (>= 1.16, < 4)
method_source (0.9.0)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.3.0)
minitest (5.10.3)
multi_json (1.12.1)
lumberjack (1.2.10)
mail (2.7.1)
mini_mime (>= 0.1.1)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.4.0)
minitest (5.15.0)
nenv (0.3.0)
nio4r (2.1.0)
nokogiri (1.8.1)
mini_portile2 (~> 2.3.0)
notiffany (0.1.1)
nio4r (2.7.0)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
pg (0.21.0)
pry (0.11.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-byebug (3.5.0)
byebug (~> 9.1)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.8.0)
byebug (~> 11.0)
pry (~> 0.10)
pry-coolline (0.2.5)
pry-coolline (0.2.6)
coolline (~> 0.5)
pry-doc (0.11.1)
pry (~> 0.9)
yard (~> 0.9)
puma (3.10.0)
rack (2.0.3)
rack-cors (0.4.1)
pry (~> 0.13)
puma (3.12.6)
rack (2.2.8.1)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-test (0.6.3)
rack (>= 1.0)
rails (5.0.6)
actioncable (= 5.0.6)
actionmailer (= 5.0.6)
actionpack (= 5.0.6)
actionview (= 5.0.6)
activejob (= 5.0.6)
activemodel (= 5.0.6)
activerecord (= 5.0.6)
activesupport (= 5.0.6)
rails (5.0.7.2)
actioncable (= 5.0.7.2)
actionmailer (= 5.0.7.2)
actionpack (= 5.0.7.2)
actionview (= 5.0.7.2)
activejob (= 5.0.7.2)
activemodel (= 5.0.7.2)
activerecord (= 5.0.7.2)
activesupport (= 5.0.7.2)
bundler (>= 1.3.0)
railties (= 5.0.6)
railties (= 5.0.7.2)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
rails-dom-testing (2.1.1)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.0.6)
actionpack (= 5.0.6)
activesupport (= 5.0.6)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
railties (5.0.7.2)
actionpack (= 5.0.7.2)
activesupport (= 5.0.7.2)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.1.0)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
rake (13.1.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
responders (3.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
Expand All @@ -188,28 +182,26 @@ GEM
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
shellany (0.0.1)
spring (2.0.2)
activesupport (>= 4.2)
spring (2.1.1)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (3.7.1)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
thor (0.20.0)
thor (1.2.2)
thread_safe (0.3.6)
tzinfo (1.2.3)
tzinfo (1.2.11)
thread_safe (~> 0.1)
unicode_utils (1.4.0)
uniform_notifier (1.10.0)
uniform_notifier (1.16.0)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
yard (0.9.9)
websocket-extensions (0.1.5)

PLATFORMS
ruby
Expand All @@ -218,23 +210,23 @@ DEPENDENCIES
bcrypt (~> 3.1.7)
bullet
byebug
factory_bot_rails
factory_bot_rails (= 4.8.2)
faker
guard-rspec
jazz_fingers
jbuilder (~> 2.5)
jwt
knock
knock (~> 2.1.1)
listen (~> 3.0.5)
pg (~> 0.18)
puma (~> 3.0)
rack-cors
rails (~> 5.0.2)
responders
rspec-rails
rspec-rails (= 3.5.2)
spring
spring-watcher-listen (~> 2.0.0)
tzinfo-data

BUNDLED WITH
1.15.4
1.17.3
7 changes: 7 additions & 0 deletions bin/render-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# exit on error
set -o errexit

bundle install
bundle exec rake db:migrate
bundle exec rake db:seed
3 changes: 2 additions & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

# 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?
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?



# Enable serving of images, stylesheets, and JavaScripts from an asset server.
Expand Down
3 changes: 2 additions & 1 deletion config/initializers/cors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins ENV['CORS_ORIGINS']
origins '*'
# origins ENV['CORS_ORIGINS']
resource '*',
headers: :any,
:methods => [:get, :post, :put, :delete]
Expand Down
Loading

0 comments on commit 0ef8ada

Please sign in to comment.