From 0aa748eb30abe48d63f4a18cff6f6de83dbea3a1 Mon Sep 17 00:00:00 2001 From: Linda Goldstein Date: Sat, 1 Jun 2019 15:46:47 -0700 Subject: [PATCH 1/4] Remove configurable_engine patch that is no longer needed since we upgraded the gem --- config/initializers/configurable_monkeypatch.rb | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 config/initializers/configurable_monkeypatch.rb diff --git a/config/initializers/configurable_monkeypatch.rb b/config/initializers/configurable_monkeypatch.rb deleted file mode 100644 index cfa1a90f..00000000 --- a/config/initializers/configurable_monkeypatch.rb +++ /dev/null @@ -1,13 +0,0 @@ -# remove when https://github.com/paulca/configurable_engine/pull/11 gets merged -module ConfigurableEngine - module ConfigurablesController - def update - Configurable.keys.each do |key| - configurable = Configurable.find_by_name(key) || - Configurable.create {|c| c.name = key} - configurable.update_attribute(:value,params[key]) - end - redirect_to admin_configurable_path - end - end -end From 6cbea671423eb8d61e4de71eded0551832654c0b Mon Sep 17 00:00:00 2001 From: Linda Goldstein Date: Sat, 1 Jun 2019 16:03:49 -0700 Subject: [PATCH 2/4] Update jquery-datatables-rails and sorting still works but the arrows look like boxes but it's worth it for now --- Gemfile | 2 +- Gemfile.lock | 9 ++++++--- app/assets/javascripts/application.js | 10 +++++----- app/assets/stylesheets/application.css.scss | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index c34ce356..49144a73 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,7 @@ gem 'sass-rails', '~> 4' gem 'uglifier' gem 'coffee-rails' gem 'bootstrap-sass' -gem 'jquery-datatables-rails', '~> 1' # TODO: upgrade this to the present +gem 'jquery-datatables-rails' group :development do gem 'better_errors' # Provides a better error page for Rails and other Rack apps diff --git a/Gemfile.lock b/Gemfile.lock index 39f24fb1..d277ba07 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -153,8 +153,11 @@ GEM jbuilder (2.9.1) activesupport (>= 4.2.0) jmespath (1.4.0) - jquery-datatables-rails (1.12.2) + jquery-datatables-rails (3.4.0) + actionpack (>= 3.1) jquery-rails + railties (>= 3.1) + sass-rails jquery-rails (4.3.3) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) @@ -372,7 +375,7 @@ DEPENDENCIES haml-rails html2haml jbuilder - jquery-datatables-rails (~> 1) + jquery-datatables-rails jquery-rails kaminari launchy @@ -413,4 +416,4 @@ RUBY VERSION ruby 2.5.5p157 BUNDLED WITH - 2.0.1 + 1.17.1 diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 3cfac553..5b0212d7 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,23 +12,23 @@ // //= require jquery //= require jquery_ujs -//= require bootstrap //= require dataTables/jquery.dataTables -//= require dataTables/jquery.dataTables.bootstrap +//= require dataTables/bootstrap/3/jquery.dataTables.bootstrap +//= require bootstrap $(document).ready(function () { $.extend( $.fn.dataTable.defaults, { "bPaginate": false } ); - $('.js-datatable').dataTable({ + $('.js-datatable').DataTable({ }); - $('.js-datatable-dues').dataTable({ + $('.js-datatable-dues').DataTable({ "aaSorting": [[ 2, "asc" ]] }) - $('.js-datatable-applications').dataTable({ + $('.js-datatable-applications').DataTable({ "aaSorting": [[ 1, "desc" ]], "aoColumnDefs": [ {'aTargets': ['date'], 'sType': "date"} diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 69f91a49..bec31fba 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -18,7 +18,7 @@ *= require static_index *= require members *= require utilities - *= require dataTables/jquery.dataTables.bootstrap + *= require dataTables/bootstrap/3/jquery.dataTables.bootstrap */ @import url(//fonts.googleapis.com/css?family=Open+Sans:300,600); From 8ab1cdca0656a82cde74abf6573cf5991192099b Mon Sep 17 00:00:00 2001 From: Linda Goldstein Date: Sat, 1 Jun 2019 16:25:56 -0700 Subject: [PATCH 3/4] Update sass-rails --- Gemfile | 2 +- Gemfile.lock | 41 ++++++++++++++++++++--------------- config/initializers/assets.rb | 4 ++++ 3 files changed, 28 insertions(+), 19 deletions(-) create mode 100644 config/initializers/assets.rb diff --git a/Gemfile b/Gemfile index 49144a73..1ef6dc26 100644 --- a/Gemfile +++ b/Gemfile @@ -26,7 +26,7 @@ gem 'aws-sdk-rails' gem 'rack-cors' gem 'haml-rails' -gem 'sass-rails', '~> 4' +gem 'sass-rails' gem 'uglifier' gem 'coffee-rails' gem 'bootstrap-sass' diff --git a/Gemfile.lock b/Gemfile.lock index d277ba07..bf1cc535 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -140,7 +140,6 @@ GEM html2haml (>= 1.0.1) railties (>= 4.0.1) hashie (3.6.0) - hike (1.2.3) html2haml (2.2.0) erubis (~> 2.7.0) haml (>= 4.0, < 6) @@ -268,6 +267,9 @@ GEM thor (>= 0.18.1, < 2.0) raindrops (0.19.0) rake (12.3.2) + rb-fsevent (0.10.3) + rb-inotify (0.10.0) + ffi (~> 1.0) redcarpet (3.4.0) ref (2.0.0) regexp_parser (1.5.1) @@ -293,12 +295,17 @@ GEM ruby_parser (3.13.1) sexp_processor (~> 4.9) rubyzip (1.2.3) - sass (3.2.19) - sass-rails (4.0.5) - railties (>= 4.0.0, < 5.0) - sass (~> 3.2.2) - sprockets (~> 2.8, < 3.0) - sprockets-rails (~> 2.0) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sass-rails (5.0.7) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) sassc (2.0.1) ffi (~> 1.9) rake @@ -308,15 +315,13 @@ GEM sexp_processor (4.12.0) shoulda-matchers (4.0.1) activesupport (>= 4.2.0) - sprockets (2.12.5) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.3.3) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (>= 2.8, < 4.0) + sprockets (3.7.2) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) stripe (3.31.1) faraday (~> 0.10) stripe-ruby-mock (2.5.7) @@ -336,7 +341,7 @@ GEM rack (>= 1, < 3) thor (0.20.3) thread_safe (0.3.6) - tilt (1.4.1) + tilt (2.0.9) timecop (0.9.1) turbolinks (5.2.0) turbolinks-source (~> 5.2) @@ -398,7 +403,7 @@ DEPENDENCIES redcarpet rspec-collection_matchers rspec-rails - sass-rails (~> 4) + sass-rails selenium-webdriver shoulda-matchers state_machine! diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb new file mode 100644 index 00000000..f89e7493 --- /dev/null +++ b/config/initializers/assets.rb @@ -0,0 +1,4 @@ +filenames = (Dir['app/assets/javascripts/*'] + Dir['app/assets/stylesheets/*']).map do |filepath| + File.basename(filepath).gsub('.scss', '') +end +Rails.application.config.assets.precompile += filenames From bf54d6b23bc4a012d6abf3a1b39ccf8e8fc56f1c Mon Sep 17 00:00:00 2001 From: Linda Goldstein Date: Sat, 15 Jun 2019 00:37:04 -0700 Subject: [PATCH 4/4] Newer bundler in Gemfile.lock to fix travis --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index bf1cc535..2920b7c7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -421,4 +421,4 @@ RUBY VERSION ruby 2.5.5p157 BUNDLED WITH - 1.17.1 + 2.0.1