dev 2.0.193 → 2.0.194

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80e3645b3104e32404231b816b603d86d40729c5
4
- data.tar.gz: 85fa6d55e22540b694f4ca568211830183793bf1
3
+ metadata.gz: 0563d7b60183ac907de34d6e819f28c117acc61e
4
+ data.tar.gz: b2f16cd208c4b51489f2fff9198675883ef7fda9
5
5
  SHA512:
6
- metadata.gz: c249301bd07c3ba7c8012b0bef019024b6e56cb31e868c4871e5927d34bd5f361dbbc09be42d9459e54b4ad74c7b4745fe8fce3b7ed74cb5f3a5187db928c9dd
7
- data.tar.gz: 107b04f459a1377400f3e9a9b1463aee35ee9ecb6a90c229f5754dabfb9bc92038e5e170d8efa63631fc4553135f595df75d81ff2b4cf6fc1d73c786d243cd20
6
+ metadata.gz: a167e8793cfe59baef1da3ac1a26e656aca831deabe9e67f11beea733500f203f8ce21d93f8691bb1199ee7d20bebd11c7019ca31f729d0c1b5c5db2c07083dd
7
+ data.tar.gz: e67af08a04ae5a0e408f1dc59569c16952823833b311af6f6c14b8646df9a221a082adb48ad17c0d20a5172ffafe200a60595036e34fe3a57fc08607891b1093
data/lib/base/project.rb CHANGED
@@ -17,7 +17,11 @@ class Project < Hash
17
17
  end
18
18
 
19
19
  def self.get_fullname
20
- Rake.application.original_dir.gsub(Environment.dev_root,'').gsub('/trunk','')
20
+ Rake.application.original_dir.gsub(Environment.dev_root,'').gsub('/trunk','') .gsub('/wrk','')
21
+ end
22
+
23
+ def self.get_fullname_from_url url
24
+ return url.gsub('http://','').gsub('http://','').gsub('.com/','/').gsub('.git','')
21
25
  end
22
26
 
23
27
  def initialize value=''
@@ -26,6 +30,7 @@ class Project < Hash
26
30
  self[:fullname]=Project.get_fullname
27
31
  if value.is_a?(String)
28
32
  self[:url] = value if value.is_a?(String) && value.length > 0
33
+ self[:fullname] = Project.get_fullname_from_url self[:url]
29
34
  elsif(value.is_a?(Hash))
30
35
  value.each{|k,v|self[k]=v}
31
36
  else
@@ -33,6 +38,9 @@ class Project < Hash
33
38
  end
34
39
  end
35
40
 
41
+ def url
42
+ self[:url]
43
+ end
36
44
  def fullname
37
45
  self[:fullname]
38
46
  end
@@ -94,5 +102,44 @@ class Project < Hash
94
102
  puts "#{'url'.fix(13)}: #{self[:url]}"
95
103
  puts "#{'version'.fix(13)}: #{VERSION}" if defined? VERSION
96
104
  end
105
+
106
+ def make_dir tag
107
+ "#{Environment.dev_root}/make/#{self.fullname}-#{tag}"
108
+ end
109
+
110
+ def make tag
111
+ rake_default=nil
112
+ 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
+ if(File.exists?(logfile))
115
+ # load hash from json
116
+ return Command.new(JSON.parse(IO.read(logfile)))
117
+ else
118
+ FileUtils.mkdir("#{Environment.dev_root}/make") if !File.exists? "#{Environment.dev_root}/make"
119
+ makedir="#{Environment.dev_root}/make/#{self.fullname}-#{tag}"
120
+ FileUtils.mkdir_p(File.dirname(makedir)) if !File.exists? File.dirname(makedir)
121
+ if(self[:url].include?('.git'))
122
+ clone=Command.new({:input=>"git clone #{self[:url]} #{makedir}",:quiet=>true})
123
+ clone.execute
124
+ Dir.chdir(makedir) do
125
+ checkout=Command.new({:input=>"git checkout #{tag}",:quiet=>true})
126
+ checkout.execute
127
+ FileUtils.rm_r '.git'
128
+ rake_default=Command.new('rake default')
129
+ rake_default[:quiet]=true
130
+ rake_default.execute
131
+ FileUtils.mkdir_p(File.dirname(logfile)) if !File.exists?(File.dirname(logfile))
132
+ File.open(logfile,'w'){|f|f.write(rake_default.to_json)}
133
+ rake_default
134
+ end
135
+ end
136
+ FileUtils.rm_r makedir
137
+ rake_default
138
+ end
139
+ end
140
+
141
+ def clobber
142
+
143
+ end
97
144
  end
98
145
 
data/lib/tasks/test.rb CHANGED
@@ -13,7 +13,7 @@ task :test => [:build] do Tasks.execute_task :test;end
13
13
 
14
14
  class Test < Array
15
15
  def update
16
- add 'rspec' if File.exists?('spec')
16
+ add 'rspec --format documentation' if File.exists?('spec')
17
17
 
18
18
  if(defined?(NUNIT))
19
19
  NUNIT.each{|nunit_dll|
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.193
4
+ version: 2.0.194
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-16 00:00:00.000000000 Z
11
+ date: 2015-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.2.3
109
+ rubygems_version: 2.4.5
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: dev