win32-shortcut 0.2.4 → 0.2.5

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d92d92fae988ee2c3dceba4de32a9378ac518b3b
4
+ data.tar.gz: 72e64e4d2a1ce958388de65e09402182b46259d3
5
+ SHA512:
6
+ metadata.gz: 1cd71ac67ed580d792d49ce8aed4804417ac29f927c6de49cf255737469af2ce237d17fa2f203da7c50c87019e440addae4b4679c6496082ecc899dc93f2f9c1
7
+ data.tar.gz: bc55d55ec1397fa0002af6de29ad1c1ebe4b2e3bbd800a8a989201e79e517441b9c56950cef315a2e808339d12fc24fef08defd76f0ceb070b0968797697d3bf
@@ -0,0 +1 @@
1
+ Gˈ���' �1�3(2�T��L/���7��#���3&���Ϗ���g�\k�$P�]����Qq���7C{43���K>��2ή�<�3�I���t ��;� ���- �����dH%�{��ŦRsɂ4�v���o���d��&V{�=>`vJ~ݍ��vU` jL��8�1_�B�$��ubH�IUc�b��-��Pw85ڱQ 2�}�3���/2 �>�&
@@ -0,0 +1,3 @@
1
+ TZIr}�s���4��V��$��G�����6��X>)���'����05D |-���3Y`H��\d)27�Z��Ӝ�e�\"d��6��]��T��(EiS�L��K���bP���l E�j�1�U�b��@���A��" s�:��6�
2
+ �n�<� a�n�vs�J�"��7k~�>�ߺ��H���n"�7�fP�}�f�e8��SC*J\?'"&v�3��mg(��(�}�ec�E��
3
+ ���' ��$L{�=�Ϯ@VK4�
data/CHANGES CHANGED
@@ -1,3 +1,10 @@
1
+ == 0.2.5 - 15-Jan-2016
2
+ * This gem is now signed.
3
+ * The gem related tasks in the Rakefile now assume Rubygems 2.x.
4
+ * Fixed a deprecation warning in the test suite.
5
+ * Miscellaneous updates to the gemspec.
6
+ * A win32-shortcut.rb file was added for convenience.
7
+
1
8
  == 0.2.4 - 18-Mar-2012
2
9
  * Refactored and updated the Rakefile and gemspec.
3
10
 
data/MANIFEST CHANGED
@@ -4,5 +4,7 @@
4
4
  * Rakefile
5
5
  * win32-shortcut.gemspec
6
6
  * examples/example_shortcut.rb
7
+ * certs/djberg96_pub.pem
8
+ * lib/win32-shortcut.rb
7
9
  * lib/win32/shortcut.rb
8
- * test/test_shortcut.rb
10
+ * test/test_shortcut.rb
data/README CHANGED
@@ -30,7 +30,7 @@
30
30
  Ideas welcome. Please submit them on the project page.
31
31
 
32
32
  == Copyright
33
- (C) 2003-2012, Daniel J. Berger, All Rights Reserved
33
+ (C) 2003-2016, Daniel J. Berger, All Rights Reserved
34
34
 
35
35
  == License
36
36
  Artistic 2.0
data/Rakefile CHANGED
@@ -7,15 +7,17 @@ CLEAN.include("**/*.gem")
7
7
  namespace :gem do
8
8
  desc "Create theh win32-shortcut gem"
9
9
  task :create => [:clean] do
10
+ require 'rubygems/package'
10
11
  spec = eval(IO.read('win32-shortcut.gemspec'))
11
- Gem::Builder.new(spec).build
12
+ spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
13
+ Gem::Package.build(spec, true)
12
14
  end
13
15
 
14
16
  desc "Install the win32-shortcut gem"
15
17
  task :install => [:create] do
16
18
  ruby 'win32-shortcut.gemspec'
17
19
  file = Dir["*.gem"].first
18
- sh "gem install #{file}"
20
+ sh "gem install -l #{file}"
19
21
  end
20
22
  end
21
23
 
@@ -0,0 +1,21 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhkamJl
3
+ cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
4
+ MB4XDTE1MDkwMjIwNDkxOFoXDTE2MDkwMTIwNDkxOFowPzERMA8GA1UEAwwIZGpi
5
+ ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
6
+ bTCCASIwDQYJKoZIhvcNA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+ '\Shortcut Script.lnk') do |s|
17
- s.path = "c:\\" << Dir::WINDOWS << "\\notepad.exe"
17
+ s.path = Dir::WINDOWS << "\\notepad.exe"
18
18
  s.window_style = Shortcut::SHOWNORMAL
19
19
  s.hotkey = "CTRL+SHIFT+F"
20
20
  s.icon_location = "notepad.exe"
@@ -25,4 +25,4 @@ end
25
25
  sc = Shortcut.open(Dir::DESKTOP + '\Shortcut Script.lnk')
26
26
  p sc.path
27
27
  p sc.window_style
28
- p sc.hotkey
28
+ p sc.hotkey
@@ -0,0 +1 @@
1
+ require_relative 'win32/shortcut'
@@ -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.4'
8
+ VERSION = '0.2.5'
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
@@ -4,7 +4,7 @@
4
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
+ #
8
8
  # You should run this test case via the 'rake test' task.
9
9
  ##############################################################################
10
10
  require 'win32/shortcut'
@@ -12,102 +12,102 @@ require 'test/unit'
12
12
  include Win32
13
13
 
14
14
  class TC_Shortcut < Test::Unit::TestCase
15
- def setup
16
- @link = File.join(Dir.pwd, 'test.lnk')
17
- @sc = Shortcut.new(@link)
18
- end
19
-
20
- def test_version
21
- assert_equal('0.2.3', Shortcut::VERSION)
22
- end
23
-
24
- def test_arguments
25
- assert_respond_to(@sc, :arguments)
26
- assert_respond_to(@sc, :arguments=)
27
- assert_nothing_raised{ @sc.arguments }
28
- assert_nothing_raised{ @sc.arguments = '-v' }
29
- end
30
-
31
- def test_description
32
- assert_respond_to(@sc, :description)
33
- assert_respond_to(@sc, :description=)
34
- assert_nothing_raised{ @sc.description }
35
- assert_nothing_raised{ @sc.description = "test link" }
36
- end
37
-
38
- def test_file
39
- assert_respond_to(@sc, :file)
40
- assert_nothing_raised{ @sc.file }
41
- end
42
-
43
- # TODO: Figure out why hotkey assignment fails here. It works fine in
44
- # the example program.
45
- #
46
- def test_hotkey
47
- assert_respond_to(@sc, :hotkey)
48
- assert_respond_to(@sc, :hotkey=)
49
- assert_nothing_raised{ @sc.hotkey }
50
- #assert_nothing_raised{ @sc.hotkey = "CTRL-SHIFT-F" }
51
- end
52
-
53
- def test_icon_location
54
- assert_respond_to(@sc, :icon_location)
55
- assert_respond_to(@sc, :icon_location=)
56
- assert_nothing_raised{ @sc.icon_location }
57
- assert_nothing_raised{ @sc.icon_location = "notepad.exe"}
58
- end
59
-
60
- def test_path
61
- assert_respond_to(@sc, :path)
62
- assert_respond_to(@sc, :path=)
63
- assert_nothing_raised{ @sc.path }
64
- assert_nothing_raised{ @sc.path = 'c:\winnt\notepad.exe' }
65
- end
66
-
67
- def test_open
68
- shortcut = Shortcut.new(@link)
69
- shortcut.save
70
-
71
- assert_respond_to(Shortcut, :open)
72
- assert_nothing_raised{ Shortcut.open(@link) }
73
- end
74
-
75
- def test_open_expected_errors
76
- assert_raise(ArgumentError){ Shortcut.open('bogus') }
77
- end
78
-
79
- def test_resolve
80
- assert_respond_to(@sc, :resolve)
81
- end
82
-
83
- def test_save
84
- assert_respond_to(@sc, :save)
85
- assert_nothing_raised{ @sc.save }
86
- assert_equal(true, File.exists?(@link))
87
- end
88
-
89
- def test_window_style
90
- assert_respond_to(@sc, :window_style)
91
- assert_respond_to(@sc, :window_style=)
92
- assert_nothing_raised{ @sc.window_style }
93
- assert_nothing_raised{ @sc.window_style = Shortcut::SHOWNORMAL }
94
- end
95
-
96
- def test_working_directory
97
- assert_respond_to(@sc, :working_directory)
98
- assert_respond_to(@sc, :working_directory=)
99
- assert_nothing_raised{ @sc.working_directory }
100
- assert_nothing_raised{ @sc.working_directory = "c:\\" }
101
- end
102
-
103
- def test_constants
104
- assert_not_nil(Shortcut::SHOWNORMAL)
105
- assert_not_nil(Shortcut::SHOWMINNOACTIVE)
106
- assert_not_nil(Shortcut::SHOWMAXIMIZED)
107
- end
108
-
109
- def teardown
110
- @sc = nil
111
- File.delete(@link) if File.exists?(@link)
112
- end
113
- end
15
+ def setup
16
+ @link = File.join(Dir.pwd, 'test.lnk')
17
+ @sc = Shortcut.new(@link)
18
+ end
19
+
20
+ def test_version
21
+ assert_equal('0.2.5', Shortcut::VERSION)
22
+ end
23
+
24
+ def test_arguments
25
+ assert_respond_to(@sc, :arguments)
26
+ assert_respond_to(@sc, :arguments=)
27
+ assert_nothing_raised{ @sc.arguments }
28
+ assert_nothing_raised{ @sc.arguments = '-v' }
29
+ end
30
+
31
+ def test_description
32
+ assert_respond_to(@sc, :description)
33
+ assert_respond_to(@sc, :description=)
34
+ assert_nothing_raised{ @sc.description }
35
+ assert_nothing_raised{ @sc.description = "test link" }
36
+ end
37
+
38
+ def test_file
39
+ assert_respond_to(@sc, :file)
40
+ assert_nothing_raised{ @sc.file }
41
+ end
42
+
43
+ # TODO: Figure out why hotkey assignment fails here. It works fine in
44
+ # the example program.
45
+ #
46
+ def test_hotkey
47
+ assert_respond_to(@sc, :hotkey)
48
+ assert_respond_to(@sc, :hotkey=)
49
+ assert_nothing_raised{ @sc.hotkey }
50
+ #assert_nothing_raised{ @sc.hotkey = "CTRL-SHIFT-F" }
51
+ end
52
+
53
+ def test_icon_location
54
+ assert_respond_to(@sc, :icon_location)
55
+ assert_respond_to(@sc, :icon_location=)
56
+ assert_nothing_raised{ @sc.icon_location }
57
+ assert_nothing_raised{ @sc.icon_location = "notepad.exe"}
58
+ end
59
+
60
+ def test_path
61
+ assert_respond_to(@sc, :path)
62
+ assert_respond_to(@sc, :path=)
63
+ assert_nothing_raised{ @sc.path }
64
+ assert_nothing_raised{ @sc.path = 'c:\winnt\notepad.exe' }
65
+ end
66
+
67
+ def test_open
68
+ shortcut = Shortcut.new(@link)
69
+ shortcut.save
70
+
71
+ assert_respond_to(Shortcut, :open)
72
+ assert_nothing_raised{ Shortcut.open(@link) }
73
+ end
74
+
75
+ def test_open_expected_errors
76
+ assert_raise(ArgumentError){ Shortcut.open('bogus') }
77
+ end
78
+
79
+ def test_resolve
80
+ assert_respond_to(@sc, :resolve)
81
+ end
82
+
83
+ def test_save
84
+ assert_respond_to(@sc, :save)
85
+ assert_nothing_raised{ @sc.save }
86
+ assert_equal(true, File.exist?(@link))
87
+ end
88
+
89
+ def test_window_style
90
+ assert_respond_to(@sc, :window_style)
91
+ assert_respond_to(@sc, :window_style=)
92
+ assert_nothing_raised{ @sc.window_style }
93
+ assert_nothing_raised{ @sc.window_style = Shortcut::SHOWNORMAL }
94
+ end
95
+
96
+ def test_working_directory
97
+ assert_respond_to(@sc, :working_directory)
98
+ assert_respond_to(@sc, :working_directory=)
99
+ assert_nothing_raised{ @sc.working_directory }
100
+ assert_nothing_raised{ @sc.working_directory = "c:\\" }
101
+ end
102
+
103
+ def test_constants
104
+ assert_not_nil(Shortcut::SHOWNORMAL)
105
+ assert_not_nil(Shortcut::SHOWMINNOACTIVE)
106
+ assert_not_nil(Shortcut::SHOWMAXIMIZED)
107
+ end
108
+
109
+ def teardown
110
+ @sc = nil
111
+ File.delete(@link) if File.exist?(@link)
112
+ end
113
+ end
@@ -1,17 +1,17 @@
1
1
  require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
- spec.name = 'win32-shortcut'
5
- spec.version = '0.2.4'
6
- spec.author = 'Daniel J. Berger'
7
- spec.license = 'Artistic 2.0'
8
- spec.email = 'djberg96@gmail.com'
9
- spec.homepage = 'http://www.rubyforge.org/projects/win32utils'
10
- spec.summary = 'An interface for creating or modifying Windows shortcuts.'
11
- spec.test_file = 'test/test_shortcut.rb'
12
- spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
4
+ spec.name = 'win32-shortcut'
5
+ spec.version = '0.2.5'
6
+ spec.author = 'Daniel J. Berger'
7
+ spec.license = 'Artistic 2.0'
8
+ spec.email = 'djberg96@gmail.com'
9
+ spec.homepage = 'http://github.com/djberg96/win32-shortcut'
10
+ spec.summary = 'An interface for creating or modifying Windows shortcuts.'
11
+ spec.test_file = 'test/test_shortcut.rb'
12
+ spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
13
+ spec.cert_chain = Dir['certs/*']
13
14
 
14
- spec.rubyforge_project = 'win32utils'
15
15
  spec.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
16
16
 
17
17
  spec.description = <<-EOF
metadata CHANGED
@@ -1,18 +1,40 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win32-shortcut
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
5
- prerelease:
4
+ version: 0.2.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Daniel J. Berger
9
8
  autorequire:
10
9
  bindir: bin
11
- cert_chain: []
12
- date: 2012-03-18 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhkamJl
14
+ cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
15
+ MB4XDTE1MDkwMjIwNDkxOFoXDTE2MDkwMTIwNDkxOFowPzERMA8GA1UEAwwIZGpi
16
+ ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
17
+ bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyTkvXqRp6hLs9eoJOS
18
+ Hmi8kRYbq9Vkf15/hMxJpotYMgJVHHWrmDcC5Dye2PbnXjTkKf266Zw0PtT9h+lI
19
+ S3ts9HO+vaCFSMwFFZmnWJSpQ3CNw2RcHxjWkk9yF7imEM8Kz9ojhiDXzBetdV6M
20
+ gr0lV/alUr7TNVBDngbXEfTWscyXh1qd7xZ4EcOdsDktCe5G45N/o3662tPQvJsi
21
+ FOF0CM/KuBsa/HL1/eoEmF4B3EKIRfTHrQ3hu20Kv3RJ88QM4ec2+0dd97uX693O
22
+ zv6981fyEg+aXLkxrkViM/tz2qR2ZE0jPhHTREPYeMEgptRkTmWSKAuLVWrJEfgl
23
+ DtkCAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFEwe
24
+ nn6bfJADmuIDiMSOzedOrL+xMB0GA1UdEQQWMBSBEmRqYmVyZzk2QGdtYWlsLmNv
25
+ bTAdBgNVHRIEFjAUgRJkamJlcmc5NkBnbWFpbC5jb20wDQYJKoZIhvcNAQEFBQAD
26
+ ggEBAHmNOCWoDVD75zHFueY0viwGDVP1BNGFC+yXcb7u2GlK+nEMCORqzURbYPf7
27
+ tL+/hzmePIRz7i30UM//64GI1NLv9jl7nIwjhPpXpf7/lu2I9hOTsvwSumb5UiKC
28
+ /sqBxI3sfj9pr79Wpv4MuikX1XPik7Ncb7NPsJPw06Lvyc3Hkg5X2XpPtLtS+Gr2
29
+ wKJnmzb5rIPS1cmsqv0M9LPWflzfwoZ/SpnmhagP+g05p8bRNKjZSA2iImM/GyYZ
30
+ EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
31
+ tGSHgAmcLlkdGgan182qsE/4kKM=
32
+ -----END CERTIFICATE-----
33
+ date: 2016-01-16 00:00:00.000000000 Z
13
34
  dependencies: []
14
- description: ! " The win32-shortcut library provides an interface for creating
15
- new\n Windows shortcuts or querying information about existing shortcuts.\n"
35
+ description: |2
36
+ The win32-shortcut library provides an interface for creating new
37
+ Windows shortcuts or querying information about existing shortcuts.
16
38
  email: djberg96@gmail.com
17
39
  executables: []
18
40
  extensions: []
@@ -21,38 +43,44 @@ extra_rdoc_files:
21
43
  - CHANGES
22
44
  - MANIFEST
23
45
  files:
46
+ - certs
47
+ - certs/djberg96_pub.pem
24
48
  - CHANGES
49
+ - examples
25
50
  - examples/example_shortcut.rb
51
+ - lib
52
+ - lib/win32
26
53
  - lib/win32/shortcut.rb
54
+ - lib/win32-shortcut.rb
27
55
  - MANIFEST
28
56
  - Rakefile
29
57
  - README
58
+ - test
30
59
  - test/test_shortcut.rb
31
60
  - win32-shortcut.gemspec
32
- homepage: http://www.rubyforge.org/projects/win32utils
61
+ homepage: http://github.com/djberg96/win32-shortcut
33
62
  licenses:
34
63
  - Artistic 2.0
64
+ metadata: {}
35
65
  post_install_message:
36
66
  rdoc_options: []
37
67
  require_paths:
38
68
  - lib
39
69
  required_ruby_version: !ruby/object:Gem::Requirement
40
- none: false
41
70
  requirements:
42
- - - ! '>='
71
+ - - ">="
43
72
  - !ruby/object:Gem::Version
44
73
  version: '0'
45
74
  required_rubygems_version: !ruby/object:Gem::Requirement
46
- none: false
47
75
  requirements:
48
- - - ! '>='
76
+ - - ">="
49
77
  - !ruby/object:Gem::Version
50
78
  version: '0'
51
79
  requirements: []
52
- rubyforge_project: win32utils
53
- rubygems_version: 1.8.11
80
+ rubyforge_project:
81
+ rubygems_version: 2.4.8
54
82
  signing_key:
55
- specification_version: 3
83
+ specification_version: 4
56
84
  summary: An interface for creating or modifying Windows shortcuts.
57
85
  test_files:
58
86
  - test/test_shortcut.rb
Binary file