my_forum 0.0.2 → 0.0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/my_forum/posts.js.coffee +4 -0
- data/app/helpers/my_forum/posts_helper.rb +5 -4
- data/config/locales/ru.yml +1 -1
- data/lib/my_forum/engine.rb +1 -0
- data/lib/my_forum/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b41182adb8b596c4921371310fbd823932646e8f
|
4
|
+
data.tar.gz: b1a66385c9b08ce3d4b02ecf581ef348b3b48c6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e30aebce379a7b413628cc63b46f7974740ca76872a06612d13d3e1b5b1861cb3e86b82e311798b24686261767d992dbf62b7a39f1307de40d0b30706e1345c1
|
7
|
+
data.tar.gz: 0bac644ed881e21bdbdcb841e737c4b7d626d01cece21c5e618053b73d4dd5449fbd1358f21ec5a5030047956ee2a25779eeaa93697d059909cc34f23ec214fe
|
@@ -12,6 +12,7 @@ module MyForum
|
|
12
12
|
# Images
|
13
13
|
text.gsub!(/\[img\]/i, '<img src="')
|
14
14
|
text.gsub!(/\[\/img\]/i, '" />')
|
15
|
+
text.gsub!(/\[img\](.*?)\[\/img\]/i) { ActionController::Base.helpers.image_tag($1) }
|
15
16
|
|
16
17
|
# Youtube
|
17
18
|
text.gsub!(/(?:https?:\/\/)?(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=)?(?<video_code>[\w-]{10,})/i) do |match|
|
@@ -56,16 +57,16 @@ module MyForum
|
|
56
57
|
text.gsub!(/#{Regexp.quote(code)}/) { "<img src='#{path}' class='smile' />" }
|
57
58
|
end
|
58
59
|
|
59
|
-
# Link
|
60
|
+
# Link TODO
|
60
61
|
# ActionController::Base.helpers.... - this method uses in controller, which don`t know link_to
|
61
|
-
text.gsub!(/\[url=(.*?)\](.*?)\[\/url\]/i) { ActionController::Base.helpers.link_to($2, $1, target: '_blank') }
|
62
|
-
text.gsub!(/(http:\/\/[\S]+|www:\/\/[\S]+)/i) { ActionController::Base.helpers.link_to($1, $1, target: '_blank') }
|
62
|
+
#text.gsub!(/\[url=(.*?)\](.*?)\[\/url\]/i) { ActionController::Base.helpers.link_to($2, $1, target: '_blank') }
|
63
|
+
#text.gsub!(/(http:\/\/[\S]+|www:\/\/[\S]+)/i) { ActionController::Base.helpers.link_to($1, $1, target: '_blank') }
|
63
64
|
|
64
65
|
# Ping user
|
65
66
|
text.gsub!(/@\S+/) { |match| "<span class='badge'>#{match}</span>" }
|
66
67
|
|
67
68
|
|
68
|
-
text.html_safe
|
69
|
+
auto_link(text).html_safe
|
69
70
|
end
|
70
71
|
|
71
72
|
def bbquote(author:, date:)
|
data/config/locales/ru.yml
CHANGED
@@ -5,7 +5,7 @@ ru:
|
|
5
5
|
sent: 'Сообщение отправленно'
|
6
6
|
mailer:
|
7
7
|
new_pm_notification_subject: 'Уведомление о новом личном сообщении'
|
8
|
-
ping_user: "Вас упоминули в теме %{topic_name}"
|
8
|
+
ping_user: "Вас упоминули в теме '%{topic_name}'"
|
9
9
|
shared:
|
10
10
|
post_preview:
|
11
11
|
preview: 'Предпросмотр сообщения'
|
data/lib/my_forum/engine.rb
CHANGED
data/lib/my_forum/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_forum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.2
|
4
|
+
version: 0.0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vitaly Omelchenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02
|
11
|
+
date: 2016-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rails_autolink
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
139
153
|
description: Simple forum engine.
|
140
154
|
email:
|
141
155
|
- prosto.vint@gmail.com
|