jist 1.1.1.pre.1 → 1.1.1.pre.2
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.
- data/jist.gemspec +1 -0
- data/lib/jist.rb +4 -4
- metadata +17 -1
data/jist.gemspec
CHANGED
data/lib/jist.rb
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
require 'net/https'
|
2
2
|
require 'cgi'
|
3
3
|
require 'json'
|
4
|
+
require 'clippy'
|
4
5
|
|
5
6
|
# It just gists.
|
6
7
|
module Jist
|
7
8
|
extend self
|
8
9
|
|
9
|
-
VERSION = '1.1.1.pre.
|
10
|
+
VERSION = '1.1.1.pre.2'
|
10
11
|
|
11
12
|
# A list of clipboard commands with copy and paste support.
|
12
13
|
CLIPBOARD_COMMANDS = {
|
@@ -202,8 +203,7 @@ module Jist
|
|
202
203
|
# This method was heavily inspired by defunkt's Gist#copy,
|
203
204
|
# @see https://github.com/defunkt/gist/blob/bca9b29/lib/gist.rb#L178
|
204
205
|
def copy(content)
|
205
|
-
|
206
|
-
raise "Copying to clipboard failed" unless paste == content
|
206
|
+
Clippy.copy(content)
|
207
207
|
end
|
208
208
|
|
209
209
|
# Get a string from the clipboard.
|
@@ -211,7 +211,7 @@ module Jist
|
|
211
211
|
# @param [String] content
|
212
212
|
# @raise [RuntimeError] if no clipboard integration could be found
|
213
213
|
def paste
|
214
|
-
|
214
|
+
Clippy.paste(content)
|
215
215
|
end
|
216
216
|
|
217
217
|
# Find command from PATH environment.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.1.pre.
|
4
|
+
version: 1.1.1.pre.2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,6 +11,22 @@ bindir: bin
|
|
11
11
|
cert_chain: []
|
12
12
|
date: 2012-10-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: clippy
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
14
30
|
- !ruby/object:Gem::Dependency
|
15
31
|
name: json
|
16
32
|
requirement: !ruby/object:Gem::Requirement
|