Chore: Update ruby and rails versions (#831)

This commit is contained in:
Sojan Jose 2020-05-08 12:13:23 +05:30 committed by GitHub
parent 628e0c8423
commit 05ea6308f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 107 additions and 107 deletions

View file

@ -7,7 +7,7 @@ defaults: &defaults
working_directory: ~/build
docker:
# specify the version you desire here
- image: circleci/ruby:2.7.0-node-browsers
- image: circleci/ruby:2.7.1-node-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images

View file

@ -1 +1 @@
2.7.0
2.7.1

View file

@ -1,6 +1,6 @@
source 'https://rubygems.org'
ruby '2.7.0'
ruby '2.7.1'
##-- base gems for rails --##
gem 'rack-cors', require: 'rack/cors'

View file

@ -25,61 +25,61 @@ GEM
specs:
action-cable-testing (0.6.1)
actioncable (>= 5.0)
actioncable (6.0.2.2)
actionpack (= 6.0.2.2)
actioncable (6.0.3)
actionpack (= 6.0.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.2.2)
actionpack (= 6.0.2.2)
activejob (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
actionmailbox (6.0.3)
actionpack (= 6.0.3)
activejob (= 6.0.3)
activerecord (= 6.0.3)
activestorage (= 6.0.3)
activesupport (= 6.0.3)
mail (>= 2.7.1)
actionmailer (6.0.2.2)
actionpack (= 6.0.2.2)
actionview (= 6.0.2.2)
activejob (= 6.0.2.2)
actionmailer (6.0.3)
actionpack (= 6.0.3)
actionview (= 6.0.3)
activejob (= 6.0.3)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.2.2)
actionview (= 6.0.2.2)
activesupport (= 6.0.2.2)
actionpack (6.0.3)
actionview (= 6.0.3)
activesupport (= 6.0.3)
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 (6.0.2.2)
actionpack (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
actiontext (6.0.3)
actionpack (= 6.0.3)
activerecord (= 6.0.3)
activestorage (= 6.0.3)
activesupport (= 6.0.3)
nokogiri (>= 1.8.5)
actionview (6.0.2.2)
activesupport (= 6.0.2.2)
actionview (6.0.3)
activesupport (= 6.0.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.0.2.2)
activesupport (= 6.0.2.2)
activejob (6.0.3)
activesupport (= 6.0.3)
globalid (>= 0.3.6)
activemodel (6.0.2.2)
activesupport (= 6.0.2.2)
activerecord (6.0.2.2)
activemodel (= 6.0.2.2)
activesupport (= 6.0.2.2)
activestorage (6.0.2.2)
actionpack (= 6.0.2.2)
activejob (= 6.0.2.2)
activerecord (= 6.0.2.2)
activemodel (6.0.3)
activesupport (= 6.0.3)
activerecord (6.0.3)
activemodel (= 6.0.3)
activesupport (= 6.0.3)
activestorage (6.0.3)
actionpack (= 6.0.3)
activejob (= 6.0.3)
activerecord (= 6.0.3)
marcel (~> 0.3.1)
activesupport (6.0.2.2)
activesupport (6.0.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2)
zeitwerk (~> 2.2, >= 2.2.2)
acts-as-taggable-on (6.5.0)
activerecord (>= 5.0, < 6.1)
addressable (2.7.0)
@ -90,8 +90,8 @@ GEM
ast (2.4.0)
attr_extras (6.2.3)
aws-eventstream (1.1.0)
aws-partitions (1.296.0)
aws-sdk-core (3.94.0)
aws-partitions (1.310.0)
aws-sdk-core (3.94.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
@ -99,11 +99,11 @@ GEM
aws-sdk-kms (1.30.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.61.2)
aws-sdk-s3 (1.63.1)
aws-sdk-core (~> 3, >= 3.83.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.1.1)
aws-sigv4 (1.1.3)
aws-eventstream (~> 1.0, >= 1.0.2)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
@ -131,7 +131,7 @@ GEM
bundler-audit (0.6.1)
bundler (>= 1.2.0, < 3)
thor (~> 0.18)
byebug (11.1.1)
byebug (11.1.3)
chargebee (2.7.5)
json_pure (~> 2.1)
rest-client (>= 1.8, < 3.0)
@ -167,13 +167,13 @@ GEM
equalizer (0.0.11)
erubi (1.9.0)
execjs (2.7.0)
facebook-messenger (1.4.1)
facebook-messenger (1.5.0)
httparty (~> 0.13, >= 0.13.7)
rack (>= 1.4.5)
factory_bot (5.1.2)
factory_bot (5.2.0)
activesupport (>= 4.2.0)
factory_bot_rails (5.1.1)
factory_bot (~> 5.1.0)
factory_bot_rails (5.2.0)
factory_bot (~> 5.2.0)
railties (>= 4.2.0)
faker (2.11.0)
i18n (>= 1.6, < 2)
@ -217,7 +217,7 @@ GEM
groupdate (5.0.0)
activesupport (>= 5)
haikunator (1.1.0)
hana (1.3.5)
hana (1.3.6)
hashie (4.1.0)
hkdf (0.3.0)
http-accept (1.7.0)
@ -272,8 +272,8 @@ GEM
method_source (1.0.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.1009)
mimemagic (0.3.4)
mime-types-data (3.2020.0425)
mimemagic (0.3.5)
mini_magick (4.10.1)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
@ -290,7 +290,7 @@ GEM
orm_adapter (0.5.0)
os (1.1.0)
parallel (1.19.1)
parser (2.7.1.1)
parser (2.7.1.2)
ast (~> 2.4.0)
pg (1.2.3)
pry (0.13.1)
@ -314,38 +314,38 @@ GEM
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.2.2)
actioncable (= 6.0.2.2)
actionmailbox (= 6.0.2.2)
actionmailer (= 6.0.2.2)
actionpack (= 6.0.2.2)
actiontext (= 6.0.2.2)
actionview (= 6.0.2.2)
activejob (= 6.0.2.2)
activemodel (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
rails (6.0.3)
actioncable (= 6.0.3)
actionmailbox (= 6.0.3)
actionmailer (= 6.0.3)
actionpack (= 6.0.3)
actiontext (= 6.0.3)
actionview (= 6.0.3)
activejob (= 6.0.3)
activemodel (= 6.0.3)
activerecord (= 6.0.3)
activestorage (= 6.0.3)
activesupport (= 6.0.3)
bundler (>= 1.3.0)
railties (= 6.0.2.2)
railties (= 6.0.3)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (6.0.2.2)
actionpack (= 6.0.2.2)
activesupport (= 6.0.2.2)
railties (6.0.3)
actionpack (= 6.0.3)
activesupport (= 6.0.3)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rainbow (3.0.0)
rake (13.0.1)
rb-fsevent (0.10.3)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
redis (4.1.3)
redis (4.1.4)
redis-namespace (1.7.0)
redis (>= 3.0.4)
redis-rack-cache (2.2.1)
@ -367,8 +367,8 @@ GEM
netrc (~> 0.8)
retriable (3.1.2)
rexml (3.2.4)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-core (3.9.2)
rspec-support (~> 3.9.3)
rspec-expectations (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
@ -383,8 +383,8 @@ GEM
rspec-expectations (~> 3.9)
rspec-mocks (~> 3.9)
rspec-support (~> 3.9)
rspec-support (3.9.2)
rubocop (0.81.0)
rspec-support (3.9.3)
rubocop (0.82.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.7.0.1)
@ -398,7 +398,7 @@ GEM
activesupport
rack (>= 1.1)
rubocop (>= 0.72.0)
rubocop-rspec (1.38.1)
rubocop-rspec (1.39.0)
rubocop (>= 0.68.1)
ruby-progressbar (1.10.1)
sass (3.7.4)
@ -418,7 +418,7 @@ GEM
faraday (>= 1.0)
shoulda-matchers (4.3.0)
activesupport (>= 4.2.0)
sidekiq (6.0.6)
sidekiq (6.0.7)
connection_pool (>= 2.2.2)
rack (~> 2.0)
rack-protection (>= 2.0.0)
@ -460,7 +460,7 @@ GEM
nokogiri (>= 1.6, < 2.0)
tzinfo (1.2.7)
thread_safe (~> 0.1)
tzinfo-data (1.2019.3)
tzinfo-data (1.2020.1)
tzinfo (>= 1.0.0)
uber (0.1.0)
uglifier (4.2.0)
@ -480,12 +480,12 @@ GEM
equalizer (~> 0.0, >= 0.0.9)
warden (1.2.8)
rack (>= 2.0.6)
web-console (4.0.1)
web-console (4.0.2)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webpacker (5.0.1)
webpacker (5.1.1)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 5.2)
@ -576,7 +576,7 @@ DEPENDENCIES
wisper (= 2.0.0)
RUBY VERSION
ruby 2.7.0p0
ruby 2.7.1p83
BUNDLED WITH
2.1.2
2.1.4

View file

@ -3,7 +3,7 @@ class ActionCableBroadcastJob < ApplicationJob
def perform(members, event_name, data)
members.each do |member|
ActionCable.server.broadcast(member, event: event_name, data: data)
ActionCable.server.broadcast(member, { event: event_name, data: data })
end
end
end

View file

@ -180,7 +180,7 @@ class Conversation < ApplicationRecord
def create_assignee_change(user_name)
params = { assignee_name: assignee&.name, user_name: user_name }.compact
key = assignee_id ? 'assigned' : 'removed'
content = I18n.t("conversations.activity.assignee.#{key}", params)
content = I18n.t("conversations.activity.assignee.#{key}", **params)
messages.create(activity_message_params(content))
end

View file

@ -66,7 +66,7 @@ Rails.application.configure do
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true
config.i18n.fallbacks = [I18n.default_locale]
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify

View file

@ -81,7 +81,7 @@ Rails.application.configure do
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true
config.i18n.fallbacks = [I18n.default_locale]
config.active_job.queue_adapter = :sidekiq
# Send deprecation notices to registered listeners.

View file

@ -16,10 +16,10 @@ KillMode=mixed
StandardInput=null
SyslogIdentifier=%p
Environment="PATH=/home/chatwoot/.rvm/gems/ruby-2.7.0/bin:/home/chatwoot/.rvm/gems/ruby-2.7.0@global/bin:/home/chatwoot/.rvm/rubies/ruby-2.7.0/bin:/home/chatwoot/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/chatwoot/.rvm/bin:/home/chatwoot/.rvm/bin"
Environment="PATH=/home/chatwoot/.rvm/gems/ruby-2.7.1/bin:/home/chatwoot/.rvm/gems/ruby-2.7.1@global/bin:/home/chatwoot/.rvm/rubies/ruby-2.7.1/bin:/home/chatwoot/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/chatwoot/.rvm/bin:/home/chatwoot/.rvm/bin"
Environment="PORT=3000"
Environment="RAILS_ENV=production"
Environment="NODE_ENV=production"
Environment="RAILS_LOG_TO_STDOUT=true"
Environment="GEM_HOME=/home/chatwoot/.rvm/gems/ruby-2.7.0"
Environment="GEM_PATH=/home/chatwoot/.rvm/gems/ruby-2.7.0:/home/chatwoot/.rvm/gems/ruby-2.7.0@global"
Environment="GEM_HOME=/home/chatwoot/.rvm/gems/ruby-2.7.1"
Environment="GEM_PATH=/home/chatwoot/.rvm/gems/ruby-2.7.1:/home/chatwoot/.rvm/gems/ruby-2.7.1@global"

View file

@ -16,10 +16,10 @@ KillMode=mixed
StandardInput=null
SyslogIdentifier=%p
Environment="PATH=/home/chatwoot/.rvm/gems/ruby-2.7.0/bin:/home/chatwoot/.rvm/gems/ruby-2.7.0@global/bin:/home/chatwoot/.rvm/rubies/ruby-2.7.0/bin:/home/chatwoot/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/chatwoot/.rvm/bin:/home/chatwoot/.rvm/bin"
Environment="PATH=/home/chatwoot/.rvm/gems/ruby-2.7.1/bin:/home/chatwoot/.rvm/gems/ruby-2.7.1@global/bin:/home/chatwoot/.rvm/rubies/ruby-2.7.1/bin:/home/chatwoot/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/chatwoot/.rvm/bin:/home/chatwoot/.rvm/bin"
Environment="PORT=3000"
Environment="RAILS_ENV=production"
Environment="NODE_ENV=production"
Environment="RAILS_LOG_TO_STDOUT=true"
Environment="GEM_HOME=/home/chatwoot/.rvm/gems/ruby-2.7.0"
Environment="GEM_PATH=/home/chatwoot/.rvm/gems/ruby-2.7.0:/home/chatwoot/.rvm/gems/ruby-2.7.0@global"
Environment="GEM_HOME=/home/chatwoot/.rvm/gems/ruby-2.7.1"
Environment="GEM_PATH=/home/chatwoot/.rvm/gems/ruby-2.7.1:/home/chatwoot/.rvm/gems/ruby-2.7.1@global"

View file

@ -45,8 +45,8 @@ RAILS_ENV=production
sudo -i -u chatwoot << EOF
rvm --version
rvm autolibs disable
rvm install "ruby-2.7.0"
rvm use 2.7.0 --default
rvm install "ruby-2.7.1"
rvm use 2.7.1 --default
git clone https://github.com/chatwoot/chatwoot.git
cd chatwoot

View file

@ -1,5 +1,5 @@
# pre-build stage
FROM ruby:2.7.0-alpine AS pre-builder
FROM ruby:2.7.1-alpine AS pre-builder
# ARG default to production settings
# For development docker-compose file overrides ARGS
@ -36,7 +36,7 @@ COPY Gemfile Gemfile.lock ./
# Do not install development or test gems in production
RUN if [ "$RAILS_ENV" = "production" ]; then \
bundle install -j 4 -r 3 --without development test; \
bundle config set without 'development test'; bundle install -j 4 -r 3; \
else bundle install -j 4 -r 3; \
fi
@ -51,7 +51,7 @@ RUN if [ "$RAILS_ENV" = "production" ]; then \
fi
# final build stage
FROM ruby:2.7.0-alpine
FROM ruby:2.7.1-alpine
ARG BUNDLE_WITHOUT="development:test"
ENV BUNDLE_WITHOUT ${BUNDLE_WITHOUT}
@ -82,7 +82,7 @@ RUN if [ "$RAILS_ENV" = "production" ]; then \
COPY --from=pre-builder /gems/ /gems/
COPY --from=pre-builder /app /app
# Remove unecessary files
# Remove unnecessary files
RUN rm -rf /gems/ruby/2.7.0/cache/*.gem \
&& find /gems/ruby/2.7.0/gems/ -name "*.c" -delete \
&& find /gems/ruby/2.7.0/gems/ -name "*.o" -delete

View file

@ -37,19 +37,19 @@ source ~/.rvm/scripts/rvm
### Install Ruby
Chatwoot APIs are built on Ruby on Rails, you need install ruby 2.7.0
Chatwoot APIs are built on Ruby on Rails, you need install ruby 2.7.1
If you are using `rvm` :
```bash
rvm install ruby-2.7.0
rvm use 2.7.0
rvm install ruby-2.7.1
rvm use 2.7.1
```
If you are using `rbenv` to manage ruby versions do :
```bash
rbenv install 2.7.0
rbenv install 2.7.1
```
`rbenv` identifies the ruby version from `.ruby-version` file on the root of the project and loads it automatically.

View file

@ -33,16 +33,16 @@ Enable `Run command as a login shell` in terminal `Preferences`. Restart your co
### Install Ruby
Chatwoot APIs are built on Ruby on Rails, you need install ruby 2.7.0
Chatwoot APIs are built on Ruby on Rails, you need install ruby 2.7.1
```bash
rvm install ruby-2.7.0
rvm install ruby-2.7.1
```
Use ruby 2.7.0 as default
Use ruby 2.7.1 as default
```bash
rvm use 2.7.0 --default
rvm use 2.7.1 --default
```
### Install Node.js

View file

@ -26,15 +26,15 @@ sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev
```
Install RVM & ruby version 2.7.0
Install RVM & ruby version 2.7.1
```bash
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install 2.7.0
rvm use 2.7.0 --default
rvm install 2.7.1
rvm use 2.7.1 --default
ruby -v
```