formatize 1.0.0rc1 → 1.0.0rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +40 -8
- data/lib/formatize.rb +2 -2
- data/lib/formatize/{helpers.rb → helper.rb} +1 -2
- data/lib/formatize/version.rb +1 -1
- metadata +13 -10
data/README.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
Formatize
|
2
2
|
=========
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
The `textilize`, `textilize_without_paragraph`, and `markdown` helper methods
|
5
|
+
will not be available from the next version of Rails 3 and on. Formatize
|
6
|
+
brings them back. They were removed in
|
7
|
+
[this commit.](http://github.com/rails/rails/commit/0919c0dbca3df02f5cfff7dde4f61b85ef16d886)
|
8
|
+
If you are running edge Rails, Formatize can already be useful now.
|
6
9
|
|
7
10
|
Installation
|
8
11
|
------------
|
@@ -23,9 +26,9 @@ automatically when installing the gem.
|
|
23
26
|
Usage
|
24
27
|
-----
|
25
28
|
|
26
|
-
### The `textilize` & `textilize_without_paragraph`
|
29
|
+
### The `textilize` & `textilize_without_paragraph` helper methods
|
27
30
|
|
28
|
-
The `textilize` helper accepts a string of
|
31
|
+
The `textilize` helper method accepts a string of
|
29
32
|
[Textile](http://redcloth.org/textile) and one or more options. In most cases
|
30
33
|
the default behavior will be suitable and you will not have to pass it any options:
|
31
34
|
|
@@ -44,13 +47,13 @@ Or you can specify multiple options:
|
|
44
47
|
# => "This is worded <strong>strongly</strong>"
|
45
48
|
|
46
49
|
The `textilize_without_paragraph` works similarly except it omits the
|
47
|
-
surrounding `<p>` tag. Check out the
|
48
|
-
[`RedCloth::TextileDoc`](http://redcloth.rubyforge.org/classes/RedCloth/TextileDoc.html)
|
50
|
+
surrounding `<p>` tag. Check out the
|
51
|
+
[documentation for `RedCloth::TextileDoc`](http://redcloth.rubyforge.org/classes/RedCloth/TextileDoc.html)
|
49
52
|
for an overview on the options available.
|
50
53
|
|
51
|
-
### The `markdown` helper
|
54
|
+
### The `markdown` helper method
|
52
55
|
|
53
|
-
The `markdown` helper accepts a string of
|
56
|
+
The `markdown` helper method accepts a string of
|
54
57
|
[Markdown](http://daringfireball.net/projects/markdown/):
|
55
58
|
|
56
59
|
markdown("We are using __Markdown__ now!")
|
@@ -62,6 +65,35 @@ before conversion:
|
|
62
65
|
markdown("<em>We are using __Markdown__ now!</em>", :safe => true)
|
63
66
|
# => "<p><em>We are using <strong>Markdown</strong> now!</em></p>"
|
64
67
|
|
68
|
+
Compatibility
|
69
|
+
-------------
|
70
|
+
|
71
|
+
There will be maintained compatibility with the latest final Ruby 1.8 and 1.9
|
72
|
+
versions, which at the time of writing means 1.8.7 and 1.9.1 respectively. When
|
73
|
+
Ruby 1.8.8 is released, for example, there will not be made an effort to
|
74
|
+
maintain backwards compatibility with 1.8.7. Formatize is also compatible with
|
75
|
+
Ruby 1.9.2 Preview 3.
|
76
|
+
|
77
|
+
The `textilize`, `textilize_without_paragraph`, and `markdown` helper methods
|
78
|
+
were removed after the release of Rails 3.0.0 Beta 4, so when the next
|
79
|
+
prerelease of Rails 3.0.0 is out, Formatize will be updated (if necessary) to
|
80
|
+
be compatible with that. However, there will not be made an effort to maintain
|
81
|
+
backwards compatibility with prereleases of Rails 3.0.0 in the future. As soon
|
82
|
+
as Rails 3.0.0 Final is released Formatize 1.0.0 Final will be released, and
|
83
|
+
all future Formatize versions will maintain compatibility with the latest Rails
|
84
|
+
3.x versions.
|
85
|
+
|
86
|
+
What that means is that when Rails 3.0.1 is released there will not be made an
|
87
|
+
effort to maintain backwards compatibility with 3.0.0, because 3.0.1 is the
|
88
|
+
latest 3.0 version. The reason for that is that it should be fairly straight
|
89
|
+
forward to upgrade from, for example, Rails 3.0.0 to 3.0.1, but it might not be
|
90
|
+
as easy to upgrade from 3.0.5 to 3.1.0.
|
91
|
+
|
92
|
+
If one day a new Ruby/Rails version is released and there is no sensible way to
|
93
|
+
maintain the level of backwards compatibility promised above, a new major
|
94
|
+
version of Formatize will be released. If Formatize 2 is released one day,
|
95
|
+
Formatize 1 will be maintained in a separate branch.
|
96
|
+
|
65
97
|
Copyright & Licensing
|
66
98
|
---------------------
|
67
99
|
|
data/lib/formatize.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Formatize
|
2
|
-
module
|
2
|
+
module Helper
|
3
3
|
# Returns the text with all the Textile[http://www.textism.com/tools/textile] codes turned into HTML tags.
|
4
4
|
#
|
5
5
|
# You can learn more about Textile's syntax at its website[http://www.textism.com/tools/textile].
|
@@ -27,7 +27,6 @@ module Formatize
|
|
27
27
|
def textilize(text, *options)
|
28
28
|
require 'RedCloth'
|
29
29
|
|
30
|
-
options ||= [:hard_breaks]
|
31
30
|
text = sanitize(text) unless text.html_safe? || options.delete(:safe)
|
32
31
|
|
33
32
|
if text.blank?
|
data/lib/formatize/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formatize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1531271193
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 0rc2
|
10
|
+
version: 1.0.0rc2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Heinemeier Hansson
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-07-30 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -54,13 +54,16 @@ dependencies:
|
|
54
54
|
requirement: &id003 !ruby/object:Gem::Requirement
|
55
55
|
none: false
|
56
56
|
requirements:
|
57
|
-
- - "
|
57
|
+
- - "="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
hash:
|
59
|
+
hash: 1003494531
|
60
60
|
segments:
|
61
|
+
- 3
|
62
|
+
- 0
|
61
63
|
- 0
|
62
|
-
|
63
|
-
|
64
|
+
- rc
|
65
|
+
version: 3.0.0.rc
|
66
|
+
type: :runtime
|
64
67
|
version_requirements: *id003
|
65
68
|
description:
|
66
69
|
email: david@loudthinking.com
|
@@ -71,7 +74,7 @@ extensions: []
|
|
71
74
|
extra_rdoc_files: []
|
72
75
|
|
73
76
|
files:
|
74
|
-
- lib/formatize/
|
77
|
+
- lib/formatize/helper.rb
|
75
78
|
- lib/formatize/version.rb
|
76
79
|
- lib/formatize.rb
|
77
80
|
- LICENSE
|
@@ -111,6 +114,6 @@ rubyforge_project:
|
|
111
114
|
rubygems_version: 1.3.7
|
112
115
|
signing_key:
|
113
116
|
specification_version: 3
|
114
|
-
summary: Plugin containing the textilize, textilize_without_paragraph, and markdown
|
117
|
+
summary: Plugin containing the textilize, textilize_without_paragraph, and markdown helper methods removed from Rails.
|
115
118
|
test_files: []
|
116
119
|
|