dev 2.0.270 → 2.0.271

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: 7248978e9485e170b6131017226eac544530bca6
4
- data.tar.gz: 2c4152f5040c40985aeaf736114eeeccc6c3657a
3
+ metadata.gz: 250e5de38be7903ba22278d1ae3400999f92605e
4
+ data.tar.gz: 940a8b48b3fa546a9b5e323a1dc67c10b738f2bb
5
5
  SHA512:
6
- metadata.gz: 16928d3ab7e5a7173c68e7d3deb8aba002e99ab85c62118fff688bc204aa8c37df6d4476af7ba631d3986b063de4aa387e54089eb7dd2d9ef98841c4f413b968
7
- data.tar.gz: cb72c3f82c26e5650d39b769b0518f6295bd1538a3bf72d8a6a92be25980b719ffd8d8f03286c52f13dc18083f632090d9b8dea3879ca14e08f108af42584ce8
6
+ metadata.gz: a60ff501e785bb155f2ff94b558accdfe84d01c8ab9903caecf16b1d6fdbd9cbbb46d8c38cd7886c719cc8aba3b19ee71a52b382f924540f6ad5b7ec5f0cee9a
7
+ data.tar.gz: 17805bc0adffe5ac02facea81e77fa023b550613df4511ecc69a08f5ad4c2971c249522014b5fa082444bb9305a81dbe131ae3cf0df8f6325e66d1f841028e4e
@@ -68,8 +68,9 @@ class MSBuild < Hash
68
68
  def self.get_platforms(sln_filename)
69
69
  platforms=Array.new
70
70
  sln_text=File.read(sln_filename,:encoding=>"UTF-8")
71
- sln_text.scan( /= [\w]+\|([\w ]+)/ ).each{|m|
72
- p=m.first.to_s
71
+ #sln_text.scan( /= [\w]+\|([\w ]+)/ ).each{|m|
72
+ sln_text.scan(/\|([\w\d\s]+)\s*=/).each{|m|
73
+ p=m.first.to_s.strip
73
74
  platforms << p if !platforms.include?(p)
74
75
  }
75
76
  return platforms
@@ -113,6 +113,7 @@ class Svn
113
113
 
114
114
  files.each{|f|
115
115
  fdir=File.dirname(f)
116
+
116
117
  FileUtils.mkdir_p(fdir) if(fdir.length > 0 && !File.exists?(fdir))
117
118
  FileUtils.cp("#{source_dir}/#{f}","#{f}")
118
119
  add_file.puts f
@@ -11,6 +11,9 @@ class Array
11
11
  @env=Environment.new() if @env.nil?
12
12
  i=0
13
13
  while i < self.length
14
+ #puts "Array[#{i.to_s}]'=nil" if @env.debug? && self[i].nil?
15
+ #puts "Array[#{i.to_s}].class=#{self[i].class.to_s}" if @env.debug? && !self[i].nil?
16
+ #puts "Array[#{i.to_s}].to_s=#{self[i].to_s}" if @env.debug? && !self[i].nil?
14
17
  self[i]=Command.new({ :input => self[i], :quiet => true }) if(self[i].is_a?(String))
15
18
  self[i]=Command.new(self[i]) if(self[i].is_a?(Hash) && !self[i].is_a?(Command))
16
19
 
@@ -18,7 +21,6 @@ class Array
18
21
  value.each{|k,v|self[i][k]=v}
19
22
  end
20
23
 
21
- #self[i].execute if(self[i].is_a?(Command))
22
24
  if(self[i].is_a?(Command))
23
25
  self[i].execute
24
26
  @env.out self[i].summary
@@ -172,15 +172,15 @@ class Environment < Hash
172
172
  text.match(/(\d+\.\d+\.[\d\w]+)/)
173
173
  end
174
174
 
175
- def self.info
175
+ def info
176
176
  puts "Environment"
177
177
  puts " ruby version: #{`ruby --version`}"
178
178
  puts " ruby platform: #{RUBY_PLATFORM}"
179
- puts " dev_root: #{Environment.dev_root}"
180
- puts " machine: #{Environment.machine}"
181
- puts " user: #{Environment.user}"
182
- puts " configuration: #{Environment.configuration}"
183
- puts " debug: #{Environment.debug}"
179
+ puts " dev_root: #{self.root_dir}"
180
+ puts " machine: #{self.machine}"
181
+ puts " user: #{self.user}"
182
+ #puts " configuration: #{self.configuration}"
183
+ puts " debug: #{self.debug}"
184
184
  puts " "
185
185
  puts "Path Commands"
186
186
  ['svn --version --quiet','git --version','msbuild /version','nuget','candle','light','gem --version'].each{|cmd|
@@ -35,7 +35,7 @@ class Project < Hash
35
35
 
36
36
  def self.get_url directory=Rake.application.original_dir
37
37
  url=''
38
- Dir.chdir(directory) do#Rake.application.original_dir) do
38
+ Dir.chdir(directory) do
39
39
  url=`git config --get remote.origin.url`.strip if(File.exists?('.git'))
40
40
  url= Svn.url.strip if(File.exists?('.svn'))
41
41
  end
@@ -83,8 +83,6 @@ class Project < Hash
83
83
 
84
84
  def checkout
85
85
  if(!File.exists?(wrk_dir) && self[:url].include?('svn'))
86
- #puts "checkout #{self.url} to #{self.wrk_dir}"
87
- #puts `svn checkout #{self.url} #{self.wrk_dir}`
88
86
  cmd=Command.new({ :input => "svn checkout #{self.url} #{self.wrk_dir}", :quiet => true,:ignore_failure => true})
89
87
  cmd.execute
90
88
  @env.out cmd.summary
@@ -178,8 +176,11 @@ class Project < Hash
178
176
  CLEAN.include logfile
179
177
  return true
180
178
  else
179
+ puts " deleting #{logfile}" if @env.debug?
181
180
  File.delete(logfile)
182
181
  end
182
+ else
183
+ puts "logfile #{logfile} does NOT exist." if @env.debug?
183
184
  end
184
185
  else
185
186
  puts "wrk_dir does not match Rake.application.original_dir" if @env.debug?
@@ -190,6 +191,7 @@ class Project < Hash
190
191
  def mark_work_up_to_date
191
192
  if wrk_dir == Rake.application.original_dir
192
193
  logfile=get_logfile ['up2date']
194
+ puts " writing #{logfile}" if Environment.default.debug?
193
195
  File.open(logfile,'w'){|f|f.write(' ')}
194
196
  else
195
197
  puts "wrk_dir does not match Rake.application.original_dir" if @env.debug?
@@ -253,12 +255,6 @@ class Project < Hash
253
255
  end
254
256
  end
255
257
 
256
- #def info
257
- # @env.out "Project #{name}"
258
- # @env.out "#{'fullname'.fix(13)}: #{self.fullname}"
259
- # @env.out "#{'url'.fix(13)}: #{self[:url]}"
260
- # @env.out "#{'version'.fix(13)}: #{VERSION}" if defined? VERSION
261
- #end
262
258
  def info
263
259
  infoCmd=Command.new({ :input => 'info', :exit_code => 0 })
264
260
  #out_cyan '========================================================='
@@ -429,23 +425,14 @@ class Project < Hash
429
425
  Dir.chdir(wrk_dir) do
430
426
  if(File.exists?('.git'))
431
427
  pull=Command.execute(Command.new({:input => 'git pull', :quiet => true, :ignore_failure => true}))
432
- @env.out pull.summary
428
+ @env.out pull.summary true
433
429
  return pull
434
- #pull=Command.new('git pull')
435
- #rake_default[:quiet]=true
436
- #rake_default[:ignore_failure]=true
437
- #rake_default.execute
438
- #return rake_defa
439
430
  end
440
431
  if(File.exists?('svn'))
441
432
  updateCmd=Command.execute(Command.new({:input => 'svn update', :quiet => true, :ignore_failure => true}))
442
- @env.out updateCmd.summary
433
+ @env.out updateCmd.summary true
443
434
  return updateCmd
444
435
  end
445
- #rake_default=Command.new('svn update')
446
- #rake_default[:quiet]=true
447
- #rake_default[:ignore_failure]=true
448
- #rake_default.execute
449
436
  end
450
437
  end
451
438
  return Command.new({:exit_code => 1})
@@ -25,7 +25,13 @@ class Projects < Hash
25
25
  if(self.has_key? fullname)
26
26
  self[fullname]
27
27
  else
28
- nil
28
+ project=nil
29
+ begin
30
+ project=Project.new(Project.get_url,fullname)
31
+ rescue
32
+ project=nil
33
+ end
34
+ project
29
35
  end
30
36
  end
31
37
 
@@ -21,10 +21,8 @@ class Add < Array
21
21
  end
22
22
  if(status.include?('?') || status.include?('was not found') || error.include?('was not found'))
23
23
  if(f.include?(' '))
24
- #puts "svn add \"#{f}\" --parents"
25
- add_quiet add "svn add \"#{f}\" --parents"
24
+ add_quiet "svn add \"#{f}\" --parents"
26
25
  else
27
- #puts "svn add #{f} --parents"
28
26
  add_quiet "svn add #{f} --parents"
29
27
  end
30
28
  end
@@ -36,7 +34,6 @@ class Add < Array
36
34
  if(File.exists?(f) && File.file?(f))
37
35
  status=Command.output("git status #{f} --short")
38
36
  if status.include?('??') || status.include?(' M ')
39
- #puts "git add #{f} -v"
40
37
  add_quiet "git add #{f} -v"
41
38
  end
42
39
  end
@@ -1,6 +1,6 @@
1
1
  desc 'displays project info'
2
2
  task :info do
3
- Environment.info
3
+ Environment.default.info
4
4
  puts ' '
5
5
  PROJECT.info
6
6
  puts ' '
@@ -78,7 +78,7 @@ class Setup < Array
78
78
  if(defined?(VERSION))
79
79
  Dir.glob('*.nuspec').each{|nuspec|
80
80
  current_version=IO.read(nuspec).scan(/<version>[\d.]+<\/version>/)[0]
81
- puts "#{nuspec} current version=#{current_version}" if defined?(DEBUG)
81
+ puts "#{nuspec} current version=#{current_version}" if env.debug?
82
82
  if(current_version.include?('<version>'))
83
83
  target_version="<version>#{VERSION}</version>"
84
84
  if(current_version != target_version)
@@ -88,17 +88,19 @@ class Setup < Array
88
88
  }
89
89
  Dir.glob('**/AssemblyInfo.cs').each{|assemblyInfo|
90
90
  current_version=IO.read(assemblyInfo).scan(/Version\(\"[\d.]+\"\)/)[0]
91
- puts "#{assemblyInfo} current version=#{current_version}" if defined?(DEBUG)
92
- if(current_version.include?('Version('))
91
+ if(!current_version.nil?)
92
+ puts "#{assemblyInfo} current version=#{current_version}" if env.debug?
93
+ if(current_version.include?('Version('))
93
94
  target_version="Version(\"#{VERSION}\")"
94
95
  if(current_version != target_version)
95
96
  add "<%Text.replace_in_file('#{assemblyInfo}','#{current_version}','#{target_version}')%>"
96
97
  end
97
- end
98
+ end
99
+ end
98
100
  }
99
101
  Dir.glob('**/*.wxs').each{|wxs|
100
102
  current_version=IO.read(wxs).scan(/Version=\"([\d.]+)\"/)[0][0]
101
- puts "#{wxs} current version=#{current_version}" if defined?(DEBUG)
103
+ puts "#{wxs} current version=#{current_version}" if env.debug?
102
104
  if(current_version.include?('Version='))
103
105
  target_version="Version=\"#{VERSION}\")="
104
106
  if(current_version != target_version)
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.0.270
4
+ version: 2.0.271
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-02 00:00:00.000000000 Z
11
+ date: 2015-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake