dev 2.0.194 → 2.0.195

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: 0563d7b60183ac907de34d6e819f28c117acc61e
4
- data.tar.gz: b2f16cd208c4b51489f2fff9198675883ef7fda9
3
+ metadata.gz: 2991a183429492e7bf7c04d35bef2feebd45c24b
4
+ data.tar.gz: 19754b66567aabc1e2bd4c2eb95466c70e2aafbe
5
5
  SHA512:
6
- metadata.gz: a167e8793cfe59baef1da3ac1a26e656aca831deabe9e67f11beea733500f203f8ce21d93f8691bb1199ee7d20bebd11c7019ca31f729d0c1b5c5db2c07083dd
7
- data.tar.gz: e67af08a04ae5a0e408f1dc59569c16952823833b311af6f6c14b8646df9a221a082adb48ad17c0d20a5172ffafe200a60595036e34fe3a57fc08607891b1093
6
+ metadata.gz: 54721601d4d67c6a37c9926be84f109d762f5b1f58afdb0cde736046f9c114ad6ed210802432d5597133b579e27fb589e3ed30251bf85babc18185a7b70c7936
7
+ data.tar.gz: b74b4ebc3cd3b6e240cf606fbe31d8e711bfd33bb8af2a0ae549f943dcafae640bc297676a8dbfe5e502394406b44cb64d5e86a7b8b4c7138cc9cb66308cf439
@@ -112,7 +112,4 @@ class Git
112
112
  end
113
113
  end
114
114
  end
115
-
116
- # retrieve copy of specific files for a specific tag
117
- # self.get source, tag, source_filelist, destination
118
115
  end
@@ -88,7 +88,6 @@ class MSBuild < Hash
88
88
  sln_arg="\"#{sln_filename}\"" if sln_filename.include?(' ')
89
89
  platform_arg="/p:Platform=#{platform}"
90
90
  platform_arg="/p:Platform=\"#{platform}\"" if platform.include?(' ')
91
- #build_commands << "#{msbuild_arg} #{sln_arg} /nologo /p:Configuration=#{configuration} #{platform_arg}"
92
91
  build_commands << "#{msbuild_arg} #{sln_arg} /p:Configuration=#{configuration} #{platform_arg}"
93
92
  }
94
93
  }
@@ -82,7 +82,6 @@ class Svn
82
82
 
83
83
  output = "\n"
84
84
  if(`svn info #{destination} 2>&1`.include?('Revision:'))
85
- #raise "Svn.publish: destination #{destination} already exists"
86
85
  puts "Svn.publish: destination #{destination} already exists"
87
86
  else
88
87
  # create subversion directory
@@ -95,17 +94,10 @@ class Svn
95
94
  files = source_filelist.to_a
96
95
  end
97
96
  files=source_filelist
98
- #Dir.chdir(source_dir) do
99
- # files=FileList.new(source_glob).to_a
100
- #end
101
97
  output = output + "\nfiles: "
102
- #Dir.chdir(source_dir) do
103
- files.each{|f|
104
- output = output + f + " "
105
- }
106
- #end
107
- #output = output + "\nfiles: #{files.to_s}"
108
-
98
+ files.each{|f|
99
+ output = output + f + " "
100
+ }
109
101
  pwd=Dir.pwd
110
102
  Dir.mktmpdir{|dir|
111
103
 
@@ -10,20 +10,11 @@ class Wix
10
10
  build_commands=Array.new if build_commands.nil?
11
11
  build_commands << "candle #{wxs_file} -ext WixNetFxExtension -ext WixBalExtension -ext WixUtilExtension"
12
12
 
13
- #if(IO.read(wxs_file).include?('<Product'))
14
- if(defined?(VERSION))
15
- build_commands << "light #{File.basename(wxs_file,'.*')}.wixobj -out #{File.basename(wxs_file,'.*')}-#{VERSION}.msi -ext WixNetFxExtension -ext WixBalExtension -ext WixUtilExtension"
16
- else
17
- build_commands << "light #{File.basename(wxs_file,'.*')}.wixobj -ext WixNetFxExtension -ext WixBalExtension -ext WixUtilExtension"
18
- end
19
- #end
20
- #elsif(IO.read(wxs_file).include?('<Bundle'))
21
- # if(defined?(VERSION))
22
- # build_commands << "light #{File.basename(wxs_file,'.*')}.wixobj -out #{File.basename(wxs_file,'.*')}-#{VERSION}.exe -ext WixNetFxExtension -ext WixBalExtension -ext WixUtilExtension"
23
- # else
24
- # build_commands << "light #{File.basename(wxs_file,'.*')}.wixobj -ext WixNetFxExtension -ext WixBalExtension -ext WixUtilExtension"
25
- # end
26
- #end
13
+ if(defined?(VERSION))
14
+ build_commands << "light #{File.basename(wxs_file,'.*')}.wixobj -out #{File.basename(wxs_file,'.*')}-#{VERSION}.msi -ext WixNetFxExtension -ext WixBalExtension -ext WixUtilExtension"
15
+ else
16
+ build_commands << "light #{File.basename(wxs_file,'.*')}.wixobj -ext WixNetFxExtension -ext WixBalExtension -ext WixUtilExtension"
17
+ end
27
18
  end
28
19
  build_commands
29
20
  end
@@ -97,8 +97,6 @@ class Command < Hash
97
97
  self[:end_time] = Time.now
98
98
  else
99
99
  require_relative 'timeout.rb'
100
- #puts run_with_timeout(self[:input], self[:timeout], 1).to_s
101
- #self[:output] = run_with_timeout(self[:input], self[:timeout], 1)
102
100
  result=run_with_timeout2(self[:directory],self[:input], self[:timeout], 2)
103
101
  self[:output]=result[0]
104
102
  self[:error]=result[1]
@@ -130,7 +128,7 @@ class Command < Hash
130
128
  end
131
129
  if(!self.has_key?(:ignore_failure) || !self[:ignore_failure])
132
130
  raise "#{self[:input]} failed"
133
- end #unless (self.has_key?(:ignore_failure) && self[:ignore_failure]==true)
131
+ end
134
132
  end
135
133
 
136
134
  end
@@ -164,7 +162,6 @@ class Command < Hash
164
162
  return ENV[v].gsub('\\','/') unless ENV[v].nil?
165
163
  }
166
164
  dir=home
167
- #dir=ENV["DEV_ROOT"].gsub('\\','/') unless ENV["DEV_ROOT"].nil?
168
165
  return dir
169
166
  end
170
167
 
@@ -60,7 +60,6 @@ class Environment < Hash
60
60
  end
61
61
 
62
62
  def self.check
63
- #["ruby","svn","git","msbuild","candle","light"].each{|cmd|
64
63
  puts 'checking commands...'
65
64
  missing_command=false
66
65
  ['ruby --version','svn --version --quiet','git --version','msbuild /version','nunit-console','nuget','candle','light','gem --version'].each{|cmd|
@@ -14,7 +14,6 @@ class File
14
14
  def self.publish destination, source_dir, source_glob='**/*', overwrite_existing=false
15
15
 
16
16
  output = "\n"
17
- # directory
18
17
  FileUtils.mkdir_p destination if !File.exists? destination
19
18
 
20
19
  files=nil
@@ -7,8 +7,6 @@ class Hash
7
7
  if(v.is_a?(Array) && v.length==0)
8
8
  self.delete k
9
9
  else
10
- #puts "executing #{k}"
11
-
12
10
  v.execute(value) if v.respond_to?(:execute)
13
11
  end
14
12
  }
@@ -1,7 +1,6 @@
1
1
  puts __FILE__ if defined?(DEBUG)
2
2
 
3
3
  require 'open-uri'
4
- #require 'net/http'
5
4
  require 'timeout'
6
5
  class Internet
7
6
 
@@ -50,10 +50,6 @@ class Project < Hash
50
50
  parts[parts.length-1]
51
51
  #self[:name]
52
52
  end
53
-
54
- #def get_latest_unique_id
55
- # '51ed9c9d45ba3979c808740d75ba1831c85aff5d'
56
- #end
57
53
 
58
54
  def wrk_dir
59
55
  "#{Environment.dev_root}/wrk/#{self.fullname}"
@@ -110,7 +106,6 @@ class Project < Hash
110
106
  def make tag
111
107
  rake_default=nil
112
108
  logfile="#{Environment.dev_root}/log/#{self.fullname}/#{tag}/#{Environment.user}@#{Environment.machine}.json"
113
- #logfile="#{Environment.dev_root}/log/#{Environment.machine}/#{Environment.user}/#{self.fullname}/#{tag}.json"
114
109
  if(File.exists?(logfile))
115
110
  # load hash from json
116
111
  return Command.new(JSON.parse(IO.read(logfile)))
@@ -138,6 +133,21 @@ class Project < Hash
138
133
  end
139
134
  end
140
135
 
136
+ def tags
137
+ tags=Array.new
138
+ if !File.exists? wrk_dir
139
+ clone=Command.new({:input=>'git clone #{self[:url]} #{wrk_dir}',:quiet=>true})
140
+ clone.execute
141
+ end
142
+ Dir.chdir(wrk_dir) do
143
+ Command.output('git tag').split('\n').each{|line|
144
+ tag=line.strip
145
+ tags << tag if tag.length < 0
146
+ }
147
+ end
148
+ tags
149
+ end
150
+
141
151
  def clobber
142
152
 
143
153
  end
@@ -1,6 +1,5 @@
1
1
  puts __FILE__ if defined?(DEBUG)
2
2
 
3
-
4
3
  class String
5
4
  def fix(size,padstr=' ')
6
5
  self[0...size].rjust(size,padstr)
@@ -1,7 +1,7 @@
1
1
  class Version
2
2
  def self.read filename
3
3
  return "#{Gem::Specification.load(filename).version.to_s}" if filename.include?('.gemspec')
4
- return IO.read(assemblyInfo).scan(/Version\(\"[\d.]+\"\)/)[0] if filename.include?('AssemblyInfo.cs')
4
+ return IO.read(filename).scan(/Version\(\"[\d.]+\"\)/)[0] if filename.include?('AssemblyInfo.cs')
5
5
  '0.0.0'
6
6
  end
7
7
  end
@@ -17,9 +17,6 @@ class Add < Array
17
17
  if(status.include?('?') || status.include?('was not found') || error.include?('was not found'))
18
18
  puts "svn add #{f} --parents"
19
19
  add "svn add #{f} --parents"
20
- else
21
- #puts "#{status}" if status.strip.length > 0
22
- #puts " #{f}" if status.strip.length == 0
23
20
  end
24
21
  end
25
22
  }
@@ -28,12 +25,9 @@ class Add < Array
28
25
  SOURCE.each{|f|
29
26
  if(File.exists?(f) && File.file?(f))
30
27
  status=`git status #{f} --short`
31
- #if status.include?('untracked') || status.include?('modified:')
32
28
  if status.include?('??') || status.include?(' M ')
33
29
  puts "git add #{f} -v"
34
30
  add "git add #{f} -v"
35
- else
36
- #puts status if status.strip.length > 0
37
31
  end
38
32
  end
39
33
  }
@@ -3,7 +3,6 @@ puts __FILE__ if defined?(DEBUG)
3
3
  desc 'performs analyze commands'
4
4
  task :analyze do Tasks.execute_task :analyze;end
5
5
 
6
-
7
6
  class Analyze < Array
8
7
  def update
9
8
  if(`gem list countloc`.include?('countloc ('))
@@ -15,7 +15,7 @@ class Commit < Array
15
15
  if(File.exists?('.git') && `git config --list`.include?('user.name='))
16
16
  if(!`git status`.include?('nothing to commit') &&
17
17
  !`git status`.include?('untracked files present'))
18
- if(message.length==0)#File.exists?('commit.message') && File.read('commit.message').gsub(/\s+/,"").length >0)
18
+ if(message.length==0)
19
19
  if(defined?(REQUIRE_COMMIT_MESSAGE))
20
20
  Commit.reset_commit_message
21
21
  raise "commit.message required to perform commit"
@@ -23,11 +23,9 @@ class Commit < Array
23
23
  add "git commit -m'all'"
24
24
  end
25
25
  else
26
- #add "git commit -a -v -m \"#{File.read('commit.message')}\""
27
26
  add "git commit -a -v --file commit.message"
28
27
  add "<%Commit.reset_commit_message%>"
29
28
  end
30
- # add "<%File.open('commit.message','w'){|f|f.write('')}%>"
31
29
  end
32
30
  end
33
31
  if(File.exists?('.svn'))
@@ -21,7 +21,7 @@ if(!defined?(NO_DEFAULT_TASK))
21
21
  Rake::Task["clean"].reenable
22
22
  CLEAN.include('rake.default')
23
23
  puts `git add -A` if(File.exists?('.gitignore'))
24
- if(Git.has_changes?)# || !RAKE_DEFAULT_EXISTS)
24
+ if(Git.has_changes?)
25
25
  puts 'Git changes detected.'
26
26
  puts `git status`
27
27
  [:setup,:build,:test,:add,:commit,:publish,:clean,:push,:pull].each{|task| Rake::Task[task].invoke}
@@ -3,7 +3,6 @@ puts __FILE__ if defined?(DEBUG)
3
3
  desc 'performs documentation commands'
4
4
  task :doc do Tasks.execute_task :doc;end
5
5
 
6
-
7
6
  class Doc < Array
8
7
  def update
9
8
  if(Command.exit_code('yard --version'))
@@ -1,7 +1,5 @@
1
1
  puts __FILE__ if defined?(DEBUG)
2
2
 
3
- #require_relative 'array.rb'
4
- #INFO=Array.new
5
3
  desc 'displays project info'
6
4
  task :info do
7
5
  Environment.info
@@ -9,9 +7,5 @@ task :info do
9
7
  PROJECT.info
10
8
  puts ' '
11
9
  COMMANDS.info
12
- #if(defined?(INFO) && INFO.length > 0)
13
- # puts "[:info]" if(!Tasks.quiet)
14
- # INFO.each{|l|puts l}
15
- #end
16
10
  end
17
11
 
@@ -3,7 +3,6 @@ puts __FILE__ if defined?(DEBUG)
3
3
  desc 'performs publish commands'
4
4
  task :publish do Tasks.execute_task :publish; end
5
5
 
6
-
7
6
  class Publish < Array
8
7
  def update
9
8
 
@@ -7,7 +7,7 @@ class Push < Array
7
7
  def update
8
8
  if(File.exists?('.git') && `git config --list`.include?('user.name=') && `git branch`.include?('* master'))
9
9
  self << 'git push'
10
- self << 'git push --tags'# if Git.branch != 'develop' && Internet.available?
10
+ self << 'git push --tags'
11
11
  end
12
12
  end
13
13
  end
@@ -24,7 +24,6 @@ class Test < Array
24
24
  xml_arg="/xml:#{nunit_dll}.TestResults.xml"
25
25
  xml_arg="/xml:\"#{nunit_dll}.TestResults.xml\"" if(nunit_dll.include?(' '))
26
26
  add "#{nunit_arg} #{dll_arg} #{xml_arg}"
27
- #add "\"#{Test.nunit_console}\" \"#{Rake.application.original_dir}\\#{nunit_dll}\" /xml:\"#{nunit_dll}.TestResults.xml\""
28
27
  }
29
28
  end
30
29
 
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.194
4
+ version: 2.0.195
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-08-17 00:00:00.000000000 Z
11
+ date: 2015-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -111,3 +111,4 @@ signing_key:
111
111
  specification_version: 4
112
112
  summary: dev
113
113
  test_files: []
114
+ has_rdoc: