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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 237a90d01c04b4bc90c952c1be16fa97255f170a
4
- data.tar.gz: d856ac41813bb402d4d3a8f16a3de37be54c6784
3
+ metadata.gz: 261d90fe19a04f29355ec34a63184cea1cdf13b8
4
+ data.tar.gz: 03db5146dd94b739acfa2e72787d785dd633ec72
5
5
  SHA512:
6
- metadata.gz: 58ae86f9691c2473b8369790aa85699647ab51ebc46a2bf660033c74dee4241f88e8fdb8c461d0a711655e071cb0ad29938ab8769b9e913123c5de2fb608c32a
7
- data.tar.gz: 5acec4533f51a1ece1d31cd28ea092796c9c608c657205f932d7fa7778a4e52f9753eb59693ac6cf8f7b0dbbce18efbed36fdee59a80c1034cac96a9e2ce6576
6
+ metadata.gz: 3c460c00bc82c5538a2fb13644385b254f0f276581f546bd24c53df655d929e92e931163ec6b8f8cef9bc44ddbdb6cd0989ac5e98658dc665a833e9a667275f7
7
+ data.tar.gz: 30c8074736c47988e540b259177ea54dd82ddd1617bb8b7208e358ca84d8c85afeacf06200c491919f3de36afcb8991ee1fa0555af0dc3cdb83df09ebe7b7732
Binary file
@@ -1,11 +1,21 @@
1
- class BBCode::Tag < AbstractController::Base
2
- include AbstractController::Rendering
3
- include AbstractController::Helpers
4
- include AbstractController::Translation
5
- include AbstractController::AssetPaths
6
- include ActionView::Rendering
7
- include Rails.application.routes.url_helpers
8
- self.view_paths = "app/views"
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 = '=(?:&quot;)?(.+?)(?:&quot;)?'
18
28
  end
19
29
  if args.include? :no_closing_tag
20
30
  @regex = /\[#{n.to_s}#{arg}\]/mi
@@ -1,3 +1,3 @@
1
1
  module BBCode
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
data/lib/bbcode-rails.rb CHANGED
@@ -30,3 +30,4 @@ class String
30
30
  end
31
31
 
32
32
  require 'bbcode-rails/railtie' if defined?(Rails)
33
+ require 'bbcode-rails/tag' unless defined?(Rails)
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.0
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