bbcode-rails 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/bbcode-rails/version.rb +1 -1
- data/lib/generators/bb_code/USAGE +18 -0
- data/lib/generators/bb_code/install_generator.rb +20 -0
- data/lib/generators/bb_code/templates/_quote.html.erb +11 -0
- data/lib/generators/bb_code/templates/b_tag.rb +8 -0
- data/lib/generators/bb_code/templates/i_tag.rb +8 -0
- data/lib/generators/bb_code/templates/img_tag.rb +8 -0
- data/lib/generators/bb_code/templates/quote_tag.rb +8 -0
- metadata +7 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eee36ea29830dc83a7843dad8943e85e4ab88cb6
|
4
|
+
data.tar.gz: 313b2a3bc3276ae865dc9ef757ff9f575692dce7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8584d458464d83bd45a958fa8d838d205795a18eed3f2edd00811b3ad24b7d657a14e3b925f8d52f10aceb727e6a94acc9dfc5f9f6ab810f8d940b01e2966ee6
|
7
|
+
data.tar.gz: c30594d59da3ba541a8d9de1b663cd460055abc6760388c2044cbceebe584136c0c5becb6a652a976cab827638344f9a08b566462affc7467f39e1d19df116dc
|
data/README.md
CHANGED
@@ -40,11 +40,11 @@ tags are not big enough to warrant this, so one can also group them. For example
|
|
40
40
|
|
41
41
|
You can use the bbcode generator to quickly setup a new tag, simple run
|
42
42
|
|
43
|
-
$ rails generate
|
43
|
+
$ rails generate bb_code:tag tagname
|
44
44
|
|
45
45
|
For example if we want to create a bbcode tag to easily link to a user
|
46
46
|
|
47
|
-
$ rails generate
|
47
|
+
$ rails generate bb_code:tag user
|
48
48
|
|
49
49
|
This will create `app/bbcode/user_tag.rb`.
|
50
50
|
|
data/lib/bbcode-rails/version.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
bb_code:tag
|
2
|
+
|
1
3
|
Description:
|
2
4
|
Generates a BBCode Tag with the given name.
|
3
5
|
|
@@ -6,3 +8,19 @@ Example:
|
|
6
8
|
|
7
9
|
This will create:
|
8
10
|
app/bbcode/user_tag.rb
|
11
|
+
|
12
|
+
bb_code:install
|
13
|
+
|
14
|
+
Description:
|
15
|
+
Generates a few of the most simple tags as examples
|
16
|
+
|
17
|
+
Example:
|
18
|
+
rails generate bbcode:install
|
19
|
+
|
20
|
+
This will create:
|
21
|
+
app/bbcode/i_tag.rb
|
22
|
+
app/bbcode/b_tag.rb
|
23
|
+
app/bbcode/quote_tag.rb
|
24
|
+
app/bbcode/img_tag.rb
|
25
|
+
app/views/bbcode/_quote.html.erb
|
26
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
require 'rails/generators/named_base'
|
3
|
+
|
4
|
+
module BbCode
|
5
|
+
class InstallGenerator < ::Rails::Generators::Base
|
6
|
+
source_root File.expand_path('../templates', __FILE__)
|
7
|
+
|
8
|
+
def copy_files
|
9
|
+
["i", "b", "quote", "img"].each do |name|
|
10
|
+
copy_file "#{name}_tag.rb", "app/bbcode/#{name}_tag.rb"
|
11
|
+
end
|
12
|
+
copy_file "_quote.html.erb", "app/views/bbcode/_quote.html.erb"
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
def file_name
|
17
|
+
name.underscore
|
18
|
+
end
|
19
|
+
end
|
20
|
+
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.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcel Müller
|
@@ -59,7 +59,13 @@ files:
|
|
59
59
|
- lib/bbcode-rails/tag.rb
|
60
60
|
- lib/bbcode-rails/version.rb
|
61
61
|
- lib/generators/bb_code/USAGE
|
62
|
+
- lib/generators/bb_code/install_generator.rb
|
62
63
|
- lib/generators/bb_code/tag_generator.rb
|
64
|
+
- lib/generators/bb_code/templates/_quote.html.erb
|
65
|
+
- lib/generators/bb_code/templates/b_tag.rb
|
66
|
+
- lib/generators/bb_code/templates/i_tag.rb
|
67
|
+
- lib/generators/bb_code/templates/img_tag.rb
|
68
|
+
- lib/generators/bb_code/templates/quote_tag.rb
|
63
69
|
- lib/generators/bb_code/templates/tag.rb
|
64
70
|
homepage: https://github.com/TheNeikos/bbcode-rails
|
65
71
|
licenses:
|