win32-clipboard 0.5.2 → 0.6.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 +7 -0
- data/CHANGES +91 -81
- data/MANIFEST +12 -8
- data/README +112 -112
- data/Rakefile +40 -15
- data/examples/clipboard_test.rb +28 -28
- data/lib/win32/clipboard.rb +414 -412
- data/lib/win32/html_clipboard.rb +232 -0
- data/lib/win32/windows/constants.rb +10 -0
- data/lib/win32/windows/functions.rb +56 -0
- data/lib/win32/windows/structs.rb +43 -0
- data/test/test_clipboard.rb +155 -135
- data/test/test_html_clipboard.rb +50 -0
- data/win32-clipboard.gemspec +26 -30
- metadata +78 -46
@@ -0,0 +1,50 @@
|
|
1
|
+
########################################################################
|
2
|
+
# test_html_clipboard.rb
|
3
|
+
#
|
4
|
+
# Test suite for the HtmlClipboard class.
|
5
|
+
########################################################################
|
6
|
+
require 'test-unit'
|
7
|
+
require 'win32/clipboard'
|
8
|
+
require 'win32/html_clipboard'
|
9
|
+
include Win32
|
10
|
+
|
11
|
+
class TC_Html_Clipboard < Test::Unit::TestCase
|
12
|
+
def setup
|
13
|
+
@html_str = "Writing to the <i>clipboard</i> is <b>easy</b> with this code"
|
14
|
+
@plain_str = "Writing to the clipboard is easy with this code"
|
15
|
+
end
|
16
|
+
|
17
|
+
test "CF_HTML constant is defined" do
|
18
|
+
assert_not_nil(HtmlClipboard::CF_HTML)
|
19
|
+
assert_kind_of(Integer, HtmlClipboard::CF_HTML)
|
20
|
+
end
|
21
|
+
|
22
|
+
test "get_data basic functionality" do
|
23
|
+
assert_respond_to(HtmlClipboard, :get_data)
|
24
|
+
end
|
25
|
+
|
26
|
+
test "set_data basic functionality" do
|
27
|
+
assert_respond_to(HtmlClipboard, :set_data)
|
28
|
+
end
|
29
|
+
|
30
|
+
test "getting html data returns a plain string" do
|
31
|
+
assert_nothing_raised{ HtmlClipboard.set_data(@html_str) }
|
32
|
+
assert_equal(@plain_str, HtmlClipboard.get_data)
|
33
|
+
end
|
34
|
+
|
35
|
+
test "html_format basic functionality" do
|
36
|
+
assert_respond_to(HtmlClipboard, :html_format?)
|
37
|
+
assert_boolean(HtmlClipboard.html_format?)
|
38
|
+
end
|
39
|
+
|
40
|
+
test "data details basic functionality" do
|
41
|
+
assert_respond_to(HtmlClipboard, :data_details)
|
42
|
+
assert_nothing_raised{ HtmlClipboard.data_details }
|
43
|
+
assert_kind_of(String, HtmlClipboard.data_details)
|
44
|
+
end
|
45
|
+
|
46
|
+
def teardown
|
47
|
+
@html_str = nil
|
48
|
+
@plain_str = nil
|
49
|
+
end
|
50
|
+
end
|
data/win32-clipboard.gemspec
CHANGED
@@ -1,30 +1,26 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
end
|
28
|
-
|
29
|
-
Gem.manage_gems if Gem::RubyGemsVersion.to_f < 1.0
|
30
|
-
Gem::Builder.new(spec).build
|
1
|
+
require "rubygems"
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = 'win32-clipboard'
|
5
|
+
spec.version = '0.6.0'
|
6
|
+
spec.authors = ['Daniel J. Berger', 'Park Heesob']
|
7
|
+
spec.license = 'Artistic 2.0'
|
8
|
+
spec.email = 'djberg96@gmail.com'
|
9
|
+
spec.homepage = 'http://github.com/djberg96/win32-clipboard'
|
10
|
+
spec.summary = 'A library for interacting with the Windows clipboard'
|
11
|
+
spec.test_file = 'test/test_clipboard.rb'
|
12
|
+
spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
|
13
|
+
|
14
|
+
spec.extra_rdoc_files = ['CHANGES', 'README', 'MANIFEST']
|
15
|
+
spec.rubyforge_project = 'win32utils'
|
16
|
+
|
17
|
+
spec.add_dependency('ffi')
|
18
|
+
spec.add_development_dependency('test-unit')
|
19
|
+
spec.add_development_dependency('rake')
|
20
|
+
|
21
|
+
spec.description = <<-EOF
|
22
|
+
The win32-clipboard library provides an interface for interacting
|
23
|
+
with the Windows clipboard. It supports the ability to read and
|
24
|
+
write text, images, files, and Windows metafiles.
|
25
|
+
EOF
|
26
|
+
end
|
metadata
CHANGED
@@ -1,74 +1,106 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-clipboard
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Daniel J. Berger
|
8
8
|
- Park Heesob
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
date: 2014-01-12 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: ffi
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - '>='
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
18
21
|
type: :runtime
|
19
|
-
|
20
|
-
version_requirements: !ruby/object:Gem::Requirement
|
21
|
-
requirements:
|
22
|
-
- -
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version:
|
25
|
-
|
26
|
-
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - '>='
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: test-unit
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rake
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
description: |2
|
57
|
+
The win32-clipboard library provides an interface for interacting
|
58
|
+
with the Windows clipboard. It supports the ability to read and
|
59
|
+
write text, images, files, and Windows metafiles.
|
27
60
|
email: djberg96@gmail.com
|
28
61
|
executables: []
|
29
|
-
|
30
62
|
extensions: []
|
31
|
-
|
32
|
-
extra_rdoc_files:
|
63
|
+
extra_rdoc_files:
|
33
64
|
- CHANGES
|
34
65
|
- README
|
35
66
|
- MANIFEST
|
36
|
-
files:
|
67
|
+
files:
|
37
68
|
- CHANGES
|
38
|
-
- examples/clipboard_test.rb
|
39
|
-
- lib/win32/clipboard.rb
|
40
69
|
- MANIFEST
|
41
|
-
- Rakefile
|
42
70
|
- README
|
71
|
+
- Rakefile
|
72
|
+
- examples/clipboard_test.rb
|
73
|
+
- lib/win32/clipboard.rb
|
74
|
+
- lib/win32/html_clipboard.rb
|
75
|
+
- lib/win32/windows/constants.rb
|
76
|
+
- lib/win32/windows/functions.rb
|
77
|
+
- lib/win32/windows/structs.rb
|
43
78
|
- test/test_clipboard.rb
|
79
|
+
- test/test_html_clipboard.rb
|
44
80
|
- win32-clipboard.gemspec
|
45
|
-
|
46
|
-
|
47
|
-
licenses:
|
81
|
+
homepage: http://github.com/djberg96/win32-clipboard
|
82
|
+
licenses:
|
48
83
|
- Artistic 2.0
|
84
|
+
metadata: {}
|
49
85
|
post_install_message:
|
50
86
|
rdoc_options: []
|
51
|
-
|
52
|
-
require_paths:
|
87
|
+
require_paths:
|
53
88
|
- lib
|
54
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
55
|
-
requirements:
|
56
|
-
- -
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
version:
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
version: "0"
|
65
|
-
version:
|
89
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
66
99
|
requirements: []
|
67
|
-
|
68
100
|
rubyforge_project: win32utils
|
69
|
-
rubygems_version:
|
101
|
+
rubygems_version: 2.2.1
|
70
102
|
signing_key:
|
71
|
-
specification_version:
|
103
|
+
specification_version: 4
|
72
104
|
summary: A library for interacting with the Windows clipboard
|
73
|
-
test_files:
|
105
|
+
test_files:
|
74
106
|
- test/test_clipboard.rb
|