Skip to content

Commit

Permalink
Migrando a rails7 lo del lado del servidor
Browse files Browse the repository at this point in the history
  • Loading branch information
vtamara committed Jan 5, 2022
1 parent dccb690 commit 2499630
Show file tree
Hide file tree
Showing 17 changed files with 830 additions and 752 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ gem 'nokogiri', '>=1.11.1'

gem 'pg'

gem 'rails', '~> 6.1'
gem 'rails', '~> 7.0'
#git: 'https://github.com/rails/rails.git', branch: '6-1-stable'

gem 'sassc-rails'
Expand All @@ -53,7 +53,7 @@ gem "will_paginate" # Listados en páginas
# lógico y no alfabetico como las gemas anteriores)

gem 'sip', # Motor generico
git: 'https://github.com/pasosdeJesus/sip.git', branch: :main
git: 'https://github.com/pasosdeJesus/sip.git', branch: :rails7
#gem 'sip', path: '../sip'


Expand Down
141 changes: 71 additions & 70 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ GIT

GIT
remote: https://github.com/pasosdeJesus/sip.git
revision: b90543e16f676d68f8cacceb2370948536e7a36e
branch: main
revision: 66677df6ad96d7241cd939c99917a01190273841
branch: rails7
specs:
sip (2.0)
sip (2.1a1)
cancancan
chosen-rails
devise
Expand All @@ -37,75 +37,75 @@ GIT
PATH
remote: .
specs:
jn316_gen (1.0.a2)
jn316_gen (2.1a1)
net-ldap
rails
sip

GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.4.4)
actionpack (= 6.1.4.4)
activesupport (= 6.1.4.4)
actioncable (7.0.0)
actionpack (= 7.0.0)
activesupport (= 7.0.0)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.4.4)
actionpack (= 6.1.4.4)
activejob (= 6.1.4.4)
activerecord (= 6.1.4.4)
activestorage (= 6.1.4.4)
activesupport (= 6.1.4.4)
actionmailbox (7.0.0)
actionpack (= 7.0.0)
activejob (= 7.0.0)
activerecord (= 7.0.0)
activestorage (= 7.0.0)
activesupport (= 7.0.0)
mail (>= 2.7.1)
actionmailer (6.1.4.4)
actionpack (= 6.1.4.4)
actionview (= 6.1.4.4)
activejob (= 6.1.4.4)
activesupport (= 6.1.4.4)
actionmailer (7.0.0)
actionpack (= 7.0.0)
actionview (= 7.0.0)
activejob (= 7.0.0)
activesupport (= 7.0.0)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.4.4)
actionview (= 6.1.4.4)
activesupport (= 6.1.4.4)
rack (~> 2.0, >= 2.0.9)
actionpack (7.0.0)
actionview (= 7.0.0)
activesupport (= 7.0.0)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.4.4)
actionpack (= 6.1.4.4)
activerecord (= 6.1.4.4)
activestorage (= 6.1.4.4)
activesupport (= 6.1.4.4)
actiontext (7.0.0)
actionpack (= 7.0.0)
activerecord (= 7.0.0)
activestorage (= 7.0.0)
activesupport (= 7.0.0)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (6.1.4.4)
activesupport (= 6.1.4.4)
actionview (7.0.0)
activesupport (= 7.0.0)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.4.4)
activesupport (= 6.1.4.4)
activejob (7.0.0)
activesupport (= 7.0.0)
globalid (>= 0.3.6)
activemodel (6.1.4.4)
activesupport (= 6.1.4.4)
activerecord (6.1.4.4)
activemodel (= 6.1.4.4)
activesupport (= 6.1.4.4)
activestorage (6.1.4.4)
actionpack (= 6.1.4.4)
activejob (= 6.1.4.4)
activerecord (= 6.1.4.4)
activesupport (= 6.1.4.4)
marcel (~> 1.0.0)
activemodel (7.0.0)
activesupport (= 7.0.0)
activerecord (7.0.0)
activemodel (= 7.0.0)
activesupport (= 7.0.0)
activestorage (7.0.0)
actionpack (= 7.0.0)
activejob (= 7.0.0)
activerecord (= 7.0.0)
activesupport (= 7.0.0)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.4.4)
activesupport (7.0.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
bcrypt (3.1.16)
bigdecimal (3.0.2)
bigdecimal (3.1.1)
bindex (0.8.1)
bootsnap (1.9.3)
msgpack (~> 1.0)
Expand Down Expand Up @@ -148,7 +148,8 @@ GEM
activesupport (>= 5.0)
i18n (1.8.11)
concurrent-ruby (~> 1.0)
jbuilder (2.11.4)
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
Expand Down Expand Up @@ -191,21 +192,20 @@ GEM
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.1.4.4)
actioncable (= 6.1.4.4)
actionmailbox (= 6.1.4.4)
actionmailer (= 6.1.4.4)
actionpack (= 6.1.4.4)
actiontext (= 6.1.4.4)
actionview (= 6.1.4.4)
activejob (= 6.1.4.4)
activemodel (= 6.1.4.4)
activerecord (= 6.1.4.4)
activestorage (= 6.1.4.4)
activesupport (= 6.1.4.4)
rails (7.0.0)
actioncable (= 7.0.0)
actionmailbox (= 7.0.0)
actionmailer (= 7.0.0)
actionpack (= 7.0.0)
actiontext (= 7.0.0)
actionview (= 7.0.0)
activejob (= 7.0.0)
activemodel (= 7.0.0)
activerecord (= 7.0.0)
activestorage (= 7.0.0)
activesupport (= 7.0.0)
bundler (>= 1.15.0)
railties (= 6.1.4.4)
sprockets-rails (>= 2.0.0)
railties (= 7.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -215,15 +215,16 @@ GEM
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
rails-i18n (6.0.0)
rails-i18n (7.0.1)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 7)
railties (6.1.4.4)
actionpack (= 6.1.4.4)
activesupport (= 6.1.4.4)
railties (>= 6.0.0, < 8)
railties (7.0.0)
actionpack (= 7.0.0)
activesupport (= 7.0.0)
method_source
rake (>= 0.13)
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (13.0.6)
responders (3.0.1)
actionpack (>= 5.0)
Expand Down Expand Up @@ -255,9 +256,9 @@ GEM
sprockets (>= 3.0.0)
terrapin (0.6.0)
climate_control (>= 0.0.3, < 1.0)
thor (1.1.0)
thor (1.2.1)
tilt (2.0.10)
twitter_cldr (6.10.0)
twitter_cldr (6.11.0)
camertron-eprun
cldr-plurals-runtime-rb (~> 1.1)
tzinfo
Expand All @@ -279,7 +280,7 @@ GEM
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
will_paginate (3.3.1)
zeitwerk (2.5.1)
zeitwerk (2.5.3)

PLATFORMS
x86_64-openbsd
Expand All @@ -302,7 +303,7 @@ DEPENDENCIES
nokogiri (>= 1.11.1)
pg
puma
rails (~> 6.1)
rails (~> 7.0)
rails-controller-testing
sassc-rails
simple_form
Expand Down
4 changes: 2 additions & 2 deletions bin/gc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if (test "$SININS" != "1") then {
} fi;

if (test "$SINMIG" != "1") then {
(cd test/dummy; bin/rails db:migrate sip:indices db:structure:dump)
(cd test/dummy; bin/rails db:migrate sip:indices db:schema:dump)
if (test "$?" != "0") then {
exit 1;
} fi;
Expand All @@ -67,7 +67,7 @@ if (test "$?" != "0") then {
exit 1;
} fi;

(cd test/dummy; RAILS_ENV=test bin/rails db:structure:dump)
(cd test/dummy; RAILS_ENV=test bin/rails db:schema:dump)

b=`git branch | grep "^*" | sed -e "s/^* //g"`
git status -s
Expand Down
1 change: 1 addition & 0 deletions config/initializers/ldap_authenticatable.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'net/ldap'
require 'devise/strategies/authenticatable'
require 'jn316_gen/ldap_helper'

module Devise
module Strategies
Expand Down
2 changes: 1 addition & 1 deletion lib/jn316_gen/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Jn316Gen
VERSION = "1.0.a2"
VERSION = "2.1a1"
end
2 changes: 1 addition & 1 deletion test/dummy/bin/rails
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../config/application', __dir__)
APP_PATH = File.expand_path("../config/application", __dir__)
require_relative "../config/boot"
require "rails/commands"
18 changes: 9 additions & 9 deletions test/dummy/bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require "fileutils"

# path to your application root.
APP_ROOT = File.expand_path('..', __dir__)
APP_ROOT = File.expand_path("..", __dir__)

def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
Expand All @@ -13,21 +13,21 @@ FileUtils.chdir APP_ROOT do
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
# Add necessary setup steps to this file.

puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')
puts "== Installing dependencies =="
system! "gem install bundler --conservative"
system("bundle check") || system!("bundle install")

# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')
# FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
# unless File.exist?("config/database.yml")
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
# end

puts "\n== Preparing database =="
system! 'bin/rails db:prepare'
system! "bin/rails db:prepare"

puts "\n== Removing old logs and tempfiles =="
system! 'bin/rails log:clear tmp:clear'
system! "bin/rails log:clear tmp:clear"

puts "\n== Restarting application server =="
system! 'bin/rails restart'
system! "bin/rails restart"
end
2 changes: 1 addition & 1 deletion test/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
module Dummy
class Application < Rails::Application

config.load_defaults 6.0
config.load_defaults 7.0

# Settings in config/environments/* take precedence over those specified here.
# Application configuration can go into files in config/initializers
Expand Down
16 changes: 5 additions & 11 deletions test/dummy/config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@
# Show full error reports.
config.consider_all_requests_local = true

# Enable server timing
config.server_timing = true

# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
if Rails.root.join('tmp', 'caching-dev.txt').exist?
if Rails.root.join("tmp/caching-dev.txt").exist?
config.action_controller.perform_caching = true
config.action_controller.enable_fragment_cache_logging = true

config.cache_store = :memory_store
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{2.days.to_i}"
"Cache-Control" => "public, max-age=#{2.days.to_i}"
}
else
config.action_controller.perform_caching = false
Expand Down Expand Up @@ -53,11 +56,6 @@
# Highlight code that triggered database queries in logs.
config.active_record.verbose_query_logs = true

# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true

# Suppress logger output for asset requests.
config.assets.quiet = true

Expand All @@ -67,10 +65,6 @@
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true

# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker

# Uncomment if you wish to allow Action Cable access from any origin.
# config.action_cable.disable_request_forgery_protection = true
end
Loading

0 comments on commit 2499630

Please sign in to comment.