lesstile 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
File without changes
data/.gitignore CHANGED
@@ -1,3 +1,3 @@
1
1
  pkg
2
2
  doc
3
- *.gemspec
3
+ *.gem
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gemspec
@@ -0,0 +1,26 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ lesstile (1.0.0)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.1.2)
10
+ rspec (2.0.1)
11
+ rspec-core (~> 2.0.1)
12
+ rspec-expectations (~> 2.0.1)
13
+ rspec-mocks (~> 2.0.1)
14
+ rspec-core (2.0.1)
15
+ rspec-expectations (2.0.1)
16
+ diff-lcs (>= 1.1.2)
17
+ rspec-mocks (2.0.1)
18
+ rspec-core (~> 2.0.1)
19
+ rspec-expectations (~> 2.0.1)
20
+
21
+ PLATFORMS
22
+ ruby
23
+
24
+ DEPENDENCIES
25
+ lesstile!
26
+ rspec (~> 2.0.1)
@@ -15,3 +15,7 @@
15
15
  * Added #format_as_html method
16
16
  * Switch to semantic versioning
17
17
  * Removed dependency on Jeweler
18
+
19
+ == 1.0.1 / 2011-02-04
20
+
21
+ * rubygems-test compat
@@ -0,0 +1,52 @@
1
+ = Lesstile
2
+
3
+ Converts text formatted with an exceedingly simple markup language into valid HTML (iron clad guarantee!) - perfect for comments on your blog. Textile isn't good for this because not only does it do too much (do commenters really need subscript?), but it can also output invalid HTML (try a <b> tag over multiple lines...). Whitelisting HTML is another option, but you still need some sort of parsing if you want syntax highlighting.
4
+
5
+ Integrates with CodeRay for sexy syntax highlighting.
6
+
7
+ == Synopsis
8
+
9
+ comment = <<-EOS
10
+ "Ego Link":http://rhnh.net
11
+ Wow, this post is awesome. I'd implement it like this:
12
+
13
+ --- Ruby
14
+ def hello_world
15
+ puts "hello world!"
16
+ end
17
+ ---
18
+
19
+ --- HTML
20
+ <strong>Look, HTML code</strong>
21
+ ---
22
+
23
+ ---
24
+ just some normal code
25
+ ---
26
+ EOS
27
+
28
+ Lesstile.format_as_html(comment)
29
+ Lesstile.format_as_html(comment, :code_formatter => Lesstile::CodeRayFormatter) # Requires coderay
30
+ Lesstile.format_as_html(comment, :code_formatter => lambda {|code, lang| "Code in #{lang}: #{code}" })
31
+
32
+ # Also XHTML, for the old schoolers
33
+ Lesstile.format_as_xhtml(comment)
34
+
35
+ == Status
36
+
37
+ Lesstile is used by the enki blogging engine, which has many production deployments. The current release is 1.0.0 and considered stable.
38
+
39
+ == Requirements
40
+
41
+ Provides a CodeRay syntax highlighter, but you need to have the gem installed to use it.
42
+
43
+ gem install coderay
44
+
45
+ == Install
46
+
47
+ Pick one:
48
+
49
+ sudo gem install lesstile # gem install
50
+ git clone git://github.com/xaviershay/lesstile.git # go from source
51
+
52
+ Tested on 1.8.7-p302, 1.9.2-p0, jruby 1.5.1, and rbx 1.1
data/Rakefile CHANGED
@@ -1,8 +1,9 @@
1
- require 'spec/rake/spectask'
2
- Spec::Rake::SpecTask.new do |t|
3
- t.warning = false
4
- t.rcov = false
5
- t.spec_files = FileList['spec/spec_*.rb']
1
+ # RSpec provided helper doesn't like me, for now just run it myself
2
+ desc "Run specs"
3
+ task :spec do
4
+ commands = []
5
+ commands << "bundle exec rspec spec/*_spec.rb"
6
+ exec commands.join(" && ")
6
7
  end
7
8
 
8
9
  task :test => :spec
@@ -0,0 +1,51 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{lesstile}
5
+ s.version = "1.0.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Xavier Shay"]
9
+ s.date = %q{2010-09-15}
10
+ s.description = %q{Converts text formatted with an exceedingly simple markup language into valid HTML (iron clad guarantee!) - perfect for comments on your blog. Textile isn't good for this because not only does it do too much (do commenters really need subscript?), but it can also output invalid HTML (try a <b> tag over multiple lines...). Whitelisting HTML is another option, but you still need some sort of parsing if you want syntax highlighting.
11
+
12
+ Integrates with CodeRay for sexy syntax highlighting.
13
+ }
14
+ s.email = %q{contact@rhnh.net}
15
+ s.extra_rdoc_files = [
16
+ "README.rdoc"
17
+ ]
18
+ s.files = [
19
+ "Gemfile",
20
+ "Gemfile.lock",
21
+ "lesstile.gemspec",
22
+ ".gitignore",
23
+ "History.txt",
24
+ "Manifest.txt",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "lib/lesstile.rb",
28
+ "spec/lesstile_spec.rb",
29
+ ".gemtest"
30
+ ]
31
+ s.homepage = %q{http://github.com/xaviershay/lesstile}
32
+ s.rdoc_options = ["--charset=UTF-8"]
33
+ s.require_paths = ["lib"]
34
+ s.rubygems_version = %q{1.3.7}
35
+ s.summary = %q{Format text using an exceedingly simple markup language - perfect for comments on your blog}
36
+ s.test_files = [
37
+ "spec/lesstile_spec.rb"
38
+ ]
39
+ s.add_development_dependency 'rspec', '~> 2.0.1'
40
+
41
+ if s.respond_to? :specification_version then
42
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
43
+ s.specification_version = 3
44
+
45
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
46
+ else
47
+ end
48
+ else
49
+ end
50
+ end
51
+
@@ -1,8 +1,7 @@
1
- require 'rubygems'
2
- require 'spec'
3
- require File.dirname(__FILE__) + '/../lib/lesstile'
1
+ require 'rspec'
2
+ require File.expand_path(File.dirname(__FILE__) + '/../lib/lesstile')
4
3
 
5
- describe 'an html formatter', :shared => true do
4
+ shared_examples_for 'an html formatter' do
6
5
  it "normal text unchanged" do
7
6
  @format["hello"].should == "hello"
8
7
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesstile
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
4
  prerelease: false
6
5
  segments:
7
6
  - 1
8
7
  - 0
9
- - 0
10
- version: 1.0.0
8
+ - 1
9
+ version: 1.0.1
11
10
  platform: ruby
12
11
  authors:
13
12
  - Xavier Shay
@@ -15,10 +14,24 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-09-15 00:00:00 +01:00
17
+ date: 2010-09-15 00:00:00 +10:00
19
18
  default_executable:
20
- dependencies: []
21
-
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rspec
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 2
30
+ - 0
31
+ - 1
32
+ version: 2.0.1
33
+ type: :development
34
+ version_requirements: *id001
22
35
  description: |
23
36
  Converts text formatted with an exceedingly simple markup language into valid HTML (iron clad guarantee!) - perfect for comments on your blog. Textile isn't good for this because not only does it do too much (do commenters really need subscript?), but it can also output invalid HTML (try a <b> tag over multiple lines...). Whitelisting HTML is another option, but you still need some sort of parsing if you want syntax highlighting.
24
37
 
@@ -30,15 +43,19 @@ executables: []
30
43
  extensions: []
31
44
 
32
45
  extra_rdoc_files:
33
- - README.txt
46
+ - README.rdoc
34
47
  files:
48
+ - Gemfile
49
+ - Gemfile.lock
50
+ - lesstile.gemspec
35
51
  - .gitignore
36
52
  - History.txt
37
53
  - Manifest.txt
38
- - README.txt
54
+ - README.rdoc
39
55
  - Rakefile
40
56
  - lib/lesstile.rb
41
- - spec/spec_lesstile.rb
57
+ - spec/lesstile_spec.rb
58
+ - .gemtest
42
59
  has_rdoc: true
43
60
  homepage: http://github.com/xaviershay/lesstile
44
61
  licenses: []
@@ -53,7 +70,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
70
  requirements:
54
71
  - - ">="
55
72
  - !ruby/object:Gem::Version
56
- hash: 3
57
73
  segments:
58
74
  - 0
59
75
  version: "0"
@@ -62,7 +78,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
78
  requirements:
63
79
  - - ">="
64
80
  - !ruby/object:Gem::Version
65
- hash: 3
66
81
  segments:
67
82
  - 0
68
83
  version: "0"
@@ -74,4 +89,4 @@ signing_key:
74
89
  specification_version: 3
75
90
  summary: Format text using an exceedingly simple markup language - perfect for comments on your blog
76
91
  test_files:
77
- - spec/spec_lesstile.rb
92
+ - spec/lesstile_spec.rb
data/README.txt DELETED
@@ -1,72 +0,0 @@
1
- = lesstile
2
- by Xavier Shay (http://rhnh.net)
3
-
4
- == DESCRIPTION:
5
-
6
- Converts text formatted with an exceedingly simple markup language into valid HTML (iron clad guarantee!) - perfect for comments on your blog. Textile isn't good for this because not only does it do too much (do commenters really need subscript?), but it can also output invalid HTML (try a <b> tag over multiple lines...). Whitelisting HTML is another option, but you still need some sort of parsing if you want syntax highlighting.
7
-
8
- Integrates with CodeRay for sexy syntax highlighting.
9
-
10
- == SYNOPSIS:
11
-
12
- comment = <<-EOS
13
- "Ego Link":http://rhnh.net
14
- Wow, this post is awesome. I'd implement it like this:
15
-
16
- --- Ruby
17
- def hello_world
18
- puts "hello world!"
19
- end
20
- ---
21
-
22
- --- HTML
23
- <strong>Look, HTML code</strong>
24
- ---
25
-
26
- ---
27
- just some normal code
28
- ---
29
- EOS
30
-
31
- Lesstile.format_as_html(comment)
32
- Lesstile.format_as_html(comment, :code_formatter => Lesstile::CodeRayFormatter) # Requires code ray
33
- Lesstile.format_as_html(comment, :code_formatter => lambda {|code, lang| "Code in #{lang}: #{code}" })
34
-
35
- # Also XHTML, for the old schoolers
36
- Lesstile.format_as_xhtml(comment)
37
-
38
- == REQUIREMENTS:
39
-
40
- * CodeRay (optional)
41
-
42
- == INSTALL (pick one):
43
-
44
- sudo gem install lesstile # gem install
45
- git clone git://github.com/xaviershay/lesstile.git # go from source
46
-
47
- Tested on ruby 1.8.6-339, 1.8.7-160, 1.9.1-rc2, and 1.9.2-p0
48
-
49
- == LICENSE:
50
-
51
- (The MIT License)
52
-
53
- Copyright (c) 2007 Xavier Shay
54
-
55
- Permission is hereby granted, free of charge, to any person obtaining
56
- a copy of this software and associated documentation files (the
57
- 'Software'), to deal in the Software without restriction, including
58
- without limitation the rights to use, copy, modify, merge, publish,
59
- distribute, sublicense, and/or sell copies of the Software, and to
60
- permit persons to whom the Software is furnished to do so, subject to
61
- the following conditions:
62
-
63
- The above copyright notice and this permission notice shall be
64
- included in all copies or substantial portions of the Software.
65
-
66
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
67
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
68
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
69
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
70
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
71
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
72
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.