dev 2.0.46 → 2.0.47

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.
@@ -1 +1,42 @@
1
- require_relative 'environment.rb'
1
+ #require_relative 'environment.rb'
2
+ class Environment < Hash
3
+
4
+ def initialize
5
+ self[:home]=Environment.home
6
+ self[:machine]=Environment.machine
7
+ self[:user]=Environment.user
8
+ end
9
+
10
+ def self.home
11
+ ["USERPROFILE","HOME"].each {|v|
12
+ return ENV[v].gsub('\\','/') unless ENV[v].nil?
13
+ }
14
+ dir="~"
15
+ dir=ENV["HOME"] unless ENV["HOME"].nil?
16
+ dir=ENV["USERPROFILE"].gsub('\\','/') unless ENV["USERPROFILE"].nil?
17
+ return dir
18
+ end
19
+
20
+ def self.machine
21
+ if !ENV['COMPUTERNAME'].nil?
22
+ return ENV['COMPUTERNAME']
23
+ end
24
+
25
+ machine = `hostname`
26
+ machine = machine.split('.')[0] if machine.include?('.')
27
+ return machine.strip
28
+ end
29
+
30
+ def self.user
31
+ return ENV['USER'] if !ENV['USER'].nil? #on Unix
32
+ ENV['USERNAME']
33
+ end
34
+
35
+ def self.dev_root
36
+ ["DEV_HOME","DEV_ROOT"].each {|v|
37
+ return ENV[v].gsub('\\','/') unless ENV[v].nil?
38
+ }
39
+ dir=home
40
+ return dir
41
+ end
42
+ end
data/lib/dev_git.rb CHANGED
@@ -1,4 +1,51 @@
1
- require_relative 'git.rb'
1
+ class Git
2
+ def self.branch directory=''
3
+ directory=Dir.pwd if directory.length == 0
4
+ Dir.chdir(directory) do
5
+ begin
6
+ `git branch`.scan(/\* ([.\w-]+)/)[0][0] if(File.exists?('.git'))
7
+ rescue
8
+ ''
9
+ end
10
+ end
11
+ end
2
12
 
3
- class DevGit
4
- end
13
+ def self.remote_origin directory=''
14
+ url=''
15
+ directory=Dir.pwd if directory.length == 0
16
+ Dir.chdir(directory) do
17
+ begin
18
+ url=`git remote show origin`.scan(/Fetch URL: ([\.\-:\/\w\d]+)/)[0][0] if(File.exists?('.git'))
19
+ rescue
20
+ url=''
21
+ end
22
+ end
23
+ url
24
+ end
25
+
26
+ def self.has_changes? directory=''
27
+ directory=Dir.pwd if directory.length==0
28
+ Dir.chdir(directory) do
29
+ if(File.exists?('.git'))
30
+ return true if `git status`.include?('modified:')
31
+ end
32
+ end
33
+ false
34
+ end
35
+
36
+ def self.init directory=''
37
+ directory=Dir.pwd if directory.length==0
38
+ FileUtils.mkpath directory if !File.exists?(directory)
39
+ if(!File.exists?("#{directory}/.git"))
40
+ Dir.chdir(directory) do
41
+ `git init`
42
+ File.open('.gitignore','w'){|f|
43
+ f.puts '### Mac ###'
44
+ f.puts '*.DS_Store'
45
+ }
46
+ `git add .gitignore`
47
+ `git commit -m'added .gitignore'`
48
+ end
49
+ end
50
+ end
51
+ end
data/lib/dev_msbuild.rb CHANGED
@@ -0,0 +1,72 @@
1
+ #require_relative 'msbuild.rb'
2
+ # Visual Studio 2008 version 9.0, solution format version 10.00
3
+ # Visual Studio 2010 version 10.0, solution format version 11.00
4
+ # Visual Studio 2012 version 11.0, solution format version 12.00
5
+ # Visual Studio 2013 version 12.0, solution format version 12.00
6
+ class MSBuild < Hash
7
+
8
+ def initialize
9
+ self[:vs9]="C:\\Windows\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe" if(File.exists?("C:\\Windows\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe"))
10
+ 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"))
11
+ 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"))
12
+ end
13
+
14
+ def self.has_version? version
15
+ if(defined?(MSBUILD))
16
+ MSBUILD.has_key?(version)
17
+ else
18
+ msb=MSBuild.new
19
+ return msb.has_key? version
20
+ end
21
+ end
22
+
23
+ def self.get_version version
24
+ if(defined?(MSBUILD))
25
+ MSBUILD[version]
26
+ else
27
+ msb=MSBuild.new
28
+ return msb[version]
29
+ end
30
+ end
31
+
32
+ def self.get_vs_version(sln_filename)
33
+ sln_text=File.read(sln_filename,:encoding=>'UTF-8')
34
+ return :vs9 if sln_text.include?('Format Version 10.00')
35
+ return :vs12
36
+ end
37
+
38
+ def self.get_configurations(sln_filename)
39
+ configs=Array.new
40
+ sln_text=File.read(sln_filename,:encoding=>'UTF-8')
41
+ sln_text.scan( /= ([\w]+)\|/ ).each{|m|
42
+ c=m.first.to_s
43
+ configs << c if !configs.include?(c)
44
+ }
45
+ return configs
46
+ end
47
+
48
+ def self.get_platforms(sln_filename)
49
+ platforms=Array.new
50
+ sln_text=File.read(sln_filename,:encoding=>"UTF-8")
51
+ sln_text.scan( /= [\w]+\|([\w ]+)/ ).each{|m|
52
+ p=m.first.to_s
53
+ platforms << p if !platforms.include?(p)
54
+ }
55
+ return platforms
56
+ end
57
+
58
+ def self.get_build_commands sln_filename
59
+ build_commands=nil
60
+ vs_version=MSBuild.get_vs_version(sln_filename)
61
+ if(MSBuild.has_version?(vs_version))
62
+ MSBuild.get_configurations(sln_filename).each{ |configuration|
63
+ MSBuild.get_platforms(sln_filename).each{|platform|
64
+ build_commands=Array.new if build_commands.nil?
65
+ build_commands << "\"#{MSBuild.get_version(vs_version)}\" \"#{sln_filename}\" /nologo /p:Configuration=#{configuration} /p:Platform=\"#{platform}\""
66
+ }
67
+ }
68
+ end
69
+ build_commands
70
+ end
71
+ end
72
+
data/lib/dev_projects.rb CHANGED
@@ -1,10 +1,141 @@
1
1
  #require 'dev_environment'
2
- require_relative 'projects.rb'
3
- require_relative 'project.rb'
2
+ #require_relative 'projects.rb'
3
+ #require_relative 'project.rb'
4
+
5
+
6
+ #class DevProjects
7
+ #end
8
+ require 'json'
9
+ #require 'dev_commands'
10
+
11
+ class Project < Hash
12
+ attr_accessor :filename
13
+ def initialize value=''
14
+ @filename=''
15
+ self[:url]=''
16
+ self[:url] = value if value.is_a?(String)
17
+ if(value.is_a?(Hash))
18
+ value.each{|k,v|self[k]=v}
19
+ end
20
+ end
21
+
22
+ def name
23
+ self[:name]
24
+ end
25
+
26
+ def get_latest_unique_id
27
+ '51ed9c9d45ba3979c808740d75ba1831c85aff5d'
28
+ end
29
+
30
+ def wrk_dir
31
+ "#{Environment.dev_root}/wrk/#{self.name}"
32
+ end
33
+
34
+ def pull
35
+ if(File.exists?(wrk_dir) && File.exists?("#{wrk_dir}/.git"))
36
+ Dir.chdir(wrk_dir) do
37
+ puts "git pull (#{wrk_dir})"
38
+ puts `git pull`
39
+ end
40
+ end
41
+ end
42
+
43
+ def clone
44
+ if(!File.exists?(wrk_dir) && self[:url].include?('.git'))
45
+ puts "cloning #{self[:url]} to #{self.wrk_dir}"
46
+ puts `git clone #{self[:url]} #{self.wrk_dir}`
47
+ end
48
+ end
49
+
50
+ def checkout
51
+ if(!File.exists?(wrk_dir) && self[:url].include?('svn'))
52
+ puts "checkout #{self.url} to #{self.wrk_dir}"
53
+ puts `svn checkout #{self.url} #{self.wrk_dir}`
54
+ end
55
+ end
56
+
57
+ def rake
58
+ if(!File.exists?(self.wrk_dir))
59
+ clone
60
+ checkout
61
+ end
62
+ if(File.exists?(self.wrk_dir))
63
+ Dir.chdir(self.wrk_dir) do
64
+ rake = Command.new({ :input => 'rake', :timeout => 300, :ignore_failure => true })
65
+ rake.execute
66
+ puts rake.summary
67
+ end
68
+ end
69
+ end
70
+ end
71
+
72
+ require 'json'
73
+ require 'rake'
74
+ #require 'dev_git'
75
+ #require 'dev_svn'
76
+ #require 'dev_msbuild'
77
+ #require 'dev_environment'
78
+
79
+ class Projects < Hash
80
+ attr_accessor :filename
81
+
82
+ def initialize
83
+ @filename=''
84
+ end
85
+
86
+ def update
87
+ self.each{|k,v|
88
+ self[k]=Project.new(v) if(v.is_a?(String))
89
+ self[k]=Project.new(v) if(!v.is_a?(Project) && v.is_a?(Hash))
90
+ self[k][:name]=k
91
+ #self[k].update if self[k].respond_to?("update".to_sym)
92
+ }
93
+ end
94
+
95
+ def save filename=''
96
+ @filename=filename if !filename.nil? && filename.length > 0
97
+ File.open(@filename,'w'){|f|f.write(JSON.pretty_generate(self))} if @filename.length > 0
98
+ end
99
+
100
+ def open filename=''
101
+ @filename=filename if filename.length > 0
102
+ JSON.parse(IO.read(@filename)).each{|k,v| self[k]=v}
103
+ update
104
+ end
105
+
106
+ def self.user_projects_filename
107
+ FileUtils.mkdir("#{Environment.dev_root}/data") if(!File.exists?("#{Environment.dev_root}/data"))
108
+ "#{Environment.dev_root}/data/PROJECTS.json"
109
+ end
110
+
111
+ def self.current
112
+ project=nil
113
+ url=Git.remote_origin
114
+ url=Svn.url if url.length==0
115
+ if(Rake.application.original_dir.include?('/wrk/') &&
116
+ url.length > 0)
117
+ project=Project.new(url)
118
+ name=Rake.application.original_dir.gsub("#{Environment.dev_root}/wrk/",'')
119
+ project[:name] = name if(name.length>0 && !name.include?(Environment.dev_root))
120
+ if(defined?(PROJECTS))
121
+ PROJECTS[name]=project if(!PROJECTS.has_key?(name))
122
+ project.each{|k,v|PROJECTS[name][k]=v}
123
+ PROJECTS.save
124
+ else
125
+ project[:name]=name
126
+ end
127
+ end
128
+ project
129
+ end
130
+
131
+ def pull
132
+ self.each{|k,v| v.pull if v.respond_to?("pull".to_sym)}
133
+ end
134
+ def rake
135
+ self.each{|k,v| v.rake if v.respond_to?("rake".to_sym)}
136
+ end
137
+ end
4
138
 
5
139
  PROJECTS=Projects.new
6
140
  PROJECTS.open Projects.user_projects_filename if File.exists? Projects.user_projects_filename
7
141
  PROJECTS.save Projects.user_projects_filename if !File.exists? Projects.user_projects_filename
8
-
9
- class DevProjects
10
- end
data/lib/dev_svn.rb CHANGED
@@ -1,2 +1,99 @@
1
+ require 'fileutils'
2
+ require 'tmpdir'
3
+ class Svn
1
4
 
2
- require_relative 'svn.rb'
5
+ def self.latest_revision
6
+ if(Dir.exists?(".svn"))
7
+ `svn update`
8
+ `svn info`.scan(/Last Changed Rev: ([\d]+)/).each{|m|
9
+ return m.first.to_s
10
+ }
11
+ end
12
+ "0"
13
+ end
14
+
15
+ def self.url
16
+ if(Dir.exists?(".svn"))
17
+ `svn info`.scan(/URL: ([:\/\.\-\d\w]+)/).each{|m|
18
+ return m.first.to_s
19
+ }
20
+ end
21
+ ''
22
+ end
23
+
24
+ def self.export url, destination
25
+ if(!File.exists?(destination.chomp('@')))
26
+ `svn export #{url} #{destination}`
27
+ end
28
+ end
29
+
30
+ def self.has_changes? directory=''
31
+ directory=Dir.pwd if directory.length==0
32
+ Dir.chdir(directory) do
33
+ if(File.exists?('.svn'))
34
+ return true if `svn status`.scan(/^[MA]/).length>0
35
+ end
36
+ end
37
+ false
38
+ end
39
+
40
+ # publish a directory to a new subversion path
41
+ # source_dir is the directory with the files to be published
42
+ # destination is the new subversion path URL
43
+ # source_glob is a string or array of glob directives to specify files in source_dir to be publish
44
+ # source_glob defaults to '**/*' to publish all files in the source_dir
45
+ def self.publish source_dir, destination, source_glob='**/*'
46
+
47
+ output = "\n"
48
+ raise "Svn.publish: destination #{destination} already exists" if(`svn info #{destination} 2>&1`.include?('Revision:'))
49
+
50
+ # create subversion directory
51
+ output = output + "svn mkdir #{destination} --parents --message mkdir_for_publishing"
52
+ if(!`svn mkdir #{destination} --parents --message mkdir_for_publishing`.include?('Committed'))
53
+ raise "failure 'svn mkdir #{destination} --parents --message mkdir_for_publishing'"
54
+ end
55
+
56
+ files=nil
57
+ Dir.chdir(source_dir) do
58
+ files=FileList.new(source_glob).to_a
59
+ end
60
+ output = output + "\nfiles: #{files}.to_s"
61
+
62
+ pwd=Dir.pwd
63
+ Dir.mktmpdir{|dir|
64
+
65
+ # checkout new subversion directory
66
+ output = output + "\nsvn checkout #{destination} #{dir}/to_publish_checkout"
67
+ if(!`svn checkout #{destination} #{dir}/to_publish_checkout`.include?('Checked out'))
68
+ raise "failure 'svn checkout #{destination} #{dir}/to_publish_checkout'"
69
+ end
70
+
71
+ # copy files into the checkout out subversion directory to_publish
72
+ raise "#{dir}/to_publish_checkout does not exist" if(!File.exists?("#{dir}/to_publish_checkout"))
73
+ Dir.chdir("#{dir}/to_publish_checkout") do
74
+ File.open('add.txt','w'){|add_file|
75
+
76
+ files.each{|f|
77
+ fdir=File.dirname(f)
78
+ FileUtils.mkdir_p(fdir) if(fdir.length > 0 && !File.exists?(fdir))
79
+ FileUtils.cp("#{source_dir}/#{f}","#{f}")
80
+ add_file.puts f
81
+ }
82
+ add_file.close
83
+ }
84
+
85
+ output = output + "\nsvn add --parents --targets add.txt 2>&1"
86
+ `svn add --parents --targets add.txt 2>&1`
87
+ commit_output = `svn commit -m"add" 2>&1`
88
+ output = output + "\n#{commit_output}"
89
+ if(!commit_output.include?("Committed"))
90
+ raise "failure 'svn commit -m'added files''" + output
91
+ end
92
+ end
93
+
94
+ #begin
95
+ FileUtils.rm_r "#{dir}/to_publish_checkout"
96
+ output
97
+ }
98
+ end
99
+ end
data/lib/dev_tasks.rb CHANGED
@@ -1,4 +1,86 @@
1
- require_relative('tasks.rb')
1
+
2
2
 
3
3
  class DevTasks
4
- end
4
+ end
5
+ require 'rake'
6
+ require 'rake/clean'
7
+
8
+ class Tasks
9
+ #@@commands=nil
10
+ @@quiet=false
11
+
12
+ def self.quiet
13
+ @@quiet
14
+ end
15
+
16
+ def self.execute value
17
+ if(value.respond_to?(:execute))
18
+ value.update if value.respond_to?(:update)
19
+ value.execute
20
+ else
21
+ if(value.is_a?(String))
22
+ puts `#{value}`
23
+ else
24
+ if(value.is_a?(Array))
25
+ value.each{|e| execute(e)}
26
+ end
27
+ end
28
+ end
29
+ end
30
+
31
+ def self.execute_task task
32
+ if(defined?(COMMANDS))
33
+ if(COMMANDS.has_key?(task))
34
+ puts "[:#{task}]" if(!Tasks.quiet)
35
+ Tasks.execute(COMMANDS[task])
36
+ end
37
+ end
38
+ end
39
+ end
40
+
41
+ desc 'performs a git pull'
42
+ task :pull do Tasks.execute_task :pull; end
43
+
44
+ desc 'performs svn update'
45
+ task :update do Tasks.execute_task :update; end
46
+
47
+ desc 'performs setup commands'
48
+ task :setup do Tasks.execute_task :setup;end
49
+
50
+ desc 'performs build commands'
51
+ task :build do Tasks.execute_task :build;end
52
+
53
+ desc 'performs test commands'
54
+ task :test => [:build] do Tasks.execute_task :test;end
55
+
56
+ desc 'performs analyze commands'
57
+ task :analyze do Tasks.execute_task :analyze;end
58
+
59
+ desc 'performs documentation commands'
60
+ task :doc do Tasks.execute_task :doc;end
61
+
62
+ desc 'performs clean commands'
63
+ task :clean do Tasks.execute_task :clean;end
64
+
65
+ desc 'performs publish commands'
66
+ task :publish do Tasks.execute_task :publish; end
67
+
68
+ desc 'performs clobber commands'
69
+ task :clobber => [:clean] do Tasks.execute_task :clobber;end
70
+
71
+ desc 'adds source files to git or subversion'
72
+ task :add do Tasks.execute_task :add;end
73
+
74
+ desc 'commits source files to git or subversion'
75
+ task :commit do Tasks.execute_task :commit;end
76
+
77
+ desc 'performs a git push'
78
+ task :push do Tasks.execute_task :push;end
79
+
80
+ desc 'displays project info'
81
+ task :info do
82
+ if(defined?(INFO) && INFO.length > 0)
83
+ puts "[:info]" if(!Tasks.quiet)
84
+ INFO.each{|l|puts l}
85
+ end
86
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.46
4
+ version: 2.0.47
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-04-06 00:00:00.000000000 Z
12
+ date: 2015-04-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -34,15 +34,6 @@ extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
36
  - LICENSE
37
- - lib/add.rb
38
- - lib/analyze.rb
39
- - lib/array.rb
40
- - lib/build.rb
41
- - lib/clean.rb
42
- - lib/clobber.rb
43
- - lib/command.rb
44
- - lib/commands.rb
45
- - lib/commit.rb
46
37
  - lib/dev.rb
47
38
  - lib/dev_commands.rb
48
39
  - lib/dev_environment.rb
@@ -51,28 +42,6 @@ files:
51
42
  - lib/dev_projects.rb
52
43
  - lib/dev_svn.rb
53
44
  - lib/dev_tasks.rb
54
- - lib/doc.rb
55
- - lib/environment.rb
56
- - lib/gemspec.rb
57
- - lib/git.rb
58
- - lib/hash.rb
59
- - lib/info.rb
60
- - lib/internet.rb
61
- - lib/msbuild.rb
62
- - lib/project.rb
63
- - lib/projects.rb
64
- - lib/publish.rb
65
- - lib/pull.rb
66
- - lib/push.rb
67
- - lib/setup.rb
68
- - lib/svn.rb
69
- - lib/tasks.rb
70
- - lib/test.rb
71
- - lib/text.rb
72
- - lib/timeout.rb
73
- - lib/timer.rb
74
- - lib/update.rb
75
- - lib/upgrade.rb
76
45
  homepage: http://rubygems.org/gems/dev
77
46
  licenses:
78
47
  - Apache 2.0
data/lib/add.rb DELETED
@@ -1,22 +0,0 @@
1
- class Add < Array
2
- def update
3
- if(File.exists?('.git') && File.exists?('.gitignore'))
4
- add 'git add --all'
5
- else
6
- if(defined?(SOURCE))
7
- if(File.exists?('.svn'))
8
- SOURCE.each{|f|
9
-
10
- add "svn add #{f} --parents" if Command.output("svn status #{f}").include?('?')
11
- add "svn add #{f} --parents" if Command.exit_code("svn status #{f}") != 0
12
- }
13
- end
14
- if(File.exists?('.git'))
15
- SOURCE.each{|f|
16
- add "git add #{f} -v" if `git status #{f}`.include?('untracked')
17
- }
18
- end
19
- end
20
- end
21
- end
22
- end
data/lib/analyze.rb DELETED
@@ -1,8 +0,0 @@
1
- class Analyze < Array
2
- def update
3
- if(`gem list countloc`.include?('countloc ('))
4
- FileUtils.mkdir('doc') if(!File.exists?('doc'))
5
- add 'countloc -r * --html doc/countloc.html'
6
- end
7
- end
8
- end
data/lib/array.rb DELETED
@@ -1,30 +0,0 @@
1
- class Array
2
- def execute value=nil
3
- i=0
4
- while i < self.length
5
- self[i]=Command.new(self[i]) if(self[i].is_a?(String))
6
- self[i]=Command.new(self[i]) if(self[i].is_a?(Hash) && !self[i].is_a?(Command))
7
-
8
- if(!value.nil? && value.is_a?(Hash))
9
- value.each{|k,v|self[i][k]=v}
10
- end
11
-
12
- self[i].execute if(self[i].is_a?(Command))
13
- i=i+1
14
- end
15
- end
16
-
17
- def add command
18
- self << command if(!include?(command))
19
- end
20
-
21
- def to_html
22
- html=Array.new
23
- html << '<div>'
24
- self.each{|e|
25
- html << e.to_html if e.respond_to?(:to_html)
26
- }
27
- html << '</div>'
28
- html.join
29
- end
30
- end
data/lib/build.rb DELETED
@@ -1,33 +0,0 @@
1
- require_relative('msbuild.rb')
2
- require_relative('gemspec.rb')
3
- require 'rake'
4
-
5
- SLN_FILES=FileList.new('*.sln','*/*.sln','*/*/*.sln')
6
-
7
- class Build < Array
8
- def update
9
-
10
- changed = true
11
- #changed = Git.has_changes? if(File.exists?('.git') && defined?(Git))
12
- #changed = Svn.has_changes? if(File.exists?('.svn') && defined?(Svn))
13
- if(changed)
14
- Dir.glob('*.gemspec'){|gemspec|
15
- add "gem build #{gemspec}" if !File.exist?(Gemspec.gemfile gemspec)
16
- }
17
-
18
- SLN_FILES.each{|sln_file|
19
- vs_version=MSBuild.get_vs_version(sln_file)
20
- if(MSBuild.has_version?(vs_version))
21
- MSBuild.get_configurations(sln_file).each{ |configuration|
22
- MSBuild.get_platforms(sln_file).each{|platform|
23
- #Console.debug "configuration='#{configuration}', platform='#{platform}'"
24
- self.add "\"#{MSBuild.get_version(vs_version)}\" \"#{sln_file}\" /nologo /p:Configuration=#{configuration} /p:Platform=\"#{platform}\""
25
- }
26
- }
27
- else
28
- "puts version #{vs_version} not found for MsBuild"
29
- end
30
- }
31
- end
32
- end
33
- end
data/lib/clean.rb DELETED
@@ -1,12 +0,0 @@
1
- class Clean < Array
2
- def update
3
- ['.yardoc','log','tmp','obj'].each{|dir|
4
- CLEAN.include(dir) if File.exists?(dir)
5
- }
6
-
7
- CLEAN.include('*.{suo,sdf}')
8
-
9
- #add '<%Rake::Task[:clean].reenable%>'
10
- add '<%Rake::Task[:clean].invoke%>'
11
- end
12
- end
data/lib/clobber.rb DELETED
@@ -1,15 +0,0 @@
1
- class Clobber < Array
2
- def update
3
- ['bin'].each{|dir|
4
- CLOBBER.include(dir) if File.exists?(dir)
5
- }
6
-
7
- clean=Clean.new
8
- clean.update
9
-
10
- CLOBBER.include('*.gem')
11
-
12
- #add '<%Rake::Task[:clobber].reenable%>'
13
- add '<%Rake::Task[:clobber].invoke%>'
14
- end
15
- end