dionysus 0.3.2 → 0.4.0
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/.gitignore +4 -4
- data/Gemfile +4 -0
- data/Gemfile.lock +26 -9
- data/Rakefile +45 -3
- data/VERSION +1 -1
- data/dionysus.gemspec +10 -2
- data/lib/dionysus/rdoc/markdown.rb +64 -0
- data/lib/dionysus/rdoc/no_markup.rb +56 -0
- metadata +41 -11
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
source :gemcutter
|
2
|
+
|
1
3
|
gem 'bundler', '~> 0.9.21'
|
2
4
|
gem 'activesupport', '~> 3.0.0.beta'
|
3
5
|
|
@@ -6,4 +8,6 @@ group :development do
|
|
6
8
|
gem 'jeweler', '~> 1.4.0'
|
7
9
|
gem 'rake', '~> 0.8.7'
|
8
10
|
gem 'rcov', '~> 0.8.1'
|
11
|
+
gem 'sdoc', '~> 0.2.17'
|
12
|
+
gem 'rdiscount', '~> 1.6.0'
|
9
13
|
end
|
data/Gemfile.lock
CHANGED
@@ -8,6 +8,10 @@ dependencies:
|
|
8
8
|
group:
|
9
9
|
- :development
|
10
10
|
version: ~> 1.3.0
|
11
|
+
sdoc:
|
12
|
+
group:
|
13
|
+
- :development
|
14
|
+
version: ~> 0.2.17
|
11
15
|
rcov:
|
12
16
|
group:
|
13
17
|
- :development
|
@@ -20,6 +24,10 @@ dependencies:
|
|
20
24
|
group:
|
21
25
|
- :default
|
22
26
|
version: ~> 0.9.21
|
27
|
+
rdiscount:
|
28
|
+
group:
|
29
|
+
- :development
|
30
|
+
version: ~> 1.6.0
|
23
31
|
activesupport:
|
24
32
|
group:
|
25
33
|
- :default
|
@@ -30,29 +38,38 @@ specs:
|
|
30
38
|
- builder:
|
31
39
|
version: 2.1.2
|
32
40
|
- i18n:
|
33
|
-
version: 0.3.
|
41
|
+
version: 0.3.7
|
34
42
|
- memcache-client:
|
35
|
-
version: 1.
|
43
|
+
version: 1.8.2
|
36
44
|
- tzinfo:
|
37
|
-
version: 0.3.
|
45
|
+
version: 0.3.20
|
38
46
|
- activesupport:
|
39
47
|
version: 3.0.0.beta3
|
40
48
|
- bundler:
|
41
|
-
version: 0.9.
|
49
|
+
version: 0.9.24
|
42
50
|
- json_pure:
|
43
|
-
version: 1.1
|
51
|
+
version: 1.4.1
|
44
52
|
- gemcutter:
|
45
53
|
version: 0.5.0
|
46
54
|
- git:
|
47
55
|
version: 1.2.5
|
48
56
|
- rubyforge:
|
49
|
-
version: 2.0.
|
57
|
+
version: 2.0.4
|
50
58
|
- jeweler:
|
51
59
|
version: 1.4.0
|
60
|
+
- json:
|
61
|
+
version: 1.4.1
|
52
62
|
- rcov:
|
53
63
|
version: 0.8.1.2.0
|
64
|
+
- rdiscount:
|
65
|
+
version: 1.6.3.1
|
66
|
+
- rdoc:
|
67
|
+
version: 2.5.6
|
54
68
|
- rspec:
|
55
69
|
version: 1.3.0
|
56
|
-
|
57
|
-
|
58
|
-
|
70
|
+
- sdoc:
|
71
|
+
version: 0.2.17
|
72
|
+
hash: 7067b85b35efe373501ac3b1b893d54629bdd613
|
73
|
+
sources:
|
74
|
+
- Rubygems:
|
75
|
+
uri: http://gemcutter.org
|
data/Rakefile
CHANGED
@@ -9,6 +9,8 @@ rescue Bundler::BundlerError => e
|
|
9
9
|
end
|
10
10
|
require 'rake'
|
11
11
|
|
12
|
+
$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
13
|
+
|
12
14
|
require 'jeweler'
|
13
15
|
Jeweler::Tasks.new do |gem|
|
14
16
|
gem.name = "dionysus"
|
@@ -39,13 +41,53 @@ task :spec => :check_dependencies
|
|
39
41
|
task :default => :spec
|
40
42
|
|
41
43
|
require 'rake/rdoctask'
|
44
|
+
require 'sdoc'
|
45
|
+
require 'dionysus/rdoc/markdown'
|
46
|
+
require 'dionysus/rdoc/no_markup'
|
47
|
+
RDoc::NoMarkup.files.include('LICENSE', 'VERSION')
|
48
|
+
|
42
49
|
Rake::RDocTask.new do |rdoc|
|
43
50
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
44
|
-
|
45
|
-
rdoc.
|
51
|
+
rdoc.options << '--fmt' << 'shtml'
|
52
|
+
rdoc.template = 'direct'
|
46
53
|
rdoc.title = "Dionysus #{version}"
|
47
|
-
rdoc.
|
54
|
+
rdoc.main = "README.md"
|
55
|
+
rdoc.rdoc_files.include('README.md', 'LICENSE', 'VERSION')
|
48
56
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
57
|
+
rdoc.rdoc_dir = 'docs'
|
49
58
|
end
|
50
59
|
|
51
60
|
task :clobber => [:clobber_rcov, :clobber_rdoc]
|
61
|
+
|
62
|
+
# Github pages tasks taken from the sdoc-helpers gem.
|
63
|
+
# http://github.com/defunkt/sdoc-helpers
|
64
|
+
# Author: Chris Wanstrath chris@ozmm.org
|
65
|
+
namespace :pages do
|
66
|
+
task :publish => [ :check_dirty, :rerdoc ] do
|
67
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
68
|
+
`git checkout gh-pages`
|
69
|
+
`ls -1 | grep -v docs | xargs rm -rf; mv docs/* .; rm -rf docs`
|
70
|
+
`git add .; git commit -m "update docs for version #{version}"; git push origin gh-pages`
|
71
|
+
`git checkout master`
|
72
|
+
puts :done
|
73
|
+
end
|
74
|
+
|
75
|
+
desc "Initialize GitHub Pages with documentation"
|
76
|
+
task :init => [ :check_dirty, :rerdoc ] do
|
77
|
+
`git symbolic-ref HEAD refs/heads/gh-pages`
|
78
|
+
`rm .git/index`
|
79
|
+
`ls -1 | grep -v docs | xargs rm -rf; mv docs/* .; rm -rf docs`
|
80
|
+
`git add .;git commit -m "create docs"; git push origin gh-pages`
|
81
|
+
`git checkout master`
|
82
|
+
puts :done
|
83
|
+
end
|
84
|
+
|
85
|
+
task :check_dirty do
|
86
|
+
if !`git status`.include?('nothing to commit')
|
87
|
+
abort "dirty index - not publishing!"
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
desc "Build and publish documentation using GitHub Pages."
|
93
|
+
task :pages => "pages:publish"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/dionysus.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{dionysus}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.4.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Travis D. Warlick, Jr."]
|
12
|
-
s.date = %q{2010-04-
|
12
|
+
s.date = %q{2010-04-26}
|
13
13
|
s.email = %q{warlickt@operissystems.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE",
|
@@ -28,6 +28,8 @@ Gem::Specification.new do |s|
|
|
28
28
|
"lib/dionysus.rb",
|
29
29
|
"lib/dionysus/configuration.rb",
|
30
30
|
"lib/dionysus/digest.rb",
|
31
|
+
"lib/dionysus/rdoc/markdown.rb",
|
32
|
+
"lib/dionysus/rdoc/no_markup.rb",
|
31
33
|
"lib/dionysus/security.rb",
|
32
34
|
"lib/dionysus/security/password_salt.rb",
|
33
35
|
"lib/dionysus/security/string.rb",
|
@@ -63,24 +65,30 @@ Gem::Specification.new do |s|
|
|
63
65
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
64
66
|
s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
|
65
67
|
s.add_development_dependency(%q<rspec>, ["~> 1.3.0"])
|
68
|
+
s.add_development_dependency(%q<sdoc>, ["~> 0.2.17"])
|
66
69
|
s.add_development_dependency(%q<rcov>, ["~> 0.8.1"])
|
67
70
|
s.add_runtime_dependency(%q<bundler>, ["~> 0.9.21"])
|
68
71
|
s.add_development_dependency(%q<jeweler>, ["~> 1.4.0"])
|
72
|
+
s.add_development_dependency(%q<rdiscount>, ["~> 1.6.0"])
|
69
73
|
s.add_runtime_dependency(%q<activesupport>, ["~> 3.0.0.beta"])
|
70
74
|
else
|
71
75
|
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
72
76
|
s.add_dependency(%q<rspec>, ["~> 1.3.0"])
|
77
|
+
s.add_dependency(%q<sdoc>, ["~> 0.2.17"])
|
73
78
|
s.add_dependency(%q<rcov>, ["~> 0.8.1"])
|
74
79
|
s.add_dependency(%q<bundler>, ["~> 0.9.21"])
|
75
80
|
s.add_dependency(%q<jeweler>, ["~> 1.4.0"])
|
81
|
+
s.add_dependency(%q<rdiscount>, ["~> 1.6.0"])
|
76
82
|
s.add_dependency(%q<activesupport>, ["~> 3.0.0.beta"])
|
77
83
|
end
|
78
84
|
else
|
79
85
|
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
80
86
|
s.add_dependency(%q<rspec>, ["~> 1.3.0"])
|
87
|
+
s.add_dependency(%q<sdoc>, ["~> 0.2.17"])
|
81
88
|
s.add_dependency(%q<rcov>, ["~> 0.8.1"])
|
82
89
|
s.add_dependency(%q<bundler>, ["~> 0.9.21"])
|
83
90
|
s.add_dependency(%q<jeweler>, ["~> 1.4.0"])
|
91
|
+
s.add_dependency(%q<rdiscount>, ["~> 1.6.0"])
|
84
92
|
s.add_dependency(%q<activesupport>, ["~> 3.0.0.beta"])
|
85
93
|
end
|
86
94
|
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'active_support/concern'
|
2
|
+
begin
|
3
|
+
Markdown
|
4
|
+
rescue NameError
|
5
|
+
require 'rdiscount'
|
6
|
+
end
|
7
|
+
|
8
|
+
module RDoc # :nodoc:
|
9
|
+
##
|
10
|
+
# Extend RDoc to support Markdown files. It will automatically use Markdown
|
11
|
+
# for any files with the `.md` or `.markdown` extension. You may also specify
|
12
|
+
# files with `RDoc::Markdown.files`
|
13
|
+
#
|
14
|
+
# After RDoc is loaded:
|
15
|
+
#
|
16
|
+
# require 'dionysus/rdoc/markdown'
|
17
|
+
# RDoc::Markdown.files.include('README')
|
18
|
+
module Markdown
|
19
|
+
FILE_NAMES = Rake::FileList.new
|
20
|
+
|
21
|
+
def self.files() FILE_NAMES; end
|
22
|
+
|
23
|
+
def self.markdown_for_file?(file_name)
|
24
|
+
%w(.md .markdown).include?(File.extname(file_name)) or
|
25
|
+
self.files.resolve.to_a.include?(file_name)
|
26
|
+
end
|
27
|
+
|
28
|
+
module Parser # :nodoc:
|
29
|
+
extend ActiveSupport::Concern
|
30
|
+
|
31
|
+
included do
|
32
|
+
class << self
|
33
|
+
alias_method :can_parse_without_markdown, :can_parse
|
34
|
+
alias_method :can_parse, :can_parse_with_markdown
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
module ClassMethods # :nodoc:
|
39
|
+
def can_parse_with_markdown(file_name)
|
40
|
+
result = can_parse_without_markdown(file_name)
|
41
|
+
if result.nil? and Markdown.markdown_for_file?(file_name)
|
42
|
+
::RDoc::Parser::Simple
|
43
|
+
else
|
44
|
+
result
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
module TopLevel # :nodoc:
|
51
|
+
extend ActiveSupport::Concern
|
52
|
+
|
53
|
+
module InstanceMethods # :nodoc:
|
54
|
+
def description
|
55
|
+
return super unless Markdown.markdown_for_file?(full_name)
|
56
|
+
::Markdown.new(File.read(::RDoc::RDoc.current.generator.basedir + full_name)).to_html
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
RDoc::TopLevel.send(:include, RDoc::Markdown::TopLevel)
|
64
|
+
RDoc::Parser.send(:include, RDoc::Markdown::Parser)
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'active_support/concern'
|
2
|
+
|
3
|
+
module RDoc # :nodoc:
|
4
|
+
##
|
5
|
+
# Extend RDoc to support plaintext files that will be displayed inside a <pre> block.
|
6
|
+
#
|
7
|
+
# After RDoc is loaded:
|
8
|
+
#
|
9
|
+
# require 'dionysus/rdoc/no_markup'
|
10
|
+
# RDoc::NoMarkup.files.include('LICENSE','VERSION')
|
11
|
+
module NoMarkup
|
12
|
+
FILE_NAMES = Rake::FileList.new
|
13
|
+
|
14
|
+
def self.files() FILE_NAMES; end
|
15
|
+
|
16
|
+
def self.no_markup_for_file?(file_name)
|
17
|
+
self.files.resolve.to_a.include?(file_name)
|
18
|
+
end
|
19
|
+
|
20
|
+
module Parser # :nodoc:
|
21
|
+
extend ActiveSupport::Concern
|
22
|
+
|
23
|
+
included do
|
24
|
+
class << self
|
25
|
+
alias_method :can_parse_with_markup, :can_parse
|
26
|
+
alias_method :can_parse, :can_parse_without_markup
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
module ClassMethods # :nodoc:
|
31
|
+
def can_parse_without_markup(file_name)
|
32
|
+
if NoMarkup.no_markup_for_file?(file_name)
|
33
|
+
::RDoc::Parser::Simple
|
34
|
+
else
|
35
|
+
can_parse_with_markup(file_name)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
module TopLevel # :nodoc:
|
42
|
+
extend ActiveSupport::Concern
|
43
|
+
|
44
|
+
module InstanceMethods # :nodoc:
|
45
|
+
def description
|
46
|
+
return super unless NoMarkup.no_markup_for_file?(full_name)
|
47
|
+
txt = File.read(::RDoc::RDoc.current.generator.basedir + full_name)
|
48
|
+
%(<pre>#{txt}</pre>)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
RDoc::TopLevel.send(:include, RDoc::NoMarkup::TopLevel)
|
56
|
+
RDoc::Parser.send(:include, RDoc::NoMarkup::Parser)
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 4
|
8
|
+
- 0
|
9
|
+
version: 0.4.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Travis D. Warlick, Jr.
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-26 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -47,6 +47,20 @@ dependencies:
|
|
47
47
|
version_requirements: *id002
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
requirement: &id003 !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
segments:
|
54
|
+
- 0
|
55
|
+
- 2
|
56
|
+
- 17
|
57
|
+
version: 0.2.17
|
58
|
+
prerelease: false
|
59
|
+
type: :development
|
60
|
+
name: sdoc
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
64
|
requirements:
|
51
65
|
- - ~>
|
52
66
|
- !ruby/object:Gem::Version
|
@@ -58,9 +72,9 @@ dependencies:
|
|
58
72
|
prerelease: false
|
59
73
|
type: :development
|
60
74
|
name: rcov
|
61
|
-
version_requirements: *
|
75
|
+
version_requirements: *id004
|
62
76
|
- !ruby/object:Gem::Dependency
|
63
|
-
requirement: &
|
77
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
64
78
|
requirements:
|
65
79
|
- - ~>
|
66
80
|
- !ruby/object:Gem::Version
|
@@ -72,9 +86,9 @@ dependencies:
|
|
72
86
|
prerelease: false
|
73
87
|
type: :runtime
|
74
88
|
name: bundler
|
75
|
-
version_requirements: *
|
89
|
+
version_requirements: *id005
|
76
90
|
- !ruby/object:Gem::Dependency
|
77
|
-
requirement: &
|
91
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
78
92
|
requirements:
|
79
93
|
- - ~>
|
80
94
|
- !ruby/object:Gem::Version
|
@@ -86,9 +100,23 @@ dependencies:
|
|
86
100
|
prerelease: false
|
87
101
|
type: :development
|
88
102
|
name: jeweler
|
89
|
-
version_requirements: *
|
103
|
+
version_requirements: *id006
|
90
104
|
- !ruby/object:Gem::Dependency
|
91
|
-
requirement: &
|
105
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
segments:
|
110
|
+
- 1
|
111
|
+
- 6
|
112
|
+
- 0
|
113
|
+
version: 1.6.0
|
114
|
+
prerelease: false
|
115
|
+
type: :development
|
116
|
+
name: rdiscount
|
117
|
+
version_requirements: *id007
|
118
|
+
- !ruby/object:Gem::Dependency
|
119
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
92
120
|
requirements:
|
93
121
|
- - ~>
|
94
122
|
- !ruby/object:Gem::Version
|
@@ -101,7 +129,7 @@ dependencies:
|
|
101
129
|
prerelease: false
|
102
130
|
type: :runtime
|
103
131
|
name: activesupport
|
104
|
-
version_requirements: *
|
132
|
+
version_requirements: *id008
|
105
133
|
description:
|
106
134
|
email: warlickt@operissystems.com
|
107
135
|
executables: []
|
@@ -124,6 +152,8 @@ files:
|
|
124
152
|
- lib/dionysus.rb
|
125
153
|
- lib/dionysus/configuration.rb
|
126
154
|
- lib/dionysus/digest.rb
|
155
|
+
- lib/dionysus/rdoc/markdown.rb
|
156
|
+
- lib/dionysus/rdoc/no_markup.rb
|
127
157
|
- lib/dionysus/security.rb
|
128
158
|
- lib/dionysus/security/password_salt.rb
|
129
159
|
- lib/dionysus/security/string.rb
|