awetestlib 0.1.29pre4-x86-mingw32 → 0.1.29-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,60 +1,60 @@
1
- def edit_config_file
2
- @new_config_file = File.join(FileUtils.pwd, @proj_dir, "nbproject","private","configs", "Demo.properties")
3
- @demo_script = File.join(FileUtils.pwd, @proj_dir, "demo.rb")
4
- workspace_text = File.read(@new_config_file)
5
- new_workspace_text = workspace_text.gsub(/SAMPLE-SCRIPT/,@demo_script )
6
- new_workspace_text = new_workspace_text.gsub(/WORK-DIR/, File.dirname(@demo_script))
7
- File.open(@new_config_file, "w") {|file| file.puts new_workspace_text}
8
- end
9
-
10
- def edit_private_file
11
- @new_private_file = File.join(FileUtils.pwd, @proj_dir, "nbproject", "private", "private.properties")
12
- @bin_dir = File.join(File.dirname(__FILE__))
13
- workspace_text = File.read(@new_private_file)
14
- new_workspace_text = workspace_text.gsub(/BIN-DIR/,@bin_dir )
15
- File.open(@new_private_file, "w") {|file| file.puts new_workspace_text}
16
- end
17
-
18
- def edit_project_file
19
- @new_project_file = File.join(FileUtils.pwd, @proj_dir, "nbproject", "project.xml")
20
- project_text = File.read(@new_project_file)
21
- new_project_text = project_text.gsub(/PROJECT-NAME/, @proj_dir)
22
- File.open(@new_project_file, "w") {|file| file.puts new_project_text}
23
-
24
- end
25
-
26
-
27
- def awetestlib_netbeans_setup
28
- if ARGV[1].nil?
29
- @proj_dir = "sample_netbeans"
30
- else
31
- @proj_dir = ARGV[1]
32
- end
33
-
34
- @netbeans_dir = File.join(FileUtils.pwd, @proj_dir)
35
- @source_dir = File.join(File.dirname(__FILE__), '..', 'setup_samples', 'sample_netbeans')
36
-
37
- if File.exists?(@netbeans_dir)
38
- puts "Netbeans project directory already exists."
39
- exit 1
40
- end
41
-
42
- msg("Question") do
43
- puts "I'm about to create a netbeans project named #{ARGV[1]} in this directory" if ARGV[1]
44
- puts "I'm about to create a netbeans project named sample_netbeans in this directory" if ARGV[1].nil?
45
- puts "Please hit return to confirm that's what you want."
46
- puts "Enter anything else and hit return to abort."
47
- puts "NOTE: You may need to run this command as an administrator."
48
- end
49
- exit 2 unless STDIN.gets.chomp == ''
50
-
51
- FileUtils.cp_r(@source_dir, @netbeans_dir)
52
- edit_config_file
53
- edit_private_file
54
- edit_project_file
55
-
56
- msg("Info") do
57
- puts "Configuring files and settings"
58
- end
59
-
60
- end
1
+ def edit_config_file
2
+ @new_config_file = File.join(FileUtils.pwd, @proj_dir, "nbproject","private","configs", "Demo.properties")
3
+ @demo_script = File.join(FileUtils.pwd, @proj_dir, "demo.rb")
4
+ workspace_text = File.read(@new_config_file)
5
+ new_workspace_text = workspace_text.gsub(/SAMPLE-SCRIPT/,@demo_script )
6
+ new_workspace_text = new_workspace_text.gsub(/WORK-DIR/, File.dirname(@demo_script))
7
+ File.open(@new_config_file, "w") {|file| file.puts new_workspace_text}
8
+ end
9
+
10
+ def edit_private_file
11
+ @new_private_file = File.join(FileUtils.pwd, @proj_dir, "nbproject", "private", "private.properties")
12
+ @bin_dir = File.join(File.dirname(__FILE__))
13
+ workspace_text = File.read(@new_private_file)
14
+ new_workspace_text = workspace_text.gsub(/BIN-DIR/,@bin_dir )
15
+ File.open(@new_private_file, "w") {|file| file.puts new_workspace_text}
16
+ end
17
+
18
+ def edit_project_file
19
+ @new_project_file = File.join(FileUtils.pwd, @proj_dir, "nbproject", "project.xml")
20
+ project_text = File.read(@new_project_file)
21
+ new_project_text = project_text.gsub(/PROJECT-NAME/, @proj_dir)
22
+ File.open(@new_project_file, "w") {|file| file.puts new_project_text}
23
+
24
+ end
25
+
26
+
27
+ def awetestlib_netbeans_setup
28
+ if ARGV[1].nil?
29
+ @proj_dir = "sample_netbeans"
30
+ else
31
+ @proj_dir = ARGV[1]
32
+ end
33
+
34
+ @netbeans_dir = File.join(FileUtils.pwd, @proj_dir)
35
+ @source_dir = File.join(File.dirname(__FILE__), '..', 'setup_samples', 'sample_netbeans')
36
+
37
+ if File.exists?(@netbeans_dir)
38
+ puts "Netbeans project directory already exists."
39
+ exit 1
40
+ end
41
+
42
+ msg("Question") do
43
+ puts "I'm about to create a netbeans project named #{ARGV[1]} in this directory" if ARGV[1]
44
+ puts "I'm about to create a netbeans project named sample_netbeans in this directory" if ARGV[1].nil?
45
+ puts "Please hit return to confirm that's what you want."
46
+ puts "Enter anything else and hit return to abort."
47
+ puts "NOTE: You may need to run this command as an administrator."
48
+ end
49
+ exit 2 unless STDIN.gets.chomp == ''
50
+
51
+ FileUtils.cp_r(@source_dir, @netbeans_dir)
52
+ edit_config_file
53
+ edit_private_file
54
+ edit_project_file
55
+
56
+ msg("Info") do
57
+ puts "Configuring files and settings"
58
+ end
59
+
60
+ end
@@ -1,30 +1,30 @@
1
- def awetestlib_regression_setup
2
- using_windows = !!((RUBY_PLATFORM =~ /(win|w)(32|64)$/) || (RUBY_PLATFORM =~ /mswin|mingw/))
3
- using_osx = RUBY_PLATFORM =~ /darwin/
4
-
5
- if using_windows
6
- msg("Question") do
7
- puts "I'm about to setup awetest regression support and register the AutoItX3.dll"
8
- puts "Please hit return to confirm that's what you want."
9
- puts "Enter anything else and hit return to abort."
10
- puts "NOTE: You may need to run this command as an administrator."
11
- end
12
- exit 2 unless STDIN.gets.chomp == ''
13
-
14
- autoit_file = File.join(File.dirname(__FILE__),"AutoItX3.dll")
15
- system("regsvr32 #{autoit_file}")
16
-
17
- msg("Info") do
18
- puts "Configuring files and settings for Windows"
19
- end
20
- elsif using_osx
21
- msg("Info") do
22
- puts "Currently nothing needed to configure settings for OSX"
23
- end
24
- else
25
- msg("Error") do
26
- puts "Unsupported operating system: #{RUBY_PLATFORM}"
27
- end
28
- end
29
-
30
- end
1
+ def awetestlib_regression_setup
2
+ using_windows = !!((RUBY_PLATFORM =~ /(win|w)(32|64)$/) || (RUBY_PLATFORM =~ /mswin|mingw/))
3
+ using_osx = RUBY_PLATFORM =~ /darwin/
4
+
5
+ if using_windows
6
+ msg("Question") do
7
+ puts "I'm about to setup awetest regression support and register the AutoItX3.dll"
8
+ puts "Please hit return to confirm that's what you want."
9
+ puts "Enter anything else and hit return to abort."
10
+ puts "NOTE: You may need to run this command as an administrator."
11
+ end
12
+ exit 2 unless STDIN.gets.chomp == ''
13
+
14
+ autoit_file = File.join(File.dirname(__FILE__),"AutoItX3.dll")
15
+ system("regsvr32 #{autoit_file}")
16
+
17
+ msg("Info") do
18
+ puts "Configuring files and settings for Windows"
19
+ end
20
+ elsif using_osx
21
+ msg("Info") do
22
+ puts "Currently nothing needed to configure settings for OSX"
23
+ end
24
+ else
25
+ msg("Error") do
26
+ puts "Unsupported operating system: #{RUBY_PLATFORM}"
27
+ end
28
+ end
29
+
30
+ end
@@ -1,45 +1,45 @@
1
- def edit_config_file
2
- @new_config_file = File.join(FileUtils.pwd, @proj_dir, ".idea", "workspace.xml")
3
- @demo_script = File.join(FileUtils.pwd, @proj_dir, "demo.rb")
4
- @awetestlib_file = File.join(File.dirname(__FILE__), "awetestlib")
5
- workspace_text = File.read(@new_config_file)
6
- new_workspace_text = workspace_text.gsub(/SAMPLE-SCRIPT/,@demo_script )
7
- new_workspace_text = new_workspace_text.gsub(/RUBY-SCRIPT/, @awetestlib_file)
8
- new_workspace_text = new_workspace_text.gsub(/WORK-DIR/, File.dirname(@demo_script))
9
- File.open(@new_config_file, "w") {|file| file.puts new_workspace_text}
10
- end
11
-
12
- def awetestlib_rubymine_setup
13
- if ARGV[1].nil?
14
- @proj_dir = "sample_rubymine"
15
- else
16
- @proj_dir = ARGV[1]
17
- end
18
-
19
- @rubymine_dir = File.join(FileUtils.pwd, @proj_dir)
20
- @source_dir = File.join(File.dirname(__FILE__), '..', 'setup_samples', 'sample_rubymine')
21
-
22
- if File.exists?(@rubymine_dir)
23
- puts "Rubymine project directory (#{@rubymine_dir}) already exists."
24
- exit 1
25
- end
26
-
27
- msg("Question") do
28
- if ARGV[1]
29
- puts "I'm about to create a rubymine project named #{ARGV[1]} in this directory"
30
- else
31
- puts "I'm about to create a rubymine project named sample_rubymine in this directory"
32
- end
33
- puts "Please hit return to confirm that's what you want."
34
- puts "Enter anything else and hit return to abort."
35
- puts "NOTE: You may need to run this command as an administrator."
36
- end
37
- exit 2 unless STDIN.gets.chomp == ''
38
-
39
- FileUtils.cp_r(@source_dir, @rubymine_dir)
40
- edit_config_file
41
- msg("Info") do
42
- puts "Configuring files and settings"
43
- end
44
-
45
- end
1
+ def edit_config_file
2
+ @new_config_file = File.join(FileUtils.pwd, @proj_dir, ".idea", "workspace.xml")
3
+ @demo_script = File.join(FileUtils.pwd, @proj_dir, "demo.rb")
4
+ @awetestlib_file = File.join(File.dirname(__FILE__), "awetestlib")
5
+ workspace_text = File.read(@new_config_file)
6
+ new_workspace_text = workspace_text.gsub(/SAMPLE-SCRIPT/,@demo_script )
7
+ new_workspace_text = new_workspace_text.gsub(/RUBY-SCRIPT/, @awetestlib_file)
8
+ new_workspace_text = new_workspace_text.gsub(/WORK-DIR/, File.dirname(@demo_script))
9
+ File.open(@new_config_file, "w") {|file| file.puts new_workspace_text}
10
+ end
11
+
12
+ def awetestlib_rubymine_setup
13
+ if ARGV[1].nil?
14
+ @proj_dir = "sample_rubymine"
15
+ else
16
+ @proj_dir = ARGV[1]
17
+ end
18
+
19
+ @rubymine_dir = File.join(FileUtils.pwd, @proj_dir)
20
+ @source_dir = File.join(File.dirname(__FILE__), '..', 'setup_samples', 'sample_rubymine')
21
+
22
+ if File.exists?(@rubymine_dir)
23
+ puts "Rubymine project directory (#{@rubymine_dir}) already exists."
24
+ exit 1
25
+ end
26
+
27
+ msg("Question") do
28
+ if ARGV[1]
29
+ puts "I'm about to create a rubymine project named #{ARGV[1]} in this directory"
30
+ else
31
+ puts "I'm about to create a rubymine project named sample_rubymine in this directory"
32
+ end
33
+ puts "Please hit return to confirm that's what you want."
34
+ puts "Enter anything else and hit return to abort."
35
+ puts "NOTE: You may need to run this command as an administrator."
36
+ end
37
+ exit 2 unless STDIN.gets.chomp == ''
38
+
39
+ FileUtils.cp_r(@source_dir, @rubymine_dir)
40
+ edit_config_file
41
+ msg("Info") do
42
+ puts "Configuring files and settings"
43
+ end
44
+
45
+ end