gist 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -18,7 +18,7 @@ RubyGems:
18
18
 
19
19
  Old school:
20
20
 
21
- curl -s http://github.com/defunkt/gist/raw/master/gist > gist &&
21
+ curl -s https://github.com/defunkt/gist/raw/master/gist > gist &&
22
22
  chmod 755 gist &&
23
23
  mv gist /usr/local/bin/gist
24
24
 
@@ -94,4 +94,4 @@ Visit <http://defunkt.github.com/gist/> or use:
94
94
  Bugs
95
95
  ----
96
96
 
97
- <http://github.com/defunkt/gist/issues>
97
+ <https://github.com/defunkt/gist/issues>
data/lib/gist.rb CHANGED
@@ -95,7 +95,7 @@ module Gist
95
95
  else
96
96
  # Read from standard input.
97
97
  input = $stdin.read
98
- files = [{:input => input}]
98
+ files = [{:input => input, :extension => gist_extension}]
99
99
  end
100
100
 
101
101
  url = write(files, private_gist)
@@ -120,7 +120,7 @@ module Gist
120
120
 
121
121
  http.use_ssl = true
122
122
  http.verify_mode = OpenSSL::SSL::VERIFY_PEER
123
- http.ca_file = File.join(File.dirname(__FILE__), "cacert.pem")
123
+ http.cert = OpenSSL::X509::Certificate.new(ca_cert)
124
124
 
125
125
  req = Net::HTTP::Post.new(url.path)
126
126
  req.form_data = data(files, private_gist)
@@ -169,7 +169,7 @@ private
169
169
  data = {}
170
170
  files.each do |file|
171
171
  i = data.size + 1
172
- data["file_ext[gistfile#{i}]"] = file[:extention] ? file[:extention] : '.txt'
172
+ data["file_ext[gistfile#{i}]"] = file[:extension] ? file[:extension] : '.txt'
173
173
  data["file_name[gistfile#{i}]"] = file[:filename]
174
174
  data["file_contents[gistfile#{i}]"] = file[:input]
175
175
  end
@@ -237,6 +237,12 @@ private
237
237
  end
238
238
 
239
239
  def ca_cert
240
- DATA.read.split("__CACERT__").last
240
+ cert_path = File.join(File.dirname(__FILE__), "gist", "cacert.pem")
241
+
242
+ if File.exists? cert_path
243
+ File.read(cert_path)
244
+ else
245
+ DATA.read.split("__CACERT__").last
246
+ end
241
247
  end
242
248
  end
data/lib/gist/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gist
2
- VERSION = Version = '2.0.0'
2
+ VERSION = Version = '2.0.1'
3
3
  end
data/man/gist.1 CHANGED
@@ -54,7 +54,13 @@ There are two ways to set GitHub user and token info:
54
54
  Using env vars GITHUB_USER and GITHUB_TOKEN
55
55
  .
56
56
  .IP
57
- $ export GITHUB_USER=johndoe $ export GITHUB_TOKEN=mysecretgithubtoken $ gist ~/example
57
+ $ export GITHUB_USER=johndoe
58
+ .
59
+ .br
60
+ $ export GITHUB_TOKEN=mysecretgithubtoken
61
+ .
62
+ .br
63
+ $ gist ~/example
58
64
  .
59
65
  .IP "\(bu" 4
60
66
  Using git\-config(1)
data/man/gist.1.html CHANGED
@@ -127,8 +127,8 @@ to --open</p></dd>
127
127
  <ul>
128
128
  <li><p>Using env vars GITHUB_USER and GITHUB_TOKEN</p>
129
129
 
130
- <p>$ export GITHUB_USER=johndoe
131
- $ export GITHUB_TOKEN=mysecretgithubtoken
130
+ <p>$ export GITHUB_USER=johndoe<br />
131
+ $ export GITHUB_TOKEN=mysecretgithubtoken<br />
132
132
  $ gist ~/example</p></li>
133
133
  <li><p>Using <span class="man-ref">git-config<span class="s">(1)</span></span></p></li>
134
134
  </ul>
data/man/gist.1.ron CHANGED
@@ -52,9 +52,9 @@ There are two ways to set GitHub user and token info:
52
52
 
53
53
  * Using env vars GITHUB_USER and GITHUB_TOKEN
54
54
 
55
- $ export GITHUB_USER=johndoe
56
- $ export GITHUB_TOKEN=mysecretgithubtoken
57
- $ gist ~/example
55
+ $ export GITHUB_USER=johndoe
56
+ $ export GITHUB_TOKEN=mysecretgithubtoken
57
+ $ gist ~/example
58
58
 
59
59
  * Using git-config(1)
60
60
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gist
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 0
10
- version: 2.0.0
9
+ - 1
10
+ version: 2.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Wanstrath
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-11-06 00:00:00 -07:00
19
+ date: 2011-02-21 00:00:00 -08:00
20
20
  default_executable:
21
21
  dependencies: []
22
22