krant 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -6
- data/README.md +2 -1
- data/admin/krant/broadcast_messages.rb +2 -1
- data/app/assets/stylesheets/krant/active_admin/broadcast_messages.scss +4 -0
- data/config/locales/de.yml +2 -2
- data/config/locales/en.yml +2 -2
- data/krant.gemspec +1 -0
- data/lib/krant/engine.rb +2 -0
- data/lib/krant/version.rb +1 -1
- data/lib/krant/views/header_with_broadcast_messages.rb +3 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e41b01787c4238be635ddb9d868a6a44e583fdc42854955c560c95b73bf70f3c
|
4
|
+
data.tar.gz: 22d24551cb7c92c8b611dd2a018d22cc24e87dc4b9ccf2c71011935f7da40346
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fe9c3e5ec1e74509852becc490d157d00b32382c99335aa43d830623cb1f577765f226c24fea753d7427bd6b9d7ccf58e67405f081901ffc6cf0e2e519f0b80
|
7
|
+
data.tar.gz: deef5f5daf44dbe0e1084dd8d90e8388ec67df0fcdcc340a65aecbba4dabd76f64f8888583caf18e10c44a6cd5488496ff80e939f0e1d4c6ab44031d923b0b6d
|
data/CHANGELOG.md
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
### Version 1.
|
3
|
+
### Version 1.1.0
|
4
4
|
|
5
|
-
2019-
|
5
|
+
2019-05-20
|
6
6
|
|
7
|
-
[Compare changes](https://github.com/codevise/krant/compare/0-
|
7
|
+
[Compare changes](https://github.com/codevise/krant/compare/1-0-stable...v1.1.0)
|
8
8
|
|
9
|
-
-
|
10
|
-
([#
|
9
|
+
- Add markdown support to broadcast messages
|
10
|
+
([#2](https://github.com/codevise/krant/pull/2))
|
11
11
|
|
12
12
|
See
|
13
|
-
[0-
|
13
|
+
[1-0-stable branch](https://github.com/codevise/krant/blob/1-0-stable/CHANGELOG.md)
|
14
14
|
for previous changes.
|
data/README.md
CHANGED
@@ -59,6 +59,7 @@ Krant.broadcast_message_locales = [:en, :fr, :es]
|
|
59
59
|
|
60
60
|
Messages with different translations can now be configured via the
|
61
61
|
admin interface and will be displayed once marked as active.
|
62
|
+
Broadcast messages have full markdown support.
|
62
63
|
|
63
64
|
The color of the broadcast message bar can be configured via SCSS
|
64
65
|
|
@@ -141,7 +142,7 @@ Define a Rake tasks to persists news items in the database:
|
|
141
142
|
```ruby
|
142
143
|
# Rakefile
|
143
144
|
require 'krant/tasks'
|
144
|
-
Krant::
|
145
|
+
Krant::Tasks.install { MyApp.news }
|
145
146
|
```
|
146
147
|
|
147
148
|
and run the defined task after each deploy:
|
@@ -13,7 +13,8 @@ module Krant
|
|
13
13
|
broadcast_message.translations.each do |t|
|
14
14
|
div class: 'krant-broadcast-messages-table-text' do
|
15
15
|
span "#{t.locale}:", class: 'krant-broadcast-messages-table-text-locale'
|
16
|
-
span t.text,
|
16
|
+
span Redcarpet::Markdown.new(Redcarpet::Render::StripDown).render(t.text),
|
17
|
+
class: 'krant-broadcast-messages-table-text-translation'
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
data/config/locales/de.yml
CHANGED
@@ -2,7 +2,7 @@ de:
|
|
2
2
|
krant:
|
3
3
|
admin:
|
4
4
|
broadcast_messages:
|
5
|
-
text_translation_label: "Text (%{locale_name}):"
|
5
|
+
text_translation_label: "Text/Markdown (%{locale_name}):"
|
6
6
|
news_menu_item:
|
7
7
|
unseen: "Neuigkeiten*"
|
8
8
|
no_unseen: "Neuigkeiten"
|
@@ -17,7 +17,7 @@ de:
|
|
17
17
|
other: "Broadcast Nachrichten"
|
18
18
|
attributes:
|
19
19
|
"krant/broadcast_message":
|
20
|
-
text: "
|
20
|
+
text: "Inhalt"
|
21
21
|
active: "Aktiv"
|
22
22
|
created_at: "Erstellt am"
|
23
23
|
updated_at: "Geändert am"
|
data/config/locales/en.yml
CHANGED
@@ -2,7 +2,7 @@ en:
|
|
2
2
|
krant:
|
3
3
|
admin:
|
4
4
|
broadcast_messages:
|
5
|
-
text_translation_label: "Text (%{locale_name}):"
|
5
|
+
text_translation_label: "Text/Markdown (%{locale_name}):"
|
6
6
|
news_menu_item:
|
7
7
|
unseen: "What's new*"
|
8
8
|
no_unseen: "What's new"
|
@@ -17,7 +17,7 @@ en:
|
|
17
17
|
other: "Broadcast Messages"
|
18
18
|
attributes:
|
19
19
|
"krant/broadcast_message":
|
20
|
-
text: "
|
20
|
+
text: "Content"
|
21
21
|
active: "Active"
|
22
22
|
created_at: "Created at"
|
23
23
|
updated_at: "Updated at"
|
data/krant.gemspec
CHANGED
data/lib/krant/engine.rb
CHANGED
data/lib/krant/version.rb
CHANGED
@@ -10,7 +10,9 @@ module Krant
|
|
10
10
|
div do
|
11
11
|
TranslatedBroadcastMessage.active.each do |broadcast_message|
|
12
12
|
div class: 'krant-broadcast-messages-bar' do
|
13
|
-
|
13
|
+
Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true)
|
14
|
+
.render(broadcast_message.text)
|
15
|
+
.html_safe
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: krant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Fischbach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appraisal
|
@@ -212,6 +212,20 @@ dependencies:
|
|
212
212
|
- - "~>"
|
213
213
|
- !ruby/object:Gem::Version
|
214
214
|
version: '1.5'
|
215
|
+
- !ruby/object:Gem::Dependency
|
216
|
+
name: redcarpet
|
217
|
+
requirement: !ruby/object:Gem::Requirement
|
218
|
+
requirements:
|
219
|
+
- - "~>"
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: '3.4'
|
222
|
+
type: :runtime
|
223
|
+
prerelease: false
|
224
|
+
version_requirements: !ruby/object:Gem::Requirement
|
225
|
+
requirements:
|
226
|
+
- - "~>"
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
version: '3.4'
|
215
229
|
description:
|
216
230
|
email:
|
217
231
|
- tfischbach@codevise.de
|
@@ -280,7 +294,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
294
|
version: '0'
|
281
295
|
requirements: []
|
282
296
|
rubyforge_project:
|
283
|
-
rubygems_version: 2.7.
|
297
|
+
rubygems_version: 2.7.5
|
284
298
|
signing_key:
|
285
299
|
specification_version: 4
|
286
300
|
summary: Display app news and broadcast messages in Active Admin.
|