win32-shortcut 0.2.2 → 0.2.3
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/CHANGES +5 -1
- data/examples/example_shortcut.rb +28 -0
- data/lib/win32/shortcut.rb +1 -1
- data/test/test_shortcut.rb +3 -3
- data/win32-shortcut.gemspec +21 -20
- metadata +10 -12
data/CHANGES
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
== 0.2.3 - 6-Aug-2009
|
2
|
+
* License changed to Artistic 2.0.
|
3
|
+
* Some gemspec updates, including license and description.
|
4
|
+
|
1
5
|
== 0.2.2 - 10-Jul-2008
|
2
6
|
* Fixed a bug where creating folder shortcuts would fail if forward slashes
|
3
7
|
were used. All forward slashes are now converted to backslashes internally.
|
@@ -52,4 +56,4 @@
|
|
52
56
|
* Modified some documentation to be more rdoc friendly.
|
53
57
|
|
54
58
|
== 0.1.0 - 28-Sep-2004
|
55
|
-
* Initial release
|
59
|
+
* Initial release
|
@@ -0,0 +1,28 @@
|
|
1
|
+
###########################################################################
|
2
|
+
# example_shortcut.rb
|
3
|
+
#
|
4
|
+
# This will create a shortcut on your desktop to the the Notepad
|
5
|
+
# application. Please delete when finished.
|
6
|
+
############################################################################
|
7
|
+
Dir.chdir('..') if File.basename(Dir.pwd) == 'examples'
|
8
|
+
$LOAD_PATH.unshift(Dir.pwd + '/lib')
|
9
|
+
|
10
|
+
require 'win32/shortcut'
|
11
|
+
require 'win32/dir'
|
12
|
+
include Win32
|
13
|
+
|
14
|
+
puts Shortcut::VERSION
|
15
|
+
|
16
|
+
Shortcut.new(Dir::DESKTOP + '\Shortcut Script.lnk') do |s|
|
17
|
+
s.path = "c:\\" << Dir::WINDOWS << "\\notepad.exe"
|
18
|
+
s.window_style = Shortcut::SHOWNORMAL
|
19
|
+
s.hotkey = "CTRL+SHIFT+F"
|
20
|
+
s.icon_location = "notepad.exe"
|
21
|
+
s.description = "Shortcut Script"
|
22
|
+
s.working_directory = Dir::DESKTOP
|
23
|
+
end
|
24
|
+
|
25
|
+
sc = Shortcut.open(Dir::DESKTOP + '\Shortcut Script.lnk')
|
26
|
+
p sc.path
|
27
|
+
p sc.window_style
|
28
|
+
p sc.hotkey
|
data/lib/win32/shortcut.rb
CHANGED
@@ -5,7 +5,7 @@ module Win32
|
|
5
5
|
# The Shortcut class encapsulates an MS Windows shortcut.
|
6
6
|
class Shortcut
|
7
7
|
# The version of this library
|
8
|
-
VERSION = '0.2.
|
8
|
+
VERSION = '0.2.3'
|
9
9
|
|
10
10
|
# Activates and displays a window. If the window is minimized or maximized,
|
11
11
|
# the system restores it to its original size and position. An application
|
data/test/test_shortcut.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##############################################################################
|
2
|
-
#
|
2
|
+
# test_shortcut.rb
|
3
3
|
#
|
4
|
-
# Test suite for the win32-shortcut
|
4
|
+
# Test suite for the win32-shortcut library. This will temporarily create
|
5
5
|
# a link to Notepad in the current directory, which should be automatically
|
6
6
|
# deleted by this test suite.
|
7
7
|
#
|
@@ -18,7 +18,7 @@ class TC_Shortcut < Test::Unit::TestCase
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def test_version
|
21
|
-
assert_equal('0.2.
|
21
|
+
assert_equal('0.2.3', Shortcut::VERSION)
|
22
22
|
end
|
23
23
|
|
24
24
|
def test_arguments
|
data/win32-shortcut.gemspec
CHANGED
@@ -1,24 +1,25 @@
|
|
1
|
-
require
|
1
|
+
require 'rubygems'
|
2
2
|
|
3
3
|
spec = Gem::Specification.new do |gem|
|
4
|
-
gem.name
|
5
|
-
gem.version
|
6
|
-
gem.author
|
7
|
-
gem.
|
8
|
-
gem.
|
9
|
-
gem.
|
10
|
-
gem.platform
|
11
|
-
gem.summary
|
12
|
-
gem.
|
13
|
-
gem.
|
14
|
-
gem.
|
15
|
-
|
16
|
-
gem.
|
17
|
-
gem.
|
18
|
-
gem.extra_rdoc_files = ["README", "CHANGES", "MANIFEST"]
|
19
|
-
end
|
4
|
+
gem.name = 'win32-shortcut'
|
5
|
+
gem.version = '0.2.3'
|
6
|
+
gem.author = 'Daniel J. Berger'
|
7
|
+
gem.license = 'Artistic 2.0'
|
8
|
+
gem.email = 'djberg96@gmail.com'
|
9
|
+
gem.homepage = 'http://www.rubyforge.org/projects/win32utils'
|
10
|
+
gem.platform = Gem::Platform::RUBY
|
11
|
+
gem.summary = 'An interface for creating or modifying Windows shortcuts.'
|
12
|
+
gem.test_file = 'test/test_shortcut.rb'
|
13
|
+
gem.has_rdoc = true
|
14
|
+
gem.files = Dir['**/*'].reject{ |f| f.include?('CVS') }
|
15
|
+
|
16
|
+
gem.rubyforge_project = 'win32utils'
|
17
|
+
gem.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
|
20
18
|
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
gem.description = <<-EOF
|
20
|
+
The win32-shortcut library provides an interface for creating new
|
21
|
+
Windows shortcuts or querying information about existing shortcuts.
|
22
|
+
EOF
|
24
23
|
end
|
24
|
+
|
25
|
+
Gem::Builder.new(spec).build
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-shortcut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -9,11 +9,11 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-08-06 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
16
|
-
description:
|
16
|
+
description: " The win32-shortcut library provides an interface for creating new\n Windows shortcuts or querying information about existing shortcuts.\n"
|
17
17
|
email: djberg96@gmail.com
|
18
18
|
executables: []
|
19
19
|
|
@@ -24,20 +24,18 @@ extra_rdoc_files:
|
|
24
24
|
- CHANGES
|
25
25
|
- MANIFEST
|
26
26
|
files:
|
27
|
-
- lib/win32/shortcut.rb
|
28
|
-
- test/CVS
|
29
|
-
- test/test_shortcut.rb
|
30
27
|
- CHANGES
|
31
|
-
-
|
32
|
-
-
|
33
|
-
- lib
|
28
|
+
- examples/example_shortcut.rb
|
29
|
+
- lib/win32/shortcut.rb
|
34
30
|
- MANIFEST
|
35
31
|
- Rakefile
|
36
32
|
- README
|
37
|
-
- test
|
33
|
+
- test/test_shortcut.rb
|
38
34
|
- win32-shortcut.gemspec
|
39
35
|
has_rdoc: true
|
40
36
|
homepage: http://www.rubyforge.org/projects/win32utils
|
37
|
+
licenses:
|
38
|
+
- Artistic 2.0
|
41
39
|
post_install_message:
|
42
40
|
rdoc_options: []
|
43
41
|
|
@@ -58,9 +56,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
56
|
requirements: []
|
59
57
|
|
60
58
|
rubyforge_project: win32utils
|
61
|
-
rubygems_version: 1.
|
59
|
+
rubygems_version: 1.3.4
|
62
60
|
signing_key:
|
63
|
-
specification_version:
|
61
|
+
specification_version: 3
|
64
62
|
summary: An interface for creating or modifying Windows shortcuts.
|
65
63
|
test_files:
|
66
64
|
- test/test_shortcut.rb
|