RTFMd 0.10301.2 → 0.10301.4
Sign up to get free protection for your applications and to get access to all the features.
- data/RTFMd.gemspec +3 -11
- data/bin/rtfmd +4 -4
- data/config/rtfmd.ru +15 -0
- metadata +5 -107
- data/Rakefile +0 -138
data/RTFMd.gemspec
CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.rubygems_version = '1.3.5'
|
5
5
|
|
6
6
|
s.name = 'RTFMd'
|
7
|
-
s.version = '0.10301.
|
7
|
+
s.version = '0.10301.4'
|
8
8
|
s.date = '2011-12-16'
|
9
9
|
|
10
10
|
s.summary = "A simple, Markdown documentation helper."
|
@@ -31,23 +31,15 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.add_dependency('nokogiri', "~> 1.4")
|
32
32
|
s.add_dependency('redcarpet')
|
33
33
|
|
34
|
-
s.add_development_dependency('RedCloth')
|
35
|
-
s.add_development_dependency('mocha')
|
36
|
-
s.add_development_dependency('org-ruby')
|
37
|
-
s.add_development_dependency('shoulda')
|
38
|
-
s.add_development_dependency('rack-test')
|
39
|
-
s.add_development_dependency('wikicloth', '~> 0.6.3')
|
40
|
-
s.add_development_dependency('rake', '~> 0.9.2')
|
41
|
-
|
42
34
|
s.files = %w[
|
43
35
|
HISTORY.md
|
44
36
|
LICENSE
|
45
37
|
README.md
|
46
|
-
|
38
|
+
RTFMd.gemspec
|
47
39
|
bin/rtfm
|
48
40
|
bin/rtfmd
|
49
41
|
docs/sanitization.md
|
50
|
-
|
42
|
+
config/rtfmd.ru
|
51
43
|
lib/gollum.rb
|
52
44
|
lib/gollum/blob_entry.rb
|
53
45
|
lib/gollum/committer.rb
|
data/bin/rtfmd
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
#!/bin/bash -e
|
2
2
|
|
3
3
|
if [[ -n $1 ]]; then
|
4
|
-
|
4
|
+
RTFMd_WIKI=$1; shift
|
5
5
|
else
|
6
|
-
|
6
|
+
RTFMd_WIKI=$(pwd)
|
7
7
|
fi
|
8
8
|
|
9
|
-
export
|
9
|
+
export RTFMd_WIKI
|
10
10
|
|
11
11
|
bundle check 2>&- || { bundle install --local && bundle check; }
|
12
|
-
exec bundle exec thin start -R config/
|
12
|
+
exec bundle exec thin start -R config/rtfmd.ru
|
data/config/rtfmd.ru
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'sinatra/base'
|
2
|
+
require 'gollum'
|
3
|
+
require 'gollum/frontend/app'
|
4
|
+
|
5
|
+
base_path = "/#{File.basename(Dir.pwd)}"
|
6
|
+
|
7
|
+
Precious::App.set(:gollum_path, ENV['RTFMd_WIKI'])
|
8
|
+
Precious::App.set(:wiki_options, {
|
9
|
+
:base_path => base_path
|
10
|
+
})
|
11
|
+
|
12
|
+
map base_path do
|
13
|
+
run Precious::App
|
14
|
+
end
|
15
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: RTFMd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 41187
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 10301
|
9
|
-
-
|
10
|
-
version: 0.10301.
|
9
|
+
- 4
|
10
|
+
version: 0.10301.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tom Bombadil
|
@@ -175,108 +175,6 @@ dependencies:
|
|
175
175
|
version: "0"
|
176
176
|
type: :runtime
|
177
177
|
version_requirements: *id009
|
178
|
-
- !ruby/object:Gem::Dependency
|
179
|
-
name: RedCloth
|
180
|
-
prerelease: false
|
181
|
-
requirement: &id010 !ruby/object:Gem::Requirement
|
182
|
-
none: false
|
183
|
-
requirements:
|
184
|
-
- - ">="
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
hash: 3
|
187
|
-
segments:
|
188
|
-
- 0
|
189
|
-
version: "0"
|
190
|
-
type: :development
|
191
|
-
version_requirements: *id010
|
192
|
-
- !ruby/object:Gem::Dependency
|
193
|
-
name: mocha
|
194
|
-
prerelease: false
|
195
|
-
requirement: &id011 !ruby/object:Gem::Requirement
|
196
|
-
none: false
|
197
|
-
requirements:
|
198
|
-
- - ">="
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
hash: 3
|
201
|
-
segments:
|
202
|
-
- 0
|
203
|
-
version: "0"
|
204
|
-
type: :development
|
205
|
-
version_requirements: *id011
|
206
|
-
- !ruby/object:Gem::Dependency
|
207
|
-
name: org-ruby
|
208
|
-
prerelease: false
|
209
|
-
requirement: &id012 !ruby/object:Gem::Requirement
|
210
|
-
none: false
|
211
|
-
requirements:
|
212
|
-
- - ">="
|
213
|
-
- !ruby/object:Gem::Version
|
214
|
-
hash: 3
|
215
|
-
segments:
|
216
|
-
- 0
|
217
|
-
version: "0"
|
218
|
-
type: :development
|
219
|
-
version_requirements: *id012
|
220
|
-
- !ruby/object:Gem::Dependency
|
221
|
-
name: shoulda
|
222
|
-
prerelease: false
|
223
|
-
requirement: &id013 !ruby/object:Gem::Requirement
|
224
|
-
none: false
|
225
|
-
requirements:
|
226
|
-
- - ">="
|
227
|
-
- !ruby/object:Gem::Version
|
228
|
-
hash: 3
|
229
|
-
segments:
|
230
|
-
- 0
|
231
|
-
version: "0"
|
232
|
-
type: :development
|
233
|
-
version_requirements: *id013
|
234
|
-
- !ruby/object:Gem::Dependency
|
235
|
-
name: rack-test
|
236
|
-
prerelease: false
|
237
|
-
requirement: &id014 !ruby/object:Gem::Requirement
|
238
|
-
none: false
|
239
|
-
requirements:
|
240
|
-
- - ">="
|
241
|
-
- !ruby/object:Gem::Version
|
242
|
-
hash: 3
|
243
|
-
segments:
|
244
|
-
- 0
|
245
|
-
version: "0"
|
246
|
-
type: :development
|
247
|
-
version_requirements: *id014
|
248
|
-
- !ruby/object:Gem::Dependency
|
249
|
-
name: wikicloth
|
250
|
-
prerelease: false
|
251
|
-
requirement: &id015 !ruby/object:Gem::Requirement
|
252
|
-
none: false
|
253
|
-
requirements:
|
254
|
-
- - ~>
|
255
|
-
- !ruby/object:Gem::Version
|
256
|
-
hash: 1
|
257
|
-
segments:
|
258
|
-
- 0
|
259
|
-
- 6
|
260
|
-
- 3
|
261
|
-
version: 0.6.3
|
262
|
-
type: :development
|
263
|
-
version_requirements: *id015
|
264
|
-
- !ruby/object:Gem::Dependency
|
265
|
-
name: rake
|
266
|
-
prerelease: false
|
267
|
-
requirement: &id016 !ruby/object:Gem::Requirement
|
268
|
-
none: false
|
269
|
-
requirements:
|
270
|
-
- - ~>
|
271
|
-
- !ruby/object:Gem::Version
|
272
|
-
hash: 63
|
273
|
-
segments:
|
274
|
-
- 0
|
275
|
-
- 9
|
276
|
-
- 2
|
277
|
-
version: 0.9.2
|
278
|
-
type: :development
|
279
|
-
version_requirements: *id016
|
280
178
|
description: A simple, Markdown documentation helper with ronn, gollum, and offline-generation support
|
281
179
|
email: amanibhavam@destructuring.org
|
282
180
|
executables: []
|
@@ -290,11 +188,11 @@ files:
|
|
290
188
|
- HISTORY.md
|
291
189
|
- LICENSE
|
292
190
|
- README.md
|
293
|
-
-
|
191
|
+
- RTFMd.gemspec
|
294
192
|
- bin/rtfm
|
295
193
|
- bin/rtfmd
|
296
194
|
- docs/sanitization.md
|
297
|
-
-
|
195
|
+
- config/rtfmd.ru
|
298
196
|
- lib/gollum.rb
|
299
197
|
- lib/gollum/blob_entry.rb
|
300
198
|
- lib/gollum/committer.rb
|
data/Rakefile
DELETED
@@ -1,138 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rake'
|
3
|
-
require 'date'
|
4
|
-
|
5
|
-
#############################################################################
|
6
|
-
#
|
7
|
-
# Helper functions
|
8
|
-
#
|
9
|
-
#############################################################################
|
10
|
-
|
11
|
-
def name
|
12
|
-
@name ||= Dir['*.gemspec'].first.split('.').first
|
13
|
-
end
|
14
|
-
|
15
|
-
def version
|
16
|
-
line = File.read("lib/#{name}.rb")[/^\s*VERSION\s*=\s*.*/]
|
17
|
-
line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
|
18
|
-
end
|
19
|
-
|
20
|
-
def date
|
21
|
-
Date.today.to_s
|
22
|
-
end
|
23
|
-
|
24
|
-
def rubyforge_project
|
25
|
-
name
|
26
|
-
end
|
27
|
-
|
28
|
-
def gemspec_file
|
29
|
-
"#{name}.gemspec"
|
30
|
-
end
|
31
|
-
|
32
|
-
def gem_file
|
33
|
-
"#{name}-#{version}.gem"
|
34
|
-
end
|
35
|
-
|
36
|
-
def replace_header(head, header_name)
|
37
|
-
head.sub!(/(\.#{header_name}\s*= ').*'/) { "#{$1}#{send(header_name)}'"}
|
38
|
-
end
|
39
|
-
|
40
|
-
#############################################################################
|
41
|
-
#
|
42
|
-
# Standard tasks
|
43
|
-
#
|
44
|
-
#############################################################################
|
45
|
-
|
46
|
-
task :default => :test
|
47
|
-
|
48
|
-
require 'rake/testtask'
|
49
|
-
Rake::TestTask.new(:test) do |test|
|
50
|
-
test.libs << 'lib' << 'test' << '.'
|
51
|
-
test.pattern = 'test/**/test_*.rb'
|
52
|
-
test.verbose = true
|
53
|
-
end
|
54
|
-
|
55
|
-
desc "Generate RCov test coverage and open in your browser"
|
56
|
-
task :coverage do
|
57
|
-
require 'rcov'
|
58
|
-
sh "rm -fr coverage"
|
59
|
-
sh "rcov test/test_*.rb"
|
60
|
-
sh "open coverage/index.html"
|
61
|
-
end
|
62
|
-
|
63
|
-
desc "Open an irb session preloaded with this library"
|
64
|
-
task :console do
|
65
|
-
sh "irb -rubygems -r ./lib/#{name}.rb"
|
66
|
-
end
|
67
|
-
|
68
|
-
#############################################################################
|
69
|
-
#
|
70
|
-
# Custom tasks (add your own tasks here)
|
71
|
-
#
|
72
|
-
#############################################################################
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
#############################################################################
|
77
|
-
#
|
78
|
-
# Packaging tasks
|
79
|
-
#
|
80
|
-
#############################################################################
|
81
|
-
|
82
|
-
task :release => :build do
|
83
|
-
unless `git branch` =~ /^\* master$/
|
84
|
-
puts "You must be on the master branch to release!"
|
85
|
-
exit!
|
86
|
-
end
|
87
|
-
sh "git commit --allow-empty -a -m 'Release #{version}'"
|
88
|
-
sh "git tag v#{version}"
|
89
|
-
sh "git push origin master"
|
90
|
-
sh "git push origin v#{version}"
|
91
|
-
sh "gem push pkg/#{name}-#{version}.gem"
|
92
|
-
end
|
93
|
-
|
94
|
-
task :build => :gemspec do
|
95
|
-
sh "mkdir -p pkg"
|
96
|
-
sh "gem build #{gemspec_file}"
|
97
|
-
sh "mv #{gem_file} pkg"
|
98
|
-
end
|
99
|
-
|
100
|
-
task :gemspec => :validate do
|
101
|
-
# read spec file and split out manifest section
|
102
|
-
spec = File.read(gemspec_file)
|
103
|
-
head, manifest, tail = spec.split(" # = MANIFEST =\n")
|
104
|
-
|
105
|
-
# replace name version and date
|
106
|
-
replace_header(head, :name)
|
107
|
-
replace_header(head, :version)
|
108
|
-
replace_header(head, :date)
|
109
|
-
#comment this out if your rubyforge_project has a different name
|
110
|
-
replace_header(head, :rubyforge_project)
|
111
|
-
|
112
|
-
# determine file list from git ls-files
|
113
|
-
files = `git ls-files`.
|
114
|
-
split("\n").
|
115
|
-
sort.
|
116
|
-
reject { |file| file =~ /^\./ }.
|
117
|
-
reject { |file| file =~ /^(rdoc|pkg)/ }.
|
118
|
-
map { |file| " #{file}" }.
|
119
|
-
join("\n")
|
120
|
-
|
121
|
-
# piece file back together and write
|
122
|
-
manifest = " s.files = %w[\n#{files}\n ]\n"
|
123
|
-
spec = [head, manifest, tail].join(" # = MANIFEST =\n")
|
124
|
-
File.open(gemspec_file, 'w') { |io| io.write(spec) }
|
125
|
-
puts "Updated #{gemspec_file}"
|
126
|
-
end
|
127
|
-
|
128
|
-
task :validate do
|
129
|
-
libfiles = Dir['lib/*'] - ["lib/#{name}.rb", "lib/#{name}"]
|
130
|
-
unless libfiles.empty?
|
131
|
-
puts "Directory `lib` should only contain a `#{name}.rb` file and `#{name}` dir."
|
132
|
-
exit!
|
133
|
-
end
|
134
|
-
unless Dir['VERSION*'].empty?
|
135
|
-
puts "A `VERSION` file at root level violates Gem best practices."
|
136
|
-
exit!
|
137
|
-
end
|
138
|
-
end
|