redrug 0.2.4 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/COPYING +12 -6
- data/README.md +167 -0
- data/bin/redrug +19 -12
- data/coil.txt +30 -0
- data/dpl.txt +22 -0
- data/lib/red_rug.rb +16 -9
- data/spec/red_rug_spec.rb +34 -0
- data/spec/spec_helper.rb +91 -0
- metadata +45 -26
- data/README +0 -3
- data/owl.txt +0 -23
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8c57240ac79baf96c9a4e16630e30f215bb632aad7abd9859c7bee23fde191ab
|
4
|
+
data.tar.gz: a712d3e065bfd6d01108dfeaa0fba0150649c726f82c26b597269756b8906da1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6ce34f4060254d32df5411b05a2750942a24f2da4e379c72ed3a69a5931f8c9dacb31d9470615715ca77e9926c9c9806f87fc3e76a83e6b2ff90e650ae880644
|
7
|
+
data.tar.gz: 002757ab7f297c5ed8e4470052850c1ccfba069f6cbb3f4655fd6104fda26f31bcc15ea9c238091461613cd0653d26a842cb28ccfca0621e0414eb99d4c67610
|
data/COPYING
CHANGED
@@ -1,12 +1,18 @@
|
|
1
|
-
RedRug is distributed under the terms of the Open
|
2
|
-
|
1
|
+
RedRug is distributed under the terms of the Copyfree Open Innovation License
|
2
|
+
(COIL) or the Detachable Public License (DPL), at the recipient's discretion.
|
3
|
+
The COIL and DPL are copyfree licenses.
|
3
4
|
|
4
5
|
RedRug depends on Redcarpet, which is distributed under the terms of the ISC
|
5
6
|
License. The ISC License is a copyfree license.
|
6
7
|
|
7
|
-
|
8
|
+
RedRug also depends on Versionize, which is distributed under the terms of the
|
9
|
+
same licenses as RedRug. That's awfully convenient.
|
8
10
|
|
9
|
-
See
|
11
|
+
See http://copyfree.org for more information about copyfree licensing in
|
12
|
+
general, and about the COIL, DPL, and ISC License in particular.
|
10
13
|
|
11
|
-
See
|
12
|
-
|
14
|
+
See https://github.com/vmg/redcarpet for more information about Redcarpet. See
|
15
|
+
http://fossrec.com/u/apotheon/versionize for more information about Versionize.
|
16
|
+
See http://fossrec.com/u/apotheon/redrug for more information about RedRug.
|
17
|
+
|
18
|
+
See coil.txt for the text of the COIL and dpl.txt for the text of the DPL.
|
data/README.md
ADDED
@@ -0,0 +1,167 @@
|
|
1
|
+
# redrug
|
2
|
+
|
3
|
+
The redcarpet library can be a bit cumbersome to use, and redrug aims to
|
4
|
+
rectify this problem by wrapping it with simpler interfaces for common use
|
5
|
+
cases. Three places to get information about RedRug include:
|
6
|
+
|
7
|
+
* [Fossil Repository](https://fossrec.com/u/apotheon/redrug)
|
8
|
+
* [GitHub Mirror](https://github.com/apotheon/redrug)
|
9
|
+
* [Ruby Gem Page](https://rubygems.org/gems/redrug)
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
The simple way to install redrug is to use the gem command:
|
14
|
+
|
15
|
+
$ gem install redrug
|
16
|
+
|
17
|
+
You can also build from source and install it the "hard" way. To do this,
|
18
|
+
first clone the sources to your local system using Fossil SCM:
|
19
|
+
|
20
|
+
$ fossil clone http://redrug.fossrec.com redrug.fossil
|
21
|
+
|
22
|
+
Then, open the repository in an appropriate directory:
|
23
|
+
|
24
|
+
$ mkdir redrug
|
25
|
+
$ cd redrug
|
26
|
+
$ fossil open ../redrug.fossil
|
27
|
+
|
28
|
+
Finally, build and install, where in this example the N.N.N sequence is a
|
29
|
+
series of numbers indicating the current version number of the gem.
|
30
|
+
|
31
|
+
$ gem build red_rug.gemspec
|
32
|
+
$ gem install redrug-N.N.N.gem
|
33
|
+
|
34
|
+
## Rails Usage
|
35
|
+
|
36
|
+
The most convenient use of RedRug with Rails is probably as an application
|
37
|
+
helper. The following example assumes that approach.
|
38
|
+
|
39
|
+
First, stick it in your Gemfile:
|
40
|
+
|
41
|
+
gem 'redrug'
|
42
|
+
|
43
|
+
Next, make sure you install it:
|
44
|
+
|
45
|
+
$ bundle install
|
46
|
+
|
47
|
+
Finally (and this is the "hard" part, of course), set up a helper in your
|
48
|
+
project's `app/helpers/application_helper.rb` (though if you are only going to
|
49
|
+
use it in very limited contexts, you may want to stick it in some other helper
|
50
|
+
within `app/helpers/`):
|
51
|
+
|
52
|
+
# whatever other requires you need
|
53
|
+
require 'red_rug'
|
54
|
+
|
55
|
+
module ApplicationHelper
|
56
|
+
# whatever other helper methods you've defined
|
57
|
+
|
58
|
+
def markdown text
|
59
|
+
RedRug.to_html(text).html_safe
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
You can then use it wherever you need to parse Markdown by executing the
|
64
|
+
`markdown` method, most likely in views. For instance, there's always this
|
65
|
+
common pattern, in (for instance) your `app/views/profiles/show.html.erb` view:
|
66
|
+
|
67
|
+
<h2><%= @article.title %></h2>
|
68
|
+
|
69
|
+
<%= markdown @article.body %>
|
70
|
+
|
71
|
+
Voila: Markdown enhanced blogging.
|
72
|
+
|
73
|
+
### HTML Safety
|
74
|
+
|
75
|
+
Alas, the simplistic approach above may expose you to the dangers of unescaped
|
76
|
+
HTML input from users. The following rewrite of the `markdown` helper method
|
77
|
+
as two methods provides both a way to escape any HTML in the input Markdown
|
78
|
+
text and a way to leave HTML unescaped when you trust the source of the
|
79
|
+
Markdown text and want to allow HTML to pass through unmolested:
|
80
|
+
|
81
|
+
module ApplicationHelper
|
82
|
+
# whatever other helper methods you've defined
|
83
|
+
|
84
|
+
# use this for input you do not trust
|
85
|
+
def markdown text
|
86
|
+
RedRug.to_html(h text).html_safe
|
87
|
+
end
|
88
|
+
|
89
|
+
# use this for input you trust, if you really really must
|
90
|
+
def septic_markdown text
|
91
|
+
RedRug.to_html(text).html_safe
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
Since RedRug version 0.3.0, you have another alternative that relies on
|
96
|
+
Redcarpet's own HTML escaping capabilities. If you wish to use that instead of
|
97
|
+
the Rails `h` helper, you can do this with the HTML-escaped version of your
|
98
|
+
RedRug-based Markdown helper:
|
99
|
+
|
100
|
+
module ApplicationHelper
|
101
|
+
# . . .
|
102
|
+
|
103
|
+
def markdown text
|
104
|
+
RedRug.to_html(text, escape_html: true).html_safe
|
105
|
+
end
|
106
|
+
|
107
|
+
# . . .
|
108
|
+
end
|
109
|
+
|
110
|
+
## Library Usage
|
111
|
+
|
112
|
+
At this time, the RedRug module provides a very simple API for translating
|
113
|
+
Markdown into HTML. The basic use case examples are as follows:
|
114
|
+
|
115
|
+
require 'red_rug'
|
116
|
+
|
117
|
+
RedRug.from_file '/path/to/filename.md'
|
118
|
+
|
119
|
+
RedRug.to_html <<END
|
120
|
+
# This Is A Markdown Heading
|
121
|
+
|
122
|
+
This is how paragraphs look in Markdown.
|
123
|
+
END
|
124
|
+
|
125
|
+
## Command Line Usage
|
126
|
+
|
127
|
+
The redrug gem provides a `redrug` command line utility that takes a Markdown
|
128
|
+
formatted file as input and translates it into HTML, dumping the results to
|
129
|
+
standard output. The usual approach would be to use a redirect to send the
|
130
|
+
output to a persistent file instead:
|
131
|
+
|
132
|
+
$ redrug filename.md > filename.html
|
133
|
+
|
134
|
+
This translates the contents of a Markdown formatted file, `filename.md`, into
|
135
|
+
HTML, then writes that HTML into a file called `filename.html`.
|
136
|
+
|
137
|
+
It can also accept Markdown from standard input, so commands such as the
|
138
|
+
following examples should also work:
|
139
|
+
|
140
|
+
$ cat file1.md file2.md file3.md | redrug > filename.html
|
141
|
+
$ redrug < filename.md > filename.html
|
142
|
+
|
143
|
+
The usual Unix pipeline rules apply.
|
144
|
+
|
145
|
+
As of RedRug version 0.3.0, the `redrug` utility also accepts a command line
|
146
|
+
option for escaping HTML before parsing Markdown:
|
147
|
+
|
148
|
+
$ redrug -e filename.md
|
149
|
+
|
150
|
+
Simply put, `-e` employs Redcarpet's `:html_escape` parsing option to escape
|
151
|
+
HTML before parsing any Markdown. Otherwise, the behavior of the `redrug`
|
152
|
+
utility has not changed.
|
153
|
+
|
154
|
+
## Bugs And Feature Requests
|
155
|
+
|
156
|
+
To file a bug report, feature request, or other issue, please log in as
|
157
|
+
"anonymous" using the temporary password provided on the login page, then click
|
158
|
+
the Tickets link and select New Ticket. Select the appropriate issue type
|
159
|
+
before submitting.
|
160
|
+
|
161
|
+
## Other
|
162
|
+
|
163
|
+
For more information, see either the [redrug project page][redrug] or the
|
164
|
+
[redrug Rubygems page][rubygem].
|
165
|
+
|
166
|
+
[redrug]: http://fossrec.com/u/apotheon/redrug
|
167
|
+
[rubygem]: http://rubygems.org/gems/redrug
|
data/bin/redrug
CHANGED
@@ -3,29 +3,36 @@ require 'optparse'
|
|
3
3
|
require 'red_rug'
|
4
4
|
|
5
5
|
help_text = {
|
6
|
-
:
|
7
|
-
:
|
6
|
+
escape: 'Escape all embedded HTML before parsing markdown.',
|
7
|
+
help: 'Display this help text.',
|
8
|
+
version: 'Display version and license information.'
|
8
9
|
}
|
9
10
|
|
10
|
-
@usage =
|
11
|
+
@usage = <<-EOF
|
11
12
|
|
12
|
-
USAGE: #{File.basename $0} [options] FILE
|
13
|
+
USAGE: #{File.basename $0} [options] FILE
|
13
14
|
|
14
|
-
This utility reads the contents of a Markdown formatted FILE, translates them
|
15
|
-
to HTML, and prints the translated text to standard output.
|
15
|
+
This utility reads the contents of a Markdown formatted FILE, translates them
|
16
|
+
to HTML, and prints the translated text to standard output.
|
16
17
|
|
17
18
|
EOF
|
18
19
|
|
19
|
-
version_help =
|
20
|
+
version_help = <<-EOF
|
20
21
|
|
21
|
-
RedRug #{RedRug.version}, Copyright 2012 Chad Perrin
|
22
|
-
|
22
|
+
RedRug #{RedRug.version}, Copyright 2012 Chad Perrin
|
23
|
+
It may be distributed under the terms of the Open Works License.
|
23
24
|
|
24
25
|
EOF
|
25
26
|
|
27
|
+
options = Hash.new
|
28
|
+
|
26
29
|
OptionParser.new do |opts|
|
27
30
|
opts.banner = @usage
|
28
31
|
|
32
|
+
opts.on('--escape', '-e', help_text[:escape]) do
|
33
|
+
options[:escape_html] = true
|
34
|
+
end
|
35
|
+
|
29
36
|
opts.on('--help', '-h', help_text[:help]) do
|
30
37
|
puts opts
|
31
38
|
puts
|
@@ -38,8 +45,8 @@ OptionParser.new do |opts|
|
|
38
45
|
end
|
39
46
|
end.parse!
|
40
47
|
|
41
|
-
|
48
|
+
content = String.new
|
42
49
|
|
43
|
-
$<.each {|line|
|
50
|
+
$<.each {|line| content << line }
|
44
51
|
|
45
|
-
puts RedRug.to_html
|
52
|
+
puts RedRug.to_html content, options
|
data/coil.txt
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# Copyfree Open Innovation License
|
2
|
+
|
3
|
+
This is version 0.6 of the Copyfree Open Innovation License.
|
4
|
+
|
5
|
+
## Terms and Conditions
|
6
|
+
|
7
|
+
Redistributions, modified or unmodified, in whole or in part, must retain
|
8
|
+
applicable notices of copyright or other legal privilege, these conditions, and
|
9
|
+
the following license terms and disclaimer. Subject to these conditions, each
|
10
|
+
holder of copyright or other legal privileges, author or assembler, and
|
11
|
+
contributor of this work, henceforth "licensor", hereby grants to any person
|
12
|
+
who obtains a copy of this work in any form:
|
13
|
+
|
14
|
+
1. Permission to reproduce, modify, distribute, publish, sell, sublicense, use,
|
15
|
+
and/or otherwise deal in the licensed material without restriction.
|
16
|
+
|
17
|
+
2. A perpetual, worldwide, non-exclusive, royalty-free, gratis, irrevocable
|
18
|
+
patent license to make, have made, provide, transfer, import, use, and/or
|
19
|
+
otherwise deal in the licensed material without restriction, for any and all
|
20
|
+
patents held by such licensor and necessarily infringed by the form of the work
|
21
|
+
upon distribution of that licensor's contribution to the work under the terms
|
22
|
+
of this license.
|
23
|
+
|
24
|
+
NO WARRANTY OF ANY KIND IS IMPLIED BY, OR SHOULD BE INFERRED FROM, THIS LICENSE
|
25
|
+
OR THE ACT OF DISTRIBUTION UNDER THE TERMS OF THIS LICENSE, INCLUDING BUT NOT
|
26
|
+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
|
27
|
+
AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, ASSEMBLERS, OR HOLDERS OF
|
28
|
+
COPYRIGHT OR OTHER LEGAL PRIVILEGE BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
|
29
|
+
LIABILITY, WHETHER IN ACTION OF CONTRACT, TORT, OR OTHERWISE ARISING FROM, OUT
|
30
|
+
OF, OR IN CONNECTION WITH THE WORK OR THE USE OF OR OTHER DEALINGS IN THE WORK.
|
data/dpl.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Permission is hereby granted by the holder(s) of copyright or other legal
|
2
|
+
privileges, author(s) or assembler(s), and contributor(s) of this work, to any
|
3
|
+
person who obtains a copy of this work in any form, to reproduce, modify,
|
4
|
+
distribute, publish, sell, sublicense, use, and/or otherwise deal in the
|
5
|
+
licensed material without restriction, provided the following conditions are
|
6
|
+
met.
|
7
|
+
|
8
|
+
Redistributions, modified or unmodified, in whole or in part, must make
|
9
|
+
applicable copyright and other legal privilege notices, the above license
|
10
|
+
notice, these conditions, and the following disclaimer, freely available to
|
11
|
+
recipients on distribution through one of the following means, in descending
|
12
|
+
order of preferability: incorporated into the work, provided with the work,
|
13
|
+
presented via the medium or method of distribution for the work, or upon
|
14
|
+
request by recipients of the work while the work is offered for distribution.
|
15
|
+
|
16
|
+
NO WARRANTY OF ANY KIND IS IMPLIED BY, OR SHOULD BE INFERRED FROM, THIS LICENSE
|
17
|
+
OR THE ACT OF DISTRIBUTION UNDER THE TERMS OF THIS LICENSE, INCLUDING BUT NOT
|
18
|
+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
|
19
|
+
AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, ASSEMBLERS, OR HOLDERS OF
|
20
|
+
COPYRIGHT OR OTHER LEGAL PRIVILEGE BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
|
21
|
+
LIABILITY, WHETHER IN ACTION OF CONTRACT, TORT, OR OTHERWISE ARISING FROM, OUT
|
22
|
+
OF, OR IN CONNECTION WITH THE WORK OR THE USE OF OR OTHER DEALINGS IN THE WORK.
|
data/lib/red_rug.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'redcarpet'
|
2
|
+
require 'versionize'
|
2
3
|
|
3
4
|
=begin rdoc
|
4
5
|
|
@@ -6,17 +7,19 @@ RedRug provides a simplified interface to the functionality of the Redcarpet
|
|
6
7
|
gem for Markdown handling, intended to provide convenience in execution of
|
7
8
|
common tasks. At present, only HTML output is supported.
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
module RedRug
|
12
|
-
|
13
|
-
=begin rdoc
|
10
|
+
To begin using RedRug in your code, require it. Example:
|
14
11
|
|
15
|
-
|
12
|
+
require 'red_rug'
|
16
13
|
|
17
14
|
=end
|
18
15
|
|
19
|
-
|
16
|
+
module RedRug
|
17
|
+
include Versionize
|
18
|
+
@version = {
|
19
|
+
:major => 0,
|
20
|
+
:minor => 3,
|
21
|
+
:revision => 2
|
22
|
+
}
|
20
23
|
|
21
24
|
=begin rdoc
|
22
25
|
|
@@ -32,8 +35,12 @@ Example:
|
|
32
35
|
|
33
36
|
=end
|
34
37
|
|
35
|
-
def self.to_html(markdown_string)
|
36
|
-
|
38
|
+
def self.to_html(markdown_string, options=Hash.new)
|
39
|
+
unless options.has_key? :escape_html
|
40
|
+
options[:escape_html] = false
|
41
|
+
end
|
42
|
+
|
43
|
+
markdown = Redcarpet::Markdown.new Redcarpet::Render::HTML.new(options)
|
37
44
|
markdown.render(markdown_string)
|
38
45
|
end
|
39
46
|
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
load '../lib/red_rug.rb'
|
3
|
+
|
4
|
+
RSpec.describe RedRug do
|
5
|
+
describe 'to_html' do
|
6
|
+
it 'returns HTML equivalent of Markdown input' do
|
7
|
+
markdown_input = <<-END.gsub(/^ */, '')
|
8
|
+
# Heading Level One
|
9
|
+
|
10
|
+
This is a very short paragraph indeed.
|
11
|
+
|
12
|
+
## Heading Level Two
|
13
|
+
|
14
|
+
Luckily, we have another paragraph, consisting of more than one line.
|
15
|
+
It also consists of more than one sentence, though of course RedRug is
|
16
|
+
not currently sentence-aware, so far as its developers are aware.
|
17
|
+
END
|
18
|
+
|
19
|
+
html_output = <<-END.gsub(/^ */, '')
|
20
|
+
<h1>Heading Level One</h1>
|
21
|
+
|
22
|
+
<p>This is a very short paragraph indeed.</p>
|
23
|
+
|
24
|
+
<h2>Heading Level Two</h2>
|
25
|
+
|
26
|
+
<p>Luckily, we have another paragraph, consisting of more than one line.
|
27
|
+
It also consists of more than one sentence, though of course RedRug is
|
28
|
+
not currently sentence-aware, so far as its developers are aware.</p>
|
29
|
+
END
|
30
|
+
|
31
|
+
expect(RedRug.to_html markdown_input).to eq html_output
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
4
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
5
|
+
# files.
|
6
|
+
#
|
7
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
8
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
9
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
10
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
11
|
+
# a separate helper file that requires the additional dependencies and performs
|
12
|
+
# the additional setup, and require it from the spec files that actually need
|
13
|
+
# it.
|
14
|
+
#
|
15
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
16
|
+
# users commonly want.
|
17
|
+
#
|
18
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
19
|
+
RSpec.configure do |config|
|
20
|
+
# rspec-expectations config goes here. You can use an alternate
|
21
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
22
|
+
# assertions if you prefer.
|
23
|
+
config.expect_with :rspec do |expectations|
|
24
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
25
|
+
# and `failure_message` of custom matchers include text for helper methods
|
26
|
+
# defined using `chain`, e.g.:
|
27
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
28
|
+
# # => "be bigger than 2 and smaller than 4"
|
29
|
+
# ...rather than:
|
30
|
+
# # => "be bigger than 2"
|
31
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
32
|
+
end
|
33
|
+
|
34
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
35
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
36
|
+
config.mock_with :rspec do |mocks|
|
37
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
38
|
+
# a real object. This is generally recommended, and will default to
|
39
|
+
# `true` in RSpec 4.
|
40
|
+
mocks.verify_partial_doubles = true
|
41
|
+
end
|
42
|
+
|
43
|
+
# The settings below are suggested to provide a good initial experience
|
44
|
+
# with RSpec, but feel free to customize to your heart's content.
|
45
|
+
=begin
|
46
|
+
# These two settings work together to allow you to limit a spec run
|
47
|
+
# to individual examples or groups you care about by tagging them with
|
48
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
49
|
+
# get run.
|
50
|
+
config.filter_run :focus
|
51
|
+
config.run_all_when_everything_filtered = true
|
52
|
+
|
53
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
54
|
+
# recommended. For more details, see:
|
55
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
56
|
+
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
57
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
58
|
+
config.disable_monkey_patching!
|
59
|
+
|
60
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
61
|
+
# be too noisy due to issues in dependencies.
|
62
|
+
config.warnings = true
|
63
|
+
|
64
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
65
|
+
# file, and it's useful to allow more verbose output when running an
|
66
|
+
# individual spec file.
|
67
|
+
if config.files_to_run.one?
|
68
|
+
# Use the documentation formatter for detailed output,
|
69
|
+
# unless a formatter has already been configured
|
70
|
+
# (e.g. via a command-line flag).
|
71
|
+
config.default_formatter = 'doc'
|
72
|
+
end
|
73
|
+
|
74
|
+
# Print the 10 slowest examples and example groups at the
|
75
|
+
# end of the spec run, to help surface which specs are running
|
76
|
+
# particularly slow.
|
77
|
+
config.profile_examples = 10
|
78
|
+
|
79
|
+
# Run specs in random order to surface order dependencies. If you find an
|
80
|
+
# order dependency and want to debug it, you can fix the order by providing
|
81
|
+
# the seed, which is printed after each run.
|
82
|
+
# --seed 1234
|
83
|
+
config.order = :random
|
84
|
+
|
85
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
86
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
87
|
+
# test failures related to randomization by passing the same `--seed` value
|
88
|
+
# as the one that triggered the failure.
|
89
|
+
Kernel.srand config.seed
|
90
|
+
=end
|
91
|
+
end
|
metadata
CHANGED
@@ -1,29 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redrug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Chad Perrin
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2021-08-05 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: redcarpet
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
|
26
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: versionize
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: |2
|
42
|
+
RedRug is a wrapper for Redcarpet, intended to provide more convenient
|
43
|
+
interfaces for common Markdown parsing use cases.
|
27
44
|
email: code@apotheon.net
|
28
45
|
executables:
|
29
46
|
- redrug
|
@@ -31,37 +48,39 @@ extensions: []
|
|
31
48
|
extra_rdoc_files: []
|
32
49
|
files:
|
33
50
|
- COPYING
|
34
|
-
- README
|
35
|
-
- owl.txt
|
36
|
-
- lib/red_rug.rb
|
51
|
+
- README.md
|
37
52
|
- bin/redrug
|
38
|
-
|
53
|
+
- coil.txt
|
54
|
+
- dpl.txt
|
55
|
+
- lib/red_rug.rb
|
56
|
+
- spec/red_rug_spec.rb
|
57
|
+
- spec/spec_helper.rb
|
58
|
+
homepage: http://fossrec.com/u/apotheon/redrug
|
39
59
|
licenses:
|
40
|
-
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
60
|
+
- COIL
|
61
|
+
- DPL
|
62
|
+
metadata: {}
|
63
|
+
post_install_message: |2
|
64
|
+
Thank you for using RedRug. Require "red_rug" to load this library.
|
65
|
+
The "redrug" command line utility takes a filename argument and outputs
|
66
|
+
the contents of the file translated from Markdown to HTML. Usage and
|
67
|
+
option help for it can be had via the "-h" option.
|
45
68
|
rdoc_options: []
|
46
69
|
require_paths:
|
47
70
|
- lib
|
48
71
|
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
72
|
requirements:
|
51
|
-
- -
|
73
|
+
- - ">="
|
52
74
|
- !ruby/object:Gem::Version
|
53
75
|
version: 1.9.2
|
54
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
|
-
none: false
|
56
77
|
requirements:
|
57
|
-
- -
|
78
|
+
- - ">="
|
58
79
|
- !ruby/object:Gem::Version
|
59
80
|
version: '0'
|
60
81
|
requirements: []
|
61
|
-
|
62
|
-
rubygems_version: 1.8.15
|
82
|
+
rubygems_version: 3.1.4
|
63
83
|
signing_key:
|
64
|
-
specification_version:
|
84
|
+
specification_version: 4
|
65
85
|
summary: RedRug - Simple Markdown Interface
|
66
86
|
test_files: []
|
67
|
-
has_rdoc: true
|
data/README
DELETED
data/owl.txt
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# Open Works License
|
2
|
-
|
3
|
-
This is version 0.9.2 of the Open Works License.
|
4
|
-
|
5
|
-
## Terms
|
6
|
-
|
7
|
-
Permission is hereby granted by the copyright holder(s), author(s), and
|
8
|
-
contributor(s) of this work, to any person who obtains a copy of this work in
|
9
|
-
any form, to reproduce, modify, distribute, publish, sell, use, or otherwise
|
10
|
-
deal in the licensed material without restriction, provided the following
|
11
|
-
conditions are met:
|
12
|
-
|
13
|
-
Redistributions, modified or unmodified, in whole or in part, must retain
|
14
|
-
applicable copyright notices, the above license notice, these conditions, and
|
15
|
-
the following disclaimer.
|
16
|
-
|
17
|
-
NO WARRANTY OF ANY KIND IS IMPLIED BY, OR SHOULD BE INFERRED FROM, THIS LICENSE
|
18
|
-
OR THE ACT OF DISTRIBUTION UNDER THE TERMS OF THIS LICENSE, INCLUDING BUT NOT
|
19
|
-
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
|
20
|
-
AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
21
|
-
LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
22
|
-
CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE
|
23
|
-
WORK, OR THE USE OF OR OTHER DEALINGS IN THE WORK.
|