gist 6.0.0 → 6.1.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.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/bin/gist +2 -1
- data/lib/gist.rb +6 -6
- data/vendor/json.rb +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a81ce3967b1095ead6ba1ca877a9c3f6de348de6a30b0f3d43489bbde1e82d2f
|
|
4
|
+
data.tar.gz: adc00b10a3514227ecfe8250a0a22af8df929e3cbffec78d33b0ec3cbf52dc2c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 450ee25c8f289acb02aa085ffe140801ed32ead7679f98d2e426315e2586c63224304dc4660820a80d75c3c6b011794cc53b6815d8754bddf4ba592b950197e7
|
|
7
|
+
data.tar.gz: 5831bd45e6d92a280e91ff4c7b28b635920480de9c663d473b37d3510cb5fe881d47583b976a5d7531e54df00cfdfa42ffe44ccb3be55ffb0f4829b38a2068ab
|
data/README.md
CHANGED
data/bin/gist
CHANGED
data/lib/gist.rb
CHANGED
|
@@ -12,7 +12,7 @@ end
|
|
|
12
12
|
module Gist
|
|
13
13
|
extend self
|
|
14
14
|
|
|
15
|
-
VERSION = '6.
|
|
15
|
+
VERSION = '6.1.0'
|
|
16
16
|
|
|
17
17
|
# A list of clipboard commands with copy and paste support.
|
|
18
18
|
CLIPBOARD_COMMANDS = {
|
|
@@ -103,7 +103,7 @@ module Gist
|
|
|
103
103
|
# @option options [Boolean] :skip_empty (false) Skip gisting empty files.
|
|
104
104
|
# @option options [Symbol] :output (:all) The type of return value you'd like:
|
|
105
105
|
# :html_url gives a String containing the url to the gist in a browser
|
|
106
|
-
# :short_url gives a String
|
|
106
|
+
# :short_url gives a String containing a git.io url that redirects to html_url
|
|
107
107
|
# :javascript gives a String containing a script tag suitable for embedding the gist
|
|
108
108
|
# :all gives a Hash containing the parsed json response from the server
|
|
109
109
|
#
|
|
@@ -212,10 +212,10 @@ module Gist
|
|
|
212
212
|
get_gist_pages(url, auth_token())
|
|
213
213
|
end
|
|
214
214
|
|
|
215
|
-
def read_gist(id, file_name=nil)
|
|
215
|
+
def read_gist(id, file_name=nil, options={})
|
|
216
216
|
url = "#{base_path}/gists/#{id}"
|
|
217
217
|
|
|
218
|
-
access_token = auth_token()
|
|
218
|
+
access_token = (options[:access_token] || auth_token())
|
|
219
219
|
|
|
220
220
|
request = Net::HTTP::Get.new(url)
|
|
221
221
|
request['Authorization'] = "token #{access_token}" if access_token.to_s != ''
|
|
@@ -232,7 +232,7 @@ module Gist
|
|
|
232
232
|
file = files.values.first
|
|
233
233
|
end
|
|
234
234
|
|
|
235
|
-
|
|
235
|
+
file["content"]
|
|
236
236
|
else
|
|
237
237
|
raise Error, "Gist with id of #{id} does not exist."
|
|
238
238
|
end
|
|
@@ -464,7 +464,7 @@ module Gist
|
|
|
464
464
|
end
|
|
465
465
|
if uri.scheme == "https"
|
|
466
466
|
connection.use_ssl = true
|
|
467
|
-
connection.verify_mode = OpenSSL::SSL::
|
|
467
|
+
connection.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
|
468
468
|
end
|
|
469
469
|
connection.open_timeout = 10
|
|
470
470
|
connection.read_timeout = 10
|
data/vendor/json.rb
CHANGED
|
@@ -44,7 +44,7 @@ module JSON
|
|
|
44
44
|
/(?=\*/) # single slash before this comment's end
|
|
45
45
|
)*
|
|
46
46
|
\*/ # the End of this comment
|
|
47
|
-
|[ \t\r\n]+ # whitespaces: space,
|
|
47
|
+
|[ \t\r\n]+ # whitespaces: space, horizontal tab, lf, cr
|
|
48
48
|
)+
|
|
49
49
|
)mx
|
|
50
50
|
|
|
@@ -64,7 +64,7 @@ module JSON
|
|
|
64
64
|
# (keys) in a JSON object. Otherwise strings are returned, which is also
|
|
65
65
|
# the default.
|
|
66
66
|
# * *create_additions*: If set to false, the Parser doesn't create
|
|
67
|
-
# additions even if a
|
|
67
|
+
# additions even if a matching class and create_id was found. This option
|
|
68
68
|
# defaults to true.
|
|
69
69
|
# * *object_class*: Defaults to Hash
|
|
70
70
|
# * *array_class*: Defaults to Array
|
|
@@ -1265,7 +1265,7 @@ module ::Kernel
|
|
|
1265
1265
|
nil
|
|
1266
1266
|
end
|
|
1267
1267
|
|
|
1268
|
-
#
|
|
1268
|
+
# Outputs _objs_ to STDOUT as JSON strings in a pretty format, with
|
|
1269
1269
|
# indentation and over many lines.
|
|
1270
1270
|
def jj(*objs)
|
|
1271
1271
|
objs.each do |obj|
|
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: 6.
|
|
4
|
+
version: 6.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Conrad Irwin
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2026-06-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rake
|
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
112
112
|
- !ruby/object:Gem::Version
|
|
113
113
|
version: '0'
|
|
114
114
|
requirements: []
|
|
115
|
-
rubygems_version: 3.0.3
|
|
115
|
+
rubygems_version: 3.0.3.1
|
|
116
116
|
signing_key:
|
|
117
117
|
specification_version: 4
|
|
118
118
|
summary: Just allows you to upload gists
|