dev 1.0.37 → 1.0.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/dev/Project.rb +19 -4
  2. data/lib/dev/Scm.rb +8 -1
  3. metadata +13 -13
data/lib/dev/Project.rb CHANGED
@@ -14,7 +14,7 @@ class Project < Hash
14
14
 
15
15
  def array_method(name)
16
16
  string_name=name.to_s
17
- #puts_debug "method_missing name=" + string_name
17
+ puts_debug "method_missing name=" + string_name
18
18
 
19
19
  puts " no directives defined for #{string_name}" if self.get_value(string_name).nil? && string_name=="pull"
20
20
  return if(self.get_value(string_name).nil?)
@@ -73,8 +73,15 @@ class Project < Hash
73
73
  def add
74
74
  unless self[:src_glob].nil?
75
75
  scm = Dev::Scm.new
76
- puts " adding files " + self[:src_glob].to_s
77
- scm.add_file_glob(self[:src_glob])
76
+ if self[:src_glob].kind_of?(Hash)
77
+ self[:src_glob].each do |name,value|
78
+ puts " adding files " + value.to_s
79
+ scm.add_file_glob(value)
80
+ end
81
+ else
82
+ puts " adding files " + self[:src_glob].to_s
83
+ scm.add_file_glob(self[:src_glob])
84
+ end
78
85
  end
79
86
  end
80
87
 
@@ -257,7 +264,15 @@ class Project < Hash
257
264
 
258
265
  if key=="file_count"
259
266
  unless Dir.glob(self[:src_glob]).nil?
260
- value=Dir.glob(self[:src_glob]).length.to_s
267
+ if self[:src_glob].kind_of?(Hash)
268
+ length=0
269
+ src_glob.each do |name,value|
270
+ length+=Dir.glob(value).length
271
+ end
272
+ value=length.to_s
273
+ else
274
+ value=Dir.glob(self[:src_glob]).length.to_s
275
+ end
261
276
  end
262
277
  end
263
278
 
data/lib/dev/Scm.rb CHANGED
@@ -18,7 +18,14 @@ class Scm
18
18
 
19
19
  def add_file(file)
20
20
  call=Dev::SystemCall.new("git add #{file}") if @scm_type=="git"
21
- call=Dev::SystemCall.new("svn add #{file}") if @scm_type=="svn"
21
+
22
+ if @scm_type=="svn"
23
+ call=Dev::SystemCall.new("svn info #{file}")
24
+ if(call.status != 0)
25
+ call=Dev::SystemCall.new("svn add #{file} --parents")
26
+ call.puts_summary
27
+ end
28
+ end
22
29
  end
23
30
 
24
31
  def add_file_glob(glob)
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: 1.0.37
4
+ version: 1.0.38
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &25064352 !ruby/object:Gem::Requirement
16
+ requirement: &28513092 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *25064352
24
+ version_requirements: *28513092
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: semver
27
- requirement: &25064076 !ruby/object:Gem::Requirement
27
+ requirement: &28512768 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *25064076
35
+ version_requirements: *28512768
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: countloc
38
- requirement: &25063824 !ruby/object:Gem::Requirement
38
+ requirement: &28512468 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *25063824
46
+ version_requirements: *28512468
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &25063572 !ruby/object:Gem::Requirement
49
+ requirement: &28512048 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *25063572
57
+ version_requirements: *28512048
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: cucumber
60
- requirement: &25063320 !ruby/object:Gem::Requirement
60
+ requirement: &28511496 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *25063320
68
+ version_requirements: *28511496
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
- requirement: &25063068 !ruby/object:Gem::Requirement
71
+ requirement: &28511244 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *25063068
79
+ version_requirements: *28511244
80
80
  description: development tasks
81
81
  email: lou.parslow@gmail.com
82
82
  executables: