dev 2.0.199 → 2.0.200
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/base/command.rb +7 -1
- data/lib/base/project.rb +2 -2
- data/lib/base/projects.rb +6 -0
- data/lib/base/version.rb +10 -0
- metadata +1 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79f3392087f2d4ed57ca1212ae2b21dd76886d91
|
4
|
+
data.tar.gz: 3f153b69319274760f375284f707a459a060fb27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 552bd139d3f7ee7ba334c6f87f134f196df6cc78603c5fb462a439873c85b4be2e9d0714a192ecf4f74f2ece76314264ee580da80c202f7050cabc7073d035b5
|
7
|
+
data.tar.gz: 5503b027ec8427bc24a0f05bd1455b0aa738f589718c6899d526db1919a5c09df8b17d883e68d6cac41eae314acc750570a10097a7097415a3bcff9778dd36e5
|
data/lib/base/command.rb
CHANGED
@@ -127,7 +127,7 @@ class Command < Hash
|
|
127
127
|
puts self[:error]
|
128
128
|
end
|
129
129
|
if(!self.has_key?(:ignore_failure) || !self[:ignore_failure])
|
130
|
-
raise "#{self[:input]} failed"
|
130
|
+
raise "#{self[:input]} failed\n#{self[:output]}\n#{self[:error]}"
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|
@@ -165,6 +165,12 @@ class Command < Hash
|
|
165
165
|
return dir
|
166
166
|
end
|
167
167
|
|
168
|
+
def self.execute command
|
169
|
+
cmd = Command.new(command)
|
170
|
+
cmd.execute
|
171
|
+
cmd[:exit_code]
|
172
|
+
end
|
173
|
+
|
168
174
|
def self.exit_code command
|
169
175
|
cmd = Command.new(command)
|
170
176
|
cmd[:ignore_failure]=true
|
data/lib/base/project.rb
CHANGED
@@ -21,7 +21,7 @@ class Project < Hash
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def self.get_fullname_from_url url
|
24
|
-
return url.gsub('http://','').gsub('
|
24
|
+
return url.gsub('http://','').gsub('https://','').gsub('.com/','/').gsub('.git','')
|
25
25
|
end
|
26
26
|
|
27
27
|
def initialize value=''
|
@@ -32,7 +32,7 @@ class Project < Hash
|
|
32
32
|
self[:url] = value if value.is_a?(String) && value.length > 0
|
33
33
|
self[:fullname] = Project.get_fullname_from_url self[:url]
|
34
34
|
elsif(value.is_a?(Hash))
|
35
|
-
value.each{|k,v|self[k]=v}
|
35
|
+
value.each{|k,v|self[k.to_sym]=v}
|
36
36
|
else
|
37
37
|
self[:fullname]=Project.get_fullname
|
38
38
|
end
|
data/lib/base/projects.rb
CHANGED
@@ -4,6 +4,8 @@ require 'json'
|
|
4
4
|
require 'rake'
|
5
5
|
require_relative('environment.rb')
|
6
6
|
require_relative('project.rb')
|
7
|
+
require_relative('../apps/git.rb')
|
8
|
+
require_relative('../apps/svn.rb')
|
7
9
|
|
8
10
|
class Projects < Hash
|
9
11
|
attr_accessor :filename
|
@@ -64,6 +66,10 @@ class Projects < Hash
|
|
64
66
|
end
|
65
67
|
end
|
66
68
|
|
69
|
+
current=Projects.current # this makes sure the current project is added to PROJECTS
|
70
|
+
|
67
71
|
PROJECTS=Projects.new
|
68
72
|
PROJECTS.open Projects.user_projects_filename if File.exists? Projects.user_projects_filename
|
69
73
|
PROJECTS.save Projects.user_projects_filename if !File.exists? Projects.user_projects_filename
|
74
|
+
|
75
|
+
|
data/lib/base/version.rb
CHANGED
@@ -4,6 +4,16 @@ class Version
|
|
4
4
|
return IO.read(filename).scan(/Version\(\"([\d.]+)\"\)/)[0][0] if filename.include?('AssemblyInfo.cs')
|
5
5
|
'0.0.0'
|
6
6
|
end
|
7
|
+
|
8
|
+
def self.get_version
|
9
|
+
Dir.glob('**/*.gemspec').each{|gemspec|
|
10
|
+
return Version.read gemspec
|
11
|
+
}
|
12
|
+
Dir.glob('**/AssemblyInfo.cs').each{|assemblyInfo|
|
13
|
+
return Version.read assemblyInfo
|
14
|
+
}
|
15
|
+
'0.0.0'
|
16
|
+
end
|
7
17
|
end
|
8
18
|
|
9
19
|
if !defined? VERSION
|
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.
|
4
|
+
version: 2.0.200
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lou Parslow
|
@@ -111,4 +111,3 @@ signing_key:
|
|
111
111
|
specification_version: 4
|
112
112
|
summary: dev
|
113
113
|
test_files: []
|
114
|
-
has_rdoc:
|