vidibus-textile 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +7 -1
- data/Gemfile.lock +40 -22
- data/README.rdoc +37 -8
- data/Rakefile +4 -2
- data/VERSION +1 -1
- data/lib/vidibus-textile.rb +1 -0
- data/lib/vidibus/textile.rb +3 -2
- data/lib/vidibus/textile/mongoid.rb +40 -0
- data/spec/spec_helper.rb +11 -1
- data/spec/vidibus/textile/action_view_spec.rb +1 -1
- data/spec/vidibus/textile/mongoid_spec.rb +65 -0
- data/vidibus-textile.gemspec +61 -24
- metadata +203 -13
- data/.gitignore +0 -22
data/Gemfile
CHANGED
@@ -1,8 +1,14 @@
|
|
1
|
-
source
|
1
|
+
source :rubygems
|
2
|
+
|
2
3
|
gem "bundler", "~> 1.0.0"
|
3
4
|
gem "RedCloth"
|
4
5
|
gem "activesupport", "~> 3.0.0"
|
5
6
|
gem "actionpack", "~> 3.0.0"
|
7
|
+
gem "mongoid", "~> 2.0.0.beta.20"
|
8
|
+
|
9
|
+
# Development dependecies
|
10
|
+
gem "jeweler"
|
11
|
+
gem "rake"
|
6
12
|
gem "rspec", "~> 2.0.0.beta.20"
|
7
13
|
gem "rr"
|
8
14
|
gem "relevance-rcov"
|
data/Gemfile.lock
CHANGED
@@ -1,46 +1,61 @@
|
|
1
1
|
GEM
|
2
|
-
remote: http://
|
2
|
+
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
4
|
RedCloth (4.2.3)
|
5
5
|
abstract (1.0.0)
|
6
|
-
actionpack (3.0.
|
7
|
-
activemodel (= 3.0.
|
8
|
-
activesupport (= 3.0.
|
6
|
+
actionpack (3.0.3)
|
7
|
+
activemodel (= 3.0.3)
|
8
|
+
activesupport (= 3.0.3)
|
9
9
|
builder (~> 2.1.2)
|
10
10
|
erubis (~> 2.6.6)
|
11
|
-
i18n (~> 0.4
|
11
|
+
i18n (~> 0.4)
|
12
12
|
rack (~> 1.2.1)
|
13
|
-
rack-mount (~> 0.6.
|
14
|
-
rack-test (~> 0.5.
|
13
|
+
rack-mount (~> 0.6.13)
|
14
|
+
rack-test (~> 0.5.6)
|
15
15
|
tzinfo (~> 0.3.23)
|
16
|
-
activemodel (3.0.
|
17
|
-
activesupport (= 3.0.
|
16
|
+
activemodel (3.0.3)
|
17
|
+
activesupport (= 3.0.3)
|
18
18
|
builder (~> 2.1.2)
|
19
|
-
i18n (~> 0.4
|
20
|
-
activesupport (3.0.
|
19
|
+
i18n (~> 0.4)
|
20
|
+
activesupport (3.0.3)
|
21
|
+
bson (1.1.2)
|
21
22
|
builder (2.1.2)
|
22
23
|
diff-lcs (1.1.2)
|
23
24
|
erubis (2.6.6)
|
24
25
|
abstract (>= 1.0.0)
|
25
|
-
|
26
|
+
git (1.2.5)
|
27
|
+
i18n (0.4.2)
|
28
|
+
jeweler (1.5.1)
|
29
|
+
bundler (~> 1.0.0)
|
30
|
+
git (>= 1.2.5)
|
31
|
+
rake
|
32
|
+
mongo (1.1.2)
|
33
|
+
bson (>= 1.1.1)
|
34
|
+
mongoid (2.0.0.beta.20)
|
35
|
+
activemodel (~> 3.0)
|
36
|
+
mongo (~> 1.1)
|
37
|
+
tzinfo (~> 0.3.22)
|
38
|
+
will_paginate (~> 3.0.pre)
|
26
39
|
rack (1.2.1)
|
27
40
|
rack-mount (0.6.13)
|
28
41
|
rack (>= 1.0.0)
|
29
42
|
rack-test (0.5.6)
|
30
43
|
rack (>= 1.0)
|
44
|
+
rake (0.8.7)
|
31
45
|
relevance-rcov (0.9.2.1)
|
32
|
-
rr (1.0.
|
33
|
-
rspec (2.0.
|
34
|
-
rspec-core (
|
35
|
-
rspec-expectations (
|
36
|
-
rspec-mocks (
|
37
|
-
rspec-core (2.0.
|
38
|
-
rspec-expectations (2.0.
|
46
|
+
rr (1.0.2)
|
47
|
+
rspec (2.0.1)
|
48
|
+
rspec-core (~> 2.0.1)
|
49
|
+
rspec-expectations (~> 2.0.1)
|
50
|
+
rspec-mocks (~> 2.0.1)
|
51
|
+
rspec-core (2.0.1)
|
52
|
+
rspec-expectations (2.0.1)
|
39
53
|
diff-lcs (>= 1.1.2)
|
40
|
-
rspec-mocks (2.0.
|
41
|
-
rspec-core (
|
42
|
-
rspec-expectations (
|
54
|
+
rspec-mocks (2.0.1)
|
55
|
+
rspec-core (~> 2.0.1)
|
56
|
+
rspec-expectations (~> 2.0.1)
|
43
57
|
tzinfo (0.3.23)
|
58
|
+
will_paginate (3.0.pre2)
|
44
59
|
|
45
60
|
PLATFORMS
|
46
61
|
ruby
|
@@ -50,6 +65,9 @@ DEPENDENCIES
|
|
50
65
|
actionpack (~> 3.0.0)
|
51
66
|
activesupport (~> 3.0.0)
|
52
67
|
bundler (~> 1.0.0)
|
68
|
+
jeweler
|
69
|
+
mongoid (~> 2.0.0.beta.20)
|
70
|
+
rake
|
53
71
|
relevance-rcov
|
54
72
|
rr
|
55
73
|
rspec (~> 2.0.0.beta.20)
|
data/README.rdoc
CHANGED
@@ -1,35 +1,64 @@
|
|
1
1
|
= vidibus-textile
|
2
2
|
|
3
|
-
Basically, this is a wrapper for RedCloth with some extensions. It is inspired by the acts_as_textiled plugin
|
3
|
+
Basically, this is a wrapper for RedCloth with some extensions. It is inspired by the acts_as_textiled plugin and extends your Mongoid models.
|
4
4
|
|
5
|
-
This gem is part of the open source SOA framework Vidibus: http://vidibus.org
|
5
|
+
This gem is part of the open source SOA framework Vidibus: http://vidibus.org
|
6
|
+
|
7
|
+
|
8
|
+
== Installation
|
9
|
+
|
10
|
+
Add the dependency to the Gemfile of your application:
|
11
|
+
|
12
|
+
gem "vidibus-textile"
|
13
|
+
|
14
|
+
Then call `bundle install` on your console.
|
6
15
|
|
7
16
|
|
8
17
|
== Usage
|
9
18
|
|
10
|
-
The basic
|
19
|
+
The basic methods are:
|
11
20
|
|
12
|
-
#to_html (provided by RedCloth)
|
13
21
|
Vidibus::Textile.new('Some *say*, "love":http://doit.xxx is a _river_.').to_html
|
14
22
|
# => '<p>Some <strong>say</strong>, <a href="http://doit.xxx">love</a> is a <em>river</em>.</p>'
|
23
|
+
# (#to_html is provided by RedCloth)
|
15
24
|
|
16
|
-
#to_text
|
17
25
|
Vidibus::Textile.new('Some *say*, "love":http://doit.xxx is a _river_.').to_text
|
18
26
|
# => "Some say, love is a river."
|
19
27
|
|
20
28
|
The method #to_text will return a plain text version of textile content but keep newlines intact. However, if
|
21
29
|
you just want a stripped version without newlines, provide the option :plain => true
|
22
30
|
|
23
|
-
#to_text with :plain => true
|
31
|
+
# #to_text with :plain => true
|
24
32
|
Vidibus::Textile.new("Super\nTrouper").to_text(:plain => true)
|
25
33
|
# => "Super Trouper"
|
26
34
|
|
27
35
|
|
36
|
+
== Mongoid integration
|
37
|
+
|
38
|
+
Adding textile content to your Mongoid model is simple:
|
39
|
+
|
40
|
+
class Page
|
41
|
+
include Mongoid::Document
|
42
|
+
include Vidibus::Textile::Mongoid
|
43
|
+
textile :body
|
44
|
+
end
|
45
|
+
|
46
|
+
By setting textile :body on the page model above, it will be extended by two fields:
|
47
|
+
|
48
|
+
field :body
|
49
|
+
# => Contains the textile content.
|
50
|
+
|
51
|
+
field :body_plain
|
52
|
+
# => Contains a plain text version of the content, stored in the database.
|
53
|
+
|
54
|
+
Additionally, the method #body_html is available. As one could guess, it returns rendered html from the textile content.
|
55
|
+
|
56
|
+
|
28
57
|
== View helper
|
29
58
|
|
30
|
-
For your convenience, the view helper
|
59
|
+
For your convenience, the view helper #stripped is available (as counterpart for Rails' #textilize).
|
31
60
|
|
32
|
-
# In
|
61
|
+
# In your view...
|
33
62
|
stripped("*Super*\nTrouper", :plain => true)
|
34
63
|
# => "Super Trouper"
|
35
64
|
|
data/Rakefile
CHANGED
@@ -8,13 +8,15 @@ begin
|
|
8
8
|
require "jeweler"
|
9
9
|
Jeweler::Tasks.new do |gem|
|
10
10
|
gem.name = "vidibus-textile"
|
11
|
-
gem.summary = %Q{Wrapper for RedCloth with extensions.}
|
11
|
+
gem.summary = %Q{Wrapper for RedCloth with extensions for Mongoid.}
|
12
12
|
gem.description = %Q{Provides textile formatting through RedCloth and adds methods for getting plain text version of textile markup.}
|
13
13
|
gem.email = "andre@vidibus.com"
|
14
14
|
gem.homepage = "http://github.com/vidibus/vidibus-textile"
|
15
15
|
gem.authors = ["Andre Pankratz"]
|
16
16
|
gem.add_dependency "RedCloth"
|
17
17
|
gem.add_dependency "activesupport"
|
18
|
+
gem.add_dependency "actionpack", "~> 3.0.0"
|
19
|
+
gem.add_dependency "mongoid", "~> 2.0.0.beta.20"
|
18
20
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
19
21
|
end
|
20
22
|
Jeweler::GemcutterTasks.new
|
@@ -25,7 +27,7 @@ end
|
|
25
27
|
Rspec::Core::RakeTask.new(:rcov) do |t|
|
26
28
|
t.pattern = "spec/**/*_spec.rb"
|
27
29
|
t.rcov = true
|
28
|
-
t.rcov_opts = ["--exclude", "^spec,/gems/"
|
30
|
+
t.rcov_opts = ["--exclude", "^spec,/gems/"]
|
29
31
|
end
|
30
32
|
|
31
33
|
Rake::RDocTask.new do |rdoc|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/lib/vidibus-textile.rb
CHANGED
data/lib/vidibus/textile.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "textile/extensions"
|
2
|
+
require "textile/mongoid"
|
2
3
|
|
3
4
|
module Vidibus
|
4
5
|
module Textile
|
@@ -6,12 +7,12 @@ module Vidibus
|
|
6
7
|
# A convenience method for creating a new TextileDoc. See
|
7
8
|
# RedCloth::TextileDoc.
|
8
9
|
def self.new(*args, &block)
|
9
|
-
|
10
|
+
Doc.new(*args, &block)
|
10
11
|
end
|
11
12
|
|
12
13
|
# Include extension modules (if any) in TextileDoc.
|
13
14
|
def self.include(*args)
|
14
|
-
|
15
|
+
Doc.send(:include, *args)
|
15
16
|
end
|
16
17
|
|
17
18
|
class Doc < ::RedCloth::TextileDoc
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Vidibus
|
2
|
+
module Textile
|
3
|
+
module Mongoid
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
module ClassMethods
|
6
|
+
|
7
|
+
# Define existing attribute as textile.
|
8
|
+
def textile(*args)
|
9
|
+
options = args.extract_options!
|
10
|
+
for field in args
|
11
|
+
plain_field = "#{field}_plain"
|
12
|
+
self.send(:field, field, :type => Binary)
|
13
|
+
self.send(:field, plain_field, :type => Binary)
|
14
|
+
|
15
|
+
class_eval <<-EOS
|
16
|
+
before_save :set_#{plain_field}, :if => lambda {#{field}_changed? or new_record?}
|
17
|
+
|
18
|
+
def set_#{plain_field}
|
19
|
+
self.#{plain_field} = #{plain_field}
|
20
|
+
end
|
21
|
+
|
22
|
+
def #{plain_field}
|
23
|
+
if #{field}_changed? or new_record?
|
24
|
+
Vidibus::Textile.new(#{field}).to_text(:plain => true)
|
25
|
+
else
|
26
|
+
read_attribute(:#{plain_field})
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def #{field}_html
|
31
|
+
return "" unless #{field}
|
32
|
+
Vidibus::Textile.new(#{field}).to_html
|
33
|
+
end
|
34
|
+
EOS
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -3,8 +3,18 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
|
3
3
|
|
4
4
|
require "rubygems"
|
5
5
|
require "rspec"
|
6
|
+
require "rr"
|
6
7
|
require "vidibus-textile"
|
7
8
|
|
9
|
+
Mongoid.configure do |config|
|
10
|
+
name = "vidibus-textile_test"
|
11
|
+
host = "localhost"
|
12
|
+
config.master = Mongo::Connection.new.db(name)
|
13
|
+
end
|
14
|
+
|
8
15
|
RSpec.configure do |config|
|
9
16
|
config.mock_with :rr
|
10
|
-
|
17
|
+
config.after :suite do
|
18
|
+
Mongoid.master.collections.select {|c| c.name !~ /system/ }.each(&:drop)
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
class Page
|
4
|
+
include Mongoid::Document
|
5
|
+
include Vidibus::Textile::Mongoid
|
6
|
+
textile :body
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "Vidibus::Textile::Mongoid" do
|
10
|
+
let(:page) { Page.new(:body => "h1. Hello World!") }
|
11
|
+
|
12
|
+
it "should add a field :body" do
|
13
|
+
page.should respond_to(:body)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should add a field :body_plain" do
|
17
|
+
page.should respond_to(:body_plain)
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should add a method :body_html" do
|
21
|
+
page.should respond_to(:body_html)
|
22
|
+
end
|
23
|
+
|
24
|
+
describe "saving" do
|
25
|
+
it "should call #set_body_plain" do
|
26
|
+
mock(page).set_body_plain
|
27
|
+
page.save
|
28
|
+
end
|
29
|
+
|
30
|
+
it "should set plain body" do
|
31
|
+
mock(page).body_plain=("Hello World!")
|
32
|
+
page.save
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should not set plain body unless the body has changed" do
|
36
|
+
page.save
|
37
|
+
dont_allow(page).set_body_plain
|
38
|
+
page.save
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe "#body_plain" do
|
43
|
+
it "should plain text from textile field" do
|
44
|
+
page.body_plain.should eql("Hello World!")
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should not convert textile input if value is available in database" do
|
48
|
+
page.save
|
49
|
+
dont_allow(Vidibus::Textile).new
|
50
|
+
page.body_plain.should eql("Hello World!")
|
51
|
+
end
|
52
|
+
|
53
|
+
it "should convert textile input if it has been changed" do
|
54
|
+
page.save
|
55
|
+
page.body = "h2. This is The End"
|
56
|
+
page.body_plain.should eql("This is The End")
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
describe "#body_html" do
|
61
|
+
it "should return html from textile field" do
|
62
|
+
page.body_html.should eql("<h1>Hello World!</h1>")
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
data/vidibus-textile.gemspec
CHANGED
@@ -1,49 +1,50 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{vidibus-textile}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andre Pankratz"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-11-18}
|
13
13
|
s.description = %q{Provides textile formatting through RedCloth and adds methods for getting plain text version of textile markup.}
|
14
14
|
s.email = %q{andre@vidibus.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
|
17
|
+
"README.rdoc"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
21
|
+
".rspec",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE",
|
25
|
+
"README.rdoc",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"lib/vidibus-textile.rb",
|
29
|
+
"lib/vidibus/textile.rb",
|
30
|
+
"lib/vidibus/textile/extensions.rb",
|
31
|
+
"lib/vidibus/textile/extensions/view.rb",
|
32
|
+
"lib/vidibus/textile/mongoid.rb",
|
33
|
+
"spec/spec_helper.rb",
|
34
|
+
"spec/vidibus/textile/action_view_spec.rb",
|
35
|
+
"spec/vidibus/textile/mongoid_spec.rb",
|
36
|
+
"spec/vidibus/textile_spec.rb",
|
37
|
+
"vidibus-textile.gemspec"
|
37
38
|
]
|
38
39
|
s.homepage = %q{http://github.com/vidibus/vidibus-textile}
|
39
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
40
40
|
s.require_paths = ["lib"]
|
41
41
|
s.rubygems_version = %q{1.3.7}
|
42
|
-
s.summary = %q{Wrapper for RedCloth with extensions.}
|
42
|
+
s.summary = %q{Wrapper for RedCloth with extensions for Mongoid.}
|
43
43
|
s.test_files = [
|
44
44
|
"spec/spec_helper.rb",
|
45
|
-
|
46
|
-
|
45
|
+
"spec/vidibus/textile/action_view_spec.rb",
|
46
|
+
"spec/vidibus/textile/mongoid_spec.rb",
|
47
|
+
"spec/vidibus/textile_spec.rb"
|
47
48
|
]
|
48
49
|
|
49
50
|
if s.respond_to? :specification_version then
|
@@ -51,15 +52,51 @@ Gem::Specification.new do |s|
|
|
51
52
|
s.specification_version = 3
|
52
53
|
|
53
54
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
55
|
+
s.add_runtime_dependency(%q<bundler>, ["~> 1.0.0"])
|
56
|
+
s.add_runtime_dependency(%q<RedCloth>, [">= 0"])
|
57
|
+
s.add_runtime_dependency(%q<activesupport>, ["~> 3.0.0"])
|
58
|
+
s.add_runtime_dependency(%q<actionpack>, ["~> 3.0.0"])
|
59
|
+
s.add_runtime_dependency(%q<mongoid>, ["~> 2.0.0.beta.20"])
|
60
|
+
s.add_runtime_dependency(%q<jeweler>, [">= 0"])
|
61
|
+
s.add_runtime_dependency(%q<rake>, [">= 0"])
|
62
|
+
s.add_runtime_dependency(%q<rspec>, ["~> 2.0.0.beta.20"])
|
63
|
+
s.add_runtime_dependency(%q<rr>, [">= 0"])
|
64
|
+
s.add_runtime_dependency(%q<relevance-rcov>, [">= 0"])
|
54
65
|
s.add_runtime_dependency(%q<RedCloth>, [">= 0"])
|
55
66
|
s.add_runtime_dependency(%q<activesupport>, [">= 0"])
|
67
|
+
s.add_runtime_dependency(%q<actionpack>, ["~> 3.0.0"])
|
68
|
+
s.add_runtime_dependency(%q<mongoid>, ["~> 2.0.0.beta.20"])
|
56
69
|
else
|
70
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
71
|
+
s.add_dependency(%q<RedCloth>, [">= 0"])
|
72
|
+
s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
|
73
|
+
s.add_dependency(%q<actionpack>, ["~> 3.0.0"])
|
74
|
+
s.add_dependency(%q<mongoid>, ["~> 2.0.0.beta.20"])
|
75
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
76
|
+
s.add_dependency(%q<rake>, [">= 0"])
|
77
|
+
s.add_dependency(%q<rspec>, ["~> 2.0.0.beta.20"])
|
78
|
+
s.add_dependency(%q<rr>, [">= 0"])
|
79
|
+
s.add_dependency(%q<relevance-rcov>, [">= 0"])
|
57
80
|
s.add_dependency(%q<RedCloth>, [">= 0"])
|
58
81
|
s.add_dependency(%q<activesupport>, [">= 0"])
|
82
|
+
s.add_dependency(%q<actionpack>, ["~> 3.0.0"])
|
83
|
+
s.add_dependency(%q<mongoid>, ["~> 2.0.0.beta.20"])
|
59
84
|
end
|
60
85
|
else
|
86
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
87
|
+
s.add_dependency(%q<RedCloth>, [">= 0"])
|
88
|
+
s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
|
89
|
+
s.add_dependency(%q<actionpack>, ["~> 3.0.0"])
|
90
|
+
s.add_dependency(%q<mongoid>, ["~> 2.0.0.beta.20"])
|
91
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
92
|
+
s.add_dependency(%q<rake>, [">= 0"])
|
93
|
+
s.add_dependency(%q<rspec>, ["~> 2.0.0.beta.20"])
|
94
|
+
s.add_dependency(%q<rr>, [">= 0"])
|
95
|
+
s.add_dependency(%q<relevance-rcov>, [">= 0"])
|
61
96
|
s.add_dependency(%q<RedCloth>, [">= 0"])
|
62
97
|
s.add_dependency(%q<activesupport>, [">= 0"])
|
98
|
+
s.add_dependency(%q<actionpack>, ["~> 3.0.0"])
|
99
|
+
s.add_dependency(%q<mongoid>, ["~> 2.0.0.beta.20"])
|
63
100
|
end
|
64
101
|
end
|
65
102
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vidibus-textile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 2
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andre Pankratz
|
@@ -15,13 +15,94 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-11-18 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
name: bundler
|
25
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ~>
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 23
|
31
|
+
segments:
|
32
|
+
- 1
|
33
|
+
- 0
|
34
|
+
- 0
|
35
|
+
version: 1.0.0
|
36
|
+
requirement: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
22
40
|
name: RedCloth
|
41
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
hash: 3
|
47
|
+
segments:
|
48
|
+
- 0
|
49
|
+
version: "0"
|
50
|
+
requirement: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
type: :runtime
|
53
|
+
prerelease: false
|
54
|
+
name: activesupport
|
55
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - ~>
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 7
|
61
|
+
segments:
|
62
|
+
- 3
|
63
|
+
- 0
|
64
|
+
- 0
|
65
|
+
version: 3.0.0
|
66
|
+
requirement: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
type: :runtime
|
23
69
|
prerelease: false
|
24
|
-
|
70
|
+
name: actionpack
|
71
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
hash: 7
|
77
|
+
segments:
|
78
|
+
- 3
|
79
|
+
- 0
|
80
|
+
- 0
|
81
|
+
version: 3.0.0
|
82
|
+
requirement: *id004
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
type: :runtime
|
85
|
+
prerelease: false
|
86
|
+
name: mongoid
|
87
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
88
|
+
none: false
|
89
|
+
requirements:
|
90
|
+
- - ~>
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
hash: 62196427
|
93
|
+
segments:
|
94
|
+
- 2
|
95
|
+
- 0
|
96
|
+
- 0
|
97
|
+
- beta
|
98
|
+
- 20
|
99
|
+
version: 2.0.0.beta.20
|
100
|
+
requirement: *id005
|
101
|
+
- !ruby/object:Gem::Dependency
|
102
|
+
type: :runtime
|
103
|
+
prerelease: false
|
104
|
+
name: jeweler
|
105
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
25
106
|
none: false
|
26
107
|
requirements:
|
27
108
|
- - ">="
|
@@ -30,12 +111,44 @@ dependencies:
|
|
30
111
|
segments:
|
31
112
|
- 0
|
32
113
|
version: "0"
|
114
|
+
requirement: *id006
|
115
|
+
- !ruby/object:Gem::Dependency
|
33
116
|
type: :runtime
|
34
|
-
|
117
|
+
prerelease: false
|
118
|
+
name: rake
|
119
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
120
|
+
none: false
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
hash: 3
|
125
|
+
segments:
|
126
|
+
- 0
|
127
|
+
version: "0"
|
128
|
+
requirement: *id007
|
35
129
|
- !ruby/object:Gem::Dependency
|
36
|
-
|
130
|
+
type: :runtime
|
37
131
|
prerelease: false
|
38
|
-
|
132
|
+
name: rspec
|
133
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
134
|
+
none: false
|
135
|
+
requirements:
|
136
|
+
- - ~>
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
hash: 62196427
|
139
|
+
segments:
|
140
|
+
- 2
|
141
|
+
- 0
|
142
|
+
- 0
|
143
|
+
- beta
|
144
|
+
- 20
|
145
|
+
version: 2.0.0.beta.20
|
146
|
+
requirement: *id008
|
147
|
+
- !ruby/object:Gem::Dependency
|
148
|
+
type: :runtime
|
149
|
+
prerelease: false
|
150
|
+
name: rr
|
151
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
39
152
|
none: false
|
40
153
|
requirements:
|
41
154
|
- - ">="
|
@@ -44,8 +157,83 @@ dependencies:
|
|
44
157
|
segments:
|
45
158
|
- 0
|
46
159
|
version: "0"
|
160
|
+
requirement: *id009
|
161
|
+
- !ruby/object:Gem::Dependency
|
47
162
|
type: :runtime
|
48
|
-
|
163
|
+
prerelease: false
|
164
|
+
name: relevance-rcov
|
165
|
+
version_requirements: &id010 !ruby/object:Gem::Requirement
|
166
|
+
none: false
|
167
|
+
requirements:
|
168
|
+
- - ">="
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
hash: 3
|
171
|
+
segments:
|
172
|
+
- 0
|
173
|
+
version: "0"
|
174
|
+
requirement: *id010
|
175
|
+
- !ruby/object:Gem::Dependency
|
176
|
+
type: :runtime
|
177
|
+
prerelease: false
|
178
|
+
name: RedCloth
|
179
|
+
version_requirements: &id011 !ruby/object:Gem::Requirement
|
180
|
+
none: false
|
181
|
+
requirements:
|
182
|
+
- - ">="
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
hash: 3
|
185
|
+
segments:
|
186
|
+
- 0
|
187
|
+
version: "0"
|
188
|
+
requirement: *id011
|
189
|
+
- !ruby/object:Gem::Dependency
|
190
|
+
type: :runtime
|
191
|
+
prerelease: false
|
192
|
+
name: activesupport
|
193
|
+
version_requirements: &id012 !ruby/object:Gem::Requirement
|
194
|
+
none: false
|
195
|
+
requirements:
|
196
|
+
- - ">="
|
197
|
+
- !ruby/object:Gem::Version
|
198
|
+
hash: 3
|
199
|
+
segments:
|
200
|
+
- 0
|
201
|
+
version: "0"
|
202
|
+
requirement: *id012
|
203
|
+
- !ruby/object:Gem::Dependency
|
204
|
+
type: :runtime
|
205
|
+
prerelease: false
|
206
|
+
name: actionpack
|
207
|
+
version_requirements: &id013 !ruby/object:Gem::Requirement
|
208
|
+
none: false
|
209
|
+
requirements:
|
210
|
+
- - ~>
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
hash: 7
|
213
|
+
segments:
|
214
|
+
- 3
|
215
|
+
- 0
|
216
|
+
- 0
|
217
|
+
version: 3.0.0
|
218
|
+
requirement: *id013
|
219
|
+
- !ruby/object:Gem::Dependency
|
220
|
+
type: :runtime
|
221
|
+
prerelease: false
|
222
|
+
name: mongoid
|
223
|
+
version_requirements: &id014 !ruby/object:Gem::Requirement
|
224
|
+
none: false
|
225
|
+
requirements:
|
226
|
+
- - ~>
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
hash: 62196427
|
229
|
+
segments:
|
230
|
+
- 2
|
231
|
+
- 0
|
232
|
+
- 0
|
233
|
+
- beta
|
234
|
+
- 20
|
235
|
+
version: 2.0.0.beta.20
|
236
|
+
requirement: *id014
|
49
237
|
description: Provides textile formatting through RedCloth and adds methods for getting plain text version of textile markup.
|
50
238
|
email: andre@vidibus.com
|
51
239
|
executables: []
|
@@ -57,7 +245,6 @@ extra_rdoc_files:
|
|
57
245
|
- README.rdoc
|
58
246
|
files:
|
59
247
|
- .document
|
60
|
-
- .gitignore
|
61
248
|
- .rspec
|
62
249
|
- Gemfile
|
63
250
|
- Gemfile.lock
|
@@ -69,8 +256,10 @@ files:
|
|
69
256
|
- lib/vidibus/textile.rb
|
70
257
|
- lib/vidibus/textile/extensions.rb
|
71
258
|
- lib/vidibus/textile/extensions/view.rb
|
259
|
+
- lib/vidibus/textile/mongoid.rb
|
72
260
|
- spec/spec_helper.rb
|
73
261
|
- spec/vidibus/textile/action_view_spec.rb
|
262
|
+
- spec/vidibus/textile/mongoid_spec.rb
|
74
263
|
- spec/vidibus/textile_spec.rb
|
75
264
|
- vidibus-textile.gemspec
|
76
265
|
has_rdoc: true
|
@@ -78,8 +267,8 @@ homepage: http://github.com/vidibus/vidibus-textile
|
|
78
267
|
licenses: []
|
79
268
|
|
80
269
|
post_install_message:
|
81
|
-
rdoc_options:
|
82
|
-
|
270
|
+
rdoc_options: []
|
271
|
+
|
83
272
|
require_paths:
|
84
273
|
- lib
|
85
274
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -106,8 +295,9 @@ rubyforge_project:
|
|
106
295
|
rubygems_version: 1.3.7
|
107
296
|
signing_key:
|
108
297
|
specification_version: 3
|
109
|
-
summary: Wrapper for RedCloth with extensions.
|
298
|
+
summary: Wrapper for RedCloth with extensions for Mongoid.
|
110
299
|
test_files:
|
111
300
|
- spec/spec_helper.rb
|
112
301
|
- spec/vidibus/textile/action_view_spec.rb
|
302
|
+
- spec/vidibus/textile/mongoid_spec.rb
|
113
303
|
- spec/vidibus/textile_spec.rb
|