win32-clipboard 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -1,30 +1,26 @@
1
- require "rubygems"
2
-
3
- spec = Gem::Specification.new do |gem|
4
- gem.name = 'win32-clipboard'
5
- gem.version = '0.5.2'
6
- gem.authors = ['Daniel J. Berger', 'Park Heesob']
7
- gem.email = 'djberg96@gmail.com'
8
- gem.homepage = 'http://www.rubyforge.org/projects/win32utils'
9
- gem.platform = Gem::Platform::RUBY
10
- gem.summary = 'A library for interacting with the Windows clipboard'
11
- gem.test_file = 'test/test_clipboard.rb'
12
- gem.has_rdoc = true
13
- gem.license = 'Artistic 2.0'
14
-
15
- gem.extra_rdoc_files = ['CHANGES', 'README', 'MANIFEST']
16
- gem.rubyforge_project = 'win32utils'
17
-
18
- gem.add_dependency('windows-pr', '>= 1.0.3')
19
-
20
- gem.description = <<-EOF
21
- The win32-clipboard library provides an interface for interacting
22
- with the Windows clipboard. It supports the ability to read and
23
- write text, images, files, and Windows metafiles.
24
- EOF
25
-
26
- gem.files = Dir['**/*'].delete_if{ |item| item.include?('CVS') }
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.5.2
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
- date: 2009-07-14 00:00:00 -06:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
17
- name: windows-pr
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
- version_requirement:
20
- version_requirements: !ruby/object:Gem::Requirement
21
- requirements:
22
- - - ">="
23
- - !ruby/object:Gem::Version
24
- version: 1.0.3
25
- version:
26
- description: " The win32-clipboard library provides an interface for interacting\n with the Windows clipboard. It supports the ability to read and\n write text, images, files, and Windows metafiles.\n"
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
- has_rdoc: true
46
- homepage: http://www.rubyforge.org/projects/win32utils
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: "0"
59
- version:
60
- required_rubygems_version: !ruby/object:Gem::Requirement
61
- requirements:
62
- - - ">="
63
- - !ruby/object:Gem::Version
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: 1.3.4
101
+ rubygems_version: 2.2.1
70
102
  signing_key:
71
- specification_version: 3
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