bbcode-rails 0.2.1 → 0.3.0

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: 261d90fe19a04f29355ec34a63184cea1cdf13b8
4
- data.tar.gz: 03db5146dd94b739acfa2e72787d785dd633ec72
3
+ metadata.gz: 9f426682f533d321d43c8123dd74886db4a54405
4
+ data.tar.gz: d7b4daad8986376e4bdb3ab85198b0919d567b9d
5
5
  SHA512:
6
- metadata.gz: 3c460c00bc82c5538a2fb13644385b254f0f276581f546bd24c53df655d929e92e931163ec6b8f8cef9bc44ddbdb6cd0989ac5e98658dc665a833e9a667275f7
7
- data.tar.gz: 30c8074736c47988e540b259177ea54dd82ddd1617bb8b7208e358ca84d8c85afeacf06200c491919f3de36afcb8991ee1fa0555af0dc3cdb83df09ebe7b7732
6
+ metadata.gz: 9896fd6d6b35c8f91307a579576bbefffafb556e3bead0fcb012b7cdea629b55f5e6b0a1801b019ab605d55b5729b28e0627d7b4d2a538137c8fd450461e05bc
7
+ data.tar.gz: 3aa45a1a1c7f605d1973667c8022982de6d446ce6b331838c796c468abb76e6abb61be4221e5546f00df5c1224378023eeb45a653cf3cb4b0c34ba8b39298f0e
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.gem
data/README.md CHANGED
@@ -68,7 +68,7 @@ class UserTag < BBCode::Tag
68
68
  name :user, :argument, :no_closing_tag
69
69
  on_layout do |args|
70
70
  user = User.find_by_id(args[1])
71
- render partial: 'shared/userquote', locals: user
71
+ render partial: 'shared/userquote', locals: { user: user }
72
72
  end
73
73
  end
74
74
  ```
@@ -1,3 +1,3 @@
1
1
  module BBCode
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -0,0 +1,8 @@
1
+ Description:
2
+ Generates a BBCode Tag with the given name.
3
+
4
+ Example:
5
+ rails generate bbcode:tag user
6
+
7
+ This will create:
8
+ app/bbcode/user_tag.rb
@@ -0,0 +1,18 @@
1
+ require 'rails/generators'
2
+ require 'rails/generators/named_base'
3
+
4
+ module BbCode
5
+ class TagGenerator < ::Rails::Generators::NamedBase
6
+ source_root File.expand_path('../templates', __FILE__)
7
+ check_class_collision :suffix => "Tag"
8
+
9
+ def create_tag
10
+ template 'tag.rb', File.join('app/bbcode', class_path, "#{file_name}_tag.rb")
11
+ end
12
+
13
+ private
14
+ def file_name
15
+ name.underscore
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,9 @@
1
+ <% module_namespacing do -%>
2
+ class <%= name.classify %>Tag < BBCode::Tag
3
+ block_name :<%= name %>
4
+
5
+ on_layout do |args|
6
+ "TODO: Implement <%= name %> tag"
7
+ end
8
+ end
9
+ <% end -%>
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.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcel Müller
@@ -52,14 +52,15 @@ files:
52
52
  - LICENSE.txt
53
53
  - README.md
54
54
  - Rakefile
55
- - bbcode-rails-0.1.0.gem
56
- - bbcode-rails-0.2.0.gem
57
55
  - bbcode-rails.gemspec
58
56
  - bin/console
59
57
  - lib/bbcode-rails.rb
60
58
  - lib/bbcode-rails/railtie.rb
61
59
  - lib/bbcode-rails/tag.rb
62
60
  - lib/bbcode-rails/version.rb
61
+ - lib/generators/bb_code/USAGE
62
+ - lib/generators/bb_code/tag_generator.rb
63
+ - lib/generators/bb_code/templates/tag.rb
63
64
  homepage: https://github.com/TheNeikos/bbcode-rails
64
65
  licenses:
65
66
  - MIT
Binary file
Binary file