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

setup/config changes #7

Merged
merged 2 commits into from
Jul 13, 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
14 changes: 14 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Make sure you keep your secrets safe! How you do this is up to you, but in general:
# * Never commit unencrypted secrets
# * Don't share secrets in unencrypted messaging systems
# * Store secrets safely

CLIO_MANAGE_CLIENT_ID=YOUR_MANAGE_APP_CLIENT_ID
CLIO_MANAGE_CLIENT_SECRET=YOUR_MANAGE_APP_CLIENT_SECRET
CLIO_MANAGE_SITE_URL=https://app.clio.com/

CLIO_IDENTITY_CLIENT_ID=YOUR_IDENTITY_APP_CLIENT_ID
CLIO_IDENTITY_CLIENT_SECRET=YOUR_IDENTITY_APP_CLIENT_SECRET
CLIO_IDENTITY_SITE_URL=https://account.clio.com/

ROOT_URL=http://localhost:3013/
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,4 @@ yarn-debug.log*
!/storage/.keep
/public/uploads

# Ignore local environment variables file
/config/local_env

.DS_Store
15 changes: 8 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ git_source(:github) do |repo_name|
end

# Bundle edge Rails instead: gem "rails", github: "rails/rails"
gem "rails", "5.2.6"
gem "rails", "5.2.7.1"
# Use postgres as the database for Active Record
gem "pg"
gem "pg", "1.1.4"
# Use Puma as the app server
gem "puma"
# Use SCSS for stylesheets
Expand All @@ -18,27 +18,28 @@ gem "uglifier", ">= 1.3.0"
# Use CoffeeScript for .coffee assets and views
gem "coffee-rails", "~> 4.2"
# Used to enforce code style
gem "rubocop-rails", "2.12.4"
gem "rubocop-rails", "2.15.0"
# Use jquery as the JavaScript library
gem "jquery-rails"
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem "turbolinks", "~> 5"
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem "jbuilder", "~> 2.5"

gem "http"
gem "jwt"
gem "secure_headers"
gem "http", "~> 2.2.2"
gem "jwt", "2.3.0"
gem "secure_headers", "6.3.1"

group :development, :test do
# Call "byebug" anywhere in the code to stop execution and get a debugger console
gem "byebug", platform: :mri
gem "dotenv-rails"
end

group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem "web-console", ">= 3.3.0"
gem "listen", "~> 3.0.5"
gem "listen", ">= 3.0.5", "< 3.2"
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
Expand Down
249 changes: 249 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.7.1)
actionpack (= 5.2.7.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.7.1)
actionpack (= 5.2.7.1)
actionview (= 5.2.7.1)
activejob (= 5.2.7.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.7.1)
actionview (= 5.2.7.1)
activesupport (= 5.2.7.1)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.7.1)
activesupport (= 5.2.7.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.7.1)
activesupport (= 5.2.7.1)
globalid (>= 0.3.6)
activemodel (5.2.7.1)
activesupport (= 5.2.7.1)
activerecord (5.2.7.1)
activemodel (= 5.2.7.1)
activesupport (= 5.2.7.1)
arel (>= 9.0)
activestorage (5.2.7.1)
actionpack (= 5.2.7.1)
activerecord (= 5.2.7.1)
marcel (~> 1.0.0)
activesupport (5.2.7.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
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)
ast (2.4.2)
bindex (0.8.1)
builder (3.2.4)
byebug (11.1.3)
coderay (1.1.3)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.10)
crass (1.0.6)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
dotenv-rails (2.7.6)
dotenv (= 2.7.6)
railties (>= 3.2)
erubi (1.10.0)
execjs (2.8.1)
ffi (1.15.5)
globalid (1.0.0)
activesupport (>= 5.0)
http (2.2.2)
addressable (~> 2.3)
http-cookie (~> 1.0)
http-form_data (~> 1.0.1)
http_parser.rb (~> 0.6.0)
http-cookie (1.0.5)
domain_name (~> 0.5)
http-form_data (1.0.3)
http_parser.rb (0.6.0)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jwt (2.3.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.18.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.2)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.8.0)
minitest (5.16.2)
nio4r (2.5.8)
nokogiri (1.13.7)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
parallel (1.22.1)
parser (3.1.2.0)
ast (~> 2.4.1)
pg (1.1.4)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.8.0)
byebug (~> 11.0)
pry (~> 0.10)
public_suffix (4.0.7)
puma (5.6.4)
nio4r (~> 2.0)
racc (1.6.0)
rack (2.2.4)
rack-test (2.0.2)
rack (>= 1.3)
rails (5.2.7.1)
actioncable (= 5.2.7.1)
actionmailer (= 5.2.7.1)
actionpack (= 5.2.7.1)
actionview (= 5.2.7.1)
activejob (= 5.2.7.1)
activemodel (= 5.2.7.1)
activerecord (= 5.2.7.1)
activestorage (= 5.2.7.1)
activesupport (= 5.2.7.1)
bundler (>= 1.3.0)
railties (= 5.2.7.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.3)
loofah (~> 2.3)
railties (5.2.7.1)
actionpack (= 5.2.7.1)
activesupport (= 5.2.7.1)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rainbow (3.1.1)
rake (13.0.6)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (2.5.0)
rexml (3.2.5)
rubocop (1.30.0)
parallel (~> 1.10)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.18.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.19.1)
parser (>= 3.1.1.0)
rubocop-rails (2.15.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.7.0, < 2.0)
ruby-progressbar (1.11.0)
ruby_dep (1.5.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.1.0)
railties (>= 5.2.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
secure_headers (6.3.1)
spring (2.1.1)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
thor (1.2.1)
thread_safe (0.3.6)
tilt (2.0.10)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.2.0)
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)

PLATFORMS
ruby

DEPENDENCIES
byebug
coffee-rails (~> 4.2)
dotenv-rails
http (~> 2.2.2)
jbuilder (~> 2.5)
jquery-rails
jwt (= 2.3.0)
listen (>= 3.0.5, < 3.2)
pg (= 1.1.4)
pry
pry-byebug
puma
rails (= 5.2.7.1)
rubocop-rails (= 2.15.0)
sass-rails (~> 5.0)
secure_headers (= 6.3.1)
spring
spring-watcher-listen (~> 2.0.0)
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
web-console (>= 3.3.0)

BUNDLED WITH
2.2.21
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To request a Clio Identity API key in order to implement SSO see our guide for [

First, clone the example application repository to your local environment: `git clone https://github.com/clio/example-third-party-application.git`.

Then update the environment variables in `config/local_env.yml`:
Then update the environment variables in `.env`:
1. Update the `CLIO_MANAGE_CLIENT_ID` and `CLIO_MANAGE_CLIENT_SECRET` values with your Clio Manage API Key and Secret
2. Update the `CLIO_MANAGE_SITE_URL` value with the region specific URL of your Clio Manage account:
* `https://app.clio.com/` for the United States
Expand Down
6 changes: 0 additions & 6 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,5 @@

module ExampleThirdPartyIntegrationApp
class Application < Rails::Application
deanna-cooney marked this conversation as resolved.
Show resolved Hide resolved
config.before_configuration do
env_file = File.join(Rails.root, "config", "local_env.yml")
YAML.safe_load(File.open(env_file)).each do |key, value|
ENV[key.to_s] = value
end if File.exists?(env_file)
end
end
end
14 changes: 0 additions & 14 deletions config/local_env.yml

This file was deleted.

4 changes: 2 additions & 2 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# Get and append the docker host IP to the config/local_env.yml file if it isn't there already.
# Get and append the docker host IP to the .env file if it isn't there already.
set -euo pipefail
grep -q DOCKER_HOST_IP ./config/local_env.yml \
grep -q DOCKER_HOST_IP .env \
|| ruby /usr/bin/resolve_docker_host.rb

# This is to fix a Rails-specific issue that prevents the server from restarting when a certain server.pid file pre-exists.
Expand Down
2 changes: 1 addition & 1 deletion scripts/resolve_docker_host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"127.0.0.1"
end

File.write("config/local_env.yml", "DOCKER_HOST_IP: \"#{docker_host_ip}\"", mode: "a")
File.write(".env", "DOCKER_HOST_IP=#{docker_host_ip}", mode: "a")