detroit-github 0.1.0 → 0.2.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/.ruby +14 -10
- data/{GPL3.txt → LICENSE.txt} +0 -0
- data/README.rdoc +12 -5
- data/lib/detroit-github.rb +164 -79
- data/man/detroit-github.5 +93 -0
- data/man/detroit-github.5.html +159 -0
- data/man/detroit-github.5.ronn +74 -0
- metadata +23 -8
data/.ruby
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
---
|
2
|
+
source:
|
3
|
+
- meta
|
2
4
|
authors:
|
3
5
|
- name: T. Sawyer
|
4
6
|
email: transfire@gmail.com
|
@@ -6,26 +8,28 @@ copyrights:
|
|
6
8
|
- holder: Thomas Sawyer
|
7
9
|
year: '2011'
|
8
10
|
license: GPL3
|
9
|
-
replacements: []
|
10
|
-
conflicts: []
|
11
11
|
requirements:
|
12
12
|
- name: detroit
|
13
|
+
version: 0.3.0+
|
14
|
+
- name: grit
|
13
15
|
dependencies: []
|
16
|
+
alternatives: []
|
17
|
+
conflicts: []
|
14
18
|
repositories: []
|
15
19
|
resources:
|
16
20
|
home: http://detroit.github.com/
|
17
21
|
code: http://github.com/detroit/detroit-github
|
18
22
|
mail: http://groups.google.com/group/rubyworks-mailinglist
|
23
|
+
extra: {}
|
19
24
|
load_path:
|
20
25
|
- lib
|
21
|
-
extra: {}
|
22
26
|
revision: 0
|
23
|
-
|
24
|
-
source:
|
25
|
-
- Profile
|
26
|
-
alternatives: []
|
27
|
-
title: Detroit GitHub
|
28
|
-
version: 0.1.0
|
27
|
+
created: '2011-10-16'
|
29
28
|
summary: GitHub plugin for Detroit
|
29
|
+
title: Detroit GitHub
|
30
|
+
version: 0.2.0
|
31
|
+
name: detroit-github
|
32
|
+
suite: detroit
|
30
33
|
description: GitHub plugin for Detroit build system.
|
31
|
-
|
34
|
+
organization: rubyworks
|
35
|
+
date: '2012-04-01'
|
data/{GPL3.txt → LICENSE.txt}
RENAMED
File without changes
|
data/README.rdoc
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
= Detroit GitHub Tool
|
2
2
|
|
3
|
+
{Website}[http://rubyworks.github.com/detroit-github] /
|
4
|
+
{Report Issue}[http://github.com/rubyworks/detroit-github/issues] /
|
5
|
+
{Repository}[http://github.com/rubyworks/detroit-github]
|
3
6
|
|
4
|
-
|
7
|
+
|
8
|
+
== Description
|
5
9
|
|
6
10
|
The GitHub tool provides services tied to your project's
|
7
11
|
github repository.
|
@@ -10,16 +14,19 @@ Currently it only supports gh-pages publishing from a
|
|
10
14
|
project's website directory.
|
11
15
|
|
12
16
|
|
13
|
-
==
|
17
|
+
== Installation
|
18
|
+
|
19
|
+
Per the usual gem install process:
|
14
20
|
|
15
21
|
$ gem install detroit-github
|
16
22
|
|
17
23
|
|
18
|
-
==
|
24
|
+
== Copyrights
|
19
25
|
|
20
26
|
Copyright (c) 2011 Thomas Sawyer
|
21
27
|
|
22
|
-
GPL
|
28
|
+
Detroit GitHub is distributable in accordance with the GPL, GNU General Public
|
29
|
+
License, version 3 or higher.
|
23
30
|
|
24
|
-
See COPYING.rdoc and
|
31
|
+
See COPYING.rdoc and LICENSE.txt file for details.
|
25
32
|
|
data/lib/detroit-github.rb
CHANGED
@@ -18,11 +18,14 @@ module Detroit
|
|
18
18
|
#
|
19
19
|
PAGES_BRANCH = "gh-pages"
|
20
20
|
|
21
|
+
# The project directory to store the gh-pages git repo.
|
22
|
+
DEFAULT_FOLDER = "web"
|
23
|
+
|
21
24
|
#
|
22
25
|
DEFAULT_REMOTE = "origin"
|
23
26
|
|
24
|
-
#
|
25
|
-
DEFAULT_MESSAGE ="Update
|
27
|
+
# Default commit message.
|
28
|
+
DEFAULT_MESSAGE = "Update pages via Detroit."
|
26
29
|
|
27
30
|
|
28
31
|
# A T T R I B U T E S
|
@@ -33,13 +36,22 @@ module Detroit
|
|
33
36
|
# Commit message.
|
34
37
|
attr_accessor :message
|
35
38
|
|
36
|
-
#
|
39
|
+
# Pages folder to use (defaults to 'pages').
|
40
|
+
attr_accessor :folder
|
41
|
+
|
42
|
+
# Alias for `#folder`.
|
43
|
+
alias_accessor :gh_pages, :folder
|
44
|
+
|
45
|
+
# Use a local check out?
|
46
|
+
#attr_accessor :local
|
47
|
+
|
48
|
+
# List of directories and files to copy to pages.
|
37
49
|
# If a single directory entry is given then the contents
|
38
|
-
# of that directory will be
|
39
|
-
attr_reader :sitemap
|
50
|
+
# of that directory will be copied.
|
51
|
+
#attr_reader :sitemap
|
40
52
|
|
41
53
|
# List of any files/directory to not overwrite in branch.
|
42
|
-
attr_reader :keep
|
54
|
+
#attr_reader :keep
|
43
55
|
|
44
56
|
# Set sitemap.
|
45
57
|
def sitemap=(entries)
|
@@ -64,62 +76,66 @@ module Detroit
|
|
64
76
|
# The repository branch (ALWAYS "gh-pages").
|
65
77
|
attr_reader :branch
|
66
78
|
|
79
|
+
# A S S E M B L Y
|
67
80
|
|
68
|
-
#
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
81
|
+
# Do not need to `prepare` if gh_pages directory is already created.
|
82
|
+
def assemble?(station, options={})
|
83
|
+
case station
|
84
|
+
when :prepare
|
85
|
+
child ? false : true
|
86
|
+
when :publish, :clean
|
87
|
+
true
|
88
|
+
end
|
73
89
|
end
|
74
90
|
|
75
|
-
#
|
76
|
-
def
|
77
|
-
|
91
|
+
# Attach to `prepare`, `publish` and `clean`.
|
92
|
+
def assemble(station, options={})
|
93
|
+
case station
|
94
|
+
when :prepare then prepare
|
95
|
+
when :publish then publish
|
96
|
+
when :clean then clean
|
97
|
+
end
|
78
98
|
end
|
79
99
|
|
80
|
-
|
81
100
|
# S E R V I C E M E T H O D S
|
82
101
|
|
83
|
-
#
|
84
|
-
def
|
85
|
-
if
|
86
|
-
report "No files selected for publishing."
|
87
|
-
return
|
88
|
-
end
|
102
|
+
#
|
103
|
+
def prepare
|
104
|
+
return if child
|
89
105
|
|
90
|
-
|
91
|
-
|
92
|
-
|
106
|
+
if File.exist?(pgdir)
|
107
|
+
abort "Can't setup gh-pages at #{folder}. Directory already exists."
|
108
|
+
end
|
93
109
|
|
94
|
-
|
110
|
+
# does the master repo have a gh-pages branch?
|
111
|
+
new = !master.branches.find{ |b| b.name == branch }
|
95
112
|
|
96
|
-
|
97
|
-
|
98
|
-
|
113
|
+
if new
|
114
|
+
create_branch
|
115
|
+
else
|
116
|
+
clone_branch
|
99
117
|
end
|
100
118
|
|
101
|
-
|
102
|
-
|
103
|
-
rm path if File.file?(path)
|
104
|
-
end
|
119
|
+
update_gitignore
|
120
|
+
end
|
105
121
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
end
|
122
|
+
#
|
123
|
+
# Publish sitemap files to branch (gh-pages).
|
124
|
+
#
|
125
|
+
# @todo Should we all `git add --all` ?
|
126
|
+
#
|
127
|
+
def publish
|
128
|
+
if !File.directory?(pgdir)
|
129
|
+
report "No pages folder found (#{folder})."
|
130
|
+
return
|
116
131
|
end
|
117
132
|
|
118
|
-
|
119
|
-
|
133
|
+
#copy_files # post_generate assembly ?
|
134
|
+
|
135
|
+
chdir(pgdir) do
|
136
|
+
#sh %[git add -A]
|
120
137
|
sh %[git commit -q -a -m "#{message}"]
|
121
|
-
sh %[git push #{remote} #{branch}]
|
122
|
-
sh %[git push #{url} #{branch}] # TODO: add --dry-run if trial?
|
138
|
+
sh %[git push #{remote} #{branch}]
|
123
139
|
end
|
124
140
|
end
|
125
141
|
|
@@ -130,54 +146,93 @@ module Detroit
|
|
130
146
|
|
131
147
|
private
|
132
148
|
|
133
|
-
#
|
134
|
-
|
149
|
+
# NOTE: Considered using `sh %[git clone --local . #{pgdir}]` but
|
150
|
+
# that appeared to require duplicate commits, once in pgdir and
|
151
|
+
# then in root.
|
152
|
+
|
153
|
+
# Clone the repo to a local folder, checkout the pages
|
154
|
+
# branch and remove the master branch.
|
155
|
+
#
|
156
|
+
def clone_branch
|
157
|
+
sh %[git clone #{url} #{pgdir}]
|
158
|
+
Dir.chdir(pgdir) do
|
159
|
+
sh %[git checkout #{branch}]
|
160
|
+
sh %[git branch -d master]
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
135
164
|
# TODO: This assumes we started out on master. Look up current and swtich back to that.
|
136
|
-
|
165
|
+
|
166
|
+
# If the gh-pages branch doesn't exist we need to create it.
|
137
167
|
def create_branch
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
168
|
+
sh %[git clone #{url} #{pgdir}]
|
169
|
+
Dir.chdir(pgdir) do
|
170
|
+
sh %[git symbolic-ref HEAD refs/heads/#{branch}]
|
171
|
+
sh %[rm .git/index]
|
172
|
+
sh %[git clean -fdxq]
|
173
|
+
sh %[echo "My GitHub Page" > index.html]
|
174
|
+
sh %[git add .]
|
175
|
+
sh %[git commit -a -m "First pages commit."]
|
176
|
+
sh %[git push origin #{branch}]
|
177
|
+
sh %[git checkout #{branch}]
|
178
|
+
sh %[git branch -d master]
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Only updates .gitignore if folder is not already present.
|
183
|
+
def update_gitignore
|
184
|
+
file = File.join(root, '.gitignore')
|
185
|
+
if File.exist?(file)
|
186
|
+
done = false
|
187
|
+
File.readlines(file).each do |line|
|
188
|
+
done = true if line.strip == folder
|
189
|
+
end
|
190
|
+
append(file, folder) unless done
|
191
|
+
else
|
192
|
+
write(file, folder)
|
143
193
|
end
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
sh 'rm .git/index'
|
150
|
-
sh 'git clean -fdxq'
|
151
|
-
sh 'echo "My GitHub Page" > index.html'
|
152
|
-
sh 'git add .'
|
153
|
-
sh 'git commit -a -m "First pages commit"'
|
154
|
-
sh 'git push origin gh-pages'
|
155
|
-
## gh-pages is made, let's get back to master
|
156
|
-
sh 'git checkout master'
|
157
|
-
sh 'git stash pop'
|
158
|
-
end
|
159
|
-
|
160
|
-
#--
|
161
|
-
# TODO: Does the POM Project provide the site directory?
|
162
|
-
#++
|
194
|
+
end
|
195
|
+
|
196
|
+
# TODO: Does the POM Project provide the site folder?
|
197
|
+
|
198
|
+
#
|
163
199
|
def initialize_defaults
|
164
200
|
@branch ||= PAGES_BRANCH
|
201
|
+
@folder ||= DEFAULT_FOLDER
|
165
202
|
@remote ||= DEFAULT_REMOTE
|
166
203
|
@message ||= DEFAULT_MESSAGE
|
167
|
-
@sitemap ||= default_sitemap
|
168
|
-
@keep ||= []
|
169
204
|
end
|
170
205
|
|
171
|
-
# Require Grit.
|
172
|
-
#
|
173
206
|
# TODO: Switch to `scm` gem if it is better than grit.
|
207
|
+
|
208
|
+
# Require Grit.
|
174
209
|
def initialize_requires
|
175
210
|
require 'grit'
|
176
211
|
end
|
177
212
|
|
178
213
|
# Get a cached Grit::Repo instance.
|
179
|
-
def
|
180
|
-
@
|
214
|
+
def master
|
215
|
+
@master ||= Grit::Repo.new(root)
|
216
|
+
end
|
217
|
+
|
218
|
+
# Remote URL for master.
|
219
|
+
def url
|
220
|
+
@url ||= master.config["remote.#{remote}.url"]
|
221
|
+
end
|
222
|
+
|
223
|
+
# Child Grit::Repo instance, i.e. a repo just for gh-pages.
|
224
|
+
def child
|
225
|
+
@child ||= \
|
226
|
+
begin
|
227
|
+
Grit::Repo.new(pgdir) if File.directory?(pgdir)
|
228
|
+
rescue Grit::InvalidGitRepositoryError
|
229
|
+
nil
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
# Location of child folder.
|
234
|
+
def pgdir
|
235
|
+
@pgdir ||= File.join(root,folder)
|
181
236
|
end
|
182
237
|
|
183
238
|
# Cached system temporary directory.
|
@@ -189,6 +244,35 @@ module Detroit
|
|
189
244
|
)
|
190
245
|
end
|
191
246
|
|
247
|
+
#
|
248
|
+
def root
|
249
|
+
project ? project.root : Dir.pwd
|
250
|
+
end
|
251
|
+
|
252
|
+
# TODO: Add support to copy files from project root to gh-pages folder.
|
253
|
+
# This can be helpful when serving generated content.
|
254
|
+
|
255
|
+
=begin
|
256
|
+
# Copy files from project root to gh-pages folder.
|
257
|
+
def copy_files
|
258
|
+
paths_to_remove.each do |path|
|
259
|
+
path = File.join(tmpdir, path)
|
260
|
+
rm path if File.file?(path)
|
261
|
+
end
|
262
|
+
|
263
|
+
expanded_sitemap.each do |(src, dest)|
|
264
|
+
trace "transfer: #{src} => #{dest}"
|
265
|
+
if directory?(src)
|
266
|
+
out = File.join(tmpdir, dest)
|
267
|
+
mkdir_p(out) unless File.directory?(out)
|
268
|
+
else
|
269
|
+
out = File.join(tmpdir, dest)
|
270
|
+
mkdir_p(File.dirname(out))
|
271
|
+
install(src, out) unless keep.include?(dest)
|
272
|
+
end
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
192
276
|
# Default sitemap includes the `site` directoy, if it exists.
|
193
277
|
# Otherwise the `doc` directory.
|
194
278
|
def default_sitemap
|
@@ -232,6 +316,7 @@ module Detroit
|
|
232
316
|
paths = arrival - present - keep
|
233
317
|
paths
|
234
318
|
end
|
319
|
+
=end
|
235
320
|
|
236
321
|
public
|
237
322
|
|
@@ -0,0 +1,93 @@
|
|
1
|
+
.\" generated with Ronn/v0.7.3
|
2
|
+
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
|
+
.
|
4
|
+
.TH "DETROIT\-GITHUB" "5" "October 2011" "" ""
|
5
|
+
.
|
6
|
+
.SH "NAME"
|
7
|
+
\fBdetroit\-github\fR \- github services for detroit
|
8
|
+
.
|
9
|
+
.SH "DESCRIPTION"
|
10
|
+
The GitHub tool provides services tied to your project\'s github repository\. Presently it only supports gh\-pages publishing\.
|
11
|
+
.
|
12
|
+
.SH "OPTIONS"
|
13
|
+
The following options can be used in Detroit assembly files for defining a github service\.
|
14
|
+
.
|
15
|
+
.IP "\(bu" 4
|
16
|
+
\fBremote\fR \- The remote to use (defaults to \'origin\')\.
|
17
|
+
.
|
18
|
+
.IP "\(bu" 4
|
19
|
+
\fBmessage\fR \- Commit message\.
|
20
|
+
.
|
21
|
+
.IP "\(bu" 4
|
22
|
+
\fBsitemap\fR \- List of directories and files to transfer\. If a single directory entry is given then the contents of that directory will be transfered\. Defaults to \fBsite\fR, \fBwebsite\fR or \fBdoc\fR\.
|
23
|
+
.
|
24
|
+
.IP "\(bu" 4
|
25
|
+
\fBkeep\fR \- List of any files/directory to not overwrite in branch\.
|
26
|
+
.
|
27
|
+
.IP "" 0
|
28
|
+
.
|
29
|
+
.SH "EXAMPLES"
|
30
|
+
If you keep your website in a project subdirectory called either \fBsite\fR, \fBweb\fR, \fBwebsite\fR or \fBwww\fR, and failing those, \fBdoc\fR or \fBdocs\fR, then the defaults settings are likely sufficiant\.
|
31
|
+
.
|
32
|
+
.IP "" 4
|
33
|
+
.
|
34
|
+
.nf
|
35
|
+
|
36
|
+
github:
|
37
|
+
active: true
|
38
|
+
.
|
39
|
+
.fi
|
40
|
+
.
|
41
|
+
.IP "" 0
|
42
|
+
.
|
43
|
+
.P
|
44
|
+
If the files to copy to the gh\-pages branch are more entailed, use a mapping of source to destination\. For example, if we want to copy all the files in \fBsite/\fR to gh\-pages, but also all the files in \fBdoc/\fR to a directory called \fBdoc\fR we could use:
|
45
|
+
.
|
46
|
+
.IP "" 4
|
47
|
+
.
|
48
|
+
.nf
|
49
|
+
|
50
|
+
github:
|
51
|
+
sitemap:
|
52
|
+
site: \.
|
53
|
+
doc: doc
|
54
|
+
.
|
55
|
+
.fi
|
56
|
+
.
|
57
|
+
.IP "" 0
|
58
|
+
.
|
59
|
+
.P
|
60
|
+
However, this isn\'t usually necessary, since a soft link could be used instead\.
|
61
|
+
.
|
62
|
+
.IP "" 4
|
63
|
+
.
|
64
|
+
.nf
|
65
|
+
|
66
|
+
$ ln \-s doc site/doc
|
67
|
+
.
|
68
|
+
.fi
|
69
|
+
.
|
70
|
+
.IP "" 0
|
71
|
+
.
|
72
|
+
.P
|
73
|
+
You can check soft\-links into with git and they will be transfered as if the real file when copied to the gh\-pages file\. So a more complex \fBsitemap\fR is really only needed when more specific selections or complex globs are needed\.
|
74
|
+
.
|
75
|
+
.SH "RESOURCES"
|
76
|
+
For more information:
|
77
|
+
.
|
78
|
+
.IP "\(bu" 4
|
79
|
+
API Documentation \fIhttp://rubydoc\.info/gems/detroit\-github\fR
|
80
|
+
.
|
81
|
+
.IP "\(bu" 4
|
82
|
+
Development Site \fIhttp://github\.com/detroit/detroit\-github\fR
|
83
|
+
.
|
84
|
+
.IP "" 0
|
85
|
+
.
|
86
|
+
.SH "COPYRIGHT"
|
87
|
+
Copyright (c) 2010 Thomas Sawyer, Rubyworks
|
88
|
+
.
|
89
|
+
.P
|
90
|
+
Detroit GitHub is distributable in accordance with the GPLv3 license\.
|
91
|
+
.
|
92
|
+
.SH "SEE ALSO"
|
93
|
+
detroit(1), git(1), detroit\-grancher(5)
|
@@ -0,0 +1,159 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv='content-type' value='text/html;charset=utf8'>
|
5
|
+
<meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
|
6
|
+
<title>detroit-github(5) - github services for detroit</title>
|
7
|
+
<style type='text/css' media='all'>
|
8
|
+
/* style: man */
|
9
|
+
body#manpage {margin:0}
|
10
|
+
.mp {max-width:100ex;padding:0 9ex 1ex 4ex}
|
11
|
+
.mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
|
12
|
+
.mp h2 {margin:10px 0 0 0}
|
13
|
+
.mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
|
14
|
+
.mp h3 {margin:0 0 0 4ex}
|
15
|
+
.mp dt {margin:0;clear:left}
|
16
|
+
.mp dt.flush {float:left;width:8ex}
|
17
|
+
.mp dd {margin:0 0 0 9ex}
|
18
|
+
.mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
|
19
|
+
.mp pre {margin-bottom:20px}
|
20
|
+
.mp pre+h2,.mp pre+h3 {margin-top:22px}
|
21
|
+
.mp h2+pre,.mp h3+pre {margin-top:5px}
|
22
|
+
.mp img {display:block;margin:auto}
|
23
|
+
.mp h1.man-title {display:none}
|
24
|
+
.mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
|
25
|
+
.mp h2 {font-size:16px;line-height:1.25}
|
26
|
+
.mp h1 {font-size:20px;line-height:2}
|
27
|
+
.mp {text-align:justify;background:#fff}
|
28
|
+
.mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
|
29
|
+
.mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
|
30
|
+
.mp u {text-decoration:underline}
|
31
|
+
.mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
|
32
|
+
.mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
|
33
|
+
.mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
|
34
|
+
.mp b.man-ref {font-weight:normal;color:#434241}
|
35
|
+
.mp pre {padding:0 4ex}
|
36
|
+
.mp pre code {font-weight:normal;color:#434241}
|
37
|
+
.mp h2+pre,h3+pre {padding-left:0}
|
38
|
+
ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
|
39
|
+
ol.man-decor {width:100%}
|
40
|
+
ol.man-decor li.tl {text-align:left}
|
41
|
+
ol.man-decor li.tc {text-align:center;letter-spacing:4px}
|
42
|
+
ol.man-decor li.tr {text-align:right;float:right}
|
43
|
+
</style>
|
44
|
+
</head>
|
45
|
+
<!--
|
46
|
+
The following styles are deprecated and will be removed at some point:
|
47
|
+
div#man, div#man ol.man, div#man ol.head, div#man ol.man.
|
48
|
+
|
49
|
+
The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
|
50
|
+
.man-navigation should be used instead.
|
51
|
+
-->
|
52
|
+
<body id='manpage'>
|
53
|
+
<div class='mp' id='man'>
|
54
|
+
|
55
|
+
<div class='man-navigation' style='display:none'>
|
56
|
+
<a href="#NAME">NAME</a>
|
57
|
+
<a href="#DESCRIPTION">DESCRIPTION</a>
|
58
|
+
<a href="#OPTIONS">OPTIONS</a>
|
59
|
+
<a href="#EXAMPLES">EXAMPLES</a>
|
60
|
+
<a href="#RESOURCES">RESOURCES</a>
|
61
|
+
<a href="#COPYRIGHT">COPYRIGHT</a>
|
62
|
+
<a href="#SEE-ALSO">SEE ALSO</a>
|
63
|
+
</div>
|
64
|
+
|
65
|
+
<ol class='man-decor man-head man head'>
|
66
|
+
<li class='tl'>detroit-github(5)</li>
|
67
|
+
<li class='tc'></li>
|
68
|
+
<li class='tr'>detroit-github(5)</li>
|
69
|
+
</ol>
|
70
|
+
|
71
|
+
<h2 id="NAME">NAME</h2>
|
72
|
+
<p class="man-name">
|
73
|
+
<code>detroit-github</code> - <span class="man-whatis">github services for detroit</span>
|
74
|
+
</p>
|
75
|
+
|
76
|
+
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
77
|
+
|
78
|
+
<p>The GitHub tool provides services tied to your project's
|
79
|
+
github repository. Presently it only supports gh-pages
|
80
|
+
publishing.</p>
|
81
|
+
|
82
|
+
<h2 id="OPTIONS">OPTIONS</h2>
|
83
|
+
|
84
|
+
<p>The following options can be used in Detroit assembly files
|
85
|
+
for defining a github service.</p>
|
86
|
+
|
87
|
+
<ul>
|
88
|
+
<li><p><code>remote</code> - The remote to use (defaults to 'origin').</p></li>
|
89
|
+
<li><p><code>message</code> - Commit message.</p></li>
|
90
|
+
<li><p><code>sitemap</code> - List of directories and files to transfer.
|
91
|
+
If a single directory entry is given then the contents
|
92
|
+
of that directory will be transfered. Defaults to <code>site</code>,
|
93
|
+
<code>website</code> or <code>doc</code>.</p></li>
|
94
|
+
<li><p><code>keep</code> - List of any files/directory to not overwrite in branch.</p></li>
|
95
|
+
</ul>
|
96
|
+
|
97
|
+
|
98
|
+
<h2 id="EXAMPLES">EXAMPLES</h2>
|
99
|
+
|
100
|
+
<p>If you keep your website in a project subdirectory called either
|
101
|
+
<code>site</code>, <code>web</code>, <code>website</code> or <code>www</code>, and failing those, <code>doc</code> or <code>docs</code>,
|
102
|
+
then the defaults settings are likely sufficiant.</p>
|
103
|
+
|
104
|
+
<pre><code>github:
|
105
|
+
active: true
|
106
|
+
</code></pre>
|
107
|
+
|
108
|
+
<p>If the files to copy to the gh-pages branch are more entailed, use
|
109
|
+
a mapping of source to destination. For example, if we want to copy
|
110
|
+
all the files in <code>site/</code> to gh-pages, but also all the files in <code>doc/</code>
|
111
|
+
to a directory called <code>doc</code> we could use:</p>
|
112
|
+
|
113
|
+
<pre><code>github:
|
114
|
+
sitemap:
|
115
|
+
site: .
|
116
|
+
doc: doc
|
117
|
+
</code></pre>
|
118
|
+
|
119
|
+
<p>However, this isn't usually necessary, since a soft link could be used
|
120
|
+
instead.</p>
|
121
|
+
|
122
|
+
<pre><code>$ ln -s doc site/doc
|
123
|
+
</code></pre>
|
124
|
+
|
125
|
+
<p>You can check soft-links into with git and they will be transfered as
|
126
|
+
if the real file when copied to the gh-pages file. So a more complex
|
127
|
+
<code>sitemap</code> is really only needed when more specific selections or
|
128
|
+
complex globs are needed.</p>
|
129
|
+
|
130
|
+
<h2 id="RESOURCES">RESOURCES</h2>
|
131
|
+
|
132
|
+
<p>For more information:</p>
|
133
|
+
|
134
|
+
<ul>
|
135
|
+
<li><p><a href="http://rubydoc.info/gems/detroit-github">API Documentation</a></p></li>
|
136
|
+
<li><p><a href="http://github.com/detroit/detroit-github">Development Site</a></p></li>
|
137
|
+
</ul>
|
138
|
+
|
139
|
+
|
140
|
+
<h2 id="COPYRIGHT">COPYRIGHT</h2>
|
141
|
+
|
142
|
+
<p>Copyright (c) 2010 Thomas Sawyer, Rubyworks</p>
|
143
|
+
|
144
|
+
<p>Detroit GitHub is distributable in accordance with the GPLv3 license.</p>
|
145
|
+
|
146
|
+
<h2 id="SEE-ALSO">SEE ALSO</h2>
|
147
|
+
|
148
|
+
<p><span class="man-ref">detroit<span class="s">(1)</span></span>, <span class="man-ref">git<span class="s">(1)</span></span>, <span class="man-ref">detroit-grancher<span class="s">(5)</span></span></p>
|
149
|
+
|
150
|
+
|
151
|
+
<ol class='man-decor man-foot man foot'>
|
152
|
+
<li class='tl'></li>
|
153
|
+
<li class='tc'>October 2011</li>
|
154
|
+
<li class='tr'>detroit-github(5)</li>
|
155
|
+
</ol>
|
156
|
+
|
157
|
+
</div>
|
158
|
+
</body>
|
159
|
+
</html>
|
@@ -0,0 +1,74 @@
|
|
1
|
+
detroit-github(5) - github services for detroit
|
2
|
+
===============================================
|
3
|
+
|
4
|
+
## DESCRIPTION
|
5
|
+
|
6
|
+
The GitHub tool provides services tied to your project's
|
7
|
+
github repository. Presently it only supports gh-pages
|
8
|
+
publishing.
|
9
|
+
|
10
|
+
## OPTIONS
|
11
|
+
|
12
|
+
The following options can be used in Detroit assembly files
|
13
|
+
for defining a github service.
|
14
|
+
|
15
|
+
* `remote` - The remote to use (defaults to 'origin').
|
16
|
+
|
17
|
+
* `message` - Commit message.
|
18
|
+
|
19
|
+
* `sitemap` - List of directories and files to transfer.
|
20
|
+
If a single directory entry is given then the contents
|
21
|
+
of that directory will be transferred. Defaults to `site`,
|
22
|
+
`website` or `doc`.
|
23
|
+
|
24
|
+
* `keep` - List of any files/directory to not overwrite in branch.
|
25
|
+
|
26
|
+
## EXAMPLES
|
27
|
+
|
28
|
+
If you keep your website in a project sub-directory called either
|
29
|
+
`site`, `web`, `website` or `www`, and failing those, `doc` or `docs`,
|
30
|
+
then the defaults settings are likely sufficient.
|
31
|
+
|
32
|
+
github:
|
33
|
+
active: true
|
34
|
+
|
35
|
+
If the files to copy to the gh-pages branch are more entailed, use
|
36
|
+
a mapping of source to destination. For example, if we want to copy
|
37
|
+
all the files in `site/` to gh-pages, but also all the files in `doc/`
|
38
|
+
to a directory called `doc` we could use:
|
39
|
+
|
40
|
+
github:
|
41
|
+
sitemap:
|
42
|
+
site: .
|
43
|
+
doc: doc
|
44
|
+
|
45
|
+
However, this isn't usually necessary, since a soft link could be used
|
46
|
+
instead.
|
47
|
+
|
48
|
+
$ ln -s doc site/doc
|
49
|
+
|
50
|
+
You can check soft-links into with git and they will be transferred as
|
51
|
+
if the real file when copied to the gh-pages file. So a more complex
|
52
|
+
`sitemap` is really only needed when more specific selections or
|
53
|
+
complex globs are needed.
|
54
|
+
|
55
|
+
|
56
|
+
## RESOURCES
|
57
|
+
|
58
|
+
For more information:
|
59
|
+
|
60
|
+
* [API Documentation](http://rubydoc.info/gems/detroit-github)
|
61
|
+
|
62
|
+
* [Development Site](http://github.com/detroit/detroit-github)
|
63
|
+
|
64
|
+
|
65
|
+
## COPYRIGHT
|
66
|
+
|
67
|
+
Copyright (c) 2010 Thomas Sawyer, Rubyworks
|
68
|
+
|
69
|
+
Detroit GitHub is distributable in accordance with the GPLv3 license.
|
70
|
+
|
71
|
+
|
72
|
+
## SEE ALSO
|
73
|
+
|
74
|
+
detroit(1), git(1), detroit-grancher(5)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: detroit-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-04-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: detroit
|
16
|
-
requirement: &
|
16
|
+
requirement: &16794180 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.3.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *16794180
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: grit
|
27
|
+
requirement: &16786740 !ruby/object:Gem::Requirement
|
17
28
|
none: false
|
18
29
|
requirements:
|
19
30
|
- - ! '>='
|
@@ -21,24 +32,28 @@ dependencies:
|
|
21
32
|
version: '0'
|
22
33
|
type: :runtime
|
23
34
|
prerelease: false
|
24
|
-
version_requirements: *
|
35
|
+
version_requirements: *16786740
|
25
36
|
description: GitHub plugin for Detroit build system.
|
26
37
|
email:
|
27
38
|
- transfire@gmail.com
|
28
39
|
executables: []
|
29
40
|
extensions: []
|
30
41
|
extra_rdoc_files:
|
31
|
-
-
|
42
|
+
- LICENSE.txt
|
32
43
|
- README.rdoc
|
33
44
|
- COPYING.rdoc
|
34
45
|
files:
|
35
46
|
- .ruby
|
36
47
|
- lib/detroit-github.rb
|
48
|
+
- man/detroit-github.5
|
49
|
+
- man/detroit-github.5.html
|
50
|
+
- man/detroit-github.5.ronn
|
51
|
+
- LICENSE.txt
|
37
52
|
- README.rdoc
|
38
|
-
- GPL3.txt
|
39
53
|
- COPYING.rdoc
|
40
54
|
homepage: http://detroit.github.com/
|
41
|
-
licenses:
|
55
|
+
licenses:
|
56
|
+
- GPL3
|
42
57
|
post_install_message:
|
43
58
|
rdoc_options: []
|
44
59
|
require_paths:
|
@@ -57,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
72
|
version: '0'
|
58
73
|
requirements: []
|
59
74
|
rubyforge_project:
|
60
|
-
rubygems_version: 1.8.
|
75
|
+
rubygems_version: 1.8.11
|
61
76
|
signing_key:
|
62
77
|
specification_version: 3
|
63
78
|
summary: GitHub plugin for Detroit
|