dev 2.1.153 → 2.1.154
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 +4 -4
- data/lib/apps/git.rb +207 -208
- data/lib/apps/msbuild.rb +90 -90
- data/lib/apps/nbench.rb +2 -1
- data/lib/apps/nuget.rb +57 -59
- data/lib/apps/svn.rb +137 -143
- data/lib/apps/wix.rb +47 -50
- data/lib/apps/xcodebuild.rb +13 -11
- data/lib/apps/zip.rb +25 -25
- data/lib/apps.rb +3 -1
- data/lib/base/array.rb +66 -64
- data/lib/base/command.rb +237 -238
- data/lib/base/dir.rb +73 -76
- data/lib/base/environment.rb +94 -99
- data/lib/base/file.rb +35 -33
- data/lib/base/gemspec.rb +47 -45
- data/lib/base/giturl.rb +88 -90
- data/lib/base/hash.rb +20 -15
- data/lib/base/history.rb +36 -33
- data/lib/base/internet.rb +22 -20
- data/lib/base/project.rb +410 -423
- data/lib/base/projects.rb +231 -246
- data/lib/base/source.rb +22 -20
- data/lib/base/string.rb +6 -4
- data/lib/base/text.rb +16 -14
- data/lib/base/timeout.rb +29 -28
- data/lib/base/timer.rb +23 -19
- data/lib/base/version.rb +68 -72
- data/lib/base.rb +5 -3
- data/lib/commands.rb +47 -43
- data/lib/dev.config.rb +3 -2
- data/lib/dev.rb +65 -66
- data/lib/tasks/add.rb +34 -40
- data/lib/tasks/analyze.rb +17 -15
- data/lib/tasks/build.rb +101 -103
- data/lib/tasks/clean.rb +6 -4
- data/lib/tasks/clobber.rb +20 -18
- data/lib/tasks/commit.rb +42 -44
- data/lib/tasks/default.rb +41 -39
- data/lib/tasks/doc.rb +10 -8
- data/lib/tasks/info.rb +8 -7
- data/lib/tasks/package.rb +23 -20
- data/lib/tasks/publish.rb +20 -25
- data/lib/tasks/pull.rb +9 -9
- data/lib/tasks/push.rb +11 -13
- data/lib/tasks/setup.rb +180 -183
- data/lib/tasks/test.rb +121 -107
- data/lib/tasks/update.rb +13 -11
- data/lib/tasks.rb +38 -42
- metadata +7 -9
- data/bin/dev +0 -3
data/lib/tasks/test.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
#
|
2
4
|
# nunit dlls may be specified with
|
3
5
|
# NUNIT=FileList.new('**/*.Test.dll')
|
@@ -5,117 +7,129 @@
|
|
5
7
|
# for nunit dlls that must be run in x86 mode,
|
6
8
|
# NUNIT_x86=FileList.new('**/*.x86.Test.dll')
|
7
9
|
#
|
8
|
-
desc
|
9
|
-
task :
|
10
|
+
desc "performs test commands"
|
11
|
+
task test: [:build] do Tasks.execute_task :test; end
|
10
12
|
|
11
13
|
class Test < Array
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
end
|
46
|
-
|
47
|
-
# dotnet test
|
48
|
-
puts "scanning for **/*.Test.csproj" if Environment.default.debug?
|
49
|
-
Dir.glob('**/*.Test.csproj'){|proj|
|
50
|
-
puts "found #{proj}" if Environment.default.debug?
|
51
|
-
text = IO.read(proj)
|
52
|
-
if(text.include?('netcoreapp'))
|
53
|
-
add_quiet("dotnet test #{proj}")
|
54
|
-
end
|
55
|
-
}
|
56
|
-
|
57
|
-
if(defined?(TESTS))
|
58
|
-
TEST.each{|t| add_quiet t}
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
def self.nunit3_console_in_path?
|
63
|
-
command=Command.new('nunit3-console')
|
64
|
-
command[:quiet]=true
|
65
|
-
command[:ignore_failure]=true
|
66
|
-
command.execute
|
67
|
-
return true if(command[:exit_code] == 0)
|
68
|
-
false
|
14
|
+
def update
|
15
|
+
add_quiet "rspec --format documentation" if File.exist?("spec")
|
16
|
+
|
17
|
+
if defined?(NUNIT)
|
18
|
+
NUNIT.each do |nunit_dll|
|
19
|
+
skip = false
|
20
|
+
skip = true if nunit_dll.include?("/netcoreapp")
|
21
|
+
skip = true if nunit_dll.include?("packages/")
|
22
|
+
next if skip
|
23
|
+
|
24
|
+
nunit_arg = Test.nunit_console
|
25
|
+
nunit_arg = "\"#{Test.nunit_console}\"" if Test.nunit_console.include?(" ")
|
26
|
+
dll_arg = nunit_dll
|
27
|
+
dll_arg = "\"#{nunit_dll}\"" if nunit_dll.include?(" ")
|
28
|
+
if Test.nunit_console.include?("nunit3")
|
29
|
+
xml_arg = "--result=#{nunit_dll}.TestResults.xml --labels=All"
|
30
|
+
xml_arg = "--result=\"#{nunit_dll}.TestResults.xml\" --labels=All" if nunit_dll.include?(" ")
|
31
|
+
else
|
32
|
+
xml_arg = "/xml:#{nunit_dll}.TestResults.xml"
|
33
|
+
xml_arg = "/xml:\"#{nunit_dll}.TestResults.xml\"" if nunit_dll.include?(" ")
|
34
|
+
end
|
35
|
+
add_quiet "#{nunit_arg} #{dll_arg} #{xml_arg}"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
if defined?(NUNIT_X86)
|
40
|
+
NUNIT_X86.each do |nunit_dll|
|
41
|
+
if Test.nunit_console_x86.include?("nunit3")
|
42
|
+
add_quiet "\"#{Test.nunit_console_x86}\" \"#{Rake.application.original_dir}\\#{nunit_dll}\" --result=\"#{nunit_dll}.TestResults.xml\" --labels=All"
|
43
|
+
else
|
44
|
+
add_quiet "\"#{Test.nunit_console_x86}\" \"#{Rake.application.original_dir}\\#{nunit_dll}\" /xml:\"#{nunit_dll}.TestResults.xml\""
|
45
|
+
end
|
46
|
+
end
|
69
47
|
end
|
70
48
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
false
|
49
|
+
# dotnet test
|
50
|
+
puts "scanning for **/*.Test.csproj" if Environment.default.debug?
|
51
|
+
Dir.glob("**/*.Test.csproj") do |proj|
|
52
|
+
puts "found #{proj}" if Environment.default.debug?
|
53
|
+
text = IO.read(proj)
|
54
|
+
add_quiet("dotnet test #{proj}") if text.include?("netcoreapp")
|
78
55
|
end
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
56
|
+
|
57
|
+
TEST.each { |t| add_quiet t } if defined?(TESTS)
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.nunit3_console_in_path?
|
61
|
+
command = Command.new("nunit3-console")
|
62
|
+
command[:quiet] = true
|
63
|
+
command[:ignore_failure] = true
|
64
|
+
command.execute
|
65
|
+
return true if (command[:exit_code]).zero?
|
66
|
+
|
67
|
+
false
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.nunit_console_in_path?
|
71
|
+
command = Command.new("nunit-console")
|
72
|
+
command[:quiet] = true
|
73
|
+
command[:ignore_failure] = true
|
74
|
+
command.execute
|
75
|
+
return true if (command[:exit_code]).zero?
|
76
|
+
|
77
|
+
false
|
78
|
+
end
|
79
|
+
@@nunit_console = ""
|
80
|
+
def self.nunit_console
|
81
|
+
return "nunit3-console" if Test.nunit3_console_in_path?
|
82
|
+
return "nunit-console" if Test.nunit_console_in_path?
|
83
|
+
|
84
|
+
unless File.exist?(@@nunit_console)
|
85
|
+
@@nunit_console = NUNIT_CONSOLE if defined?(NUNIT_CONSOLE)
|
86
|
+
unless File.exist?(@@nunit_console)
|
87
|
+
@@nunit_console = "packages/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe"
|
88
|
+
end
|
89
|
+
unless File.exist?(@@nunit_console)
|
90
|
+
@@nunit_console = "packages/NUnit.ConsoleRunner.3.8.0/tools/nunit3-console.exe"
|
91
|
+
end
|
92
|
+
unless File.exist?(@@nunit_console)
|
93
|
+
@@nunit_console = 'C:\\Program Files (x86)\\NUnit.org\\nunit-console\\nunit3-console.exe'
|
94
|
+
end
|
95
|
+
unless File.exist?(@@nunit_console)
|
96
|
+
@@nunit_console = 'C:\\Program Files (x86)\\NUnit 2.6.4\\bin\\nunit-console.exe'
|
97
|
+
end
|
98
|
+
unless File.exist?(@@nunit_console)
|
99
|
+
@@nunit_console = 'C:\\Program Files (x86)\\NUnit 2.6.3\\bin\\nunit-console.exe'
|
100
|
+
end
|
101
|
+
Dir.glob("**/nunit3-console.exe") { |n| @@nunit_console = n } unless File.exist?(@@nunit_console)
|
102
|
+
end
|
103
|
+
unless File.exist?(@@nunit_console)
|
104
|
+
raise "unable to locate nunit-console.exe, assign NUNIT_CONSOLE to the correct location."
|
105
|
+
end
|
106
|
+
|
107
|
+
@@nunit_console
|
108
|
+
end
|
109
|
+
|
110
|
+
@@nunit_console_x86 = ""
|
111
|
+
def self.nunit_console_x86
|
112
|
+
unless File.exist?(@@nunit_console_x86)
|
113
|
+
@@nunit_console_x86 = NUNIT_CONSOLE_X86 if defined?(NUNIT_CONSOLE_X86)
|
114
|
+
unless File.exist?(@@nunit_console_x86)
|
115
|
+
@@nunit_console_x86 = 'C:\\Program Files (x86)\\NUnit.org\\nunit-console\\nunit3-console.exe'
|
116
|
+
end
|
117
|
+
unless File.exist?(@@nunit_console_x86)
|
118
|
+
@@nunit_console_x86 = 'C:\\Program Files (x86)\\NUnit 2.6.4\\bin\\nunit-console-x86.exe'
|
119
|
+
end
|
120
|
+
unless File.exist?(@@nunit_console_x86)
|
121
|
+
@@nunit_console_x86 = 'C:\\Program Files (x86)\\NUnit 2.6.3\\bin\\nunit-console-x86.exe'
|
122
|
+
end
|
123
|
+
end
|
124
|
+
unless File.exist?(@@nunit_console_x86)
|
125
|
+
raise "unable to locate nunit-console-x86.exe, assign NUNIT_CONSOLE_X86 to the correct location."
|
126
|
+
end
|
127
|
+
|
128
|
+
@@nunit_console_x86
|
129
|
+
end
|
117
130
|
end
|
118
131
|
|
119
|
-
|
120
|
-
|
121
|
-
|
132
|
+
unless defined?(NUNIT)
|
133
|
+
NUNIT = FileList.new("**/bin/**/*.Test.dll", "**/bin/**/*.Tests.dll", "**/lib/**/*.Test.dll",
|
134
|
+
"**/lib/**/*.Tests.dll")
|
135
|
+
end
|
data/lib/tasks/update.rb
CHANGED
@@ -1,15 +1,17 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
desc "performs svn update"
|
2
4
|
task :update do Tasks.execute_task :update; end
|
3
5
|
|
4
6
|
class Update < Array
|
5
|
-
|
6
|
-
|
7
|
+
def update
|
8
|
+
add_quiet "svn update" if File.exist?(".svn") && Internet.available?
|
7
9
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
10
|
+
# if(Dir.glob('**/packages.config').length > 0)
|
11
|
+
Dir.glob("*.sln").each do |sln_file|
|
12
|
+
# add_quiet "nuget restore #{sln_file}"
|
13
|
+
add_quiet "nuget update #{sln_file}"
|
14
|
+
end
|
15
|
+
# end
|
16
|
+
end
|
17
|
+
end
|
data/lib/tasks.rb
CHANGED
@@ -1,49 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class Tasks
|
2
|
-
|
3
|
-
@@default=nil
|
4
|
+
attr_accessor :env
|
4
5
|
|
5
|
-
|
6
|
-
@@default=self
|
7
|
-
@env=env
|
8
|
-
@env=Environment.new if @env.nil?
|
9
|
-
end
|
6
|
+
@@default = nil
|
10
7
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
if(value.is_a?(String))
|
17
|
-
puts `#{value}`
|
18
|
-
else
|
19
|
-
if(value.is_a?(Array))
|
20
|
-
value.each{|e| execute(e)}
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
8
|
+
def initialize(env = nil)
|
9
|
+
@@default = self
|
10
|
+
@env = env
|
11
|
+
@env = Environment.new if @env.nil?
|
12
|
+
end
|
25
13
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
14
|
+
def execute(value)
|
15
|
+
if value.respond_to?(:execute)
|
16
|
+
value.update if value.respond_to?(:update)
|
17
|
+
value.execute
|
18
|
+
elsif value.is_a?(String)
|
19
|
+
puts `#{value}`
|
20
|
+
elsif value.is_a?(Array)
|
21
|
+
value.each { |e| execute(e) }
|
22
|
+
end
|
23
|
+
end
|
39
24
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
25
|
+
def execute_task(task)
|
26
|
+
if defined?(COMMANDS) && COMMANDS.key?(task)
|
27
|
+
puts DELIMITER if defined?(DEBUG)
|
28
|
+
puts ":#{task}" unless @env.colorize?
|
29
|
+
if @env.colorize?
|
30
|
+
require "ansi/code"
|
31
|
+
puts ANSI.white + ANSI.bold + ":#{task}" + ANSI.reset if @env.colorize?
|
32
|
+
end
|
33
|
+
execute(COMMANDS[task])
|
34
|
+
end
|
35
|
+
end
|
45
36
|
|
46
|
-
|
47
|
-
|
48
|
-
|
37
|
+
def self.execute_task(task)
|
38
|
+
@@default = Tasks.new if @@default.nil?
|
39
|
+
@@default.execute_task task
|
40
|
+
end
|
41
|
+
end
|
49
42
|
|
43
|
+
%w[add analyze build clobber commit
|
44
|
+
doc info package publish pull push setup test
|
45
|
+
update].each { |name| require_relative("tasks/#{name}.rb") }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.154
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lou Parslow
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -46,13 +46,11 @@ dependencies:
|
|
46
46
|
version: '3.0'
|
47
47
|
description: development tasks
|
48
48
|
email: lou.parslow@gmail.com
|
49
|
-
executables:
|
50
|
-
- dev
|
49
|
+
executables: []
|
51
50
|
extensions: []
|
52
51
|
extra_rdoc_files: []
|
53
52
|
files:
|
54
53
|
- LICENSE
|
55
|
-
- bin/dev
|
56
54
|
- lib/apps.rb
|
57
55
|
- lib/apps/git.rb
|
58
56
|
- lib/apps/msbuild.rb
|
@@ -105,7 +103,7 @@ homepage: http://rubygems.org/gems/dev
|
|
105
103
|
licenses:
|
106
104
|
- Apache-2.0
|
107
105
|
metadata: {}
|
108
|
-
post_install_message:
|
106
|
+
post_install_message:
|
109
107
|
rdoc_options: []
|
110
108
|
require_paths:
|
111
109
|
- lib
|
@@ -120,8 +118,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
118
|
- !ruby/object:Gem::Version
|
121
119
|
version: '0'
|
122
120
|
requirements: []
|
123
|
-
rubygems_version: 3.
|
124
|
-
signing_key:
|
121
|
+
rubygems_version: 3.2.22
|
122
|
+
signing_key:
|
125
123
|
specification_version: 4
|
126
124
|
summary: dev
|
127
125
|
test_files: []
|
data/bin/dev
DELETED