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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 091fe3753c7a553d10fb5e2d7d98ce2503932ebe
4
- data.tar.gz: 927ef8fefb867a4a2704d2f67ebafb493c215f1b
3
+ metadata.gz: 9b276a299854d75e76d8fe0869d1ceeead39d9e8
4
+ data.tar.gz: 74327a7f4bc70f57bb30187235635453d4c8e549
5
5
  SHA512:
6
- metadata.gz: 751d685a056028b3c5d45ee9779230b86dffecda2cec4d9c172e41b7637aed0529bbd300449f73c7cd585057880085c24c33d79f1319b9ee3d44c34e2d981362
7
- data.tar.gz: 76c070fb19d75aff6776509558041eb559f977f21772e6af4f1e9a7969ff80b7f37576006c541be28864d668bf8afaba8348ed07d97aba4cca94fe64956b18dc
6
+ metadata.gz: 63cff502b0eed3aa3fb2165b77ec579a69e8a4a5c306c4e431d2a172f75fdaf331b1a842e92ee8200104cd39da3516fc6992c1e9dc20a5ea8e7a6c89b5c8de81
7
+ data.tar.gz: 79c8af26476e7de4f2dff411f6ccffb6bdc3966f45287532275223ed830ed9cce3066bce079240b43f15efeb39dbbc833db0131f6e8770883ff17078f6becb08
@@ -11,7 +11,7 @@ end
11
11
  module Pasting
12
12
  extend self
13
13
 
14
- VERSION = '0.0.3'
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
 
@@ -1,3 +1,3 @@
1
1
  module Pasting
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
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.3
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-27 00:00:00.000000000 Z
11
+ date: 2015-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler