gist 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,6 +42,14 @@ Set the HTTP_PROXY env variable to use a proxy.
42
42
 
43
43
  $ HTTP_PROXY=host:port gist file.rb
44
44
 
45
+ Manual
46
+ ------
47
+
48
+
49
+ Visit <http://defunkt.github.com/gist/> or use:
50
+
51
+ $ gist -m
52
+
45
53
  Ninja vs Shark
46
54
  --------------
47
55
 
data/Rakefile CHANGED
@@ -1,5 +1,9 @@
1
- require "mg"
2
- MG.new("gist.gemspec")
1
+ begin
2
+ require "mg"
3
+ MG.new("gist.gemspec")
4
+ rescue LoadError
5
+ nil
6
+ end
3
7
 
4
8
  desc "Build standalone script and manpages"
5
9
  task :build => [ :standalone, :build_man ]
@@ -117,11 +117,11 @@ module Gist
117
117
  # Tries to copy passed content to the clipboard.
118
118
  def copy(content)
119
119
  cmd = case true
120
- when system("which pbcopy > /dev/null")
120
+ when system("which pbcopy &> /dev/null")
121
121
  :pbcopy
122
- when system("which xclip > /dev/null")
122
+ when system("which xclip &> /dev/null")
123
123
  :xclip
124
- when system("which putclip")
124
+ when system("which putclip &> /dev/null")
125
125
  :putclip
126
126
  end
127
127
 
@@ -137,7 +137,7 @@ private
137
137
  # an appropriate payload for POSTing to gist.github.com
138
138
  def data(name, ext, content, private_gist)
139
139
  return {
140
- 'file_ext[gistfile1]' => ext,
140
+ 'file_ext[gistfile1]' => ext ? ext : '.txt',
141
141
  'file_name[gistfile1]' => name,
142
142
  'file_contents[gistfile1]' => content
143
143
  }.merge(private_gist ? { 'action_button' => 'private' } : {}).merge(auth)
@@ -1,3 +1,3 @@
1
1
  module Gist
2
- VERSION = Version = '1.0.1'
2
+ VERSION = Version = '1.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Wanstrath