Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo commit #81

Merged
merged 3 commits into from
Sep 3, 2022
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: actions/checkout@v2

- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@v1.97.0
with:
bundler-cache: true

Expand All @@ -64,7 +64,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@v1.97.0
with:
bundler-cache: true
- name: Security audit dependencies
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ cobra_test

public/scoop.png
/public/assets/*

/.idea
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.2
2
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Base our image on an official, minimal image of our preferred Ruby
FROM ruby:3.1.2-slim
FROM ruby:2-slim

# Install essential Linux packages
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev postgresql-client curl
Expand Down
7 changes: 2 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
source 'https://rubygems.org'

ruby '3.1.2'

gem 'bootstrap', '~> 4.3'
gem 'bootstrap-datepicker-rails'
gem 'coffee-rails'
Expand All @@ -10,11 +8,10 @@ gem 'faraday', '~> 1.0'
gem 'font-awesome-rails'
gem 'jbuilder'
gem 'jquery-rails'
gem 'net-http'
gem 'pg', '~> 1.3'
gem 'pg', '~> 0.18'
gem 'puma', '< 6'
gem 'pundit'
gem 'rails', '~> 7'
gem 'rails', '~> 5.2'
gem 'rqrcode'
gem 'sassc-rails'
gem 'simple_form'
Expand Down
184 changes: 67 additions & 117 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,73 +1,50 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.3.1)
actionpack (= 7.0.3.1)
activesupport (= 7.0.3.1)
actioncable (5.2.7)
actionpack (= 5.2.7)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.3.1)
actionpack (= 7.0.3.1)
activejob (= 7.0.3.1)
activerecord (= 7.0.3.1)
activestorage (= 7.0.3.1)
activesupport (= 7.0.3.1)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.3.1)
actionpack (= 7.0.3.1)
actionview (= 7.0.3.1)
activejob (= 7.0.3.1)
activesupport (= 7.0.3.1)
actionmailer (5.2.7)
actionpack (= 5.2.7)
actionview (= 5.2.7)
activejob (= 5.2.7)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.3.1)
actionview (= 7.0.3.1)
activesupport (= 7.0.3.1)
rack (~> 2.0, >= 2.2.0)
actionpack (5.2.7)
actionview (= 5.2.7)
activesupport (= 5.2.7)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.3.1)
actionpack (= 7.0.3.1)
activerecord (= 7.0.3.1)
activestorage (= 7.0.3.1)
activesupport (= 7.0.3.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.3.1)
activesupport (= 7.0.3.1)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.7)
activesupport (= 5.2.7)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.3.1)
activesupport (= 7.0.3.1)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.7)
activesupport (= 5.2.7)
globalid (>= 0.3.6)
activemodel (7.0.3.1)
activesupport (= 7.0.3.1)
activerecord (7.0.3.1)
activemodel (= 7.0.3.1)
activesupport (= 7.0.3.1)
activestorage (7.0.3.1)
actionpack (= 7.0.3.1)
activejob (= 7.0.3.1)
activerecord (= 7.0.3.1)
activesupport (= 7.0.3.1)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.3.1)
activemodel (5.2.7)
activesupport (= 5.2.7)
activerecord (5.2.7)
activemodel (= 5.2.7)
activesupport (= 5.2.7)
arel (>= 9.0)
activestorage (5.2.7)
actionpack (= 5.2.7)
activerecord (= 5.2.7)
marcel (~> 1.0.0)
activesupport (5.2.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
arel (9.0.0)
autoprefixer-rails (10.4.2.0)
execjs (~> 2)
bootstrap (4.6.1)
Expand Down Expand Up @@ -108,7 +85,6 @@ GEM
database_cleaner-core (~> 2.0.0)
database_cleaner-core (2.0.1)
diff-lcs (1.5.0)
digest (3.1.0)
erubi (1.10.0)
execjs (2.8.1)
factory_bot (6.2.1)
Expand Down Expand Up @@ -149,7 +125,7 @@ GEM
activesupport (>= 5.0)
graph_matching (0.2.1)
rgl (~> 0.5.0)
i18n (1.12.0)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
jbuilder (2.11.5)
actionview (>= 5.0.0)
Expand All @@ -165,7 +141,7 @@ GEM
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.18.0)
loofah (2.15.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
Expand All @@ -174,30 +150,14 @@ GEM
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.2)
minitest (5.16.2)
mini_portile2 (2.8.0)
minitest (5.15.0)
multipart-post (2.1.1)
net-http (0.2.2)
uri
net-imap (0.2.3)
digest
net-protocol
strscan
net-pop (0.1.1)
digest
net-protocol
timeout
net-protocol (0.1.3)
timeout
net-smtp (0.3.1)
digest
net-protocol
timeout
nio4r (2.5.8)
nokogiri (1.13.8-aarch64-linux)
nokogiri (1.13.4)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.13.8-x86_64-linux)
racc (~> 1.4)
pg (1.3.5)
pg (0.21.0)
popper_js (1.16.0)
pry (0.14.1)
coderay (~> 1.1)
Expand All @@ -208,35 +168,33 @@ GEM
pundit (2.2.0)
activesupport (>= 3.0.0)
racc (1.6.0)
rack (2.2.4)
rack-test (2.0.2)
rack (>= 1.3)
rails (7.0.3.1)
actioncable (= 7.0.3.1)
actionmailbox (= 7.0.3.1)
actionmailer (= 7.0.3.1)
actionpack (= 7.0.3.1)
actiontext (= 7.0.3.1)
actionview (= 7.0.3.1)
activejob (= 7.0.3.1)
activemodel (= 7.0.3.1)
activerecord (= 7.0.3.1)
activestorage (= 7.0.3.1)
activesupport (= 7.0.3.1)
bundler (>= 1.15.0)
railties (= 7.0.3.1)
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.7)
actioncable (= 5.2.7)
actionmailer (= 5.2.7)
actionpack (= 5.2.7)
actionview (= 5.2.7)
activejob (= 5.2.7)
activemodel (= 5.2.7)
activerecord (= 5.2.7)
activestorage (= 5.2.7)
activesupport (= 5.2.7)
bundler (>= 1.3.0)
railties (= 5.2.7)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.3)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
railties (7.0.3.1)
actionpack (= 7.0.3.1)
activesupport (= 7.0.3.1)
railties (5.2.7)
actionpack (= 5.2.7)
activesupport (= 5.2.7)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
raindrops (0.20.0)
rake (13.0.6)
rb-fsevent (0.11.1)
Expand Down Expand Up @@ -296,35 +254,31 @@ GEM
sprockets (>= 3.0.0)
stream (0.5.3)
generator
strscan (3.0.4)
swissper (0.3.0)
graph_matching (~> 0.0)
temple (0.8.2)
thor (1.2.1)
thread_safe (0.3.6)
tilt (2.0.10)
timeout (0.3.0)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicorn (6.1.0)
kgio (~> 2.6)
raindrops (~> 0.7)
uri (0.11.0)
vcr (3.0.3)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.0)

PLATFORMS
aarch64-linux
x86_64-linux
ruby

DEPENDENCIES
bootstrap (~> 4.3)
Expand All @@ -343,12 +297,11 @@ DEPENDENCIES
jquery-rails
launchy
listen
net-http
pg (~> 1.3)
pg (~> 0.18)
pry
puma (< 6)
pundit
rails (~> 7)
rails (~> 5.2)
rqrcode
rspec-rails
sassc-rails
Expand All @@ -361,8 +314,5 @@ DEPENDENCIES
unicorn
vcr (~> 3)

RUBY VERSION
ruby 3.1.2p20

BUNDLED WITH
2.3.13
2.3.10
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@
```
cat config/database.example.yml | sed s/localhost/db/ > config/database.yml
cp config/secrets.example.yml config/secrets.yml
echo "POSTGRES_PASSWORD=cobra" > .env
echo "RAILS_ENV=development" >> .env
echo "RAILS_ENV=development" > .env
```

Then initialize everything and bring up the server.

Note: If you are running on Apple silicon, replace `docker-compose` below with
`docker-compose -f docker-compose.yml -f docker-compose.apple.yml`

```
docker-compose up -d db
# wait for the db to be ready. (docker-compose logs db) will end with "database system is ready to accept connections"
docker-compose exec db psql --username=postgres -c "create user cobra with password 'cobra' CREATEDB;"
docker-compose exec db psql --username=postgres -c "create user cobra with password '' CREATEDB;"
docker-compose run app rake db:create db:migrate
docker-compose run app rake ids:update
docker-compose run app bundle exec rake assets:precompile
Expand Down Expand Up @@ -119,4 +115,4 @@ To remedy this you'll need to delete the unicorn `pid` file. Simply run this com
docker run -v cobra_cobra-tmp:/cobra/tmp ubuntu rm /cobra/tmp/pids/unicorn.pid
```

Then you should be able to start up the app again with `docker-compose up` as normal.
Then you should be able to start up the app again with `docker-compose up` as normal.
2 changes: 1 addition & 1 deletion app/controllers/oauth_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class OauthController < ApplicationController
before_action :skip_authorization

def auth
redirect_to Nrdb::Oauth.auth_uri(request.host), allow_other_host: true
redirect_to Nrdb::Oauth.auth_uri(request.host)
end

def logout
Expand Down
Loading