Skip to content

Commit c3b6b14

Browse files
committed
upgrade to ruby 2.6.10 and Rails 5.0.7.2
Key changes: Merged the onboarding and imap plugins into main Removed the slack plugin from Docker
1 parent 41bb306 commit c3b6b14

File tree

134 files changed

+2811
-933
lines changed

Some content is hidden

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

134 files changed

+2811
-933
lines changed

.devcontainer/Dockerfile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
22
#ARG RUBY_VERSION=3.3.3
33
#FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION
4-
FROM ruby:2.5
4+
# you can find a specific ruby version at
5+
# https://hub.docker.com/_/ruby/tags
6+
FROM ruby:2.6.10
57

68
#RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
79
#RUN apt-get install nodejs -y
@@ -18,4 +20,12 @@ RUN apt-get update \
1820
ENV CHROME_VERSION=114.0.5735.90-1
1921
RUN wget -q https://mirror.cs.uchicago.edu/google-chrome/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb
2022
RUN apt-get -y update
21-
RUN apt-get install -y ./google-chrome-stable_${CHROME_VERSION}_amd64.deb
23+
RUN apt-get install -y ./google-chrome-stable_${CHROME_VERSION}_amd64.deb
24+
25+
RUN gem update --system 3.3.22
26+
RUN gem install bundler:2.4.22
27+
RUN gem install ffi:1.17.1
28+
29+
## Got the following error when trying update bundler to 1.17.3. Needed to add https://rubygems.org to trusted domains in VSCODE by clicking on the link
30+
# Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=error sslv3 alert handshake
31+
# too many connection resets (https://rubygems.org/quick/Marshal.4.8/bundler-1.17.3.gemspec.rz)

.devcontainer/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "helpy"
1+
name: helpy_rails5
22

33
services:
44
rails-app:

.devcontainer/devcontainer.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// For format details, see https://containers.dev/implementors/json_reference/.
22
// For config options, see the README at: https://github.com/devcontainers/templates/tree/main/src/ruby
33
{
4-
"name": "helpy",
4+
"name": "helpy_rails5",
55
"dockerComposeFile": "compose.yaml",
66
"service": "rails-app",
77
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
@@ -32,6 +32,13 @@
3232

3333

3434
// Use 'postCreateCommand' to run commands after the container is created.
35-
"postCreateCommand": "bin/setup --skip-server"
35+
"postCreateCommand": "bin/setup --skip-server",
36+
"customizations": {
37+
"vscode": {
38+
"extensions": [
39+
"eamodio.gitlens"
40+
]
41+
}
42+
}
3643
}
3744

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ public/uploads
3737
/certs
3838
/postgres
3939

40-
/.fossa.yml
40+
/.fossa.yml
41+
test_results.txt

Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM ruby:2.5
1+
FROM ruby:2.6.10
22

33
ENV RAILS_ENV=production \
44
HELPY_HOME=/helpy \
55
HELPY_USER=helpyuser \
6-
HELPY_SLACK_INTEGRATION_ENABLED=true \
6+
HELPY_SLACK_INTEGRATION_ENABLED=false \
77
BUNDLE_PATH=/opt/helpy-bundle
88

99
RUN apt-get update \
@@ -16,6 +16,10 @@ RUN useradd --no-create-home $HELPY_USER \
1616
&& mkdir -p $HELPY_HOME $BUNDLE_PATH \
1717
&& chown -R $HELPY_USER:$HELPY_USER $HELPY_HOME $BUNDLE_PATH
1818

19+
RUN gem update --system 3.3.22
20+
RUN gem install ffi -v 1.17.1
21+
RUN gem install bundler -v 2.4.22
22+
1923
WORKDIR $HELPY_HOME
2024

2125
COPY Gemfile Gemfile.lock $HELPY_HOME/
@@ -27,8 +31,8 @@ USER $HELPY_USER
2731

2832
# add the slack integration gem to the Gemfile if the HELPY_SLACK_INTEGRATION_ENABLED is true
2933
# use `test` for sh compatibility, also use only one `=`. also for sh compatibility
30-
RUN test "$HELPY_SLACK_INTEGRATION_ENABLED" = "true" \
31-
&& sed -i '128i\gem "helpy_slack", git: "https://github.com/helpyio/helpy_slack.git", branch: "master"' $HELPY_HOME/Gemfile
34+
# RUN test "$HELPY_SLACK_INTEGRATION_ENABLED" = "true" \
35+
# && sed -i '128i\gem "helpy_slack", git: "https://github.com/helpyio/helpy_slack.git", branch: "master"' $HELPY_HOME/Gemfile
3236

3337
RUN bundle install --without test development
3438

Gemfile

Lines changed: 61 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

3-
gem 'rails', '4.2.11.1'
3+
gem 'rails', '< 5.1'
44

55
# Use postgresql as the database for Active Record
66
gem 'pg', '~> 0.20.0'
@@ -10,16 +10,27 @@ gem 'sass-rails', '~> 5.0.7'
1010
# Use Uglifier as compressor for JavaScript assets
1111
gem 'uglifier', '>= 1.3.0'
1212

13+
# Need to include for rails 5
14+
gem 'ffi', '~> 1.17', '>= 1.17.1'
15+
gem 'rdoc', '< 6.3'
16+
# Getting the following error when running test
17+
# NoMethodError: undefined method `new' for BigDecimal:Class
18+
# https://stackoverflow.com/a/60491254/16682649
19+
# https://github.com/ruby/bigdecimal#which-version-should-you-select
20+
# NOTE: BigDecimal.new and subclassing always prints warning.
21+
gem 'bigdecimal', '~> 1.4'
22+
gem 'responders', '3.0.1'
23+
1324
# Explicitly include Nokogiri to control version
14-
gem 'nokogiri', '>= 1.10.4'
25+
gem 'nokogiri', '~> 1.10', '>= 1.10.10'
1526

1627
# Use jquery as the JavaScript library
1728
gem 'jquery-rails'
1829
gem 'jquery-ui-rails'
1930

2031
# Inline js validations
21-
gem 'client_side_validations'
22-
gem 'client_side_validations-simple_form'
32+
gem 'client_side_validations', '>= 9.3.2', '< 15'
33+
gem 'client_side_validations-simple_form', '~> 6'
2334

2435
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
2536
gem 'turbolinks', '~> 2.5.3'
@@ -42,68 +53,73 @@ gem 'ranked-model'
4253
# Google Analytics Measurement Protocol
4354
gem 'staccato'
4455

45-
gem "rails-settings-cached", '~> 0.5.0'
56+
gem "rails-settings-cached", '< 0.5'
4657
gem 'sucker_punch', '~> 2.0'
4758

4859
# Charting
4960
gem "groupdate"
5061
gem "chartkick"
5162

5263
# Auth Gems
53-
gem 'devise', '<= 5.0.0'
64+
gem 'devise', '4.7.3'
5465
gem 'devise-i18n'
5566
gem 'devise-bootstrap-views'
5667
gem 'devise_invitable'
57-
gem 'omniauth'
68+
gem 'omniauth', '1.9.1'
5869
gem "omniauth-rails_csrf_protection" # TODO: remove once https://github.com/omniauth/omniauth/pull/809 is resolved
5970
gem 'omniauth-github'
6071
gem 'omniauth-twitter'
6172
gem 'omniauth-google-oauth2'
6273
gem 'omniauth-facebook'
6374

6475
# i18n gems
65-
gem 'rails-i18n', '~> 4.0.9'
76+
gem 'rails-i18n', '~> 5.0'
6677
gem 'i18n-country-translations'
67-
gem 'route_translator'
78+
#gem 'route_translator', '< 6'
79+
gem 'route_translator', '= 5.0.2'
6880
gem 'http_accept_language'
6981

7082
# API gems
71-
gem 'grape'
72-
gem 'grape-swagger'
73-
gem 'grape-entity'
74-
gem 'grape-swagger-rails'
75-
gem 'grape-swagger-entity'
83+
gem 'grape', '~> 1.8'
84+
gem 'grape-swagger', '~> 1.4'
85+
gem 'grape-entity', '~> 0.10'
86+
gem 'grape-swagger-rails', '~> 0.3'
87+
gem 'grape-swagger-entity', '~> 0.5'
7688
# gem 'grape-attack' #uncomment for rate limiting
77-
gem 'grape-kaminari'
78-
gem 'kaminari-grape'
89+
gem 'grape-kaminari', '~> 0.4'
90+
gem 'kaminari-grape', '~> 1.0'
7991
gem 'rack-cors', :require => 'rack/cors'
8092

81-
gem 'paper_trail'
82-
gem 'acts-as-taggable-on', '~>3.5'
93+
gem 'paper_trail', '< 11'
94+
gem 'acts-as-taggable-on', '~> 8.1'
8395

8496
gem 'kaminari'
8597
gem 'kaminari-i18n'
8698

87-
gem 'globalize', '= 5.0.1'
88-
gem 'globalize-versioning'
99+
gem 'globalize', '<= 5.1.0'
100+
gem 'globalize-versioning', '<= 0.4'
89101
gem 'globalize-accessors'
90102

91103
gem 'gravtastic'
92104

93105
# File handling
94-
gem 'cloudinary', '1.1.7'
95-
gem 'attachinary'
106+
gem 'cloudinary', '< 2'
107+
#gem 'attachinary', '< 2'
108+
gem 'attachinary', :git => 'https://github.com/ThomasConnolly/attachinary.git'
96109

97-
gem 'carrierwave', '~> 1.3.1'
98-
gem 'fog-aws'
110+
gem 'carrierwave', '< 3.0.0'
111+
gem 'fog-aws', '< 3.6'
99112
gem "jquery-fileupload-rails"
100113
gem 'mini_magick'
101114

102115
# Bootstrap/UI Gems
103-
gem 'font-awesome-sass'
116+
# Pin font-awesome-sass to prevent error
117+
# RuntimeError: Neutered Exception ActionView::Template::Error: File to import not found or unreadable: font-awesome-sprockets.
118+
# https://stackoverflow.com/a/33792852/31278
119+
gem 'font-awesome-sass', '~> 4.4.0'
104120
gem 'bootstrap-sass'
105121
gem 'bootstrap_form'
106-
gem 'simple_form'
122+
gem 'simple_form', '< 4'
107123
gem 'twitter-bootstrap-rails'
108124
gem 'twitter-bootstrap-rails-confirm'
109125
gem 'rdiscount'
@@ -129,7 +145,7 @@ gem 'griddler-postmark'
129145
gem 'griddler-sparkpost'
130146

131147
# html Email
132-
gem 'inky-rb', require: 'inky'
148+
gem 'inky-rb', '~> 1.3', require: 'inky'
133149
gem 'premailer-rails'
134150

135151
gem 'rails-timeago'
@@ -154,65 +170,68 @@ gem "recaptcha", '< 3', require: "recaptcha/rails" # TODO: Update
154170
gem 'best_in_place', '~> 3.1'
155171

156172
# Add onboarding component
157-
gem 'helpy_onboarding', git: 'https://github.com/helpyio/helpy_onboarding', branch: 'master'
158-
gem 'helpy_imap', git: 'https://github.com/helpyio/helpy_imap', branch: 'master'
159173

160174
group :development, :test do
161175
# Audit Gemfile for security vulnerabilities
162176
gem 'bundler-audit', require: false
163177
gem 'byebug', '11.0'
164178
gem 'pry'
165-
gem 'pry-byebug', '3.7.0'
179+
gem 'pry-byebug', '~> 3.9'
166180
gem 'spring', '~> 2.0.2'
167181
gem 'annotate'
168182
gem 'brakeman', require: false
169183
gem 'rubocop', '0.83.0'
170184
gem 'scss-lint'
171185
gem 'awesome_print'
172186
gem 'rb-readline'
173-
gem 'capybara'
187+
gem 'capybara', '< 3.30'
174188

175189
end
176190

177191
gem 'bulk_insert'
178-
gem 'roo'
192+
gem 'roo', '< 2.8'
179193
gem 'ancestry'
180194

181195
group :development do
182196
gem "better_errors"
197+
gem "binding_of_caller"
183198

184199
# Check Eager Loading / N+1 query problems
185200
# gem 'bullet'
186201
gem 'scout_apm'
187202

188203
# Access an IRB console on exception pages or by using <%= console %> in views
189204
gem 'web-console', '~> 3.3'
205+
gem 'meta_request', '0.7.3'
190206
end
191207

192208
group :test do
193-
gem 'minitest'
209+
gem 'minitest', '5.10.3'
194210
gem 'minitest-reporters'
195211
gem 'minitest-retry'
196-
gem 'shoulda', '3.5' # Required for minitest
197-
gem 'shoulda-matchers', '~> 2.0' # Required for minitest
198-
gem 'factory_bot_rails'
199-
gem 'webdrivers'
200-
gem 'capybara-email'
201-
gem 'selenium-webdriver', '3.141.0'
212+
gem 'shoulda', '~> 3.5' # Required for minitest
213+
gem 'shoulda-matchers', '~> 3.0' # Required for minitest
214+
gem 'factory_bot', '< 6.3'
215+
gem 'factory_bot_rails', '< 6.4'
216+
gem 'webdrivers', '< 5'
217+
gem 'capybara-email', '~> 3.0'
218+
gem 'selenium-webdriver', '< 4.0'
202219
# gem 'chromedriver-helper'
203220
gem 'launchy'
204221
gem "codeclimate-test-reporter",require: nil
205222
gem 'simplecov', :require => false
206223

207224
# remove this for Rails 5 because the function is already included
208-
gem 'test_after_commit'
225+
#gem 'test_after_commit'
226+
# assigns has been extracted to a gem.
227+
gem 'rails-controller-testing'
209228
end
210229

211230
group :production do
212231
# Uncomment this gem for Heroku:
213232
# gem 'rails_12factor'
214233
gem 'unicorn' #kept for backwards compatibility
215-
gem 'puma'
234+
gem 'puma', '< 6'
216235
end
217236

218-
ruby '>= 2.2', '< 3.0'
237+
ruby '>= 2.2', '< 2.7'

0 commit comments

Comments
 (0)