clipboard 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +3 -0
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/clipboard.gemspec +1 -1
- data/lib/clipboard/windows.rb +2 -2
- metadata +4 -6
data/CHANGELOG.rdoc
CHANGED
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.8
|
data/clipboard.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.homepage = %q{http://github.com/janlelis/clipboard}
|
14
14
|
s.required_rubygems_version = ">= 1.3.6"
|
15
15
|
s.requirements = ["On Linux (or other X), you need xclip. Install it on debian/ubuntu with sudo apt-get install xclip"]
|
16
|
-
s.requirements
|
16
|
+
s.requirements += ["On Windows, you need the ffi gem."]
|
17
17
|
s.files = Dir.glob(%w[{lib,spec}/**/*.rb [A-Z]* [A-Z]*.rdoc]) + %w{clipboard.gemspec .gemtest}
|
18
18
|
s.add_development_dependency 'rake'
|
19
19
|
s.add_development_dependency 'rspec', '>=2'
|
data/lib/clipboard/windows.rb
CHANGED
@@ -52,7 +52,7 @@ module Clipboard::Windows
|
|
52
52
|
data << pointer_to_data.get_bytes( current_byte, 1 )
|
53
53
|
current_byte += 1
|
54
54
|
end
|
55
|
-
if
|
55
|
+
if RUBY_VERSION >= '1.9'
|
56
56
|
ret = data.chop.force_encoding("UTF-16LE").encode(Encoding.default_external) # TODO catch bad encodings
|
57
57
|
else # 1.8: fallback to simple CP850 encoding
|
58
58
|
require 'iconv'
|
@@ -77,7 +77,7 @@ module Clipboard::Windows
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def copy(data_to_copy)
|
80
|
-
if
|
80
|
+
if ( RUBY_VERSION >= '1.9' ) && 0 != User32.open( 0 )
|
81
81
|
User32.empty( )
|
82
82
|
data = data_to_copy.encode("UTF-16LE") # TODO catch bad encodings
|
83
83
|
data << 0 << 0
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: clipboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.9.
|
5
|
+
version: 0.9.8
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jan Lelis
|
@@ -10,8 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-02-08 00:00:00
|
14
|
-
default_executable:
|
13
|
+
date: 2011-02-08 00:00:00 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: rake
|
@@ -61,7 +60,6 @@ files:
|
|
61
60
|
- CHANGELOG.rdoc
|
62
61
|
- clipboard.gemspec
|
63
62
|
- .gemtest
|
64
|
-
has_rdoc: true
|
65
63
|
homepage: http://github.com/janlelis/clipboard
|
66
64
|
licenses: []
|
67
65
|
|
@@ -84,9 +82,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
82
|
version: 1.3.6
|
85
83
|
requirements:
|
86
84
|
- On Linux (or other X), you need xclip. Install it on debian/ubuntu with sudo apt-get install xclip
|
87
|
-
-
|
85
|
+
- On Windows, you need the ffi gem.
|
88
86
|
rubyforge_project:
|
89
|
-
rubygems_version: 1.
|
87
|
+
rubygems_version: 1.7.2
|
90
88
|
signing_key:
|
91
89
|
specification_version: 3
|
92
90
|
summary: Access the clipboard on all systems.
|