grid_tools 0.0.4 → 0.0.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.
- data/bin/grid_tools +28 -0
- data/lib/grid_tools/version.rb +1 -1
- metadata +1 -1
data/bin/grid_tools
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'gli'
|
3
|
+
require 'fileutils'
|
3
4
|
require 'grid_tools'
|
4
5
|
|
6
|
+
|
5
7
|
include GLI::App
|
6
8
|
|
7
9
|
program_desc 'Describe your application here'
|
@@ -113,6 +115,32 @@ command :stop do |c|
|
|
113
115
|
end
|
114
116
|
end
|
115
117
|
|
118
|
+
desc 'Describe install here'
|
119
|
+
arg_name 'Describe arguments to install here'
|
120
|
+
command :install do |c|
|
121
|
+
c.action do |global_options,options,args|
|
122
|
+
|
123
|
+
if GridTools.windows?
|
124
|
+
ie_driver = File.expand_path(File.dirname(File.expand_path(__FILE__)) + '/../binaries/windows/IEDriverServer.exe')
|
125
|
+
ie_driver.gsub!("/", "\\")
|
126
|
+
|
127
|
+
chrome_driver = File.expand_path(File.dirname(File.expand_path(__FILE__)) + '/../binaries/windows/chromedriver.exe')
|
128
|
+
chrome_driver.gsub!("/", "\\")
|
129
|
+
|
130
|
+
system32 = "C:\\WINDOWS\\system32"
|
131
|
+
#puts "IE: #{ie_driver}"
|
132
|
+
#puts "CHROME: #{chrome_driver}"
|
133
|
+
#puts "SYSTEM32: #{system32}"
|
134
|
+
FileUtils.cp(ie_driver, system32)
|
135
|
+
FileUtils.cp(chrome_driver, system32)
|
136
|
+
puts "Assuming no error above, we successfully installed IE and Chrome drivers!"
|
137
|
+
else
|
138
|
+
raise "Sorry we haven't developed this yet!"
|
139
|
+
end
|
140
|
+
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
116
144
|
pre do |global,command,options,args|
|
117
145
|
# Pre logic here
|
118
146
|
# Return true to proceed; false to abourt and not call the
|
data/lib/grid_tools/version.rb
CHANGED