dev 2.0.45 → 2.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/dev_git.rb CHANGED
@@ -1,4 +1,4 @@
1
- require_relative 'git.rb'
2
-
3
- class DevGit
1
+ require_relative 'git.rb'
2
+
3
+ class DevGit
4
4
  end
data/lib/dev_projects.rb CHANGED
@@ -1,7 +1,6 @@
1
-
2
- Dir.glob("#{File.dirname(__FILE__)}/*.rb").each{|rb|
3
- require_relative(rb)
4
- }
1
+ #require 'dev_environment'
2
+ require_relative 'projects.rb'
3
+ require_relative 'project.rb'
5
4
 
6
5
  PROJECTS=Projects.new
7
6
  PROJECTS.open Projects.user_projects_filename if File.exists? Projects.user_projects_filename
data/lib/dev_svn.rb CHANGED
@@ -1,2 +1,2 @@
1
-
1
+
2
2
  require_relative 'svn.rb'
data/lib/environment.rb CHANGED
@@ -1,49 +1,49 @@
1
- class Environment < Hash
2
-
3
- def initialize
4
- self[:home]=Environment.home
5
- self[:machine]=Environment.machine
6
- self[:user]=Environment.user
7
- end
8
-
9
- def self.home
10
- ["USERPROFILE","HOME"].each {|v|
11
- return ENV[v].gsub('\\','/') unless ENV[v].nil?
12
- }
13
- dir="~"
14
- dir=ENV["HOME"] unless ENV["HOME"].nil?
15
- dir=ENV["USERPROFILE"].gsub('\\','/') unless ENV["USERPROFILE"].nil?
16
- return dir
17
- end
18
-
19
- def self.machine
20
- if !ENV['COMPUTERNAME'].nil?
21
- return ENV['COMPUTERNAME']
22
- end
23
-
24
- machine = `hostname`
25
- machine = machine.split('.')[0] if machine.include?('.')
26
- return machine.strip
27
- end
28
-
29
- def self.user
30
- return ENV['USER'] if !ENV['USER'].nil? #on Unix
31
- ENV['USERNAME']
32
- end
33
-
34
- def self.dev_root
35
- ["DEV_HOME","DEV_ROOT"].each {|v|
36
- if !ENV[v].nil?
37
- if(ENV[v].include?(';'))
38
- ENV[v].split(';').each{|d|
39
- return d if File.exists?(d)
40
- }
41
- else
42
- return ENV[v].gsub('\\','/')
43
- end
44
- end
45
- }
46
- dir=home
47
- return dir
48
- end
1
+ class Environment < Hash
2
+
3
+ def initialize
4
+ self[:home]=Environment.home
5
+ self[:machine]=Environment.machine
6
+ self[:user]=Environment.user
7
+ end
8
+
9
+ def self.home
10
+ ["USERPROFILE","HOME"].each {|v|
11
+ return ENV[v].gsub('\\','/') unless ENV[v].nil?
12
+ }
13
+ dir="~"
14
+ dir=ENV["HOME"] unless ENV["HOME"].nil?
15
+ dir=ENV["USERPROFILE"].gsub('\\','/') unless ENV["USERPROFILE"].nil?
16
+ return dir
17
+ end
18
+
19
+ def self.machine
20
+ if !ENV['COMPUTERNAME'].nil?
21
+ return ENV['COMPUTERNAME']
22
+ end
23
+
24
+ machine = `hostname`
25
+ machine = machine.split('.')[0] if machine.include?('.')
26
+ return machine.strip
27
+ end
28
+
29
+ def self.user
30
+ return ENV['USER'] if !ENV['USER'].nil? #on Unix
31
+ ENV['USERNAME']
32
+ end
33
+
34
+ def self.dev_root
35
+ ["DEV_HOME","DEV_ROOT"].each {|v|
36
+ if !ENV[v].nil?
37
+ if(ENV[v].include?(';'))
38
+ ENV[v].split(';').each{|d|
39
+ return d if File.exists?(d)
40
+ }
41
+ else
42
+ return ENV[v].gsub('\\','/')
43
+ end
44
+ end
45
+ }
46
+ dir=home
47
+ return dir
48
+ end
49
49
  end
data/lib/git.rb CHANGED
@@ -1,51 +1,51 @@
1
- class Git
2
- def self.branch directory=''
3
- directory=Dir.pwd if directory.length == 0
4
- Dir.chdir(directory) do
5
- begin
6
- `git branch`.scan(/\* ([.\w-]+)/)[0][0] if(File.exists?('.git'))
7
- rescue
8
- ''
9
- end
10
- end
11
- end
12
-
13
- def self.remote_origin directory=''
14
- url=''
15
- directory=Dir.pwd if directory.length == 0
16
- Dir.chdir(directory) do
17
- begin
18
- url=`git remote show origin`.scan(/Fetch URL: ([\.\-:\/\w\d]+)/)[0][0] if(File.exists?('.git'))
19
- rescue
20
- url=''
21
- end
22
- end
23
- url
24
- end
25
-
26
- def self.has_changes? directory=''
27
- directory=Dir.pwd if directory.length==0
28
- Dir.chdir(directory) do
29
- if(File.exists?('.git'))
30
- return true if `git status`.include?('modified:')
31
- end
32
- end
33
- false
34
- end
35
-
36
- def self.init directory=''
37
- directory=Dir.pwd if directory.length==0
38
- FileUtils.mkpath directory if !File.exists?(directory)
39
- if(!File.exists?("#{directory}/.git"))
40
- Dir.chdir(directory) do
41
- `git init`
42
- File.open('.gitignore','w'){|f|
43
- f.puts '### Mac ###'
44
- f.puts '*.DS_Store'
45
- }
46
- `git add .gitignore`
47
- `git commit -m'added .gitignore'`
48
- end
49
- end
50
- end
1
+ class Git
2
+ def self.branch directory=''
3
+ directory=Dir.pwd if directory.length == 0
4
+ Dir.chdir(directory) do
5
+ begin
6
+ `git branch`.scan(/\* ([.\w-]+)/)[0][0] if(File.exists?('.git'))
7
+ rescue
8
+ ''
9
+ end
10
+ end
11
+ end
12
+
13
+ def self.remote_origin directory=''
14
+ url=''
15
+ directory=Dir.pwd if directory.length == 0
16
+ Dir.chdir(directory) do
17
+ begin
18
+ url=`git remote show origin`.scan(/Fetch URL: ([\.\-:\/\w\d]+)/)[0][0] if(File.exists?('.git'))
19
+ rescue
20
+ url=''
21
+ end
22
+ end
23
+ url
24
+ end
25
+
26
+ def self.has_changes? directory=''
27
+ directory=Dir.pwd if directory.length==0
28
+ Dir.chdir(directory) do
29
+ if(File.exists?('.git'))
30
+ return true if `git status`.include?('modified:')
31
+ end
32
+ end
33
+ false
34
+ end
35
+
36
+ def self.init directory=''
37
+ directory=Dir.pwd if directory.length==0
38
+ FileUtils.mkpath directory if !File.exists?(directory)
39
+ if(!File.exists?("#{directory}/.git"))
40
+ Dir.chdir(directory) do
41
+ `git init`
42
+ File.open('.gitignore','w'){|f|
43
+ f.puts '### Mac ###'
44
+ f.puts '*.DS_Store'
45
+ }
46
+ `git add .gitignore`
47
+ `git commit -m'added .gitignore'`
48
+ end
49
+ end
50
+ end
51
51
  end
data/lib/project.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'json'
2
- #require 'dev_commands'
2
+ require 'dev_commands'
3
3
 
4
4
  class Project < Hash
5
5
  attr_accessor :filename
@@ -55,8 +55,6 @@ attr_accessor :filename
55
55
  if(File.exists?(self.wrk_dir))
56
56
  Dir.chdir(self.wrk_dir) do
57
57
  rake = Command.new({ :input => 'rake', :timeout => 300, :ignore_failure => true })
58
- #puts "rake (#{self.wrk_dir})"
59
- #puts `rake`
60
58
  rake.execute
61
59
  puts rake.summary
62
60
  end
data/lib/projects.rb CHANGED
@@ -1,10 +1,9 @@
1
1
  require 'json'
2
2
  require 'rake'
3
- #require 'dev_git'
4
- #require 'dev_svn'
5
- #require 'dev_msbuild'
6
- #require 'dev_environment'
7
- require_relative 'project.rb'
3
+ require 'dev_git'
4
+ require 'dev_svn'
5
+ require 'dev_msbuild'
6
+ require 'dev_environment'
8
7
 
9
8
  class Projects < Hash
10
9
  attr_accessor :filename
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.45
4
+ version: 2.0.46
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Lou Parslow
@@ -13,6 +14,7 @@ dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rspec
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -73,26 +76,27 @@ files:
73
76
  homepage: http://rubygems.org/gems/dev
74
77
  licenses:
75
78
  - Apache 2.0
76
- metadata: {}
77
79
  post_install_message:
78
80
  rdoc_options: []
79
81
  require_paths:
80
82
  - lib
81
83
  required_ruby_version: !ruby/object:Gem::Requirement
84
+ none: false
82
85
  requirements:
83
- - - '>='
86
+ - - ! '>='
84
87
  - !ruby/object:Gem::Version
85
88
  version: 1.9.3
86
89
  required_rubygems_version: !ruby/object:Gem::Requirement
90
+ none: false
87
91
  requirements:
88
- - - '>='
92
+ - - ! '>='
89
93
  - !ruby/object:Gem::Version
90
94
  version: '0'
91
95
  requirements: []
92
96
  rubyforge_project:
93
- rubygems_version: 2.0.3
97
+ rubygems_version: 1.8.24
94
98
  signing_key:
95
- specification_version: 4
99
+ specification_version: 3
96
100
  summary: dev
97
101
  test_files: []
98
102
  has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 9f5aa5fd2cbb43f327871f38319367c1ae7defcc
4
- data.tar.gz: 807ff67c0c4f2520c77c6f18262c21a8be5adb05
5
- SHA512:
6
- metadata.gz: 51630069306656eccd62d525125a31159aabc687ecc90dc1ff19de06dc867734ad5bf75b435bfdc7464ea0cf3d18c127755243f2f5f29f4ee8e01366abdb4b14
7
- data.tar.gz: 652ca888bd9e64293d69e0bd707cf8c92619b5041191f0e4eb4f795ae0382282c3b786aabc7fbd8c765688e4b4999900756d70aca596dc76b01fcbfd2d40bb39