wixgem 0.34.0 → 0.36.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 22c840bc7be89ccd3907cd8170f61197534d1d6d
4
- data.tar.gz: 5fdb74a08e62361bdbba93f51617e22174d6e7d5
3
+ metadata.gz: d943092ecd25af3e4a5723cc2a3d0cba86dab548
4
+ data.tar.gz: b65875ff2e0edc9a9a1945d8da435350da9dabd2
5
5
  SHA512:
6
- metadata.gz: 3b91f539189b3dcab3d616c619247378b25e381b27641859a439395ea8413ebf692c1867d482e8e23eb5887ab1cde3792b05d19011d9fe60b213e3be7aa57103
7
- data.tar.gz: cc1e257c42d35b13c34ff21a1c730991d6ee7719ef90c7a8d0c570ac8aaf5ace8d2ee12d11e1fe907aa88d83da917461f7affd048888c371d54d820fc2b2650e
6
+ metadata.gz: 84c7cce3863d8103c227149bd401d7635c841d326df5bd1a66ba2f8e474d421a72f18e394fa2d4ff1bce5609e1a8de981c0c745d2001861146908710a938b076
7
+ data.tar.gz: ae5425297ea707b002229aa9eedd312da4abc7ee97392f7f740baed68a51dad60e61800668d619e8787422652dde4929b6e16c0ee42810a753f71a3973a4c75a
data/spec/COM_spec.rb CHANGED
@@ -1,61 +1,61 @@
1
- require 'rspec'
2
- require './lib/wixgem.rb'
3
- require './spec/wixpath.rb'
4
- require './spec/WindowsInstaller.rb'
5
- require './spec/test_files_exist.rb'
6
- require 'win32ole'
7
- require './admin.rb'
8
-
9
- # Unfortunately, I am unable to automate testing of the COM installation. What I do not understand is I am unable to
10
- # script this COM msi. If I attempt to script the COM msi, the COM dll is never installed. I am speculating, the custom action
11
- # for the TARGETDIR is not functioning. If I use the mouse to double click on the msi, the privileges are raised to
12
- # administrative privileges the COM object is correctly installed. Don't understand the difference.
13
-
14
- if(admin? && false)
15
- describe 'Wixgem' do
16
- describe 'Installation of a COM object' do
17
- it 'should not be able to instance a COM object' do
18
- expect { WIN32OLE.new('COMObject.ComClassExample') }.to raise_error
19
- end
20
-
21
- installation_file = 'test/wixgem_com_test.msi'
22
- while(WindowsInstaller.installed?(installation_file))
23
- WindowsInstaller.uninstall(installation_file)
24
- end
25
-
26
- installation_hash = { debug: true, all_users: 'perMachine', files: ['COMObject/bin/Release/COMObject.dll']}
27
- it "should create an installation file using: #{installation_file}" do
28
- Wixgem::Wix.make_installation(installation_file, installation_hash)
29
- expect(File.exists?(installation_file)).to be(true)
30
- end
31
-
32
- it 'should install' do
33
- WindowsInstaller.install(installation_file)
34
- expect(WindowsInstaller.installed?(installation_file)).to be(true)
35
- end
36
-
37
- it 'should have installed the COMObject.dll' do
38
- test_files_exist(installation_file, installation_hash)
39
- end
40
-
41
- it 'should be able to instance a COM object with a GUID' do
42
- object = WIN32OLE.new('{863AEADA-EE73-4f4a-ABC0-3FB384CB41AA}')
43
- expect(object.nil?).to eq(false)
44
- puts "Text: #{object.GetText}"
45
- expect(object.GetText).to eq('Hello World')
46
- end
47
-
48
- it 'should be able to instance a COM object with a Program Id' do
49
- object = WIN32OLE.new('COMObject.ComClassExample')
50
- expect(object.nil?).to eq(false)
51
- puts "Text: #{object.GetText}"
52
- expect(object.GetText).to eq('Hello World')
53
- end
54
-
55
- it 'should uninstall' do
56
- WindowsInstaller.uninstall(installation_file) if(WindowsInstaller.installed?(installation_file))
57
- expect(WindowsInstaller.installed?(installation_file)).to be(false)
58
- end
59
- end
60
- end
61
- end
1
+ require 'rspec'
2
+ require './lib/wixgem.rb'
3
+ require './spec/wixpath.rb'
4
+ require './spec/WindowsInstaller.rb'
5
+ require './spec/test_files_exist.rb'
6
+ require 'win32ole'
7
+ require './admin.rb'
8
+
9
+ # Unfortunately, I am unable to automate testing of the COM installation. What I do not understand is I am unable to
10
+ # script this COM msi. If I attempt to script the COM msi, the COM dll is never installed. I am speculating, the custom action
11
+ # for the TARGETDIR is not functioning. If I use the mouse to double click on the msi, the privileges are raised to
12
+ # administrative privileges the COM object is correctly installed. Don't understand the difference.
13
+
14
+ if(admin? && false)
15
+ describe 'Wixgem' do
16
+ describe 'Installation of a COM object' do
17
+ it 'should not be able to instance a COM object' do
18
+ expect { WIN32OLE.new('COMObject.ComClassExample') }.to raise_error
19
+ end
20
+
21
+ installation_file = 'test/wixgem_com_test.msi'
22
+ while(WindowsInstaller.installed?(installation_file))
23
+ WindowsInstaller.uninstall(installation_file)
24
+ end
25
+
26
+ installation_hash = { debug: true, all_users: 'perMachine', files: ['COMObject/bin/Release/COMObject.dll']}
27
+ it "should create an installation file using: #{installation_file}" do
28
+ Wixgem::Wix.make_installation(installation_file, installation_hash)
29
+ expect(File.exists?(installation_file)).to be(true)
30
+ end
31
+
32
+ it 'should install' do
33
+ WindowsInstaller.install(installation_file)
34
+ expect(WindowsInstaller.installed?(installation_file)).to be(true)
35
+ end
36
+
37
+ it 'should have installed the COMObject.dll' do
38
+ test_files_exist(installation_file, installation_hash)
39
+ end
40
+
41
+ it 'should be able to instance a COM object with a GUID' do
42
+ object = WIN32OLE.new('{863AEADA-EE73-4f4a-ABC0-3FB384CB41AA}')
43
+ expect(object.nil?).to eq(false)
44
+ puts "Text: #{object.GetText}"
45
+ expect(object.GetText).to eq('Hello World')
46
+ end
47
+
48
+ it 'should be able to instance a COM object with a Program Id' do
49
+ object = WIN32OLE.new('COMObject.ComClassExample')
50
+ expect(object.nil?).to eq(false)
51
+ puts "Text: #{object.GetText}"
52
+ expect(object.GetText).to eq('Hello World')
53
+ end
54
+
55
+ it 'should uninstall' do
56
+ WindowsInstaller.uninstall(installation_file) if(WindowsInstaller.installed?(installation_file))
57
+ expect(WindowsInstaller.installed?(installation_file)).to be(false)
58
+ end
59
+ end
60
+ end
61
+ end
@@ -1,67 +1,67 @@
1
- require 'rspec'
2
- require './lib/wixgem.rb'
3
- require './spec/wixpath.rb'
4
- require './spec/WindowsInstaller.rb'
5
- require './admin.rb'
6
-
7
- if(admin?)
8
- describe 'Wixgem' do
9
- describe 'Side by side installations' do
10
- product1='wixgem_multiple 1.0'
11
- product2='wixgem_multiple 1.1'
12
-
13
- Wixgem::Wix.make_installation("test/wixgem_multiple.1.0.0.msi", {version: '1.0.0.0', product_name: product1, upgrade_code: '{face46ab-74ce-44eb-a2b7-81a8cfad5bab}', files: ['Gemfile']})
14
- Wixgem::Wix.make_installation("test/wixgem_multiple.1.1.0.msi", {version: '1.1.0.0', product_name: product2, upgrade_code: '{face46ab-74ce-44eb-a2b7-81a8cfad5bab}', files: ['rakefile.rb']})
15
-
16
- it "should install version 1.0.0" do
17
- WindowsInstaller.install('test\\wixgem_multiple.1.0.0.msi')
18
- expect(WindowsInstaller.installed?(product1)).to be(true)
19
- expect(WindowsInstaller.version(product1)).to eq('1.0.0.0')
20
- end
21
-
22
- it "should install version 1.1.0" do
23
- WindowsInstaller.install('test\\wixgem_multiple.1.1.0.msi')
24
- expect(WindowsInstaller.installed?(product2)).to be(true)
25
- expect(WindowsInstaller.version(product2)).to eq('1.1.0.0')
26
- end
27
-
28
- it "version 1.0.0 should still be installed" do
29
- expect(WindowsInstaller.installed?(product1)).to be(true)
30
- end
31
-
32
- it "product codes for version 1.0.0 and 1.0.0 should be different" do
33
- expect(WindowsInstaller.product_code(product1)).not_to eq(WindowsInstaller.product_code(product2))
34
- end
35
-
36
- it "Should be able to uninstall both products" do
37
- WindowsInstaller.uninstall(product1)
38
- WindowsInstaller.uninstall(product2)
39
- end
40
- end
41
-
42
- describe 'remove previous version' do
43
- product1='wixgem_install 1.0'
44
- product2='wixgem_install 1.1'
45
- Wixgem::Wix.make_installation("test/wixgem_install.1.0.0.msi", {version: '1.0.0.0', product_name: product1, upgrade_code: '{face46ab-74ce-44eb-a2b7-81a8cfad5bab}', files: ['Gemfile']})
46
- Wixgem::Wix.make_installation("test/wixgem_install.1.1.0.msi", {version: '1.1.0.0', product_name: product2, remove_existing_products: true, upgrade_code: '{face46ab-74ce-44eb-a2b7-81a8cfad5bab}', files: ['rakefile.rb']})
47
-
48
- it "should install version 1.0.0" do
49
- WindowsInstaller.install('test\\wixgem_install.1.0.0.msi')
50
- expect(WindowsInstaller.installed?(product1)).to be(true)
51
- end
52
-
53
- it "should install version 1.1.0" do
54
- WindowsInstaller.install('test\\wixgem_install.1.1.0.msi')
55
- expect(WindowsInstaller.installed?(product2)).to be(true)
56
- end
57
-
58
- it "the version 1.0.0 should have been uninstalled" do
59
- expect(WindowsInstaller.installed?(product1)).to be(false)
60
- end
61
-
62
- it "should be able to uninstall #{product2}" do
63
- WindowsInstaller.uninstall(product2)
64
- end
65
- end
66
- end
1
+ require 'rspec'
2
+ require './lib/wixgem.rb'
3
+ require './spec/wixpath.rb'
4
+ require './spec/WindowsInstaller.rb'
5
+ require './admin.rb'
6
+
7
+ if(admin?)
8
+ describe 'Wixgem' do
9
+ describe 'Side by side installations' do
10
+ product1='wixgem_multiple 1.0'
11
+ product2='wixgem_multiple 1.1'
12
+
13
+ Wixgem::Wix.make_installation("test/wixgem_multiple.1.0.0.msi", {version: '1.0.0.0', product_name: product1, upgrade_code: '{face46ab-74ce-44eb-a2b7-81a8cfad5bab}', files: ['Gemfile']})
14
+ Wixgem::Wix.make_installation("test/wixgem_multiple.1.1.0.msi", {version: '1.1.0.0', product_name: product2, upgrade_code: '{face46ab-74ce-44eb-a2b7-81a8cfad5bab}', files: ['rakefile.rb']})
15
+
16
+ it "should install version 1.0.0" do
17
+ WindowsInstaller.install('test\\wixgem_multiple.1.0.0.msi')
18
+ expect(WindowsInstaller.installed?(product1)).to be(true)
19
+ expect(WindowsInstaller.version(product1)).to eq('1.0.0.0')
20
+ end
21
+
22
+ it "should install version 1.1.0" do
23
+ WindowsInstaller.install('test\\wixgem_multiple.1.1.0.msi')
24
+ expect(WindowsInstaller.installed?(product2)).to be(true)
25
+ expect(WindowsInstaller.version(product2)).to eq('1.1.0.0')
26
+ end
27
+
28
+ it "version 1.0.0 should still be installed" do
29
+ expect(WindowsInstaller.installed?(product1)).to be(true)
30
+ end
31
+
32
+ it "product codes for version 1.0.0 and 1.0.0 should be different" do
33
+ expect(WindowsInstaller.product_code(product1)).not_to eq(WindowsInstaller.product_code(product2))
34
+ end
35
+
36
+ it "Should be able to uninstall both products" do
37
+ WindowsInstaller.uninstall(product1)
38
+ WindowsInstaller.uninstall(product2)
39
+ end
40
+ end
41
+
42
+ describe 'remove previous version' do
43
+ product1='wixgem_install 1.0'
44
+ product2='wixgem_install 1.1'
45
+ Wixgem::Wix.make_installation("test/wixgem_install.1.0.0.msi", {version: '1.0.0.0', product_name: product1, upgrade_code: '{face46ab-74ce-44eb-a2b7-81a8cfad5bab}', files: ['Gemfile']})
46
+ Wixgem::Wix.make_installation("test/wixgem_install.1.1.0.msi", {version: '1.1.0.0', product_name: product2, remove_existing_products: true, upgrade_code: '{face46ab-74ce-44eb-a2b7-81a8cfad5bab}', files: ['rakefile.rb']})
47
+
48
+ it "should install version 1.0.0" do
49
+ WindowsInstaller.install('test\\wixgem_install.1.0.0.msi')
50
+ expect(WindowsInstaller.installed?(product1)).to be(true)
51
+ end
52
+
53
+ it "should install version 1.1.0" do
54
+ WindowsInstaller.install('test\\wixgem_install.1.1.0.msi')
55
+ expect(WindowsInstaller.installed?(product2)).to be(true)
56
+ end
57
+
58
+ it "the version 1.0.0 should have been uninstalled" do
59
+ expect(WindowsInstaller.installed?(product1)).to be(false)
60
+ end
61
+
62
+ it "should be able to uninstall #{product2}" do
63
+ WindowsInstaller.uninstall(product2)
64
+ end
65
+ end
66
+ end
67
67
  end
@@ -1,35 +1,35 @@
1
- def files(data)
2
- files = data
3
- if(data.kind_of?(Hash))
4
- files = data[:files]
5
-
6
- if(data.has_key?(:modify_file_paths))
7
- modify_paths = data[:modify_file_paths]
8
- files.each_index do |index|
9
- file_path = files[index]
10
- modify_paths.each { |regex, replacement_string| file_path = file_path.gsub(regex, replacement_string) }
11
- files[index] = file_path
12
- end
13
- end
14
- end
15
- return files
16
- end
17
-
18
- def test_files_exist(msi_file, data)
19
- files = files(data)
20
-
21
- product_name = File.basename(msi_file, File.extname(msi_file))
22
- product_name = data[:product_name] if(data.kind_of?(Hash) && data.has_key?(:product_name))
23
-
24
- manufacturer = ''
25
- manufacturer = data[:manufacturer] if(data.kind_of?(Hash) && data.has_key?(:manufacturer))
26
-
27
- relative_install_dir = product_name
28
- raise "#{name}: relative_install_dir should be set to the product name" if(relative_install_dir.length == 0)
29
- relative_install_dir = "#{manufacturer}/#{relative_install_dir}" if(manufacturer.length > 0)
30
-
31
- files.each { |file|
32
- full_path = "C:/Program Files (x86)/#{relative_install_dir}/#{file}"
33
- raise "#{full_path} not installed." unless(File.exists?(full_path))
34
- }
1
+ def files(data)
2
+ files = data
3
+ if(data.kind_of?(Hash))
4
+ files = data[:files]
5
+
6
+ if(data.has_key?(:modify_file_paths))
7
+ modify_paths = data[:modify_file_paths]
8
+ files.each_index do |index|
9
+ file_path = files[index]
10
+ modify_paths.each { |regex, replacement_string| file_path = file_path.gsub(regex, replacement_string) }
11
+ files[index] = file_path
12
+ end
13
+ end
14
+ end
15
+ return files
16
+ end
17
+
18
+ def test_files_exist(msi_file, data)
19
+ files = files(data)
20
+
21
+ product_name = File.basename(msi_file, File.extname(msi_file))
22
+ product_name = data[:product_name] if(data.kind_of?(Hash) && data.has_key?(:product_name))
23
+
24
+ manufacturer = ''
25
+ manufacturer = data[:manufacturer] if(data.kind_of?(Hash) && data.has_key?(:manufacturer))
26
+
27
+ relative_install_dir = product_name
28
+ raise "#{name}: relative_install_dir should be set to the product name" if(relative_install_dir.length == 0)
29
+ relative_install_dir = "#{manufacturer}/#{relative_install_dir}" if(manufacturer.length > 0)
30
+
31
+ files.each { |file|
32
+ full_path = "C:/Program Files (x86)/#{relative_install_dir}/#{file}"
33
+ raise "#{full_path} not installed." unless(File.exists?(full_path))
34
+ }
35
35
  end
data/spec/wixpath.rb CHANGED
@@ -1,3 +1,3 @@
1
- WIX_PATH='E:/Development/dep/OpenSource/WixToolset/3.9'
1
+ WIX_PATH='C:/Development/dep/OpenSource/WixToolset/3.9'
2
2
 
3
3
  Wixgem::Wix.install_path = WIX_PATH
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wixgem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.0
4
+ version: 0.36.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Marshall
@@ -14,76 +14,70 @@ dependencies:
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: dev_tasks
56
+ name: dev
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
- - - '='
63
- - !ruby/object:Gem::Version
64
- version: 1.0.28
65
62
  type: :development
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
- - - "~>"
66
+ - - ~>
70
67
  - !ruby/object:Gem::Version
71
68
  version: '0'
72
- - - '='
73
- - !ruby/object:Gem::Version
74
- version: 1.0.28
75
69
  - !ruby/object:Gem::Dependency
76
70
  name: logging
77
71
  requirement: !ruby/object:Gem::Requirement
78
72
  requirements:
79
- - - "~>"
73
+ - - ~>
80
74
  - !ruby/object:Gem::Version
81
75
  version: '0'
82
76
  type: :development
83
77
  prerelease: false
84
78
  version_requirements: !ruby/object:Gem::Requirement
85
79
  requirements:
86
- - - "~>"
80
+ - - ~>
87
81
  - !ruby/object:Gem::Version
88
82
  version: '0'
89
83
  description: Simple Ruby interface to facilitate creating and compiling windows installation
@@ -95,10 +89,6 @@ extra_rdoc_files: []
95
89
  files:
96
90
  - LICENSE
97
91
  - README.md
98
- - example/example.msi
99
- - example/example.msm
100
- - example/install_files/directory/file2.txt
101
- - example/install_files/file1.txt
102
92
  - example/rakefile.rb
103
93
  - lib/command.rb
104
94
  - lib/wixgem.rb
@@ -126,17 +116,17 @@ require_paths:
126
116
  - lib
127
117
  required_ruby_version: !ruby/object:Gem::Requirement
128
118
  requirements:
129
- - - ">="
119
+ - - '>='
130
120
  - !ruby/object:Gem::Version
131
121
  version: 1.9.1
132
122
  required_rubygems_version: !ruby/object:Gem::Requirement
133
123
  requirements:
134
- - - ">="
124
+ - - '>='
135
125
  - !ruby/object:Gem::Version
136
126
  version: '0'
137
127
  requirements: []
138
128
  rubyforge_project:
139
- rubygems_version: 2.2.2
129
+ rubygems_version: 2.2.0
140
130
  signing_key:
141
131
  specification_version: 4
142
132
  summary: Simple Ruby interface to facilitate working with Wix Toolset
data/example/example.msi DELETED
Binary file
data/example/example.msm DELETED
Binary file
@@ -1 +0,0 @@
1
- Hello World
@@ -1 +0,0 @@
1
- Hello World