pasting 0.0.3 → 0.0.4
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/lib/pasting.rb +5 -4
- data/lib/pasting/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b276a299854d75e76d8fe0869d1ceeead39d9e8
|
4
|
+
data.tar.gz: 74327a7f4bc70f57bb30187235635453d4c8e549
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63cff502b0eed3aa3fb2165b77ec579a69e8a4a5c306c4e431d2a172f75fdaf331b1a842e92ee8200104cd39da3516fc6992c1e9dc20a5ea8e7a6c89b5c8de81
|
7
|
+
data.tar.gz: 79c8af26476e7de4f2dff411f6ccffb6bdc3966f45287532275223ed830ed9cce3066bce079240b43f15efeb39dbbc833db0131f6e8770883ff17078f6becb08
|
data/lib/pasting.rb
CHANGED
@@ -11,7 +11,7 @@ end
|
|
11
11
|
module Pasting
|
12
12
|
extend self
|
13
13
|
|
14
|
-
VERSION = '0.0.
|
14
|
+
VERSION = '0.0.4'
|
15
15
|
|
16
16
|
PASTING_API_URL = URI.encode("http://api.pasting.io/".strip)
|
17
17
|
|
@@ -100,7 +100,7 @@ module Pasting
|
|
100
100
|
response = http.request(request)
|
101
101
|
|
102
102
|
if Net::HTTPSuccess === response
|
103
|
-
messsage = on_success(response.body)
|
103
|
+
messsage = on_success(response.body, options)
|
104
104
|
puts "#{messsage}"
|
105
105
|
begin
|
106
106
|
IO.popen('pbcopy', 'r+') { |clip| clip.print messsage }
|
@@ -120,9 +120,10 @@ module Pasting
|
|
120
120
|
# the documentation for {multi_gist}
|
121
121
|
def on_success(body, options={})
|
122
122
|
json = JSON.parse(body)
|
123
|
-
|
124
123
|
output = "http://pasting.io/p/#{json["documentId"]}"
|
125
|
-
|
124
|
+
if options[:private]
|
125
|
+
output = output + "/#{json["hash"]}"
|
126
|
+
end
|
126
127
|
output
|
127
128
|
end
|
128
129
|
|
data/lib/pasting/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pasting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Facundo Guerrero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|