Skip to content

Commit e2bb475

Browse files
authored
Merge pull request #92 from TwilioDevEd/DEVEDSB-95-update-dependencies
Update to Rails 6.1
2 parents eaf5ab4 + 5e4dc6c commit e2bb475

Some content is hidden

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

87 files changed

+18892
-802
lines changed

.browserslistrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
defaults

.env.example

+13-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
# Twilio API credentials
2-
# Found at https://www.twilio.com/console/account/settings
3-
export TWILIO_ACCOUNT_SID=ACXXXXXXXXXXXXXXXXXXXXXX
4-
export TWILIO_AUTH_TOKEN=your-token
5-
6-
# Twilio phone number
7-
# Purchase one at https://www.twilio.com/console/phone-numbers/incoming
8-
export TWILIO_NUMBER=+15551234567
1+
# Your Twilio Account SID. Get a free account at twilio.com/try-twilio
2+
TWILIO_ACCOUNT_SID=your_twilio_account_SID
3+
# Your Twilio Auth Token. You can get it at twilio.com/console
4+
TWILIO_AUTH_TOKEN=your_twilio_auth_token
5+
# The Twilio phone number you want to use to send SMS. Get one in the Twilio Console
6+
TWILIO_PHONE_NUMBER=your_twilio_phone_number
97

108
# Application Configuration
11-
export EVENT_CALLBACK_URL="https://subdomain.ngrok.io/events"
12-
export ASSIGNMENT_CALLBACK_URL="https://subdomain.ngrok.io/assignment"
13-
export WORKFLOW_TIMEOUT=15
14-
export QUEUE_TIMEOUT=30
15-
export BOB_NUMBER=+15551234567
16-
export ALICE_NUMBER=+15551234568
17-
export MISSED_CALLS_EMAIL_ADDRESS=you@something.com
9+
EVENT_CALLBACK_URL="https://subdomain.ngrok.io/events"
10+
ASSIGNMENT_CALLBACK_URL="https://subdomain.ngrok.io/assignment"
11+
QUEUE_TIMEOUT=30
12+
WORKFLOW_TIMEOUT=15
13+
BOB_NUMBER=+15551234567
14+
ALICE_NUMBER=+15551234568
15+
MISSED_CALLS_EMAIL_ADDRESS=you@something.com

.gitattributes

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# See https://git-scm.com/docs/gitattributes for more about git attribute files.
2+
3+
4+
# Mark the yarn lockfile as having been generated.
5+
yarn.lock linguist-generated
6+
7+
# Mark any vendored files as having been vendored.
8+
vendor/* linguist-vendored

.github/workflows/build.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest]
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
- name: Install SQLite (Ubuntu)
20+
if: runner.os == 'Linux'
21+
run: sudo apt-get update && sudo apt-get install -yqq libsqlite3-dev
22+
- name: Install SQLite (OSX)
23+
if: runner.os == 'macOs'
24+
run: brew install sqlite3
25+
- name: Install SQLite (Windows)
26+
if: runner.os == 'Windows'
27+
uses: crazy-max/ghaction-chocolatey@v1
28+
with:
29+
args: install sqlite
30+
- name: Setup Ruby
31+
uses: ruby/setup-ruby@v1
32+
with:
33+
bundler-cache: false
34+
ruby-version: '3.0'
35+
- name: Install SQLite gem (Windows)
36+
if: runner.os == 'Windows'
37+
run: gem install sqlite3 --platform=ruby -- --with-sqlite3-include=/c:/ProgramData/ProgramData/lib/SQLite/tools
38+
- name: Install gems
39+
run: |
40+
gem install bundler
41+
bundle config path vendor/bundle
42+
bundle install --jobs 4 --retry 3
43+
- name: Setup Node
44+
uses: actions/setup-node@v1
45+
with:
46+
node-version: 14.15.4
47+
- name: Find yarn cache location
48+
id: yarn-cache
49+
run: echo "::set-output name=dir::$(yarn cache dir)"
50+
- name: JS package cache
51+
uses: actions/cache@v1
52+
with:
53+
path: ${{ steps.yarn-cache.outputs.dir }}
54+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
55+
restore-keys: |
56+
${{ runner.os }}-yarn-
57+
- name: Install packages
58+
run: |
59+
yarn install --pure-lockfile
60+
- name: Run tests
61+
run: |
62+
cp .env.example .env
63+
bundle exec rspec
64+
env:
65+
RAILS_ENV: test
66+
TWILIO_ACCOUNT_SID: ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
67+
TWILIO_AUTH_TOKEN: TWILIOAUTHTOKEN00000
68+
TWILIO_NUMBER: +12345555555
69+
BOB_NUMBER: +1234567823
70+
ALICE_NUMBER: +1234567000

.gitignore

+24-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,33 @@
1010
# Ignore the default SQLite database.
1111
/db/*.sqlite3
1212
/db/*.sqlite3-journal
13+
/db/*.sqlite3-*
1314

1415
# Ignore all logfiles and tempfiles.
1516
/log/*
17+
/tmp/*
1618
!/log/.keep
17-
/tmp
19+
!/tmp/.keep
1820

21+
# Ignore uploaded files in development.
22+
/storage/*
23+
!/storage/.keep
24+
25+
/public/assets
26+
.byebug_history
27+
28+
# Ignore master key for decrypting credentials and more.
29+
/config/master.key
30+
31+
/public/packs
32+
/public/packs-test
33+
/node_modules
34+
/yarn-error.log
35+
yarn-debug.log*
36+
.yarn-integrity
37+
38+
/vendor
1939
.env
40+
.env.test
41+
42+
/.vscode

.mergify.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pull_request_rules:
2+
- name: automatic merge for Dependabot pull requests
3+
conditions:
4+
- author~=^dependabot(|-preview)\[bot\]$
5+
- status-success=build
6+
actions:
7+
merge:
8+
method: squash

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v14.15.4

.rspec

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
--color
22
--require spec_helper
3+
--format documentation

.travis.yml

-15
This file was deleted.

CODE_OF_CONDUCT.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at open-source@twilio.com. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributing to Twilio
2+
3+
All third party contributors acknowledge that any contributions they provide will be made under the same open source license that the open source project is provided under.

Gemfile

+44-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,52 @@
11
source 'https://rubygems.org'
2+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
23

3-
gem 'rails', '4.2.6'
4-
gem 'sqlite3'
5-
gem 'uglifier', '>= 1.3.0'
6-
gem 'jquery-rails'
7-
gem 'turbolinks'
8-
gem 'twilio-ruby', '>= 5.0.0'
4+
ruby '~> 3.0'
95

10-
group :test do
6+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
7+
gem 'rails', '~> 6.1.1'
8+
# Use sqlite3 as the database for Active Record
9+
gem 'sqlite3', '~> 1.4'
10+
# Use Puma as the app server
11+
gem 'puma', '~> 5.0'
12+
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
13+
gem 'webpacker', '~> 5.0'
14+
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
15+
gem 'turbolinks', '~> 5'
16+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
17+
gem 'jbuilder', '~> 2.7'
18+
# Use Active Model has_secure_password
19+
# gem 'bcrypt', '~> 3.1.7'
20+
21+
# Reduces boot times through caching; required in config/boot.rb
22+
gem 'bootsnap', '>= 1.4.4', require: false
23+
24+
group :development, :test do
25+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
26+
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
1127
gem 'rspec-rails'
12-
gem 'pry'
13-
gem 'vcr'
14-
gem 'webmock'
15-
gem 'byebug'
28+
gem 'dotenv-rails'
1629
end
1730

1831
group :development do
19-
gem 'web-console', '~> 2.0'
32+
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
33+
gem 'web-console', '>= 4.1.0'
34+
# Display performance information such as SQL time and flame graphs for each request in your browser.
35+
# Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
36+
gem 'rack-mini-profiler', '~> 2.0'
37+
gem 'listen', '~> 3.3'
38+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
39+
gem 'spring'
2040
end
41+
42+
group :test do
43+
gem 'rails-controller-testing'
44+
gem 'webdrivers'
45+
gem 'webmock'
46+
gem 'vcr'
47+
end
48+
49+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
50+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
51+
gem "twilio-ruby", "~> 5.46"
52+
gem "bootstrap", "~> 4.5"

0 commit comments

Comments
 (0)