publify_core 10.0.1 → 10.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +46 -1
  3. data/app/assets/javascripts/markup_help_popup.js +25 -0
  4. data/app/assets/javascripts/optional_field_toggle.js +7 -0
  5. data/app/assets/javascripts/preview_comment.js +10 -0
  6. data/app/assets/javascripts/publify.js +3 -0
  7. data/app/assets/javascripts/publify_admin.js +1 -25
  8. data/app/assets/javascripts/spinnable.js +7 -2
  9. data/app/assets/stylesheets/administration_structure.css.scss +1 -1
  10. data/app/assets/stylesheets/publify.css.scss +43 -0
  11. data/app/assets/stylesheets/publify_admin.css.scss +0 -1
  12. data/app/controllers/admin/articles_controller.rb +4 -4
  13. data/app/controllers/admin/dashboard_controller.rb +0 -4
  14. data/app/controllers/admin/notes_controller.rb +11 -2
  15. data/app/controllers/admin/seo_controller.rb +5 -1
  16. data/app/controllers/admin/settings_controller.rb +1 -1
  17. data/app/controllers/admin/sidebar_controller.rb +4 -2
  18. data/app/controllers/admin/themes_controller.rb +1 -9
  19. data/app/controllers/articles_controller.rb +3 -1
  20. data/app/controllers/comments_controller.rb +1 -1
  21. data/app/helpers/admin/feedback_helper.rb +1 -1
  22. data/app/helpers/base_helper.rb +20 -12
  23. data/app/models/archives_sidebar.rb +1 -1
  24. data/app/models/config_manager.rb +8 -0
  25. data/app/models/content.rb +8 -3
  26. data/app/models/redirect.rb +2 -2
  27. data/app/models/tag_sidebar.rb +25 -3
  28. data/app/models/text_filter.rb +1 -1
  29. data/app/uploaders/resource_uploader.rb +1 -1
  30. data/app/views/admin/articles/_form.html.erb +2 -2
  31. data/app/views/admin/articles/index.html.erb +4 -5
  32. data/app/views/admin/dashboard/_comment.html.erb +1 -1
  33. data/app/views/admin/dashboard/_drafts.html.erb +1 -1
  34. data/app/views/admin/feedback/_ham.html.erb +1 -1
  35. data/app/views/admin/feedback/article.html.erb +1 -1
  36. data/app/views/admin/feedback/edit.html.erb +1 -1
  37. data/app/views/admin/feedback/index.html.erb +2 -2
  38. data/app/views/admin/migrations/show.html.erb +1 -1
  39. data/app/views/admin/notes/_form.html.erb +2 -3
  40. data/app/views/admin/notes/_note.html.erb +2 -2
  41. data/app/views/admin/notes/edit.html.erb +0 -1
  42. data/app/views/admin/pages/_pages.html.erb +1 -1
  43. data/app/views/admin/post_types/_index_and_form.html.erb +2 -2
  44. data/app/views/admin/redirects/_index_and_form.html.erb +2 -2
  45. data/app/views/admin/seo/show.html.erb +1 -1
  46. data/app/views/admin/settings/display.html.erb +1 -1
  47. data/app/views/admin/settings/feedback.html.erb +1 -1
  48. data/app/views/admin/settings/index.html.erb +1 -1
  49. data/app/views/admin/settings/write.html.erb +1 -1
  50. data/app/views/admin/tags/_index_and_form.html.erb +1 -1
  51. data/app/views/admin/users/_form.html.erb +1 -1
  52. data/app/views/articles/_comment_form.html.erb +9 -7
  53. data/app/views/articles/_comment_preview.html.erb +1 -1
  54. data/app/views/articles/_trackback.html.erb +3 -3
  55. data/app/views/articles/comment_failed.js.erb +1 -1
  56. data/app/views/articles/read.html.erb +4 -2
  57. data/app/views/comments/_comment.html.erb +1 -1
  58. data/app/views/comments/preview.js.erb +1 -1
  59. data/app/views/devise/passwords/edit.html.erb +3 -3
  60. data/app/views/devise/passwords/new.html.erb +1 -1
  61. data/app/views/devise/registrations/new.html.erb +2 -2
  62. data/app/views/devise/sessions/new.html.erb +2 -2
  63. data/app/views/devise/shared/_links.html.erb +3 -3
  64. data/app/views/layouts/accounts.html.erb +3 -3
  65. data/app/views/layouts/administration.html.erb +4 -6
  66. data/app/views/layouts/default.html.erb +1 -1
  67. data/app/views/layouts/editor.html.erb +3 -3
  68. data/app/views/notes/index.html.erb +1 -1
  69. data/app/views/notification_mailer/comment.html.erb +1 -1
  70. data/app/views/search_sidebar/_content.html.erb +2 -3
  71. data/app/views/settings/install.html.erb +2 -2
  72. data/app/views/shared/_page_header.html.erb +5 -5
  73. data/app/views/tag_sidebar/_content.html.erb +2 -2
  74. data/config/locales/ar.yml +0 -1
  75. data/config/locales/da.yml +0 -1
  76. data/config/locales/de.yml +0 -1
  77. data/config/locales/en.yml +0 -1
  78. data/config/locales/es-MX.yml +0 -1
  79. data/config/locales/fr.yml +0 -1
  80. data/config/locales/he.yml +0 -1
  81. data/config/locales/it.yml +0 -1
  82. data/config/locales/ja.yml +0 -1
  83. data/config/locales/lt.yml +0 -1
  84. data/config/locales/nb.yml +0 -1
  85. data/config/locales/nl.yml +0 -1
  86. data/config/locales/pl.yml +0 -1
  87. data/config/locales/pt-BR.yml +0 -1
  88. data/config/locales/ro.yml +0 -1
  89. data/config/locales/ru.yml +0 -1
  90. data/config/locales/zh-CN.yml +0 -1
  91. data/config/locales/zh-TW.yml +0 -1
  92. data/lib/publify_core/testing_support/feed_assertions.rb +1 -4
  93. data/lib/publify_core/version.rb +1 -1
  94. data/lib/theme.rb +18 -7
  95. metadata +30 -15
  96. data/app/assets/javascripts/datetimepicker.js +0 -1470
  97. data/app/assets/stylesheets/datetimepicker.css +0 -306
@@ -245,7 +245,6 @@ he:
245
245
  compose_new_note: Compose new note
246
246
  in_reply_to: In reply to
247
247
  no_notes: There are no notes yet. Why don't you create one?
248
- now: Now
249
248
  or: or
250
249
  permanent_link: Permanent link
251
250
  posse_to_twitter: POSSE to Twitter
@@ -246,7 +246,6 @@ it:
246
246
  compose_new_note: Compose new note
247
247
  in_reply_to: In reply to
248
248
  no_notes: There are no notes yet. Why don't you create one?
249
- now: Now
250
249
  or: or
251
250
  permanent_link: Permanent link
252
251
  posse_to_twitter: POSSE to Twitter
@@ -245,7 +245,6 @@ ja:
245
245
  compose_new_note: Compose new note
246
246
  in_reply_to: In reply to
247
247
  no_notes: There are no notes yet. Why don't you create one?
248
- now: Now
249
248
  or: or
250
249
  permanent_link: Permanent link
251
250
  posse_to_twitter: POSSE to Twitter
@@ -258,7 +258,6 @@ lt:
258
258
  compose_new_note: Compose new note
259
259
  in_reply_to: In reply to
260
260
  no_notes: There are no notes yet. Why don't you create one?
261
- now: Now
262
261
  or: or
263
262
  permanent_link: Permanent link
264
263
  posse_to_twitter: POSSE to Twitter
@@ -246,7 +246,6 @@ nb:
246
246
  compose_new_note: Skriv nytt notat
247
247
  in_reply_to: Som svar på
248
248
  no_notes: Det er ingen notater enda. Hva med å opprette en?
249
- now: Nå
250
249
  or: eller
251
250
  permanent_link: Permanent lenke
252
251
  posse_to_twitter: POSSE til Twitter
@@ -246,7 +246,6 @@ nl:
246
246
  compose_new_note: Compose new note
247
247
  in_reply_to: In reply to
248
248
  no_notes: Er zijn nog geen notes. Waarom maak je er geen?
249
- now: Now
250
249
  or: or
251
250
  permanent_link: Permanente link
252
251
  posse_to_twitter: POSSE naar Twitter
@@ -270,7 +270,6 @@ pl:
270
270
  compose_new_note: Utwórz nową notatkę
271
271
  in_reply_to: W odpowiedzi do
272
272
  no_notes: Brak notatek
273
- now: Teraz
274
273
  or: lub
275
274
  permanent_link: Link
276
275
  posse_to_twitter: POSSE to twitter
@@ -246,7 +246,6 @@ pt-BR:
246
246
  compose_new_note: Compor nova nota
247
247
  in_reply_to: Em resposta a
248
248
  no_notes: Não existem notas ainda. Por que você não inicia e cria uma?
249
- now: Agora
250
249
  or: ou
251
250
  permanent_link: link permanente
252
251
  posse_to_twitter: POSSE para twitter
@@ -258,7 +258,6 @@ ro:
258
258
  compose_new_note: Compose new note
259
259
  in_reply_to: In reply to
260
260
  no_notes: There are no notes yet. Why don't you create one?
261
- now: Now
262
261
  or: or
263
262
  permanent_link: Permanent link
264
263
  posse_to_twitter: POSSE to Twitter
@@ -270,7 +270,6 @@ ru:
270
270
  compose_new_note: Compose new note
271
271
  in_reply_to: In reply to
272
272
  no_notes: Ничего нет. Почему бы не начать и не добавить?
273
- now: Сейчас
274
273
  or: или
275
274
  permanent_link: Постоянная ссылка
276
275
  posse_to_twitter: POSSE to Twitter
@@ -242,7 +242,6 @@ zh-CN:
242
242
  compose_new_note: Compose new note
243
243
  in_reply_to: In reply to
244
244
  no_notes: 这儿并不存在Notes。让我们开始创建它。
245
- now: Now
246
245
  or: or
247
246
  permanent_link: Permanent link
248
247
  posse_to_twitter: POSSE to twitter
@@ -243,7 +243,6 @@ zh-TW:
243
243
  compose_new_note: Compose new note
244
244
  in_reply_to: In reply to
245
245
  no_notes: There are no notes yet. Why don't you create one?
246
- now: Now
247
246
  or: or
248
247
  permanent_link: Permanent link
249
248
  posse_to_twitter: POSSE to Twitter
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "feedjira"
4
- require "rexml/document"
5
4
 
6
5
  module PublifyCore
7
6
  module TestingSupport
@@ -9,9 +8,7 @@ module PublifyCore
9
8
  # TODO: Clean up use of these Test::Unit style expectations
10
9
  def assert_xml(xml)
11
10
  expect(xml).not_to be_empty
12
- expect do
13
- assert REXML::Document.new(xml)
14
- end.not_to raise_error
11
+ expect { Nokogiri::XML.parse(xml) }.not_to raise_error
15
12
  end
16
13
 
17
14
  def assert_atom10(feed, count)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PublifyCore
4
- VERSION = "10.0.1"
4
+ VERSION = "10.0.3"
5
5
  end
data/lib/theme.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Theme
4
- attr_accessor :name, :path, :description_html
4
+ attr_reader :name, :path
5
5
 
6
6
  def initialize(name, path)
7
7
  @name = name
@@ -16,18 +16,29 @@ class Theme
16
16
  end
17
17
 
18
18
  def description
19
- about_file = "#{path}/about.markdown"
20
- if File.exist? about_file
21
- File.read about_file
22
- else
23
- "### #{name}"
24
- end
19
+ @description ||=
20
+ begin
21
+ about_file = theme_file("about.markdown")
22
+ if File.exist? about_file
23
+ File.read about_file
24
+ else
25
+ "### #{name}"
26
+ end
27
+ end
28
+ end
29
+
30
+ def description_html
31
+ TextFilter.markdown.filter_text(description)
25
32
  end
26
33
 
27
34
  def view_path
28
35
  "#{path}/views"
29
36
  end
30
37
 
38
+ def theme_file(filename)
39
+ File.join(path, filename)
40
+ end
41
+
31
42
  # Find a theme, given the theme name
32
43
  def self.find(name)
33
44
  registered_themes[name]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: publify_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.1
4
+ version: 10.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matijs van Zuijlen
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2023-10-28 00:00:00.000000000 Z
14
+ date: 2025-03-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: aasm
@@ -213,14 +213,14 @@ dependencies:
213
213
  requirements:
214
214
  - - "~>"
215
215
  - !ruby/object:Gem::Version
216
- version: 6.0.1
216
+ version: '7.0'
217
217
  type: :runtime
218
218
  prerelease: false
219
219
  version_requirements: !ruby/object:Gem::Requirement
220
220
  requirements:
221
221
  - - "~>"
222
222
  - !ruby/object:Gem::Version
223
- version: 6.0.1
223
+ version: '7.0'
224
224
  - !ruby/object:Gem::Dependency
225
225
  name: kaminari
226
226
  requirement: !ruby/object:Gem::Requirement
@@ -455,6 +455,20 @@ dependencies:
455
455
  - - "~>"
456
456
  - !ruby/object:Gem::Version
457
457
  version: '3.0'
458
+ - !ruby/object:Gem::Dependency
459
+ name: erb_lint
460
+ requirement: !ruby/object:Gem::Requirement
461
+ requirements:
462
+ - - "~>"
463
+ - !ruby/object:Gem::Version
464
+ version: 0.5.0
465
+ type: :development
466
+ prerelease: false
467
+ version_requirements: !ruby/object:Gem::Requirement
468
+ requirements:
469
+ - - "~>"
470
+ - !ruby/object:Gem::Version
471
+ version: 0.5.0
458
472
  - !ruby/object:Gem::Dependency
459
473
  name: factory_bot
460
474
  requirement: !ruby/object:Gem::Requirement
@@ -545,14 +559,14 @@ dependencies:
545
559
  requirements:
546
560
  - - "~>"
547
561
  - !ruby/object:Gem::Version
548
- version: 1.57.1
562
+ version: 1.59.0
549
563
  type: :development
550
564
  prerelease: false
551
565
  version_requirements: !ruby/object:Gem::Requirement
552
566
  requirements:
553
567
  - - "~>"
554
568
  - !ruby/object:Gem::Version
555
- version: 1.57.1
569
+ version: 1.59.0
556
570
  - !ruby/object:Gem::Dependency
557
571
  name: rubocop-capybara
558
572
  requirement: !ruby/object:Gem::Requirement
@@ -587,42 +601,42 @@ dependencies:
587
601
  requirements:
588
602
  - - "~>"
589
603
  - !ruby/object:Gem::Version
590
- version: 1.19.0
604
+ version: 1.20.0
591
605
  type: :development
592
606
  prerelease: false
593
607
  version_requirements: !ruby/object:Gem::Requirement
594
608
  requirements:
595
609
  - - "~>"
596
610
  - !ruby/object:Gem::Version
597
- version: 1.19.0
611
+ version: 1.20.0
598
612
  - !ruby/object:Gem::Dependency
599
613
  name: rubocop-rails
600
614
  requirement: !ruby/object:Gem::Requirement
601
615
  requirements:
602
616
  - - "~>"
603
617
  - !ruby/object:Gem::Version
604
- version: 2.21.1
618
+ version: 2.23.0
605
619
  type: :development
606
620
  prerelease: false
607
621
  version_requirements: !ruby/object:Gem::Requirement
608
622
  requirements:
609
623
  - - "~>"
610
624
  - !ruby/object:Gem::Version
611
- version: 2.21.1
625
+ version: 2.23.0
612
626
  - !ruby/object:Gem::Dependency
613
627
  name: rubocop-rspec
614
628
  requirement: !ruby/object:Gem::Requirement
615
629
  requirements:
616
630
  - - "~>"
617
631
  - !ruby/object:Gem::Version
618
- version: 2.24.1
632
+ version: 2.25.0
619
633
  type: :development
620
634
  prerelease: false
621
635
  version_requirements: !ruby/object:Gem::Requirement
622
636
  requirements:
623
637
  - - "~>"
624
638
  - !ruby/object:Gem::Version
625
- version: 2.24.1
639
+ version: 2.25.0
626
640
  - !ruby/object:Gem::Dependency
627
641
  name: shoulda-matchers
628
642
  requirement: !ruby/object:Gem::Requirement
@@ -731,7 +745,6 @@ files:
731
745
  - app/assets/javascripts/bootstrap/transition.js
732
746
  - app/assets/javascripts/check_password.js
733
747
  - app/assets/javascripts/cookies.js
734
- - app/assets/javascripts/datetimepicker.js
735
748
  - app/assets/javascripts/lang/ar_AR.js
736
749
  - app/assets/javascripts/lang/da_DK.js
737
750
  - app/assets/javascripts/lang/default.js
@@ -740,7 +753,10 @@ files:
740
753
  - app/assets/javascripts/lang/nl_NL.js
741
754
  - app/assets/javascripts/lang/zh_TW.js
742
755
  - app/assets/javascripts/lightbox.js
756
+ - app/assets/javascripts/markup_help_popup.js
743
757
  - app/assets/javascripts/observe.js
758
+ - app/assets/javascripts/optional_field_toggle.js
759
+ - app/assets/javascripts/preview_comment.js
744
760
  - app/assets/javascripts/publify.js
745
761
  - app/assets/javascripts/publify_admin.js
746
762
  - app/assets/javascripts/quicktags.js
@@ -809,7 +825,6 @@ files:
809
825
  - app/assets/stylesheets/bootstrap/mixins/_text-overflow.scss
810
826
  - app/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss
811
827
  - app/assets/stylesheets/coderay.css
812
- - app/assets/stylesheets/datetimepicker.css
813
828
  - app/assets/stylesheets/lightbox.css
814
829
  - app/assets/stylesheets/publify.css.scss
815
830
  - app/assets/stylesheets/publify_admin.css.scss
@@ -1188,7 +1203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1188
1203
  - !ruby/object:Gem::Version
1189
1204
  version: '0'
1190
1205
  requirements: []
1191
- rubygems_version: 3.4.20
1206
+ rubygems_version: 3.3.27
1192
1207
  signing_key:
1193
1208
  specification_version: 4
1194
1209
  summary: Core engine for the Publify blogging system.