dev 2.0.142 → 2.0.143
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apps.rb +1 -0
- data/lib/{array.rb → base/array.rb} +0 -0
- data/lib/{command.rb → base/command.rb} +4 -1
- data/lib/{environment.rb → base/environment.rb} +23 -0
- data/lib/{file.rb → base/file.rb} +0 -0
- data/lib/{gemspec.rb → base/gemspec.rb} +0 -0
- data/lib/{hash.rb → base/hash.rb} +0 -0
- data/lib/{internet.rb → base/internet.rb} +0 -0
- data/lib/{project.rb → base/project.rb} +36 -9
- data/lib/{projects.rb → base/projects.rb} +2 -1
- data/lib/{source.rb → base/source.rb} +0 -0
- data/lib/{text.rb → base/text.rb} +0 -0
- data/lib/{timeout.rb → base/timeout.rb} +0 -0
- data/lib/{timer.rb → base/timer.rb} +0 -0
- data/lib/base.rb +3 -0
- data/lib/commands.rb +1 -1
- data/lib/dev.rb +6 -54
- data/lib/tasks/default.rb +53 -0
- data/lib/tasks/doc.rb +4 -0
- data/lib/tasks/info.rb +10 -1
- data/lib/tasks.rb +3 -50
- metadata +18 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 840244f9fd78a8a6491e1ceed9d1812e14aa5f00
|
4
|
+
data.tar.gz: 0143a39ee6597dcb22c4f38b2fae156fd1c151e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e65fcff5d8897c3091985ad55b799d4051b97c11457333a2f4f33067c07d5f26481f479c29faa2d0ae5294c803703d02655e5a313577629e14fba9580eb49e96
|
7
|
+
data.tar.gz: 32181e2b56e5ab93ccb397ee5f876540b4b2f5dfa9c92424cddb559d5d9d05c6a083159e0e899fb0b524ec10a001ad2d82c94b9f83b5d61f3cf3f2cc18477a8c
|
data/lib/apps.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
['git','msbuild','nuget','svn','wix'].each{|name| require_relative("apps/#{name}.rb")}
|
File without changes
|
@@ -62,4 +62,27 @@ class Environment < Hash
|
|
62
62
|
def self.get_version text
|
63
63
|
text.match(/(\d+\.\d+\.[\d\w]+)/)
|
64
64
|
end
|
65
|
+
|
66
|
+
def self.info
|
67
|
+
puts "Environment"
|
68
|
+
puts " ruby version: #{`ruby --version`}"
|
69
|
+
puts " ruby platform: #{RUBY_PLATFORM}"
|
70
|
+
puts " dev_root: #{Environment.dev_root}"
|
71
|
+
puts " machine: #{Environment.machine}"
|
72
|
+
puts " user: #{Environment.user}"
|
73
|
+
puts " "
|
74
|
+
puts "Path Commands"
|
75
|
+
['svn --version --quiet','git --version','msbuild /version','nuget','candle','light','gem --version'].each{|cmd|
|
76
|
+
command=Command.new(cmd)
|
77
|
+
command[:quiet]=true
|
78
|
+
command[:ignore_failure]=true
|
79
|
+
command.execute
|
80
|
+
if(command[:exit_code] == 0)
|
81
|
+
puts "#{cmd.split(' ')[0]} #{get_version(command[:output])}"
|
82
|
+
else
|
83
|
+
puts "#{cmd.split(' ')[0]} not found."
|
84
|
+
missing_command=true
|
85
|
+
end
|
86
|
+
}
|
87
|
+
end
|
65
88
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,26 +1,47 @@
|
|
1
1
|
require 'json'
|
2
2
|
|
3
3
|
class Project < Hash
|
4
|
-
attr_accessor :filename
|
4
|
+
attr_accessor :filename
|
5
|
+
|
6
|
+
def self.get_url
|
7
|
+
return `git config --get remote.origin.url` if(File.exists?('.git'))
|
8
|
+
return Svn.url if(File.exists?('.svn'))
|
9
|
+
''
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.get_fullname
|
13
|
+
Rake.application.original_dir.gsub(Environment.dev_root,'').gsub('/trunk','')
|
14
|
+
end
|
15
|
+
|
5
16
|
def initialize value=''
|
6
17
|
@filename=''
|
7
|
-
self[:url]=
|
8
|
-
self[:
|
9
|
-
if
|
18
|
+
self[:url]=Project.get_url
|
19
|
+
self[:fullname]=Project.get_fullname
|
20
|
+
if value.is_a?(String)
|
21
|
+
self[:url] = value if value.is_a?(String)
|
22
|
+
elsif(value.is_a?(Hash))
|
10
23
|
value.each{|k,v|self[k]=v}
|
24
|
+
else
|
25
|
+
self[:fullname]=Project.get_fullname
|
11
26
|
end
|
12
27
|
end
|
13
28
|
|
29
|
+
def fullname
|
30
|
+
self[:fullname]
|
31
|
+
end
|
32
|
+
|
14
33
|
def name
|
15
|
-
|
34
|
+
parts=fullname.split('/')
|
35
|
+
parts[parts.length-1]
|
36
|
+
#self[:name]
|
16
37
|
end
|
17
38
|
|
18
|
-
def get_latest_unique_id
|
19
|
-
|
20
|
-
end
|
39
|
+
#def get_latest_unique_id
|
40
|
+
# '51ed9c9d45ba3979c808740d75ba1831c85aff5d'
|
41
|
+
#end
|
21
42
|
|
22
43
|
def wrk_dir
|
23
|
-
"#{Environment.dev_root}/wrk/#{self.
|
44
|
+
"#{Environment.dev_root}/wrk/#{self.fullname}"
|
24
45
|
end
|
25
46
|
|
26
47
|
def pull
|
@@ -59,5 +80,11 @@ attr_accessor :filename
|
|
59
80
|
end
|
60
81
|
end
|
61
82
|
end
|
83
|
+
|
84
|
+
def info
|
85
|
+
puts "Project #{name}"
|
86
|
+
puts " fullname: #{self.fullname}"
|
87
|
+
puts " url: #{self[:url]}"
|
88
|
+
end
|
62
89
|
end
|
63
90
|
|
@@ -1,5 +1,7 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'rake'
|
3
|
+
require_relative('environment.rb')
|
4
|
+
require_relative('project.rb')
|
3
5
|
|
4
6
|
class Projects < Hash
|
5
7
|
attr_accessor :filename
|
@@ -13,7 +15,6 @@ class Projects < Hash
|
|
13
15
|
self[k]=Project.new(v) if(v.is_a?(String))
|
14
16
|
self[k]=Project.new(v) if(!v.is_a?(Project) && v.is_a?(Hash))
|
15
17
|
self[k][:name]=k
|
16
|
-
#self[k].update if self[k].respond_to?("update".to_sym)
|
17
18
|
}
|
18
19
|
end
|
19
20
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/base.rb
ADDED
data/lib/commands.rb
CHANGED
data/lib/dev.rb
CHANGED
@@ -1,60 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
}
|
6
|
-
|
7
|
-
RAKE_DEFAULT_EXISTS=File.exists?('rake.default')
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
current=Projects.current
|
12
|
-
if(!current.nil?)
|
13
|
-
INFO.add "#{current[:name]} #{current[:url]}"
|
1
|
+
Dir.chdir(File.dirname(__FILE__)) do
|
2
|
+
Dir.glob('**/*.rb').each{|f|
|
3
|
+
require_relative(f)
|
4
|
+
}
|
14
5
|
end
|
15
6
|
|
16
|
-
|
17
|
-
desc 'perform project commands to push gem development'
|
18
|
-
task :default do
|
19
|
-
if(defined?(DEFAULT_TASKS))
|
20
|
-
DEFAULT_TASKS.each{|task| Rake::Task[task].invoke}
|
21
|
-
else
|
22
|
-
if(File.exists?('.git'))
|
23
|
-
CLEAN.exclude('rake.default')
|
24
|
-
Rake::Task["clean"].invoke
|
25
|
-
Rake::Task["clean"].reenable
|
26
|
-
CLEAN.include('rake.default')
|
27
|
-
puts `git add -A` if(File.exists?('.gitignore'))
|
28
|
-
if(Git.has_changes?)# || !RAKE_DEFAULT_EXISTS)
|
29
|
-
puts 'Git changes detected.'
|
30
|
-
puts `git status`
|
31
|
-
[:setup,:build,:test,:publish,:clean,:add,:commit,:push,:pull,:info].each{|task| Rake::Task[task].invoke}
|
32
|
-
elsif !RAKE_DEFAULT_EXISTS
|
33
|
-
puts 'rake.default does not exist.'
|
34
|
-
[:setup,:build,:test,:publish,:clean,:add,:commit,:push,:pull,:info].each{|task| Rake::Task[task].invoke}
|
35
|
-
else
|
36
|
-
puts 'no changes detected.'
|
37
|
-
#[:pull].each{|task| Rake::Task[task].invoke}
|
38
|
-
end
|
39
|
-
else
|
40
|
-
if(File.exists?('.svn'))
|
41
|
-
if(Svn.has_changes? || !File.exists?('rake.default'))
|
42
|
-
[:setup,:build,:test,:publish,:clean,:add,:commit,:update,:info].each{|task| Rake::Task[task].invoke}
|
43
|
-
else
|
44
|
-
puts 'no changes detected.'
|
45
|
-
#[:update].each{|task| Rake::Task[task].invoke}
|
46
|
-
end
|
47
|
-
else
|
48
|
-
[:setup,:build,:test,:publish,:info].each{|task| Rake::Task[task].invoke}
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
puts "[:default] completed in #{TIMER.elapsed_str}"
|
54
|
-
File.open('rake.default','w'){|f|f.puts "[:default] completed in #{TIMER.elapsed_str}"}
|
55
|
-
end # :default
|
56
|
-
end
|
7
|
+
PROJECT=Project.new()
|
57
8
|
|
58
9
|
class Dev
|
10
|
+
|
59
11
|
end
|
60
12
|
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require_relative('info.rb')
|
2
|
+
require_relative('../base/array.rb')
|
3
|
+
require_relative('../base/projects.rb')
|
4
|
+
require_relative('../base/timer.rb')
|
5
|
+
|
6
|
+
RAKE_DEFAULT_EXISTS=File.exists?('rake.default')
|
7
|
+
|
8
|
+
current=Projects.current
|
9
|
+
#if(!current.nil?)
|
10
|
+
# INFO.add "#{current[:name]} #{current[:url]}"
|
11
|
+
#end
|
12
|
+
|
13
|
+
if(!defined?(NO_DEFAULT_TASK))
|
14
|
+
desc 'perform project commands to push gem development'
|
15
|
+
task :default do
|
16
|
+
if(defined?(DEFAULT_TASKS))
|
17
|
+
DEFAULT_TASKS.each{|task| Rake::Task[task].invoke}
|
18
|
+
else
|
19
|
+
if(File.exists?('.git'))
|
20
|
+
CLEAN.exclude('rake.default')
|
21
|
+
Rake::Task["clean"].invoke
|
22
|
+
Rake::Task["clean"].reenable
|
23
|
+
CLEAN.include('rake.default')
|
24
|
+
puts `git add -A` if(File.exists?('.gitignore'))
|
25
|
+
if(Git.has_changes?)# || !RAKE_DEFAULT_EXISTS)
|
26
|
+
puts 'Git changes detected.'
|
27
|
+
puts `git status`
|
28
|
+
[:setup,:build,:test,:publish,:clean,:add,:commit,:push,:pull,:info].each{|task| Rake::Task[task].invoke}
|
29
|
+
elsif !RAKE_DEFAULT_EXISTS
|
30
|
+
puts 'rake.default does not exist.'
|
31
|
+
[:setup,:build,:test,:publish,:clean,:add,:commit,:push,:pull,:info].each{|task| Rake::Task[task].invoke}
|
32
|
+
else
|
33
|
+
puts 'no changes detected.'
|
34
|
+
#[:pull].each{|task| Rake::Task[task].invoke}
|
35
|
+
end
|
36
|
+
else
|
37
|
+
if(File.exists?('.svn'))
|
38
|
+
if(Svn.has_changes? || !File.exists?('rake.default'))
|
39
|
+
[:setup,:build,:test,:publish,:clean,:add,:commit,:update,:info].each{|task| Rake::Task[task].invoke}
|
40
|
+
else
|
41
|
+
puts 'no changes detected.'
|
42
|
+
#[:update].each{|task| Rake::Task[task].invoke}
|
43
|
+
end
|
44
|
+
else
|
45
|
+
[:setup,:build,:test,:publish,:info].each{|task| Rake::Task[task].invoke}
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
puts "[:default] completed in #{TIMER.elapsed_str}"
|
51
|
+
File.open('rake.default','w'){|f|f.puts "[:default] completed in #{TIMER.elapsed_str}"}
|
52
|
+
end # :default
|
53
|
+
end
|
data/lib/tasks/doc.rb
CHANGED
data/lib/tasks/info.rb
CHANGED
@@ -1,3 +1,12 @@
|
|
1
1
|
#require_relative 'array.rb'
|
2
|
-
INFO=Array.new
|
2
|
+
#INFO=Array.new
|
3
|
+
desc 'displays project info'
|
4
|
+
task :info do
|
5
|
+
Environment.info
|
6
|
+
PROJECT.info
|
7
|
+
#if(defined?(INFO) && INFO.length > 0)
|
8
|
+
# puts "[:info]" if(!Tasks.quiet)
|
9
|
+
# INFO.each{|l|puts l}
|
10
|
+
#end
|
11
|
+
end
|
3
12
|
|
data/lib/tasks.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'rake'
|
2
|
-
#require 'rake/clean'
|
3
2
|
|
4
3
|
class Tasks
|
5
4
|
@@quiet=false
|
@@ -33,53 +32,7 @@ class Tasks
|
|
33
32
|
end
|
34
33
|
end
|
35
34
|
|
36
|
-
['add','analyze','build','clobber','commit',
|
37
|
-
|
35
|
+
['add','analyze','build','clobber','commit',
|
36
|
+
'doc','info','publish','pull','push','setup','test',
|
37
|
+
'update','default'].each{|name| require_relative("tasks/#{name}.rb")}
|
38
38
|
|
39
|
-
|
40
|
-
#desc 'performs a git pull'
|
41
|
-
#task :pull do Tasks.execute_task :pull; end
|
42
|
-
|
43
|
-
#desc 'performs svn update'
|
44
|
-
#task :update do Tasks.execute_task :update; end
|
45
|
-
|
46
|
-
#desc 'performs setup commands'
|
47
|
-
#task :setup do Tasks.execute_task :setup;end
|
48
|
-
|
49
|
-
#desc 'performs build commands'
|
50
|
-
#task :build do Tasks.execute_task :build;end
|
51
|
-
|
52
|
-
#desc 'performs test commands'
|
53
|
-
#task :test => [:build] do Tasks.execute_task :test;end
|
54
|
-
|
55
|
-
#desc 'performs analyze commands'
|
56
|
-
#task :analyze do Tasks.execute_task :analyze;end
|
57
|
-
|
58
|
-
#desc 'performs documentation commands'
|
59
|
-
#task :doc do Tasks.execute_task :doc;end
|
60
|
-
|
61
|
-
#desc 'performs clean commands'
|
62
|
-
#task :clean do Tasks.execute_task :clean;end
|
63
|
-
|
64
|
-
#desc 'performs publish commands'
|
65
|
-
#task :publish do Tasks.execute_task :publish; end
|
66
|
-
|
67
|
-
#desc 'performs clobber commands'
|
68
|
-
#task :clobber => [:clean] do Tasks.execute_task :clobber;end
|
69
|
-
|
70
|
-
#desc 'adds source files to git or subversion'
|
71
|
-
#task :add do Tasks.execute_task :add;end
|
72
|
-
|
73
|
-
#desc 'commits source files to git or subversion'
|
74
|
-
#task :commit do Tasks.execute_task :commit;end
|
75
|
-
|
76
|
-
#desc 'performs a git push'
|
77
|
-
#task :push do Tasks.execute_task :push;end
|
78
|
-
|
79
|
-
desc 'displays project info'
|
80
|
-
task :info do
|
81
|
-
if(defined?(INFO) && INFO.length > 0)
|
82
|
-
puts "[:info]" if(!Tasks.quiet)
|
83
|
-
INFO.each{|l|puts l}
|
84
|
-
end
|
85
|
-
end
|
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.
|
4
|
+
version: 2.0.143
|
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-
|
11
|
+
date: 2015-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -31,23 +31,28 @@ extensions: []
|
|
31
31
|
extra_rdoc_files: []
|
32
32
|
files:
|
33
33
|
- LICENSE
|
34
|
+
- lib/apps.rb
|
34
35
|
- lib/apps/git.rb
|
35
36
|
- lib/apps/msbuild.rb
|
36
37
|
- lib/apps/nuget.rb
|
37
38
|
- lib/apps/svn.rb
|
38
39
|
- lib/apps/wix.rb
|
39
|
-
- lib/
|
40
|
-
- lib/
|
40
|
+
- lib/base.rb
|
41
|
+
- lib/base/array.rb
|
42
|
+
- lib/base/command.rb
|
43
|
+
- lib/base/environment.rb
|
44
|
+
- lib/base/file.rb
|
45
|
+
- lib/base/gemspec.rb
|
46
|
+
- lib/base/hash.rb
|
47
|
+
- lib/base/internet.rb
|
48
|
+
- lib/base/project.rb
|
49
|
+
- lib/base/projects.rb
|
50
|
+
- lib/base/source.rb
|
51
|
+
- lib/base/text.rb
|
52
|
+
- lib/base/timeout.rb
|
53
|
+
- lib/base/timer.rb
|
41
54
|
- lib/commands.rb
|
42
55
|
- lib/dev.rb
|
43
|
-
- lib/environment.rb
|
44
|
-
- lib/file.rb
|
45
|
-
- lib/gemspec.rb
|
46
|
-
- lib/hash.rb
|
47
|
-
- lib/internet.rb
|
48
|
-
- lib/project.rb
|
49
|
-
- lib/projects.rb
|
50
|
-
- lib/source.rb
|
51
56
|
- lib/tasks.rb
|
52
57
|
- lib/tasks/add.rb
|
53
58
|
- lib/tasks/analyze.rb
|
@@ -55,6 +60,7 @@ files:
|
|
55
60
|
- lib/tasks/clean.rb
|
56
61
|
- lib/tasks/clobber.rb
|
57
62
|
- lib/tasks/commit.rb
|
63
|
+
- lib/tasks/default.rb
|
58
64
|
- lib/tasks/doc.rb
|
59
65
|
- lib/tasks/info.rb
|
60
66
|
- lib/tasks/publish.rb
|
@@ -63,9 +69,6 @@ files:
|
|
63
69
|
- lib/tasks/setup.rb
|
64
70
|
- lib/tasks/test.rb
|
65
71
|
- lib/tasks/update.rb
|
66
|
-
- lib/text.rb
|
67
|
-
- lib/timeout.rb
|
68
|
-
- lib/timer.rb
|
69
72
|
homepage: http://rubygems.org/gems/dev
|
70
73
|
licenses:
|
71
74
|
- Apache 2.0
|