jist 0.10.0.pre.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/jist +8 -2
- data/lib/jist.rb +1 -1
- metadata +4 -4
data/bin/jist
CHANGED
@@ -13,7 +13,7 @@ opts = OptionParser.new do |opts|
|
|
13
13
|
opts.banner = <<-EOS
|
14
14
|
Jist (v#{Jist::VERSION}) lets you upload to https://gist.github.com/
|
15
15
|
|
16
|
-
Usage: #{executable_name} [-o|-c] [-p] [-d DESC] [-t TOKEN|-a] [-u URL] [-f NAME]*
|
16
|
+
Usage: #{executable_name} [-o|-c] [-p] [-d DESC] [-t TOKEN|-a] [-u URL] [-P] [-f NAME]* FILE*
|
17
17
|
#{executable_name} --login
|
18
18
|
|
19
19
|
The content to be uploaded can be passed as a list of files, if none are
|
@@ -80,6 +80,10 @@ original gist with the same GitHub account.
|
|
80
80
|
options[:open] = true
|
81
81
|
end
|
82
82
|
|
83
|
+
opts.on("-P", "--paste", "Paste from the clipboard to jist") do
|
84
|
+
options[:paste] = true
|
85
|
+
end
|
86
|
+
|
83
87
|
opts.on_tail("-h","--help", "Show this message.") do
|
84
88
|
puts opts
|
85
89
|
exit
|
@@ -94,7 +98,9 @@ end
|
|
94
98
|
opts.parse!
|
95
99
|
|
96
100
|
begin
|
97
|
-
if
|
101
|
+
if options[:paste]
|
102
|
+
puts Jist.gist(Jist.paste, options)['html_url']
|
103
|
+
elsif ARGV.size == 0
|
98
104
|
$stderr.puts "(type a gist. <ctrl-c> to cancel, <ctrl-d> when done)" if $stdin.tty?
|
99
105
|
puts Jist.gist(ARGF.read, options)['html_url']
|
100
106
|
else
|
data/lib/jist.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Conrad Irwin
|
@@ -83,9 +83,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
83
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
|
-
- - ! '
|
86
|
+
- - ! '>='
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
88
|
+
version: '0'
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project:
|
91
91
|
rubygems_version: 1.8.24
|