dev_projects 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/projects.rb +16 -15
  3. metadata +29 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ea3b579ee6f61d7812947bca98e19f1aa13b0f1
4
- data.tar.gz: a8878e659563787724a862b027cfb27ffc0acde8
3
+ metadata.gz: 8616cb49ea6795b9b428a388443dd662d1f0f754
4
+ data.tar.gz: 0d51a6a621d22af7a5b2a6d535a781a54b067dda
5
5
  SHA512:
6
- metadata.gz: 34fa127541f52729a696661984277b5546c77beff6952ccd8faa2a1a23870ab54d214fb7d388e69ff88dc8d5207ce4ef17afa7446de045e007d59fd20536e096
7
- data.tar.gz: 024444657b960ee26234ab9631ad181392ab6cd34efac4403c07acad5b89bb1f97a227afb8a60b032b853b4ad5e36f2bfd8ff57a643b022189686951c78a6552
6
+ metadata.gz: 64b35eca97856bb98af9c477ae0cb433e469747d39c7487da2d58c4b74925b6cf222aa962a2d30c2f9f70f2e7a6cac4b6058a956ffbed2907f1cf2348cbac19d
7
+ data.tar.gz: 3ba41551528d4c5eaabce537be57ecd346b53b315e43c27d03a0c791fdbdee73a9b2f104d10b7325274732aa4eb8ccd1d6f84c6a527f7dd54f14279279de8dfc
data/lib/projects.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'dev_environment'
2
2
  require 'dev_git'
3
+ require 'dev_svn'
3
4
  require 'json'
4
5
  require 'rake'
5
6
 
@@ -36,21 +37,21 @@ class Projects < Hash
36
37
 
37
38
  def self.current
38
39
  project=nil
39
- if(File.exists?('.git'))
40
- if(Rake.application.original_dir.include?('/wrk/') &&
41
- Git.remote_origin.length > 0)
42
- project=Project.new(Git.remote_origin)
43
- name=Rake.application.original_dir.gsub("#{Environment.dev_root}/wrk/",'')
44
- project[:name] = name if(name.length>0 && !name.include?(Environment.dev_root))
45
- if(defined?(PROJECTS))
46
- PROJECTS[name]=project if(!PROJECTS.has_key?(name))
47
- project.each{|k,v|PROJECTS[name][k]=v}
48
- PROJECTS.save
49
- else
50
- project[:name]=name
51
- end
52
- end
53
- end
40
+ url=Git.remote_origin
41
+ url=Svn.url if url.length==0
42
+ if(Rake.application.original_dir.include?('/wrk/') &&
43
+ url.length > 0)
44
+ project=Project.new(url)
45
+ name=Rake.application.original_dir.gsub("#{Environment.dev_root}/wrk/",'')
46
+ project[:name] = name if(name.length>0 && !name.include?(Environment.dev_root))
47
+ if(defined?(PROJECTS))
48
+ PROJECTS[name]=project if(!PROJECTS.has_key?(name))
49
+ project.each{|k,v|PROJECTS[name][k]=v}
50
+ PROJECTS.save
51
+ else
52
+ project[:name]=name
53
+ end
54
+ end
54
55
  project
55
56
  end
56
57
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev_projects
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: dev_svn
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: dev_environment
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +94,20 @@ dependencies:
80
94
  - - '>='
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: dev_svn
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
83
111
  - !ruby/object:Gem::Dependency
84
112
  name: dev_environment
85
113
  requirement: !ruby/object:Gem::Requirement