bbcode-rails 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/bbcode-rails-0.2.0.gem +0 -0
- data/lib/bbcode-rails/tag.rb +19 -9
- data/lib/bbcode-rails/version.rb +1 -1
- data/lib/bbcode-rails.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 261d90fe19a04f29355ec34a63184cea1cdf13b8
|
4
|
+
data.tar.gz: 03db5146dd94b739acfa2e72787d785dd633ec72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c460c00bc82c5538a2fb13644385b254f0f276581f546bd24c53df655d929e92e931163ec6b8f8cef9bc44ddbdb6cd0989ac5e98658dc665a833e9a667275f7
|
7
|
+
data.tar.gz: 30c8074736c47988e540b259177ea54dd82ddd1617bb8b7208e358ca84d8c85afeacf06200c491919f3de36afcb8991ee1fa0555af0dc3cdb83df09ebe7b7732
|
Binary file
|
data/lib/bbcode-rails/tag.rb
CHANGED
@@ -1,11 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
if defined?(Rails)
|
2
|
+
class BBCode::Tag < AbstractController::Base
|
3
|
+
end
|
4
|
+
else
|
5
|
+
class BBCode::Tag
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
class BBCode::Tag
|
10
|
+
if defined?(Rails)
|
11
|
+
include AbstractController::Rendering
|
12
|
+
include AbstractController::Helpers
|
13
|
+
include AbstractController::Translation
|
14
|
+
include AbstractController::AssetPaths
|
15
|
+
include ActionView::Rendering
|
16
|
+
include Rails.application.routes.url_helpers
|
17
|
+
self.view_paths = "app/views"
|
18
|
+
end
|
9
19
|
|
10
20
|
|
11
21
|
def self.inherited subclass
|
@@ -14,7 +24,7 @@ class BBCode::Tag < AbstractController::Base
|
|
14
24
|
|
15
25
|
def self.block_name n, *args
|
16
26
|
if args.include? :argument
|
17
|
-
arg =
|
27
|
+
arg = '=(?:")?(.+?)(?:")?'
|
18
28
|
end
|
19
29
|
if args.include? :no_closing_tag
|
20
30
|
@regex = /\[#{n.to_s}#{arg}\]/mi
|
data/lib/bbcode-rails/version.rb
CHANGED
data/lib/bbcode-rails.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bbcode-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcel Müller
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- README.md
|
54
54
|
- Rakefile
|
55
55
|
- bbcode-rails-0.1.0.gem
|
56
|
+
- bbcode-rails-0.2.0.gem
|
56
57
|
- bbcode-rails.gemspec
|
57
58
|
- bin/console
|
58
59
|
- lib/bbcode-rails.rb
|