Skip to content

Commit

Permalink
Upgrades to Ruby 2.7.2 (#269)
Browse files Browse the repository at this point in the history
This commit migrates our Ruby version to the mostly recent one (2.7.2).
Also upgraded some dependencies that wasn't working on 2.7 version.
  • Loading branch information
duduribeiro authored Oct 28, 2020
1 parent 152414d commit 2fa2f9c
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: ruby
rvm:
- 2.5.0
- 2.7.2
services:
- postgresql
before_install:
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build stage
FROM ruby:2.5.0-alpine AS builder
FROM ruby:2.7.2-alpine AS builder

ARG build_without
ARG rails_env="development"
Expand Down Expand Up @@ -33,7 +33,7 @@ RUN bundle install && yarn && bundle exec rake assets:precompile \
&& rm -rf $to_remove

# final stage
FROM ruby:2.5.0-alpine
FROM ruby:2.7.2-alpine
LABEL maintainer="[email protected]"

ARG extra_packages
Expand All @@ -54,4 +54,4 @@ WORKDIR /var/app

EXPOSE 3000

CMD bin/rails s -b 0.0.0.0
CMD bin/rails s -b 0.0.0.0
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

ruby '2.5.0'
ruby '2.7.2'

source 'https://rubygems.org'

Expand Down
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ GEM
awesome_print (1.8.0)
bcrypt (3.1.11)
bindex (0.5.0)
bootsnap (1.1.8)
bootsnap (1.4.9)
msgpack (~> 1.0)
brakeman (4.3.1)
bugsnag (6.8.0)
Expand All @@ -77,7 +77,7 @@ GEM
code_analyzer (0.4.8)
sexp_processor
coderay (1.1.2)
concurrent-ruby (1.0.5)
concurrent-ruby (1.1.7)
connection_pool (2.2.2)
crass (1.0.4)
diff-lcs (1.3)
Expand Down Expand Up @@ -122,7 +122,7 @@ GEM
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
i18n (1.1.1)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
io-like (0.3.0)
jbuilder (2.7.0)
Expand All @@ -132,7 +132,7 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.1.0)
json (2.3.1)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
Expand All @@ -148,8 +148,8 @@ GEM
mimemagic (0.3.2)
mini_mime (1.0.1)
mini_portile2 (2.3.0)
minitest (5.11.3)
msgpack (1.2.2)
minitest (5.14.2)
msgpack (1.3.3)
multi_json (1.13.1)
nenv (0.3.0)
newrelic_rpm (5.4.0.347)
Expand Down Expand Up @@ -269,8 +269,8 @@ GEM
rubyzip (~> 1.2, >= 1.2.2)
sexp_processor (4.11.0)
shellany (0.0.1)
shoulda-matchers (3.1.2)
activesupport (>= 4.0.0)
shoulda-matchers (4.4.1)
activesupport (>= 4.2.0)
sidekiq (5.2.2)
connection_pool (~> 2.2, >= 2.2.2)
rack-protection (>= 1.5.0)
Expand Down Expand Up @@ -302,7 +302,7 @@ GEM
turbolinks (5.2.0)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.5)
tzinfo (1.2.7)
thread_safe (~> 0.1)
uglifier (4.1.19)
execjs (>= 0.3.0, < 3)
Expand Down Expand Up @@ -371,7 +371,7 @@ DEPENDENCIES
webpacker (~> 3.5)

RUBY VERSION
ruby 2.5.0p0
ruby 2.7.2p137

BUNDLED WITH
1.16.3
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You can run OpenJobs locally by two ways.

##### Ruby

The application uses Ruby 2.5.0. You should install it to run the application. (for development we recommend to use [RVM](https://rvm.io/))
The application uses Ruby 2.7.2. You should install it to run the application. (for development we recommend to use [RVM](https://rvm.io/))

##### Postgres

Expand Down
30 changes: 20 additions & 10 deletions db/structure.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
--
-- PostgreSQL database dump
--

-- Dumped from database version 11.5 (Debian 11.5-1.pgdg90+1)
-- Dumped by pg_dump version 11.3

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
Expand All @@ -18,7 +11,7 @@ SET row_security = off;

SET default_tablespace = '';

SET default_with_oids = false;
SET default_table_access_method = heap;

--
-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -
Expand Down Expand Up @@ -277,17 +270,34 @@ CREATE INDEX index_vacancies_on_tsv ON public.vacancies USING gin (tsv);
-- Name: companies companies_tsvectorupdate; Type: TRIGGER; Schema: public; Owner: -
--

CREATE TRIGGER companies_tsvectorupdate BEFORE INSERT OR UPDATE ON public.companies FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger('company_tsv', 'pg_catalog.portuguese', 'name');
CREATE TRIGGER companies_tsvectorupdate BEFORE INSERT OR UPDATE ON public.companies FOR EACH ROW EXECUTE FUNCTION tsvector_update_trigger('company_tsv', 'pg_catalog.portuguese', 'name');


--
-- Name: vacancies vacancies_tsvectorupdate; Type: TRIGGER; Schema: public; Owner: -
--

CREATE TRIGGER vacancies_tsvectorupdate BEFORE INSERT OR UPDATE ON public.vacancies FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger('tsv', 'pg_catalog.portuguese', 'location', 'job_title', 'description');
CREATE TRIGGER vacancies_tsvectorupdate BEFORE INSERT OR UPDATE ON public.vacancies FOR EACH ROW EXECUTE FUNCTION tsvector_update_trigger('tsv', 'pg_catalog.portuguese', 'location', 'job_title', 'description');


--
-- PostgreSQL database dump complete
--

SET search_path TO "$user", public;

INSERT INTO "schema_migrations" (version) VALUES
('20170222022125'),
('20170304231833'),
('20170314043437'),
('20170329184143'),
('20180216223455'),
('20180220224847'),
('20180220231334'),
('20180220232910'),
('20180221233924'),
('20180305210520'),
('20181027190121'),
('20191024195622');


1 change: 0 additions & 1 deletion spec/models/company_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

RSpec.describe Company, type: :model do
it { is_expected.to validate_presence_of(:name) }
it { is_expected.to validate_presence_of(:url) }

context 'validate company url' do
it { is_expected.to allow_value('http://opensanca.com.br').for(:url) }
Expand Down

0 comments on commit 2fa2f9c

Please sign in to comment.