Skip to content

Commit

Permalink
Rails upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalie committed Jul 10, 2023
1 parent a7c0a75 commit 16e4c48
Show file tree
Hide file tree
Showing 11 changed files with 223 additions and 151 deletions.
46 changes: 40 additions & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,45 @@
*.md
# Ignore docker files
.dockerignore
Dockerfile*
docker-compose*

# Ignore .git
/.git
.gitignore

# Ignore bundler config.
/.bundle
vendor/bundle

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

.env
.env.*
.git
.gitignore

.travis.yml
Dockerfile

*.md

spec
#IDEs folders
.idea

migration.log

# Ignore editor specific configs
/.idea
/.vscode
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
.generators
.rakeTasks

# System Files
.DS_Store
Thumbs.db
40 changes: 32 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
.bundle
.ruby-gemset
log
*.gem
vendor
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle
vendor/bundle

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

.env
.env.*

#IDEs
.idea
migration.log

# Ignore editor specific configs
/.idea
/.vscode
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
.generators
.rakeTasks

.history
# System Files
.DS_Store
Thumbs.db
7 changes: 4 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.5.9'

gem 'rails', '~> 5.2'
gem 'pg', '~> 1.0'
gem 'rails', '~> 5.2.8'
gem 'pg', '>= 0.18', '< 2.0'
gem 'rake'
gem 'rspec', '~>3.4'
gem 'rspec'
gem 's3'
168 changes: 83 additions & 85 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,146 +1,144 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.4.3)
actionpack (= 5.2.4.3)
actioncable (5.2.8.1)
actionpack (= 5.2.8.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.4.3)
actionpack (= 5.2.4.3)
actionview (= 5.2.4.3)
activejob (= 5.2.4.3)
actionmailer (5.2.8.1)
actionpack (= 5.2.8.1)
actionview (= 5.2.8.1)
activejob (= 5.2.8.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.4.3)
actionview (= 5.2.4.3)
activesupport (= 5.2.4.3)
actionpack (5.2.8.1)
actionview (= 5.2.8.1)
activesupport (= 5.2.8.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.4.3)
activesupport (= 5.2.4.3)
actionview (5.2.8.1)
activesupport (= 5.2.8.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.4.3)
activesupport (= 5.2.4.3)
activejob (5.2.8.1)
activesupport (= 5.2.8.1)
globalid (>= 0.3.6)
activemodel (5.2.4.3)
activesupport (= 5.2.4.3)
activerecord (5.2.4.3)
activemodel (= 5.2.4.3)
activesupport (= 5.2.4.3)
activemodel (5.2.8.1)
activesupport (= 5.2.8.1)
activerecord (5.2.8.1)
activemodel (= 5.2.8.1)
activesupport (= 5.2.8.1)
arel (>= 9.0)
activestorage (5.2.4.3)
actionpack (= 5.2.4.3)
activerecord (= 5.2.4.3)
marcel (~> 0.3.1)
activesupport (5.2.4.3)
activestorage (5.2.8.1)
actionpack (= 5.2.8.1)
activerecord (= 5.2.8.1)
marcel (~> 1.0.0)
activesupport (5.2.8.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
arel (9.0.0)
builder (3.2.4)
concurrent-ruby (1.1.6)
concurrent-ruby (1.1.10)
crass (1.0.6)
diff-lcs (1.3)
erubi (1.9.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
i18n (1.8.3)
diff-lcs (1.5.0)
erubi (1.11.0)
globalid (1.0.0)
activesupport (>= 5.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
loofah (2.5.0)
loofah (2.19.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
marcel (1.0.2)
method_source (1.0.0)
mimemagic (0.3.10)
nokogiri (~> 1)
rake
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.1)
nio4r (2.5.2)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
pg (1.2.3)
mini_mime (1.1.2)
mini_portile2 (2.6.1)
minitest (5.15.0)
nio4r (2.5.8)
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
pg (1.4.3)
proxies (0.2.3)
public_suffix (4.0.5)
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.4.3)
actioncable (= 5.2.4.3)
actionmailer (= 5.2.4.3)
actionpack (= 5.2.4.3)
actionview (= 5.2.4.3)
activejob (= 5.2.4.3)
activemodel (= 5.2.4.3)
activerecord (= 5.2.4.3)
activestorage (= 5.2.4.3)
activesupport (= 5.2.4.3)
public_suffix (4.0.7)
racc (1.6.0)
rack (2.2.4)
rack-test (2.0.2)
rack (>= 1.3)
rails (5.2.8.1)
actioncable (= 5.2.8.1)
actionmailer (= 5.2.8.1)
actionpack (= 5.2.8.1)
actionview (= 5.2.8.1)
activejob (= 5.2.8.1)
activemodel (= 5.2.8.1)
activerecord (= 5.2.8.1)
activestorage (= 5.2.8.1)
activesupport (= 5.2.8.1)
bundler (>= 1.3.0)
railties (= 5.2.4.3)
railties (= 5.2.8.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
rails-html-sanitizer (1.4.3)
loofah (~> 2.3)
railties (5.2.4.3)
actionpack (= 5.2.4.3)
activesupport (= 5.2.4.3)
railties (5.2.8.1)
actionpack (= 5.2.8.1)
activesupport (= 5.2.8.1)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (13.0.1)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.2)
rspec-support (~> 3.9.3)
rspec-expectations (3.9.2)
rake (13.0.6)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.3)
rspec-support (~> 3.11.0)
rspec-support (3.11.1)
s3 (0.3.29)
addressable
proxies
sprockets (4.0.2)
sprockets (4.1.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
thor (1.0.1)
thor (1.2.1)
thread_safe (0.3.6)
tzinfo (1.2.7)
tzinfo (1.2.10)
thread_safe (~> 0.1)
websocket-driver (0.7.2)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)

PLATFORMS
ruby

DEPENDENCIES
pg (~> 1.0)
rails (~> 5.2)
pg (>= 0.18, < 2.0)
rails (~> 5.2.8)
rake
rspec (~> 3.4)
rspec
s3

RUBY VERSION
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This creates a new ActiveRecord migration file in `db/main/migrate`,
with the current timestamp and the name `add_column_x_to_table_y`:

```
create db/main/migrate/20181007154333_add_column_x_to_table_y.rb
create db/main/migrate/20181007154333_add_column_x_to_table_y.rb
```

See [this guide](http://edgeguides.rubyonrails.org/active_record_migrations.html#creating-a-standalone-migration) for creating standalone migrations.
Expand All @@ -46,12 +46,13 @@ We use PostgreSQL 9.6 on production, which is often different than the database
installed on many operating systems by default. In order to make it easier to
run against 9.6 you can use Docker with a supplied docker-compose.yml file.

Run `docker-compose up` to start the container. Then you can either change
settings in `config/database.yml` to use `postgres` as a user and `5431` as a
port, or run with `DATABASE_URL` specified explicitly, for example:
Run `docker-compose up` to start the container.
Then you can either change settings in `config/database.yml`
to use `postgres` as a user, `postgres` as a password and `5432` as a port,
or run with `DATABASE_URL` specified explicitly, for example:

```bash
DATABASE_URL=postgres://postgres@localhost:5431/travis_test bundle exec rake db:migrate
DATABASE_URL=postgres://postgres:postgres@localhost:5432/travis_test bundle exec rake db:migrate
```

Running migrations locally
Expand Down Expand Up @@ -86,7 +87,7 @@ ActiveRecord::NoEnvironmentInSchemaError:
Environment data not found in the schema. To resolve this issue, run:
bin/rails db:environment:set RAILS_ENV=test
bin/rails db:environment:set RAILS_ENV=test
```

The command that it outputs will not work, because we don't install rails
Expand Down
Loading

0 comments on commit 16e4c48

Please sign in to comment.