Skip to content

Commit

Permalink
Bump rails from 5.2.3 to 5.2.6 (publiclab#9671)
Browse files Browse the repository at this point in the history
* Bump rails from 5.2.3 to 5.2.6

Bumps [rails](https://github.com/rails/rails) from 5.2.3 to 5.2.6.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](rails/rails@v5.2.3...v5.2.6)

Signed-off-by: dependabot[bot] <[email protected]>

* Try creating manifest.js file

* switch to saved tag count to simplify query

* fix count query

* manually write sql left outer join

* added //= link user_tags.css

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jywarren <[email protected]>
  • Loading branch information
dependabot[bot] and jywarren authored Dec 14, 2021
1 parent 1fbecfa commit 6872bb7
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 54 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ gem "php-serialize", :require => "php_serialize"
gem 'rack-cors', :require => 'rack/cors'
gem "rack-openid"
gem "rack-test", "1.1.0"
gem 'rails', '5.2.3'
gem 'rails', '5.2.6'
gem 'rails-controller-testing'
gem 'rails-dom-testing'
gem 'rails-i18n', '~> 5.1.3'
Expand Down
95 changes: 47 additions & 48 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,49 @@ GEM
specs:
action-cable-testing (0.6.1)
actioncable (>= 5.0)
actioncable (5.2.3)
actionpack (= 5.2.3)
actioncable (5.2.6)
actionpack (= 5.2.6)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.3)
actionpack (= 5.2.3)
actionview (= 5.2.3)
activejob (= 5.2.3)
actionmailer (5.2.6)
actionpack (= 5.2.6)
actionview (= 5.2.6)
activejob (= 5.2.6)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.3)
actionview (= 5.2.3)
activesupport (= 5.2.3)
rack (~> 2.0)
actionpack (5.2.6)
actionview (= 5.2.6)
activesupport (= 5.2.6)
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.3)
activesupport (= 5.2.3)
actionview (5.2.6)
activesupport (= 5.2.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.3)
activesupport (= 5.2.3)
activejob (5.2.6)
activesupport (= 5.2.6)
globalid (>= 0.3.6)
activemodel (5.2.3)
activesupport (= 5.2.3)
activerecord (5.2.3)
activemodel (= 5.2.3)
activesupport (= 5.2.3)
activemodel (5.2.6)
activesupport (= 5.2.6)
activerecord (5.2.6)
activemodel (= 5.2.6)
activesupport (= 5.2.6)
arel (>= 9.0)
activerecord-session_store (1.1.3)
actionpack (>= 4.0)
activerecord (>= 4.0)
multi_json (~> 1.11, >= 1.11.2)
rack (>= 1.5.2, < 3)
railties (>= 4.0)
activestorage (5.2.3)
actionpack (= 5.2.3)
activerecord (= 5.2.3)
marcel (~> 0.3.1)
activesupport (5.2.3)
activestorage (5.2.6)
actionpack (= 5.2.6)
activerecord (= 5.2.6)
marcel (~> 1.0.0)
activesupport (5.2.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
Expand Down Expand Up @@ -194,8 +194,8 @@ GEM
gemoji (3.0.1)
geocoder (1.7.0)
georuby (2.0.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
globalid (1.0.0)
activesupport (>= 5.0)
google-apis-compute_v1 (0.19.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-core (0.4.1)
Expand Down Expand Up @@ -326,8 +326,7 @@ GEM
listen (>= 0.4.1)
mail (>= 2.0.3)
maildir (>= 0.5.0)
marcel (0.3.3)
mimemagic (~> 0.3.2)
marcel (1.0.2)
matrix (0.4.2)
memoist (0.16.2)
memoizable (0.4.2)
Expand Down Expand Up @@ -437,18 +436,18 @@ GEM
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.3)
actioncable (= 5.2.3)
actionmailer (= 5.2.3)
actionpack (= 5.2.3)
actionview (= 5.2.3)
activejob (= 5.2.3)
activemodel (= 5.2.3)
activerecord (= 5.2.3)
activestorage (= 5.2.3)
activesupport (= 5.2.3)
rails (5.2.6)
actioncable (= 5.2.6)
actionmailer (= 5.2.6)
actionpack (= 5.2.6)
actionview (= 5.2.6)
activejob (= 5.2.6)
activemodel (= 5.2.6)
activerecord (= 5.2.6)
activestorage (= 5.2.6)
activesupport (= 5.2.6)
bundler (>= 1.3.0)
railties (= 5.2.3)
railties (= 5.2.6)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
Expand All @@ -465,9 +464,9 @@ GEM
rails-perftest (0.0.7)
rails_autolink (1.1.6)
rails (> 3.1)
railties (5.2.3)
actionpack (= 5.2.3)
activesupport (= 5.2.3)
railties (5.2.6)
actionpack (= 5.2.6)
activesupport (= 5.2.6)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
Expand Down Expand Up @@ -603,12 +602,12 @@ GEM
tilt (~> 2.0)
skylight (5.1.1)
activesupport (>= 5.2.0)
sprockets (3.7.2)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets-rails (3.4.1)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
teaspoon (1.1.5)
Expand Down Expand Up @@ -664,7 +663,7 @@ GEM
railties (>= 5.2)
semantic_range (>= 2.3.0)
webrick (1.7.0)
websocket-driver (0.7.1)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
whenever (1.0.0)
Expand Down Expand Up @@ -745,7 +744,7 @@ DEPENDENCIES
rack-cors
rack-openid
rack-test (= 1.1.0)
rails (= 5.2.3)
rails (= 5.2.6)
rails-controller-testing
rails-dom-testing
rails-i18n (~> 5.1.3)
Expand Down
11 changes: 11 additions & 0 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// app/assets/config/manifest.js
// https://github.com/rails/sprockets/blob/master/UPGRADING.md#guide-to-upgrading-from-sprockets-3x-to-4x
//
//= link_tree ../images
//= link application.css
//= link application.js
//= link location_tags.css
//= link user_tags.css
//
//= link editorToolbar.js
//= link post.js
10 changes: 6 additions & 4 deletions app/models/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,12 @@ def normal_tags(order = :none)
all_tags = tags.select { |tag| !tag.name.include?(':') }
tids = all_tags.collect(&:tid)
if order == :followers
tags = NodeTag.where('nid = ? AND community_tags.tid IN (?)', id, tids)
.left_outer_joins(:tag, :tag_selections)
.order(Arel.sql('count(tag_selections.user_id) DESC'))
.group('community_tags.tid, community_tags.uid, community_tags.date, community_tags.created_at, community_tags.updated_at')
tags = NodeTag.where(nid: id)
.where(tid: tids)
.joins(:tag)
.joins("LEFT OUTER JOIN tag_selections ON term_data.tid = tag_selections.tid")
.order(Arel.sql('count(tag_selections.user_id) DESC'))
.group('community_tags.tid, community_tags.uid, community_tags.date, community_tags.created_at, community_tags.updated_at')
else
tags = NodeTag.where('nid = ? AND tid IN (?)', id, tids)
end
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
config.assets.digest = true

# Add non-concatenated scripts
config.assets.precompile += ['editorToolbar.js', 'post.js']
config.assets.precompile += ['manifest.js']

# Defaults to nil and saved in location specified by config.assets.prefix
# config.assets.manifest = YOUR_PATH
Expand Down

0 comments on commit 6872bb7

Please sign in to comment.