raykit 0.0.465 → 0.0.467

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/lib/raykit/tasks.rb CHANGED
@@ -1,99 +1,99 @@
1
- # frozen_string_literal: true
2
-
3
- desc "Display project information"
4
- task :info do
5
- PROJECT.info
6
- end
7
-
8
- desc "integrate changes into the git repository"
9
- task :integrate do
10
- puts Rainbow(": integrate").blue.bright
11
-
12
- if PROJECT.read_only?
13
- puts " read only state, skipping integrate operations"
14
- else
15
- git_dir = Raykit::Git::Directory.new(Rake.application.original_dir)
16
- if git_dir.detached?
17
- puts " detached head state, skipping integrate operations"
18
- else
19
- if PROJECT.outstanding_commit?
20
- Rake::Task["test"].invoke if Rake::Task.task_defined?("test")
21
- else
22
- puts " no outstanding commits detected"
23
- end
24
-
25
- if !File.exist?(".gitignore")
26
- puts "warning: .gitignore does not exist."
27
- else
28
- PROJECT.run("git add --all")
29
- unless `git status`.include?("nothing to commit")
30
- commit_message = "integrate"
31
- PROJECT.run("git commit -m\"#{commit_message}\"") if PROJECT.outstanding_commit?
32
- end
33
- PROJECT.run("git pull", false)
34
- end
35
- end
36
- end
37
- end
38
-
39
- desc "push changes including tags"
40
- task :push do
41
- puts Rainbow(": push").blue.bright
42
- git_dir = Raykit::Git::Directory.new(Rake.application.original_dir)
43
- if git_dir.detached?
44
- puts "detached head state, skipping push operations"
45
- else
46
- PROJECT.run("git push") if (!PROJECT.read_only?)
47
- PROJECT.run("git push --tags") if (!PROJECT.read_only?)
48
- end
49
- end
50
-
51
- desc "clean files not tracked by git"
52
- task :clean do
53
- puts Rainbow(": clean").blue.bright
54
- PROJECT.run("git clean -dXf", false)
55
- end
56
-
57
- desc "tag the git repository at the current version"
58
- task :tag do
59
- puts Rainbow(": tag").blue.bright
60
- if PROJECT.read_only?
61
- puts " read only state, skipping tag operation"
62
- else
63
- if (GIT_DIRECTORY.has_tag "v#{PROJECT.version}")
64
- puts " tag #{PROJECT.latest_tag} already exists."
65
- else
66
- GIT_DIRECTORY.tag_version PROJECT.version
67
- try "git push --tags"
68
- end
69
- #if (PROJECT.latest_tag != "v#{PROJECT.version}")
70
- # GIT_DIRECTORY.tag_version PROJECT.version
71
- #if (PROJECT.version != PROJECT.latest_tag)
72
- #try "git tag -a #{PROJECT.version} -m\"version #{PROJECT.version}\""
73
- # try "git push --tags"
74
- #else
75
- # puts " tag #{PROJECT.latest_tag} already exists."
76
- #end
77
- end
78
- end
79
-
80
- desc "update_source from sourceImports.json"
81
- task :update_source do
82
- if File.exist?("sourceImports.json")
83
- puts Rainbow(":update_source").blue.bright
84
- sourceImports = Raykit::SourceImports.load("sourceImports.json")
85
- json = sourceImports.to_json
86
- sourceImports.update
87
-
88
- json2 = sourceImports.to_json
89
- if json2 != json || !sourceImports.targets_exist?
90
- sourceImports.save("sourceImports.json")
91
- sourceImports.copy
92
- else
93
- puts " no update required."
94
- end
95
- end
96
- end
97
-
98
- desc "update source files"
99
- task update: [:update_source]
1
+ # frozen_string_literal: true
2
+
3
+ desc "Display project information"
4
+ task :info do
5
+ PROJECT.info
6
+ end
7
+
8
+ desc "integrate changes into the git repository"
9
+ task :integrate do
10
+ puts Rainbow(": integrate").blue.bright
11
+
12
+ if PROJECT.read_only?
13
+ puts " read only state, skipping integrate operations"
14
+ else
15
+ git_dir = Raykit::Git::Directory.new(Rake.application.original_dir)
16
+ if git_dir.detached?
17
+ puts " detached head state, skipping integrate operations"
18
+ else
19
+ if PROJECT.outstanding_commit?
20
+ Rake::Task["test"].invoke if Rake::Task.task_defined?("test")
21
+ else
22
+ puts " no outstanding commits detected"
23
+ end
24
+
25
+ if !File.exist?(".gitignore")
26
+ puts "warning: .gitignore does not exist."
27
+ else
28
+ PROJECT.run("git add --all")
29
+ unless `git status`.include?("nothing to commit")
30
+ commit_message = "integrate"
31
+ PROJECT.run("git commit -m\"#{commit_message}\"") if PROJECT.outstanding_commit?
32
+ end
33
+ PROJECT.run("git pull", false)
34
+ end
35
+ end
36
+ end
37
+ end
38
+
39
+ desc "push changes including tags"
40
+ task :push do
41
+ puts Rainbow(": push").blue.bright
42
+ git_dir = Raykit::Git::Directory.new(Rake.application.original_dir)
43
+ if git_dir.detached?
44
+ puts "detached head state, skipping push operations"
45
+ else
46
+ PROJECT.run("git push") if (!PROJECT.read_only?)
47
+ PROJECT.run("git push --tags") if (!PROJECT.read_only?)
48
+ end
49
+ end
50
+
51
+ desc "clean files not tracked by git"
52
+ task :clean do
53
+ puts Rainbow(": clean").blue.bright
54
+ PROJECT.run("git clean -dXf", false)
55
+ end
56
+
57
+ desc "tag the git repository at the current version"
58
+ task :tag do
59
+ puts Rainbow(": tag").blue.bright
60
+ if PROJECT.read_only?
61
+ puts " read only state, skipping tag operation"
62
+ else
63
+ if (GIT_DIRECTORY.has_tag "v#{PROJECT.version}")
64
+ puts " tag #{PROJECT.latest_tag} already exists."
65
+ else
66
+ GIT_DIRECTORY.tag_version PROJECT.version
67
+ try "git push --tags"
68
+ end
69
+ #if (PROJECT.latest_tag != "v#{PROJECT.version}")
70
+ # GIT_DIRECTORY.tag_version PROJECT.version
71
+ #if (PROJECT.version != PROJECT.latest_tag)
72
+ #try "git tag -a #{PROJECT.version} -m\"version #{PROJECT.version}\""
73
+ # try "git push --tags"
74
+ #else
75
+ # puts " tag #{PROJECT.latest_tag} already exists."
76
+ #end
77
+ end
78
+ end
79
+
80
+ desc "update_source from sourceImports.json"
81
+ task :update_source do
82
+ if File.exist?("sourceImports.json")
83
+ puts Rainbow(":update_source").blue.bright
84
+ sourceImports = Raykit::SourceImports.load("sourceImports.json")
85
+ json = sourceImports.to_json
86
+ sourceImports.update
87
+
88
+ json2 = sourceImports.to_json
89
+ if json2 != json || !sourceImports.targets_exist?
90
+ sourceImports.save("sourceImports.json")
91
+ sourceImports.copy
92
+ else
93
+ puts " no update required."
94
+ end
95
+ end
96
+ end
97
+
98
+ desc "update source files"
99
+ task update: [:update_source]
data/lib/raykit/text.rb CHANGED
@@ -1,32 +1,32 @@
1
- # frozen_string_literal: true
2
-
3
- module Raykit
4
- class Text
5
- def self.replace_in_glob(glob, search, replace)
6
- Dir.glob(glob).each { |f| replace_in_file(f, search, replace) }
7
- end
8
-
9
- def self.replace_in_file(filename, search, replace)
10
- text1 = IO.read(filename)
11
- text2 = text1.gsub(search) { |_str| str = replace }
12
- unless text1 == text2
13
- File.open(filename, "w") { |f| f.puts text2 }
14
- return true
15
- end
16
- false
17
- end
18
-
19
- def self.copy_if_different(source, destination)
20
- if !File.exist?(destination)
21
- FileUtils.cp source, destination
22
- else
23
- source_text = IO.read(source)
24
- destination_text = IO.read(destination)
25
- if source_text != destination_text
26
- FileUtils.rm destination
27
- FileUtils.cp source, destination
28
- end
29
- end
30
- end
31
- end
32
- end
1
+ # frozen_string_literal: true
2
+
3
+ module Raykit
4
+ class Text
5
+ def self.replace_in_glob(glob, search, replace)
6
+ Dir.glob(glob).each { |f| replace_in_file(f, search, replace) }
7
+ end
8
+
9
+ def self.replace_in_file(filename, search, replace)
10
+ text1 = IO.read(filename)
11
+ text2 = text1.gsub(search) { |_str| str = replace }
12
+ unless text1 == text2
13
+ File.open(filename, "w") { |f| f.puts text2 }
14
+ return true
15
+ end
16
+ false
17
+ end
18
+
19
+ def self.copy_if_different(source, destination)
20
+ if !File.exist?(destination)
21
+ FileUtils.cp source, destination
22
+ else
23
+ source_text = IO.read(source)
24
+ destination_text = IO.read(destination)
25
+ if source_text != destination_text
26
+ FileUtils.rm destination
27
+ FileUtils.cp source, destination
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
data/lib/raykit/timer.rb CHANGED
@@ -1,31 +1,31 @@
1
- # frozen_string_literal: true
2
-
3
- require "time"
4
-
5
- module Raykit
6
- # Provides functionality to record the time execution times
7
- class Timer
8
- # The time at which start occurred
9
- attr_accessor :start_time
10
-
11
- def initialize
12
- @start_time = Time.now
13
- end
14
-
15
- # The elapsed time, in seconds, since the timer started
16
- def elapsed
17
- Time.now - @start_time
18
- end
19
-
20
- # The elapsed time, in seconds, as a formatted string
21
- def elapsed_str(pad = 0)
22
- Timer.get_elapsed_str(elapsed, pad)
23
- end
24
-
25
- # Converts a time span in seconds to a formatted string
26
- def self.get_elapsed_str(elapsed, pad = 0)
27
- # "[" + "%.0f" % (elapsed) + "s]".ljust(pad)
28
- format("%.0f", elapsed) + "s".ljust(pad)
29
- end
30
- end
31
- end
1
+ # frozen_string_literal: true
2
+
3
+ require "time"
4
+
5
+ module Raykit
6
+ # Provides functionality to record the time execution times
7
+ class Timer
8
+ # The time at which start occurred
9
+ attr_accessor :start_time
10
+
11
+ def initialize
12
+ @start_time = Time.now
13
+ end
14
+
15
+ # The elapsed time, in seconds, since the timer started
16
+ def elapsed
17
+ Time.now - @start_time
18
+ end
19
+
20
+ # The elapsed time, in seconds, as a formatted string
21
+ def elapsed_str(pad = 0)
22
+ Timer.get_elapsed_str(elapsed, pad)
23
+ end
24
+
25
+ # Converts a time span in seconds to a formatted string
26
+ def self.get_elapsed_str(elapsed, pad = 0)
27
+ # "[" + "%.0f" % (elapsed) + "s]".ljust(pad)
28
+ format("%.0f", elapsed) + "s".ljust(pad)
29
+ end
30
+ end
31
+ end
@@ -1,103 +1,103 @@
1
- # frozen_string_literal: true
2
-
3
- # warn "[DEPRECATION] Raykit::VersionHelper is deprecated. Use bump gem for better transparency."
4
-
5
- module Raykit
6
- # Version functionality
7
- class Version
8
- attr_accessor :start_time
9
-
10
- # detect a version number based on the NAME variable, if defined
11
- def self.detect(name, verbose = false)
12
- version = detect_from_file("#{name}/#{name}.csproj", /<Version>([-\w\d.]+)</, verbose)
13
- return version if version.length.positive?
14
-
15
- version = detect_from_file("#{name}/Properties/AssemblyInfo.cs", /^\[assembly: AssemblyVersion\("([.\w]+)/,
16
- verbose)
17
- return version if version.length.positive?
18
-
19
- version = detect_from_file("#{name}.gemspec", /version\s+=\s+['"]([\w.]+)['"]/, verbose)
20
- return version if version.length.positive?
21
-
22
- version = detect_from_file("#{name}.gemspec", /version\s?=\s?['|"]([.\d]+)['|"]/, verbose)
23
- return version if version.length.positive?
24
-
25
- version = detect_from_file("#{name}.nuspec", /<[Vv]ersion>([\d.]+)</, verbose)
26
- return version if version.length.positive?
27
-
28
- if verbose
29
- warning = "\u26A0"
30
- symbol = Rainbow(warning.encode("utf-8")).yellow
31
- puts "#{symbol} version not detected"
32
- end
33
- ""
34
- end
35
-
36
- def self.detect_from_file(filename, regex, verbose)
37
- version = ""
38
- if File.exist?(filename)
39
- match = IO.read(filename).match(regex)
40
- version = match.captures[0] if !match.nil? && match.captures.length.positive?
41
- else
42
- return ""
43
- end
44
- if verbose
45
- if version.length.positive?
46
- puts "version detected in #{filename}"
47
- else
48
- puts "no version detected in #{filename}, regex #{regex.source}"
49
- end
50
- end
51
- version
52
- end
53
-
54
- def self.set_version_in_glob(glob_pattern, version)
55
- Dir.glob(glob_pattern).each { |f|
56
- Raykit::Version::set_version_in_file(f, version)
57
- }
58
- end
59
-
60
- def self.set_version_in_file(filename, version)
61
- text = IO.read(filename)
62
- new_text = text
63
- new_text = text.gsub(/version\s?=\s?['|"]([.\d]+)['|"]/, "version='#{version}'") if filename.include?(".gemspec")
64
- new_text = text.gsub(/<Version>([-\w\d.]+)</, "<Version>#{version}<") if filename.include?(".csproj")
65
- new_text = text.gsub(/<version>([-\w\d.]+)</, "<version>#{version}<") if filename.include?(".nuspec")
66
- new_text = text.gsub(/Version="([\d\.]+)"/, "Version=\"#{version}\"") if filename.include?(".wxs")
67
- # new_text=text.gsub(/<Version>([-\w\d.]+)</,"<Version>#{version}<")
68
- # new_text=new_text.gsub(/version[\s]+=\s?['|"]([.\d]+)['|"]/,"version='#{version}'")
69
- # new_text=new_text.gsub(/Version="([.\d]+)"/,"Version=\"#{version}\"")
70
- File.open(filename, "w") { |f| f.write(new_text) } if new_text != text
71
- end
72
-
73
- def self.sync_file_versions(source_filename, destination_filename)
74
- version = Version.detect_from_file(source_filename, /<Version>([-\w\d.]+)</, false)
75
- Version.set_version_in_file(destination_filename, version)
76
- end
77
-
78
- # increment to last digit of a version string
79
- def self.bump(version)
80
- # major.minor[.build[.revision]] (example: 1.2.12.102)
81
- version_ints = version.split(".").map(&:to_i)
82
- version_ints[-1] = version_ints.last + 1
83
- version_ints.map(&:to_s).join(".")
84
- end
85
-
86
- def self.bump_file(filename)
87
- warn "Raykit::Version.bump_file filename '#{filename}' does not exist." unless File.exist?(filename)
88
-
89
- old_version = ""
90
- if filename.include?(".gemspec")
91
- old_version = detect_from_file(filename, /version\s?=\s?['|"]([.\d]+)['|"]/, false)
92
- end
93
- old_version = detect_from_file(filename, /<Version>([-\w\d.]+)</, false) if filename.include?(".csproj")
94
-
95
- if old_version.length.positive?
96
- new_version = bump(old_version)
97
- set_version_in_file(filename, new_version)
98
- end
99
-
100
- new_version
101
- end
102
- end
103
- end
1
+ # frozen_string_literal: true
2
+
3
+ # warn "[DEPRECATION] Raykit::VersionHelper is deprecated. Use bump gem for better transparency."
4
+
5
+ module Raykit
6
+ # Version functionality
7
+ class Version
8
+ attr_accessor :start_time
9
+
10
+ # detect a version number based on the NAME variable, if defined
11
+ def self.detect(name, verbose = false)
12
+ version = detect_from_file("#{name}/#{name}.csproj", /<Version>([-\w\d.]+)</, verbose)
13
+ return version if version.length.positive?
14
+
15
+ version = detect_from_file("#{name}/Properties/AssemblyInfo.cs", /^\[assembly: AssemblyVersion\("([.\w]+)/,
16
+ verbose)
17
+ return version if version.length.positive?
18
+
19
+ version = detect_from_file("#{name}.gemspec", /version\s+=\s+['"]([\w.]+)['"]/, verbose)
20
+ return version if version.length.positive?
21
+
22
+ version = detect_from_file("#{name}.gemspec", /version\s?=\s?['|"]([.\d]+)['|"]/, verbose)
23
+ return version if version.length.positive?
24
+
25
+ version = detect_from_file("#{name}.nuspec", /<[Vv]ersion>([\d.]+)</, verbose)
26
+ return version if version.length.positive?
27
+
28
+ if verbose
29
+ warning = "\u26A0"
30
+ symbol = Rainbow(warning.encode("utf-8")).yellow
31
+ puts "#{symbol} version not detected"
32
+ end
33
+ ""
34
+ end
35
+
36
+ def self.detect_from_file(filename, regex, verbose)
37
+ version = ""
38
+ if File.exist?(filename)
39
+ match = IO.read(filename).match(regex)
40
+ version = match.captures[0] if !match.nil? && match.captures.length.positive?
41
+ else
42
+ return ""
43
+ end
44
+ if verbose
45
+ if version.length.positive?
46
+ puts "version detected in #{filename}"
47
+ else
48
+ puts "no version detected in #{filename}, regex #{regex.source}"
49
+ end
50
+ end
51
+ version
52
+ end
53
+
54
+ def self.set_version_in_glob(glob_pattern, version)
55
+ Dir.glob(glob_pattern).each { |f|
56
+ Raykit::Version::set_version_in_file(f, version)
57
+ }
58
+ end
59
+
60
+ def self.set_version_in_file(filename, version)
61
+ text = IO.read(filename)
62
+ new_text = text
63
+ new_text = text.gsub(/version\s?=\s?['|"]([.\d]+)['|"]/, "version='#{version}'") if filename.include?(".gemspec")
64
+ new_text = text.gsub(/<Version>([-\w\d.]+)</, "<Version>#{version}<") if filename.include?(".csproj")
65
+ new_text = text.gsub(/<version>([-\w\d.]+)</, "<version>#{version}<") if filename.include?(".nuspec")
66
+ new_text = text.gsub(/Version="([\d\.]+)"/, "Version=\"#{version}\"") if filename.include?(".wxs")
67
+ # new_text=text.gsub(/<Version>([-\w\d.]+)</,"<Version>#{version}<")
68
+ # new_text=new_text.gsub(/version[\s]+=\s?['|"]([.\d]+)['|"]/,"version='#{version}'")
69
+ # new_text=new_text.gsub(/Version="([.\d]+)"/,"Version=\"#{version}\"")
70
+ File.open(filename, "w") { |f| f.write(new_text) } if new_text != text
71
+ end
72
+
73
+ def self.sync_file_versions(source_filename, destination_filename)
74
+ version = Version.detect_from_file(source_filename, /<Version>([-\w\d.]+)</, false)
75
+ Version.set_version_in_file(destination_filename, version)
76
+ end
77
+
78
+ # increment to last digit of a version string
79
+ def self.bump(version)
80
+ # major.minor[.build[.revision]] (example: 1.2.12.102)
81
+ version_ints = version.split(".").map(&:to_i)
82
+ version_ints[-1] = version_ints.last + 1
83
+ version_ints.map(&:to_s).join(".")
84
+ end
85
+
86
+ def self.bump_file(filename)
87
+ warn "Raykit::Version.bump_file filename '#{filename}' does not exist." unless File.exist?(filename)
88
+
89
+ old_version = ""
90
+ if filename.include?(".gemspec")
91
+ old_version = detect_from_file(filename, /version\s?=\s?['|"]([.\d]+)['|"]/, false)
92
+ end
93
+ old_version = detect_from_file(filename, /<Version>([-\w\d.]+)</, false) if filename.include?(".csproj")
94
+
95
+ if old_version.length.positive?
96
+ new_version = bump(old_version)
97
+ set_version_in_file(filename, new_version)
98
+ end
99
+
100
+ new_version
101
+ end
102
+ end
103
+ end
data/lib/raykit/vstest.rb CHANGED
@@ -1,24 +1,24 @@
1
- # frozen_string_literal: true
2
-
3
- module Raykit
4
- class VsTest
5
- def self.vstest_path
6
- ["2022/Community/Common7/IDE/CommonExtensions/Microsoft/TestWindow",
7
- "2022/Professional/Common7/IDE/CommonExtensions/Microsoft/TestWindow",
8
- "2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow",
9
- "2019/Community/Common7/IDE/CommonExtensions/Microsoft",
10
- "2019/Professional/Common7/IDE/Extensions/TestPlatform",
11
- "2019/Community/Common7/IDE/Extensions",
12
- "2019/Community/Common7/IDE/Extensions/TestPlatform",
13
- "2022/Preview/Common7/IDE/Extensions/TestPlatform"].each do |relative_path|
14
- ["C:/Program Files (x86)/Microsoft Visual Studio/",
15
- "C:/Program Files/Microsoft Visual Studio/"].each do |root_path|
16
- path = root_path + relative_path
17
- exe_path = "#{path}/vstest.console.exe"
18
- return path if Dir.exist?(path) && File.exist?(exe_path)
19
- end
20
- end
21
- "vstest_path not found"
22
- end
23
- end
24
- end
1
+ # frozen_string_literal: true
2
+
3
+ module Raykit
4
+ class VsTest
5
+ def self.vstest_path
6
+ ["2022/Community/Common7/IDE/CommonExtensions/Microsoft/TestWindow",
7
+ "2022/Professional/Common7/IDE/CommonExtensions/Microsoft/TestWindow",
8
+ "2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow",
9
+ "2019/Community/Common7/IDE/CommonExtensions/Microsoft",
10
+ "2019/Professional/Common7/IDE/Extensions/TestPlatform",
11
+ "2019/Community/Common7/IDE/Extensions",
12
+ "2019/Community/Common7/IDE/Extensions/TestPlatform",
13
+ "2022/Preview/Common7/IDE/Extensions/TestPlatform"].each do |relative_path|
14
+ ["C:/Program Files (x86)/Microsoft Visual Studio/",
15
+ "C:/Program Files/Microsoft Visual Studio/"].each do |root_path|
16
+ path = root_path + relative_path
17
+ exe_path = "#{path}/vstest.console.exe"
18
+ return path if Dir.exist?(path) && File.exist?(exe_path)
19
+ end
20
+ end
21
+ "vstest_path not found"
22
+ end
23
+ end
24
+ end
data/lib/raykit/wt.rb CHANGED
@@ -1,28 +1,28 @@
1
- module Raykit
2
- class Wt
3
- def self.open(names)
4
- if names.is_a? String
5
- cmd = Raykit::Command.new("wt --maximized #{get_tab_arg(names)}").run
6
- end
7
- if names.is_a?(Array)
8
- cmd = "wt --maximized "
9
- index = 0
10
- names.each { |url|
11
- if index <= 0
12
- cmd += get_tab_arg(url)
13
- else
14
- cmd += ";new-tab " + get_tab_arg(url)
15
- end
16
- index = index + 1
17
- }
18
- Raykit::Command.new(cmd).run
19
- end
20
- end
21
-
22
- def self.get_tab_arg(url)
23
- dir = Raykit::Git::Repository.new(url).get_dev_dir("work")
24
- name = File.basename(dir)
25
- "-d #{dir} --title #{name}"
26
- end
27
- end
28
- end
1
+ module Raykit
2
+ class Wt
3
+ def self.open(names)
4
+ if names.is_a? String
5
+ cmd = Raykit::Command.new("wt --maximized #{get_tab_arg(names)}").run
6
+ end
7
+ if names.is_a?(Array)
8
+ cmd = "wt --maximized "
9
+ index = 0
10
+ names.each { |url|
11
+ if index <= 0
12
+ cmd += get_tab_arg(url)
13
+ else
14
+ cmd += ";new-tab " + get_tab_arg(url)
15
+ end
16
+ index = index + 1
17
+ }
18
+ Raykit::Command.new(cmd).run
19
+ end
20
+ end
21
+
22
+ def self.get_tab_arg(url)
23
+ dir = Raykit::Git::Repository.new(url).get_dev_dir("work")
24
+ name = File.basename(dir)
25
+ "-d #{dir} --title #{name}"
26
+ end
27
+ end
28
+ end