gist 1.2.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,7 @@ module Gist
33
33
  if File.exists? file = File.dirname(__FILE__) + "/../../man/#{name}.1"
34
34
  File.read(file)
35
35
  else
36
- DATA.read
36
+ DATA.read.split("__CACERT__").first
37
37
  end
38
38
  end
39
39
 
@@ -19,6 +19,7 @@ preamble
19
19
  POSTAMBLE = "Gist.execute(*ARGV)\n"
20
20
  __DIR__ = File.dirname(__FILE__)
21
21
  MANPAGE = "__END__\n#{File.read(__DIR__ + '/../../man/gist.1')}"
22
+ CACERT = "__CACERT__\n#{File.read(__DIR__ + '/cacert.pem')}"
22
23
 
23
24
  def save(filename, path = '.')
24
25
  target = File.join(File.expand_path(path), filename)
@@ -46,6 +47,7 @@ preamble
46
47
 
47
48
  standalone << POSTAMBLE
48
49
  standalone << MANPAGE
50
+ standalone << CACERT
49
51
  standalone
50
52
  end
51
53
  end
@@ -1,3 +1,3 @@
1
1
  module Gist
2
- VERSION = Version = '1.2.1'
2
+ VERSION = Version = '2.0.0'
3
3
  end
data/man/gist.1 CHANGED
@@ -1,60 +1,51 @@
1
- .\" generated with Ronn/v0.5
2
- .\" http://github.com/rtomayko/ronn/
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "GIST" "1" "June 2010" "GITHUB" "Gist Manual"
4
+ .TH "GIST" "1" "November 2010" "GITHUB" "Gist Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBgist\fR \- gist on the command line
8
8
  .
9
9
  .SH "SYNOPSIS"
10
- \fBgist\fR [\fB\-p\fR] [\fB\-t extension\fR] \fIFILE\fR
10
+ \fBgist\fR [\fB\-p\fR] [\fB\-t extension\fR] \fIFILE|\-\fR
11
11
  .
12
12
  .SH "DESCRIPTION"
13
- \fBgist\fR can be used to create gists on gist.github.com from the command
14
- line. There are two primary methods of creating gists.
13
+ \fBgist\fR can be used to create gists on gist\.github\.com from the command line\. There are two primary methods of creating gists\.
15
14
  .
16
15
  .P
17
- If standard input is supplied, it will be used as the content of the
18
- new gist. If \fIFILE\fR is provided, the content of that file will be used
19
- to create the gist.
16
+ If standard input is supplied, it will be used as the content of the new gist\. If \fIFILE\fR is provided, the content of that file will be used to create the gist\. If \fIFILE\fR is \'\-\' then gist will wait for content from standard input\.
20
17
  .
21
18
  .P
22
- Once your gist is successfully created, the URL will be copied to your
23
- clipboard. If you are on OS X, \fBgist\fR will open the gist in your
24
- browser, too.
19
+ Once your gist is successfully created, the URL will be copied to your clipboard\. If you are on OS X, \fBgist\fR will open the gist in your browser, too\.
25
20
  .
26
21
  .SH "OPTIONS"
27
- \fBgist\fR's default mode of operation is to read content from standard
28
- input and create a public, text gist from it, tied to your GitHub
29
- account if you user and token are provided (see \fBCONFIGURATION\fR).
22
+ \fBgist\fR\'s default mode of operation is to read content from standard input and create a public, text gist from it, tied to your GitHub account if you user and token are provided (see \fBCONFIGURATION\fR)\.
30
23
  .
31
24
  .P
32
25
  These options can be used to change this behavior:
33
26
  .
34
27
  .TP
35
28
  \fB\-p\fR, \fB\-\-private\fR
36
- Create a private gist instead of a public gist.
29
+ Create a private gist instead of a public gist\.
37
30
  .
38
31
  .TP
39
32
  \fB\-t\fR, \fB\-\-type\fR
40
- Set the file extension explicitly. Passing a type of \fBrb\fR ensure
41
- the gist is created as a Ruby file.
33
+ Set the file extension explicitly\. Passing a type of \fBrb\fR ensure the gist is created as a Ruby file\.
42
34
  .
43
35
  .TP
44
36
  \fB\-o\fR, \fB\-\-[no\-]open\fR
45
- Open the gist in your browser after creation. Or don't. Defaults
46
- to \-\-open
37
+ Open the gist in your browser after creation\. Or don\'t\. Defaults to \-\-open
47
38
  .
48
39
  .P
49
40
  You may additionally ask for help:
50
41
  .
51
42
  .TP
52
43
  \fB\-h\fR, \fB\-\-help\fR
53
- Print help.
44
+ Print help\.
54
45
  .
55
46
  .TP
56
47
  \fB\-m\fR, \fB\-\-man\fR
57
- Display this man page.
48
+ Display this man page\.
58
49
  .
59
50
  .SH "AUTHENTICATION"
60
51
  There are two ways to set GitHub user and token info:
@@ -63,9 +54,7 @@ There are two ways to set GitHub user and token info:
63
54
  Using env vars GITHUB_USER and GITHUB_TOKEN
64
55
  .
65
56
  .IP
66
- $ export GITHUB_USER=johndoe
67
- $ export GITHUB_TOKEN=mysecretgithubtoken
68
- $ gist ~/example
57
+ $ export GITHUB_USER=johndoe $ export GITHUB_TOKEN=mysecretgithubtoken $ gist ~/example
69
58
  .
70
59
  .IP "\(bu" 4
71
60
  Using git\-config(1)
@@ -79,7 +68,7 @@ Use git\-config(1) to display the currently configured GitHub username:
79
68
  .
80
69
  .nf
81
70
 
82
- $ git config \-\-global github.user
71
+ $ git config \-\-global github\.user
83
72
  .
84
73
  .fi
85
74
  .
@@ -92,30 +81,26 @@ Or, set the GitHub username with:
92
81
  .
93
82
  .nf
94
83
 
95
- $ git config \-\-global github.user <username>
84
+ $ git config \-\-global github\.user <username>
96
85
  .
97
86
  .fi
98
87
  .
99
88
  .IP "" 0
100
89
  .
101
90
  .P
102
- See \fIhttp://github.com/guides/local\-github\-config\fR for more
103
- information.
91
+ See \fIhttp://github\.com/guides/local\-github\-config\fR for more information\.
104
92
  .
105
93
  .SH "CONFIGURATION"
106
- You can set a few options in your git config (using git\-config(1)) to
107
- control the default behavior of gist(1).
94
+ You can set a few options in your git config (using git\-config(1)) to control the default behavior of gist(1)\.
108
95
  .
109
96
  .IP "\(bu" 4
110
- gist.private \- boolean (yes or no) \- Determines whether to make a gist
111
- private by default
97
+ gist\.private \- boolean (yes or no) \- Determines whether to make a gist private by default
112
98
  .
113
99
  .IP "\(bu" 4
114
- gist.extension \- string \- Default extension for gists you create.
100
+ gist\.extension \- string \- Default extension for gists you create\.
115
101
  .
116
102
  .IP "\(bu" 4
117
- gist.browse \- boolean (yes or no) \- Whether to open the gist in your
118
- browser after creation. Default: yes
103
+ gist\.browse \- boolean (yes or no) \- Whether to open the gist in your browser after creation\. Default: yes
119
104
  .
120
105
  .IP "" 0
121
106
  .
@@ -123,7 +108,7 @@ browser after creation. Default: yes
123
108
  The following environment variables affect the execution of \fBgist\fR:
124
109
  .
125
110
  .IP "\(bu" 4
126
- HTTP_PROXY \- Proxy to use when Gisting. Should be "http://host:port/"
111
+ HTTP_PROXY \- Proxy to use when Gisting\. Should be "http://host:port/"
127
112
  .
128
113
  .IP "" 0
129
114
  .
@@ -131,18 +116,21 @@ HTTP_PROXY \- Proxy to use when Gisting. Should be "http://host:port/"
131
116
  .
132
117
  .nf
133
118
 
134
- $ gist < file.txt
119
+ $ gist < file\.txt
135
120
  $ echo secret | gist \-\-private
136
121
  $ echo "puts :hi" | gist \-t rb
137
- $ gist script.py
122
+ $ gist script\.py
123
+ $ gist \-
124
+ the quick brown fox jumps over the lazy dog
125
+ ^D
138
126
  .
139
127
  .fi
140
128
  .
141
129
  .SH "BUGS"
142
- \fIhttp://github.com/defunkt/gist/issues\fR
130
+ \fIhttp://github\.com/defunkt/gist/issues\fR
143
131
  .
144
132
  .SH "AUTHOR"
145
- Chris Wanstrath :: chris@ozmm.org
133
+ Chris Wanstrath :: chris@ozmm\.org
146
134
  .
147
135
  .SH "SEE ALSO"
148
- hub(1), git(1), git\-clone(1), \fIhttp://github.com\fR, \fIhttp://github.com/defunkt/gist\fR
136
+ hub(1), git(1), git\-clone(1), \fIhttp://github\.com\fR, \fIhttp://github\.com/defunkt/gist\fR
@@ -2,127 +2,57 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta http-equiv='content-type' value='text/html;charset=utf8'>
5
- <meta name='generator' value='Ronn/v0.5 (http://github.com/rtomayko/ronn)'>
5
+ <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
6
6
  <title>gist(1) - gist on the command line</title>
7
7
  <style type='text/css' media='all'>
8
- /* STRUCTURE, INDENT, MARGINS */
9
-
10
- body { margin:0}
11
- #man { max-width:92ex; padding:0 2ex 1ex 2ex}
12
-
13
- #man p, #man pre,
14
- #man ul, #man ol, #man dl { margin:0 0 20px 0}
15
- #man h2 { margin:10px 0 0 0}
16
-
17
- #man > p, #man > pre,
18
- #man > ul, #man > ol, #man > dl { margin-left:8ex}
19
- #man h3 { margin:0 0 0 4ex}
20
-
21
- #man dt { margin:0; clear:left}
22
- #man dt.flush { float:left; width:8ex}
23
- #man dd { margin:0 0 0 9ex}
24
- #man h1, #man h2, #man h3, #man h4 { clear:left}
25
-
26
- #man pre { margin-bottom:20px}
27
- #man pre+h2, #man pre+h3 { margin-top:22px}
28
- #man h2+pre, #man h3+pre { margin-top:5px}
29
-
30
- #man img { display:block;margin:auto}
31
- #man h1.man-title { display:none}
32
-
33
- /* FONTS */
34
-
35
- #man, #man code, #man pre,
36
- #man tt, #man kbd, #man samp,
37
- #man h3, #man h4 {
38
- font-family:monospace;
39
- font-size:14px;
40
- line-height:1.42857142857143;
41
- }
42
- #man h2, #man ol.man, #man .man-navigation a {
43
- font-size:16px;
44
- line-height:1.25
45
- }
46
- #man h1 {
47
- font-size:20px;
48
- line-height:2;
49
- }
50
-
51
- /* TEXT STYLES */
52
-
53
- #man {
54
- text-align:justify;
55
- background:#fff;
56
- }
57
- #man, #man code, #man pre, #man pre code,
58
- #man tt, #man kbd, #man samp { color:#131211}
59
- #man h1, #man h2, #man h3, #man h4 { color:#030201}
60
- #man ol.man, #man ol.man li { color:#636261}
61
-
62
- #man code, #man strong, #man b {
63
- font-weight:bold;
64
- color:#131211;
65
- }
66
-
67
- #man em, #man var, #man u {
68
- font-style:italic;
69
- color:#434241;
70
- text-decoration:none;
71
- }
72
-
73
- #man pre {
74
- background:#edeceb;
75
- padding:5px 1ex;
76
- border-left:1ex solid #ddd;
77
- }
78
- #man pre code {
79
- font-weight:normal;
80
- background:inherit;
81
- }
82
-
83
- /* DOCUMENT HEADER AND FOOTER AREAS */
84
-
85
- #man ol.man, #man ol.man li {
86
- margin:3px 0 10px 0;
87
- padding:0;
88
- float:left;
89
- width:33%;
90
- list-style-type:none;
91
- text-transform:uppercase;
92
- color:#999;
93
- letter-spacing:1px;
94
- }
95
- #man ol.man { width:100%}
96
- #man ol.man li.tl { text-align:left}
97
- #man ol.man li.tc { text-align:center; letter-spacing:4px}
98
- #man ol.man li.tr { text-align:right; float:right}
99
-
100
- /* SECTION TOC NAVIGATION */
101
-
102
- #man div.man-navigation {
103
- position:fixed;
104
- top:0;
105
- left:106ex;
106
- height:100%;
107
- width:100%;
108
- padding:1ex 0 0 2ex;
109
- border-left:0.25ex solid #DCDCDC;
110
- background-color: #F5F5F5;
111
- }
112
- #man div.man-navigation a { display:block; margin-bottom:1.5ex}
113
- </style>
114
- <style type='text/css' media='print'>
115
- #man { max-width:none}
116
- #man div.man-navigation { display:none}
117
- #man a[href]:not([href^="#"]):not([data-bare-link]):after {
118
- content:" " attr(href);
119
- }
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}
120
43
  </style>
121
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
+ -->
122
52
  <body id='manpage'>
123
- <div id='man'>
53
+ <div class='mp' id='man'>
124
54
 
125
- <div class='man-navigation'>
55
+ <div class='man-navigation' style='display:none'>
126
56
  <a href="#NAME">NAME</a>
127
57
  <a href="#SYNOPSIS">SYNOPSIS</a>
128
58
  <a href="#DESCRIPTION">DESCRIPTION</a>
@@ -136,20 +66,20 @@
136
66
  <a href="#SEE-ALSO">SEE ALSO</a>
137
67
  </div>
138
68
 
139
- <h1 class='man-title'>gist(1)</h1>
140
-
141
- <ol class='man head'>
69
+ <ol class='man-decor man-head man head'>
142
70
  <li class='tl'>gist(1)</li>
143
71
  <li class='tc'>Gist Manual</li>
144
72
  <li class='tr'>gist(1)</li>
145
73
  </ol>
146
74
 
147
- <h2 id='NAME'>NAME</h2>
148
- <p><code>gist</code> - gist on the command line</p>
75
+ <h2 id="NAME">NAME</h2>
76
+ <p class="man-name">
77
+ <code>gist</code> - <span class="man-whatis">gist on the command line</span>
78
+ </p>
149
79
 
150
80
  <h2 id="SYNOPSIS">SYNOPSIS</h2>
151
81
 
152
- <p><code>gist</code> [<code>-p</code>] [<code>-t extension</code>] <var>FILE</var></p>
82
+ <p><code>gist</code> [<code>-p</code>] [<code>-t extension</code>] <var>FILE|-</var></p>
153
83
 
154
84
  <h2 id="DESCRIPTION">DESCRIPTION</h2>
155
85
 
@@ -158,7 +88,8 @@ line. There are two primary methods of creating gists.</p>
158
88
 
159
89
  <p>If standard input is supplied, it will be used as the content of the
160
90
  new gist. If <var>FILE</var> is provided, the content of that file will be used
161
- to create the gist.</p>
91
+ to create the gist. If <var>FILE</var> is '-' then gist will wait for content
92
+ from standard input.</p>
162
93
 
163
94
  <p>Once your gist is successfully created, the URL will be copied to your
164
95
  clipboard. If you are on OS X, <code>gist</code> will open the gist in your
@@ -199,11 +130,11 @@ to --open</p></dd>
199
130
  <p>$ export GITHUB_USER=johndoe
200
131
  $ export GITHUB_TOKEN=mysecretgithubtoken
201
132
  $ gist ~/example</p></li>
202
- <li><p>Using git-config(1)</p></li>
133
+ <li><p>Using <span class="man-ref">git-config<span class="s">(1)</span></span></p></li>
203
134
  </ul>
204
135
 
205
136
 
206
- <p>Use git-config(1) to display the currently configured GitHub username:</p>
137
+ <p>Use <span class="man-ref">git-config<span class="s">(1)</span></span> to display the currently configured GitHub username:</p>
207
138
 
208
139
  <pre><code>$ git config --global github.user
209
140
  </code></pre>
@@ -218,8 +149,8 @@ information.</p>
218
149
 
219
150
  <h2 id="CONFIGURATION">CONFIGURATION</h2>
220
151
 
221
- <p>You can set a few options in your git config (using git-config(1)) to
222
- control the default behavior of gist(1).</p>
152
+ <p>You can set a few options in your git config (using <span class="man-ref">git-config<span class="s">(1)</span></span>) to
153
+ control the default behavior of <a href="gist.1.ron.html" class="man-ref">gist<span class="s">(1)</span></a>.</p>
223
154
 
224
155
  <ul>
225
156
  <li><p>gist.private - boolean (yes or no) - Determines whether to make a gist
@@ -245,6 +176,9 @@ browser after creation. Default: yes</p></li>
245
176
  $ echo secret | gist --private
246
177
  $ echo "puts :hi" | gist -t rb
247
178
  $ gist script.py
179
+ $ gist -
180
+ the quick brown fox jumps over the lazy dog
181
+ ^D
248
182
  </code></pre>
249
183
 
250
184
  <h2 id="BUGS">BUGS</h2>
@@ -257,14 +191,14 @@ $ gist script.py
257
191
 
258
192
  <h2 id="SEE-ALSO">SEE ALSO</h2>
259
193
 
260
- <p>hub(1), git(1), git-clone(1),
194
+ <p><span class="man-ref">hub<span class="s">(1)</span></span>, <span class="man-ref">git<span class="s">(1)</span></span>, <span class="man-ref">git-clone<span class="s">(1)</span></span>,
261
195
  <a href="http://github.com" data-bare-link="true">http://github.com</a>,
262
196
  <a href="http://github.com/defunkt/gist" data-bare-link="true">http://github.com/defunkt/gist</a></p>
263
197
 
264
198
 
265
- <ol class='man foot'>
199
+ <ol class='man-decor man-foot man foot'>
266
200
  <li class='tl'>GITHUB</li>
267
- <li class='tc'>June 2010</li>
201
+ <li class='tc'>November 2010</li>
268
202
  <li class='tr'>gist(1)</li>
269
203
  </ol>
270
204