dev 2.0.264 → 2.0.265
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apps/wix.rb +8 -4
- data/lib/base/dir.rb +18 -0
- data/lib/base/environment.rb +1 -1
- data/lib/base/history.rb +14 -0
- data/lib/base/project.rb +2 -1
- data/lib/base/projects.rb +21 -13
- data/lib/base.rb +2 -2
- data/lib/dev.rb +33 -2
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5eda9c2c8ceddb7243d918f0b8fd3adef7516187
|
4
|
+
data.tar.gz: 2d9b02777f21e21081c22cb266f8121ee637bc0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cb90b58b6ccfc1414f1b3098d49e039fc508f53900131b3ce250b179bcd6bfe143197c48c75eeb63aaed9d4b6011f8cce1ef2e67f513e921581fc61891373e5
|
7
|
+
data.tar.gz: 7162f67d6d015a07cabc28aa4f77a6fe46538ec74cd339e8c863d32a262e19c4da1b7739aa357b06cf4a2d623a758ad8e195317799e900cbf883073d48e6bb0a
|
data/lib/apps/wix.rb
CHANGED
@@ -9,13 +9,17 @@ class Wix
|
|
9
9
|
if(File.exists?(wxs_file))
|
10
10
|
ext='msi'
|
11
11
|
ext='exe' if(IO.read(wxs_file).include?('<Bundle'))
|
12
|
+
extensions=''
|
13
|
+
['WixNetFxExtension','WixBalExtension','WixUtilExtension','WixUiExtension'].each{|e|
|
14
|
+
extensions="#{extensions}-ext e "
|
15
|
+
}
|
12
16
|
build_commands=Array.new if build_commands.nil?
|
13
|
-
build_commands << "candle #{wxs_file}
|
14
|
-
|
17
|
+
build_commands << "candle #{wxs_file} #{extensions}"
|
18
|
+
|
15
19
|
if(defined?(VERSION))
|
16
|
-
build_commands << "light #{File.basename(wxs_file,'.*')}.wixobj -out #{File.basename(wxs_file,'.*')}-#{VERSION}.#{ext}
|
20
|
+
build_commands << "light #{File.basename(wxs_file,'.*')}.wixobj -out #{File.basename(wxs_file,'.*')}-#{VERSION}.#{ext} #{extensions}"
|
17
21
|
else
|
18
|
-
build_commands << "light #{File.basename(wxs_file,'.*')}.wixobj
|
22
|
+
build_commands << "light #{File.basename(wxs_file,'.*')}.wixobj #{extensions}"
|
19
23
|
end
|
20
24
|
end
|
21
25
|
build_commands
|
data/lib/base/dir.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
puts __FILE__ if defined?(DEBUG)
|
2
|
+
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
class Dir
|
6
|
+
def self.make directory
|
7
|
+
FileUtils.mkdir_p directory if !File.exists? directory
|
8
|
+
end
|
9
|
+
def self.remove directory
|
10
|
+
if(File.exists?(directory))
|
11
|
+
begin
|
12
|
+
FileUtils.rm_rf directory
|
13
|
+
FileUtils.rm_r directory
|
14
|
+
rescue
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/base/environment.rb
CHANGED
@@ -19,7 +19,7 @@ class Environment < Hash
|
|
19
19
|
if(!value.nil?)
|
20
20
|
FileUtils.mkdir_p value if(!File.exists?(value))
|
21
21
|
['bin','data','log','make','publish','test'].each{|dir|
|
22
|
-
FileUtils.mkdir_p("#{value}/#{dir}") if !File.exists? "#{value}/#{dir}"
|
22
|
+
#FileUtils.mkdir_p("#{value}/#{dir}") if !File.exists? "#{value}/#{dir}"
|
23
23
|
}
|
24
24
|
end
|
25
25
|
end
|
data/lib/base/history.rb
ADDED
data/lib/base/project.rb
CHANGED
@@ -17,7 +17,7 @@ class Project < Hash
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def self.get_fullname directory
|
20
|
-
directory.gsub(Environment.dev_root,'').gsub('/
|
20
|
+
directory.gsub(Environment.dev_root,'').gsub('/wrk','')
|
21
21
|
end
|
22
22
|
|
23
23
|
def self.get_fullname_from_url url
|
@@ -26,6 +26,7 @@ class Project < Hash
|
|
26
26
|
|
27
27
|
def initialize value=''
|
28
28
|
@filename=''
|
29
|
+
|
29
30
|
self[:url]=Project.get_url
|
30
31
|
self[:fullname]=Project.get_fullname_from_url self[:url] if self[:url].length > 0
|
31
32
|
if value.is_a?(String)
|
data/lib/base/projects.rb
CHANGED
@@ -8,10 +8,16 @@ require_relative('../apps/git.rb')
|
|
8
8
|
require_relative('../apps/svn.rb')
|
9
9
|
|
10
10
|
class Projects < Hash
|
11
|
-
attr_accessor :
|
11
|
+
attr_accessor :dev
|
12
12
|
|
13
|
-
def initialize
|
14
|
-
@
|
13
|
+
def initialize dev=nil
|
14
|
+
@dev=dev
|
15
|
+
@dev=Dev.new if @dev.nil?
|
16
|
+
open
|
17
|
+
end
|
18
|
+
|
19
|
+
def filename
|
20
|
+
"#{@dev.get_env('DEV_ROOT')}/data/Projects.json"
|
15
21
|
end
|
16
22
|
|
17
23
|
def update_state
|
@@ -22,15 +28,17 @@ class Projects < Hash
|
|
22
28
|
}
|
23
29
|
end
|
24
30
|
|
25
|
-
def save
|
26
|
-
|
27
|
-
File.open(
|
31
|
+
def save
|
32
|
+
Dir.make File.dirname(filename) if !File.exists? File.dirname(filename)
|
33
|
+
File.open(filename,'w'){|f|f.write(JSON.pretty_generate(self))}
|
28
34
|
end
|
29
35
|
|
30
|
-
def open
|
31
|
-
|
32
|
-
|
33
|
-
|
36
|
+
def open
|
37
|
+
if File.exists? filename
|
38
|
+
#@filename=filename if filename.length > 0
|
39
|
+
JSON.parse(IO.read(filename)).each{|k,v| self[k]=v}
|
40
|
+
update_state
|
41
|
+
end
|
34
42
|
end
|
35
43
|
|
36
44
|
def list filter=''
|
@@ -121,7 +129,7 @@ class Projects < Hash
|
|
121
129
|
if(project.fullname.length > 0 && !self.has_key?(project.fullname))
|
122
130
|
puts "adding #{project.fullname}"
|
123
131
|
self[project.fullname]=project
|
124
|
-
self.save Projects.user_projects_filename
|
132
|
+
self.save #Projects.user_projects_filename
|
125
133
|
end
|
126
134
|
end
|
127
135
|
end
|
@@ -149,8 +157,8 @@ class Projects < Hash
|
|
149
157
|
end
|
150
158
|
end
|
151
159
|
|
152
|
-
PROJECTS=Projects.new
|
153
|
-
PROJECTS.open Projects.user_projects_filename if File.exists? Projects.user_projects_filename
|
160
|
+
#PROJECTS=Projects.new
|
161
|
+
#PROJECTS.open Projects.user_projects_filename if File.exists? Projects.user_projects_filename
|
154
162
|
#current=Projects.current # this makes sure the current project is added to PROJECTS
|
155
163
|
#PROJECTS[current.fullname]=current if(!current.nil? && !PROJECTS.has_key?(current.fullname) && current.wrk_dir == Rake.application.original_dir)
|
156
164
|
#PROJECTS.save Projects.user_projects_filename if !File.exists? Projects.user_projects_filename
|
data/lib/base.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
puts __FILE__ if defined?(DEBUG)
|
2
2
|
|
3
|
-
['array','command','environment','file','gemspec',
|
4
|
-
'hash','internet','project','projects','source',
|
3
|
+
['array','command','dir','environment','file','gemspec',
|
4
|
+
'hash','history','internet','project','projects','source',
|
5
5
|
'string','text','timeout','timer','version'].each{|name| require_relative("base/#{name}.rb")}
|
data/lib/dev.rb
CHANGED
@@ -12,12 +12,43 @@ end
|
|
12
12
|
PROJECT=Project.new()
|
13
13
|
|
14
14
|
class Dev
|
15
|
+
attr_accessor :projects,:history
|
16
|
+
|
17
|
+
def initialize env=nil
|
18
|
+
@env=Hash.new
|
19
|
+
@env_aliases={'HOME' => ['USERPROFILE'],
|
20
|
+
'DEV_ROOT' => ['DEV_HOME','HOME','USERPROFILE']
|
21
|
+
}
|
22
|
+
env.each{|k,v| @env[k.to_s]=v} if !env.nil?
|
23
|
+
@projects=Projects.new(self)
|
24
|
+
@history=History.new(self)
|
25
|
+
end
|
26
|
+
|
27
|
+
def reset
|
28
|
+
@projects=nil
|
29
|
+
end
|
30
|
+
|
31
|
+
def get_env key
|
32
|
+
if(!@env.nil? && @env.has_key?(key))
|
33
|
+
return @env[key]
|
34
|
+
end
|
35
|
+
value = ENV[key]
|
36
|
+
if(value.nil?)
|
37
|
+
if(@env_aliases.has_key?(key))
|
38
|
+
@env_aliases[key].each{|akey|
|
39
|
+
value=get_env(akey) if value.nil?
|
40
|
+
}
|
41
|
+
end
|
42
|
+
end
|
43
|
+
value
|
44
|
+
end
|
45
|
+
|
15
46
|
def execute args
|
16
47
|
if(args.kind_of?(String))
|
17
48
|
args=args.split(' ')
|
18
49
|
end
|
19
|
-
projects=Projects.new
|
20
|
-
projects.open Projects.user_projects_filename if File.exists? Projects.user_projects_filename
|
50
|
+
#projects=Projects.new
|
51
|
+
#projects.open Projects.user_projects_filename if File.exists? Projects.user_projects_filename
|
21
52
|
projects.add(args) if args.length > 0 && args[0] == 'add'
|
22
53
|
projects.import(args.length>1 ? args[1]:'') if args.length > 0 && args[0] == 'import'
|
23
54
|
projects.list(args.length>1 ? args[1]:'') if args.length > 0 && args[0] == 'list'
|
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.265
|
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-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -70,10 +70,12 @@ files:
|
|
70
70
|
- lib/base.rb
|
71
71
|
- lib/base/array.rb
|
72
72
|
- lib/base/command.rb
|
73
|
+
- lib/base/dir.rb
|
73
74
|
- lib/base/environment.rb
|
74
75
|
- lib/base/file.rb
|
75
76
|
- lib/base/gemspec.rb
|
76
77
|
- lib/base/hash.rb
|
78
|
+
- lib/base/history.rb
|
77
79
|
- lib/base/internet.rb
|
78
80
|
- lib/base/project.rb
|
79
81
|
- lib/base/projects.rb
|
@@ -122,8 +124,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
124
|
version: '0'
|
123
125
|
requirements: []
|
124
126
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.
|
127
|
+
rubygems_version: 2.4.5
|
126
128
|
signing_key:
|
127
129
|
specification_version: 4
|
128
130
|
summary: dev
|
129
131
|
test_files: []
|
132
|
+
has_rdoc:
|