Skip to content

Commit 92c3220

Browse files
committed
Merge branch 'master' into tailwind-redesign
2 parents ec86490 + 8c1a8b2 commit 92c3220

File tree

9 files changed

+51
-30
lines changed

9 files changed

+51
-30
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.4
1+
2.7.5

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@ group :production do
107107
end
108108

109109
group :test, :production do
110-
gem 'mini_racer'
111110
gem 'pg', '~> 1.2'
111+
112+
gem "mini_racer", "~> 0.6.2"
112113
end
113114

114115
group :test do

Gemfile.lock

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ GEM
12641264
bundler-audit (0.9.0.1)
12651265
bundler (>= 1.2.0, < 3)
12661266
thor (~> 1.0)
1267-
chartkick (4.0.5)
1267+
chartkick (4.1.3)
12681268
childprocess (4.1.0)
12691269
climate_control (0.2.0)
12701270
cocoon (1.2.15)
@@ -1330,8 +1330,8 @@ GEM
13301330
rake
13311331
filesize (0.2.0)
13321332
flamegraph (0.9.5)
1333-
font-awesome-rails (4.7.0.7)
1334-
railties (>= 3.2, < 7)
1333+
font-awesome-rails (4.7.0.8)
1334+
railties (>= 3.2, < 8.0)
13351335
friendly_id (5.4.2)
13361336
activerecord (>= 4.0.0)
13371337
globalid (0.5.2)
@@ -1354,7 +1354,7 @@ GEM
13541354
http-form_data (2.3.0)
13551355
http-parser (1.2.3)
13561356
ffi-compiler (>= 1.0, < 2.0)
1357-
i18n (1.8.10)
1357+
i18n (1.8.11)
13581358
concurrent-ruby (~> 1.0)
13591359
ibm_cloud_sdk_core (1.1.3)
13601360
concurrent-ruby (~> 1.0)
@@ -1399,11 +1399,12 @@ GEM
13991399
kramdown-parser-gfm (1.1.0)
14001400
kramdown (~> 2.0)
14011401
language_filter (0.3.01)
1402-
libv8-node (15.14.0.1)
1402+
libv8-node (16.10.0.0)
1403+
libv8-node (16.10.0.0-x86_64-linux)
14031404
listen (3.7.0)
14041405
rb-fsevent (~> 0.10, >= 0.10.3)
14051406
rb-inotify (~> 0.9, >= 0.9.10)
1406-
loofah (2.12.0)
1407+
loofah (2.13.0)
14071408
crass (~> 1.0.2)
14081409
nokogiri (>= 1.5.9)
14091410
mail (2.7.1)
@@ -1425,19 +1426,21 @@ GEM
14251426
rake
14261427
mini_magick (4.11.0)
14271428
mini_mime (1.1.2)
1428-
mini_portile2 (2.6.1)
1429-
mini_racer (0.4.0)
1430-
libv8-node (~> 15.14.0.0)
1431-
minitest (5.14.4)
1429+
mini_portile2 (2.7.1)
1430+
mini_racer (0.6.2)
1431+
libv8-node (~> 16.10.0.0)
1432+
minitest (5.15.0)
14321433
multi_json (1.15.0)
14331434
multipart-post (2.1.1)
14341435
mustache (1.1.1)
14351436
nested_form (0.3.2)
14361437
netrc (0.11.0)
1437-
newrelic_rpm (8.0.0)
1438+
newrelic_rpm (8.3.0)
14381439
nio4r (2.5.8)
1439-
nokogiri (1.12.5)
1440-
mini_portile2 (~> 2.6.1)
1440+
nokogiri (1.13.1)
1441+
mini_portile2 (~> 2.7.0)
1442+
racc (~> 1.4)
1443+
nokogiri (1.13.1-x86_64-linux)
14411444
racc (~> 1.4)
14421445
onebox (2.2.19)
14431446
addressable (~> 2.8.0)
@@ -1455,8 +1458,8 @@ GEM
14551458
mime-types
14561459
mimemagic (~> 0.3.0)
14571460
terrapin (~> 0.6.0)
1458-
paranoia (2.4.3)
1459-
activerecord (>= 4.0, < 6.2)
1461+
paranoia (2.5.0)
1462+
activerecord (>= 5.1, < 7.1)
14601463
paypal-checkout-sdk (1.0.4)
14611464
paypalhttp (~> 1.0.1)
14621465
paypal_client (0.4.0)
@@ -1609,7 +1612,7 @@ GEM
16091612
text-hyphen (1.4.1)
16101613
textstat (0.1.7)
16111614
text-hyphen (~> 1.4, >= 1.4.1)
1612-
thor (1.1.0)
1615+
thor (1.2.1)
16131616
tilt (2.0.10)
16141617
timeago_js (3.0.2.2)
16151618
tribute (3.6.0.0)
@@ -1623,12 +1626,12 @@ GEM
16231626
uniform_notifier (1.14.2)
16241627
warden (1.2.9)
16251628
rack (>= 2.0.9)
1626-
web-console (4.1.0)
1629+
web-console (4.2.0)
16271630
actionview (>= 6.0.0)
16281631
activemodel (>= 6.0.0)
16291632
bindex (>= 0.4.0)
16301633
railties (>= 6.0.0)
1631-
webpacker (5.4.0)
1634+
webpacker (5.4.3)
16321635
activesupport (>= 5.2)
16331636
rack-proxy (>= 0.6.1)
16341637
railties (>= 5.2)
@@ -1642,10 +1645,11 @@ GEM
16421645
websocket-extensions (0.1.5)
16431646
word_count_analyzer (1.0.1)
16441647
engtagger
1645-
zeitwerk (2.5.1)
1648+
zeitwerk (2.5.3)
16461649

16471650
PLATFORMS
16481651
ruby
1652+
x86_64-linux
16491653

16501654
DEPENDENCIES
16511655
active_storage_validations
@@ -1681,7 +1685,7 @@ DEPENDENCIES
16811685
medium-editor-rails
16821686
memory_profiler
16831687
meta-tags
1684-
mini_racer
1688+
mini_racer (~> 0.6.2)
16851689
newrelic_rpm
16861690
paperclip
16871691
paranoia
@@ -1722,4 +1726,4 @@ RUBY VERSION
17221726
ruby 2.7.2p137
17231727

17241728
BUNDLED WITH
1725-
2.1.4
1729+
2.3.5

README.rdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{<img src="https://codeclimate.com/github/indentlabs/notebook/badges/coverage.svg" />}[https://codeclimate.com/github/indentlabs/notebook/coverage]
44
{<img src="http://inch-ci.org/github/indentlabs/notebook.svg?branch=master" alt="Inline docs" />}[http://inch-ci.org/github/indentlabs/notebook]
55

6-
== What is Notebook.ai?
6+
== What is Notebook.ai?
77

88
see {live website}[http://notebook.ai/]
99

app/controllers/page_tags_controller.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ def rename
1111
new_tag_name = 'Untitled Tag'
1212
end
1313

14-
current_user.page_tags.where(tag: old_tag_name).update_all(tag: new_tag_name)
14+
new_slug = PageTagService.slug_for(new_tag_name)
15+
16+
current_user.page_tags.where(tag: old_tag_name).update_all(
17+
tag: new_tag_name,
18+
slug: new_slug
19+
)
1520
end
1621

1722
# Remove a tag and all of its links to a page

app/models/page_data/page_tag.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ class PageTag < ApplicationRecord
22
belongs_to :page, polymorphic: true
33
belongs_to :user
44

5+
after_update :update_slug_to_reflect_label_changes
6+
57
# Delimiter to be used wherever we want to allow submitting multiple tags in a single string
68
SUBMISSION_DELIMITER = ',,,|||,,,'
79

@@ -12,4 +14,13 @@ def to_s
1214
def self.icon
1315
'label'
1416
end
17+
18+
def update_slug_to_reflect_label_changes
19+
self.update_slug! if (saved_change_to_tag? && self.tag.present?)
20+
end
21+
22+
def update_slug!
23+
new_slug = PageTagService.slug_for(self.tag)
24+
self.update(slug: new_slug) unless new_slug == self.slug
25+
end
1526
end

app/views/content/components/_list_filter_bar.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<% if @page_tags %>
7070
<% @page_tags.each do |page_tag| %>
7171
<li>
72-
<%= link_to params.permit(:tag, :favorite_only).merge({ slug: PageTagService.slug_for(page_tag.tag) }), class: content_type.text_color do %>
72+
<%= link_to params.permit(:tag, :favorite_only).merge({ slug: page_tag.slug }), class: content_type.text_color do %>
7373
<i class="material-icons"><%= PageTag.icon %></i>
7474
<small class="grey-text">tagged</small>
7575
<%= page_tag.tag %>

app/views/share_comments/_show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<span class="timestamp">
2525
<%= time_ago_in_words comment.created_at %> ago
2626

27-
<% if user_signed_in? && (share.user == current_user || comment.user == current_user) %>
27+
<% if user_signed_in? && (share.user_id == current_user.id || comment.user_id == current_user.id) %>
2828
<a class='dropdown-trigger right' href='#' data-target='dropdown-comment-<%= comment.id %>'>
2929
<i class="material-icons">more_vert</i>
3030
</a>

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3210,9 +3210,9 @@ flush-write-stream@^1.0.0:
32103210
readable-stream "^2.3.6"
32113211

32123212
follow-redirects@^1.0.0, follow-redirects@^1.14.0:
3213-
version "1.14.4"
3214-
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.4.tgz#838fdf48a8bbdd79e52ee51fb1c94e3ed98b9379"
3215-
integrity sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==
3213+
version "1.14.7"
3214+
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685"
3215+
integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==
32163216

32173217
for-in@^1.0.2:
32183218
version "1.0.2"

0 commit comments

Comments
 (0)