dev 2.1.58 → 2.1.59

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: d91b534e895402f9095d3ed1167366f291d4e3a8
4
- data.tar.gz: fe978c0fa5e80a5413fa173bef2ba2b626683149
3
+ metadata.gz: 670e43ff54de7c6c7720fb45143c6bc405476751
4
+ data.tar.gz: 68e94d20d454440a8ba99780857d69b89c63df9c
5
5
  SHA512:
6
- metadata.gz: cda2b756bb749e8e9d8e39e66202f5d8f9cee7951cf9730b508fef4ac127b3c7efca8f4c6ce0eb31d893824798b9e463fcbc3650d84a95270329179cd09fa063
7
- data.tar.gz: 9ed789ffb78c43ae8219e07d9f3daacbb8f8389dabc7fffb43cf05579030f8716503b8379318a2a971f1e8b9f5b44119938b226a47a5b57fd7675dfb3288beb8
6
+ metadata.gz: 594210f9ddaac4380dfa851d74505880c88009d43ca30807accef570766fd78368ab876f84aa4aee0de17346224d1285edc69fc9bbcb9a5ec949f51f7ca167ea
7
+ data.tar.gz: 5a40bdd6cb6c9e2ae134932c72d0333dffbb6fcce381aa310353882aaa7273ab2d3949510ba9230d586e18c697a035d53e1d9a6ae526291a22a409d89ff823e3
data/lib/apps/git.rb CHANGED
@@ -1,4 +1,10 @@
1
- puts __FILE__ if defined?(DEBUG)
1
+ if defined?(DEBUG)
2
+ puts DELIMITER
3
+ puts __FILE__
4
+ puts
5
+ puts 'git not found' if(!Command.executes?('git --version'))
6
+ puts
7
+ end
2
8
 
3
9
  require 'tmpdir'
4
10
  require 'rake'
data/lib/apps/msbuild.rb CHANGED
@@ -1,3 +1,4 @@
1
+ puts DELIMITER if defined?(DEBUG)
1
2
  puts __FILE__ if defined?(DEBUG)
2
3
  # Visual Studio 2008 version 9.0, solution format version 10.00
3
4
  # Visual Studio 2010 version 10.0, solution format version 11.00
@@ -5,34 +6,25 @@ puts __FILE__ if defined?(DEBUG)
5
6
  # Visual Studio 2013 version 12.0, solution format version 12.00
6
7
  # Visual Studio 2015 version 14.0, solution format version 12.00
7
8
  # Visual Studio 2017 version 15.0
9
+ require 'pp'
8
10
  class MSBuild < Hash
9
11
 
10
12
  #@@ignore_configurations=Array.new
11
13
  def initialize
12
-
13
-
14
-
15
- self[:vs9]="C:\\Windows\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe" if(File.exists?("C:\\Windows\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe"))
16
- self[:vs10]="C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\msbuild.exe" if(File.exists?("C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\msbuild.exe"))
17
- self[:vs12]="C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\msbuild.exe" if(File.exists?("C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\msbuild.exe"))
18
- self[:vs14]="C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\msbuild.exe" if(File.exists?("C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\msbuild.exe"))
19
- self[:vs15]="C:\\Program Files (x86)\\MSBuild\\15.0\\bin\\msbuild.exe" if(File.exists?("C:\\Program Files (x86)\\MSBuild\\15.0\\bin\\msbuild.exe"))
20
- self[:vs15]="C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\MSBuild\\15.0\Bin\\msbuild.exe" if(File.exists?("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\MSBuild\\15.0\Bin\\msbuild.exe"))
14
+ add(:vs9,"C:/Windows/Microsoft.NET/Framework/v3.5/msbuild.exe")
15
+ add(:vs10,"C:/Windows/Microsoft.NET/Framework/v4.0.30319/msbuild.exe")
16
+ add(:vs12,"C:/Program Files (x86)/MSBuild/12.0/bin/msbuild.exe")
17
+ add(:vs14,"C:/Program Files (x86)/MSBuild/14.0/bin/msbuild.exe")
18
+ add(:vs15,"C:/Program Files (x86)/MSBuild/15.0/bin/msbuild.exe")
19
+ add(:vs15,"C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/MSBuild/15.0/Bin/MSBuild.exe")
20
+ end
21
21
 
22
- if(File.exists?("C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\msbuild.exe"))
23
- self[:vs14]="C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\msbuild.exe"
24
- else
25
- if(Environment.windows?)
26
- puts "C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\msbuild.exe was not found."
27
- puts "MSBUILD[:vs14]='PATH_TO_MSBUILD' may be used to specify msbuild path."
28
- end
22
+ def add(key,name)
23
+ if(File.exists?(name))
24
+ self[key] = name
29
25
  end
30
26
  end
31
27
 
32
- #def self.ignore_configuration(configuration)
33
- # @@ignore_configurations.add(configuration) if(!@@ignore_configurations.include?(configuration))
34
- #end
35
-
36
28
  def self.has_version? version
37
29
  if(defined?(MSBUILD))
38
30
  MSBUILD.has_key?(version)
@@ -123,3 +115,10 @@ class MSBuild < Hash
123
115
  end
124
116
  end
125
117
 
118
+ if defined?(DEBUG)
119
+ puts
120
+ puts "MSBuild"
121
+ msb = MSBuild.new
122
+ pp msb
123
+ puts
124
+ end
data/lib/apps/nuget.rb CHANGED
@@ -1,4 +1,12 @@
1
- puts __FILE__ if defined?(DEBUG)
1
+ if defined?(DEBUG)
2
+ puts DELIMITER
3
+ puts __FILE__
4
+ puts
5
+ puts 'nuget not found' if(!Command.executes?('nuget'))
6
+ puts
7
+ end
8
+ #puts DELIMITER if defined?(DEBUG)
9
+ #puts __FILE__ if defined?(DEBUG)
2
10
 
3
11
  class Nuget
4
12
  def self.get_build_commands nuspec_file
data/lib/apps/wix.rb CHANGED
@@ -1,4 +1,11 @@
1
- puts __FILE__ if defined?(DEBUG)
1
+ if defined?(DEBUG)
2
+ puts DELIMITER
3
+ puts __FILE__
4
+ puts
5
+ puts 'candle not found' if(!Command.executes?('candle'))
6
+ puts 'light not found' if(!Command.executes?('light'))
7
+ puts
8
+ end
2
9
 
3
10
  #
4
11
  #
data/lib/base/array.rb CHANGED
@@ -10,10 +10,10 @@ class Array
10
10
  def execute value=nil
11
11
  @env=Environment.new() if @env.nil?
12
12
  i=0
13
- puts "Array.execute length=#{self.length}" if defined?(DEBUG)
13
+ #puts "Array.execute length=#{self.length}" if defined?(DEBUG)
14
14
  while i < self.length
15
15
 
16
- puts self[i].to_s if defined?(DEBUG)
16
+ #puts self[i].to_s if defined?(DEBUG)
17
17
  #puts "Array[#{i.to_s}]'=nil" if @env.debug? && self[i].nil?
18
18
  #puts "Array[#{i.to_s}].class=#{self[i].class.to_s}" if @env.debug? && !self[i].nil?
19
19
  #puts "Array[#{i.to_s}].to_s=#{self[i].to_s}" if @env.debug? && !self[i].nil?
@@ -37,6 +37,16 @@ class Array
37
37
  self << command if !has_command? command
38
38
  end
39
39
 
40
+ def log_debug_info(title)
41
+ if defined?(DEBUG) && self.length > 0
42
+ puts
43
+ puts title
44
+ self.each{|c| puts " #{c[:input]}" }
45
+ #pp self
46
+ puts
47
+ end
48
+ end
49
+
40
50
  def has_command? command
41
51
  return true if(command.kind_of?(String) && !include?(command))
42
52
  if(command.kind_of?(Command))
data/lib/base/command.rb CHANGED
@@ -1,3 +1,6 @@
1
+ puts DELIMITER if defined?(DEBUG)
2
+ puts __FILE__ if defined?(DEBUG)
3
+
1
4
  require 'time'
2
5
  require 'open3'
3
6
  require_relative('timeout.rb')
@@ -79,6 +82,15 @@ class Command < Hash
79
82
  def error
80
83
  self[:error]
81
84
  end
85
+ def self.executes?(command)
86
+ cmd = Command.new({ :input => command, :quiet => true,:ignore_failure => true})
87
+ cmd.execute
88
+ if(cmd[:exit_code] == 0)
89
+ true
90
+ else
91
+ false
92
+ end
93
+ end
82
94
 
83
95
  def execute value=nil
84
96
 
@@ -1,3 +1,4 @@
1
+ puts DELIMITER if defined?(DEBUG)
1
2
  puts __FILE__ if defined?(DEBUG)
2
3
 
3
4
  require_relative('string.rb')
@@ -111,7 +112,7 @@ class Environment < Hash
111
112
  end
112
113
 
113
114
  def debug?
114
- return true if get_env('DEBUG')=='true'
115
+ return true if defined?(DEBUG)
115
116
  false
116
117
  end
117
118
 
@@ -210,22 +211,26 @@ class Environment < Hash
210
211
  puts " dev_root: #{self.root_dir}"
211
212
  puts " machine: #{self.machine}"
212
213
  puts " user: #{self.user}"
214
+ puts " os: #{Environment.OS}"
213
215
  #puts " configuration: #{self.configuration}"
214
216
  puts " debug: #{self.debug?}"
215
- puts "git user.email: #{Git.user_email}"
217
+ #puts "git user.email: #{Git.user_email}"
216
218
  puts " "
217
- puts "Path Commands"
218
- ['svn --version --quiet','git --version','msbuild /version','nuget','candle','light','gem --version'].each{|cmd|
219
- command=Command.new(cmd)
220
- command[:quiet]=true
221
- command[:ignore_failure]=true
222
- command.execute
223
- if(command[:exit_code] == 0)
224
- puts "#{cmd.split(' ')[0].fix(14)} #{Environment.get_version(command[:output])}"
225
- else
226
- puts "#{cmd.split(' ')[0].fix(14)} not found."
227
- missing_command=true
228
- end
229
- }
230
- end
231
- end
219
+ #puts "Path Commands"
220
+ #['svn --version --quiet','git --version','msbuild /version','nuget','candle','light','gem --version'].each{|cmd|
221
+ # command=Command.new(cmd)
222
+ # command[:quiet]=true
223
+ # command[:ignore_failure]=true
224
+ # command.execute
225
+ # if(command[:exit_code] == 0)
226
+ # puts "#{cmd.split(' ')[0].fix(14)} #{Environment.get_version(command[:output])}"
227
+ # else
228
+ # puts "#{cmd.split(' ')[0].fix(14)} not found."
229
+ # missing_command=true
230
+ # end
231
+ #}
232
+ end
233
+ end
234
+
235
+ puts "" if defined?(DEBUG)
236
+ puts Environment.default.info if defined?(DEBUG)
data/lib/base/projects.rb CHANGED
@@ -1,3 +1,4 @@
1
+ puts DELIMITER if defined?(DEBUG)
1
2
  puts __FILE__ if defined?(DEBUG)
2
3
 
3
4
  require 'json'
data/lib/commands.rb CHANGED
@@ -1,9 +1,13 @@
1
- puts __FILE__ if ENV.has_key?('DEBUG')
1
+ if defined?(DEBUG)
2
+ puts DELIMITER
3
+ puts __FILE__
4
+ end
2
5
 
3
6
  require_relative('apps.rb')
4
7
 
5
8
  require 'json'
6
9
  require 'rake/clean'
10
+ require 'pp'
7
11
 
8
12
  Dir.glob("#{File.dirname(__FILE__)}/tasks/*.rb").each{|rb|
9
13
  require(rb) if !rb.include?('default')
@@ -36,7 +40,7 @@ class Commands < Hash
36
40
  if v.length > 0
37
41
  puts " #{k}"
38
42
  v.each{|c|
39
- puts " #{c}" if(!c.kind_of?(Hash))
43
+ puts " #{c[:input]}" if(!c.kind_of?(Hash))
40
44
  }
41
45
  end
42
46
  }
data/lib/dev.rb CHANGED
@@ -1,5 +1,9 @@
1
- puts __FILE__ if ENV.has_key?('DEBUG')
1
+ DELIMITER='==================================================================================='
2
+ puts DELIMITER if defined?(DEBUG)
3
+ puts __FILE__ if defined?(DEBUG)
2
4
 
5
+ require_relative('base.rb')
6
+ require_relative('base/string.rb')
3
7
  require_relative('base/environment.rb')
4
8
  require_relative('base/projects.rb')
5
9
  require_relative('commands.rb')
data/lib/tasks/add.rb CHANGED
@@ -1,4 +1,7 @@
1
- puts __FILE__ if defined?(DEBUG)
1
+ if defined?(DEBUG)
2
+ puts DELIMITER
3
+ puts __FILE__
4
+ end
2
5
 
3
6
  desc 'adds source files to git or subversion'
4
7
  task :add do Tasks.execute_task :add;end
@@ -23,21 +26,6 @@ class Add < Array
23
26
  end
24
27
  end
25
28
  end
26
- # if(f.include?(' '))
27
- # status=Command.output("svn status \"#{f}\"")
28
- # error=Command.error("svn status \"#{f}\"")
29
- # else
30
- # status=Command.output("svn status #{f}")
31
- # error=Command.error("svn status #{f}")
32
- # end
33
- # if(status.include?('?') || status.include?('was not found') || error.include?('was not found'))
34
- # if(f.include?(' '))
35
- # add_quiet "svn add \"#{f}\" --parents"
36
- # else
37
- # add_quiet "svn add #{f} --parents"
38
- # end
39
- # end
40
- #end
41
29
  }
42
30
  end
43
31
  if(File.exists?('.git'))
@@ -52,5 +40,7 @@ class Add < Array
52
40
  end
53
41
  end
54
42
  end
43
+
44
+ log_debug_info("Add") if defined?(DEBUG)
55
45
  end
56
46
  end
data/lib/tasks/analyze.rb CHANGED
@@ -9,5 +9,12 @@ class Analyze < Array
9
9
  FileUtils.mkdir('doc') if(!File.exists?('doc'))
10
10
  add_quiet 'countloc -r * --html doc/countloc.html'
11
11
  end
12
+
13
+ if defined?(DEBUG)
14
+ puts
15
+ puts "Analyze"
16
+ pp self
17
+ puts
18
+ end
12
19
  end
13
20
  end
data/lib/tasks/build.rb CHANGED
@@ -13,7 +13,7 @@ SMARTASSEMBLY_FILES=FileList.new('**/*.saproj')
13
13
  class Build < Array
14
14
  def update
15
15
 
16
- puts "SLN_FILES: #{SLN_FILES}" if(Environment.default.debug?)
16
+ #puts "SLN_FILES: #{SLN_FILES}" if(Environment.default.debug?)
17
17
 
18
18
  update_gemspec
19
19
  update_dotnet
@@ -23,28 +23,25 @@ class Build < Array
23
23
  update_wix if Environment.windows?
24
24
  update_xcode if Environment.mac?
25
25
 
26
- if(Environment.default.debug?)
27
- puts "Build commands: #{self.to_s}"
28
-
29
- end
26
+ log_debug_info("Build") if defined?(DEBUG)
30
27
  end
31
28
 
32
29
  def update_gemspec
33
- puts "Build scanning for gemspec files" if Environment.default.debug?
30
+ #puts "Build scanning for gemspec files" if Environment.default.debug?
34
31
  Dir.glob('*.gemspec'){|gemspec|
35
32
  add_quiet("gem build #{gemspec}") if !File.exist?(Gemspec.gemfile gemspec)
36
33
  }
37
34
  end
38
35
 
39
36
  def update_dotnet
40
- puts "Build scanning for project.json" if Environment.default.debug?
37
+ #puts "Build scanning for project.json" if Environment.default.debug?
41
38
  if(File.exists?('project.json'))
42
39
  add_quiet "dotnet build"
43
40
  end
44
41
  end
45
42
 
46
43
  def update_sln
47
- puts "Build scanning for sln files" if Environment.default.debug?
44
+ #puts "Build scanning for sln files" if Environment.default.debug?
48
45
  SLN_FILES.each{|sln_file|
49
46
  puts " #{sln_file}" if Environment.default.debug?
50
47
  build_commands = MSBuild.get_build_commands sln_file
@@ -60,7 +57,7 @@ class Build < Array
60
57
  end
61
58
 
62
59
  def update_smartassembly
63
- puts "Build scanning for sa (smart assembly) files" if Environment.default.debug?
60
+ #puts "Build scanning for sa (smart assembly) files" if Environment.default.debug?
64
61
  sa = 'C:/Program Files/Red Gate/SmartAssembly 6/SmartAssembly.com'
65
62
  SMARTASSEMBLY_FILES.each{|saproj_file|
66
63
  puts " #{saproj_file}" if Environment.default.debug?
@@ -75,7 +72,7 @@ class Build < Array
75
72
 
76
73
 
77
74
  def update_wix
78
- puts "Build scanning for wxs <Product> files" if Environment.default.debug?
75
+ #puts "Build scanning for wxs <Product> files" if Environment.default.debug?
79
76
  WXS_FILES.each{|wxs_file|
80
77
  if(IO.read(wxs_file).include?('<Product'))
81
78
  build_commands = Wix.get_build_commands wxs_file
@@ -87,7 +84,7 @@ class Build < Array
87
84
  end
88
85
  }
89
86
 
90
- puts "Build scanning for wxs <Bundle> files" if Environment.default.debug?
87
+ #puts "Build scanning for wxs <Bundle> files" if Environment.default.debug?
91
88
  WXS_FILES.each{|wxs_file|
92
89
  if(IO.read(wxs_file).include?('<Bundle'))
93
90
  build_commands = Wix.get_build_commands wxs_file
@@ -100,7 +97,7 @@ class Build < Array
100
97
  }
101
98
  end
102
99
  def update_xcode
103
- puts "Build scanning for xcodeproj folders" if Environment.default.debug?
100
+ #puts "Build scanning for xcodeproj folders" if Environment.default.debug?
104
101
  Dir.glob('**/*.xcodeproj').each{|dir|
105
102
  puts dir if Environment.default.debug?
106
103
  build_commands = XCodeBuild.get_build_commands dir
data/lib/tasks/commit.rb CHANGED
@@ -42,6 +42,8 @@ class Commit < Array
42
42
  add_quiet "<%Commit.reset_commit_message%>"
43
43
  end
44
44
  end
45
+
46
+ log_debug_info("Commit") if defined?(DEBUG)
45
47
  end
46
48
 
47
49
  def self.reset_commit_message
data/lib/tasks/setup.rb CHANGED
@@ -13,19 +13,11 @@ class Setup < Array
13
13
  end
14
14
 
15
15
  def update
16
- puts "Setup.update" if Environment.default.debug?
17
16
  env=Environment.new if env.nil?
18
-
19
17
  add_quiet 'bundle install' if File.exists? 'Gemfile'
20
- #add Command.new( { :input => 'bundle install', :quiet => true}) if(File.exists?('Gemfile'))
21
-
22
- #['bin','data','log','make','publish','test'].each{|dir|
23
- # add "<%FileUtils.mkdir('#{Environment.default.devroot}/#{dir}')%>" if !File.exists? "#{Environment.dev_root}/#{dir}"
24
- #}
25
18
 
26
19
  Dir.glob('*.gemspec').each{|gemspec_file|
27
20
  add_quiet "<%Gemspec.update('#{gemspec_file}')%>"
28
- #add Command.new( { :input => "<%Gemspec.update('#{gemspec_file}')%>", :quiet => true} )
29
21
  }
30
22
 
31
23
  if(Dir.glob('**/packages.config').length > 0)
@@ -38,7 +30,7 @@ class Setup < Array
38
30
  add_quiet "dotnet restore"
39
31
  end
40
32
 
41
- puts 'Setup checking SVN_EXPORTS...' if env.debug?
33
+ #puts 'Setup checking SVN_EXPORTS...' if env.debug?
42
34
  if(defined?(SVN_EXPORTS))
43
35
  SVN_EXPORTS.each{|k,v|
44
36
  dest="#{Command.dev_root}/dep/#{k}"
@@ -60,7 +52,7 @@ class Setup < Array
60
52
  end
61
53
  }
62
54
  else
63
- puts 'SVN_EXPORTS is not defined' if env.debug?
55
+ #puts 'SVN_EXPORTS is not defined' if env.debug?
64
56
  end
65
57
 
66
58
  if(defined?(GIT_EXPORTS))
@@ -80,7 +72,7 @@ class Setup < Array
80
72
  end
81
73
 
82
74
  if(defined?(VERSION))
83
- puts "updating nuspec files for VERSION #{VERSION}" if env.debug?
75
+ #puts "updating nuspec files for VERSION #{VERSION}" if env.debug?
84
76
  Dir.glob('*.nuspec').each{|nuspec|
85
77
  current_version=IO.read(nuspec).scan(/<version>[\d.]+<\/version>/)[0]
86
78
  puts "#{nuspec} current version=#{current_version}" if env.debug?
@@ -117,5 +109,6 @@ class Setup < Array
117
109
  end
118
110
  }
119
111
  end
112
+ log_debug_info("Setup")
120
113
  end
121
114
  end
data/lib/tasks.rb CHANGED
@@ -26,6 +26,7 @@ class Tasks
26
26
  def execute_task task
27
27
  if(defined?(COMMANDS))
28
28
  if(COMMANDS.has_key?(task))
29
+ puts DELIMITER if defined?(DEBUG)
29
30
  puts ":#{task}" if !@env.colorize?
30
31
  if @env.colorize?
31
32
  require 'ansi/code'
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.58
4
+ version: 2.1.59
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-21 00:00:00.000000000 Z
11
+ date: 2017-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake