dev 2.0.274 → 2.0.275
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.
- checksums.yaml +4 -4
- data/lib/apps/git.rb +20 -0
- data/lib/base/environment.rb +3 -2
- data/lib/tasks/commit.rb +1 -1
- data/lib/tasks/info.rb +2 -2
- data/lib/tasks/pull.rb +2 -4
- data/lib/tasks/push.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a1f0a12a0c19a4df49a831a37710482b0a9f72c7
|
|
4
|
+
data.tar.gz: f16fe292586527a62273d85f0d3f383261a4f2f6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bad24baf86cabd1148e14854eb5c8bedf2b54018fbc6f1ad2ff40e7be66a95b1960a3da0d7648924f9a9ba0dc636a6afbe3dc4c4fabb4ed36403bfb7ace8d6d9
|
|
7
|
+
data.tar.gz: 7ee1dd082d56018762df374e9ed321ef95552cf21b6cbfcdfcea38772d98d45ace3b22242c5967b0798de2853337b7868e06b871109dcc9f244ac4aec5882cac
|
data/lib/apps/git.rb
CHANGED
|
@@ -20,6 +20,26 @@ class Git
|
|
|
20
20
|
url=`git config --get remote.origin.url` if(File.exists?('.git'))
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
+
def self.user_email
|
|
24
|
+
email=''
|
|
25
|
+
begin
|
|
26
|
+
email=`git config --list`.scan(/user.email=([\d\w.@\-\+]+)/)[0][0]
|
|
27
|
+
rescue
|
|
28
|
+
email=''
|
|
29
|
+
end
|
|
30
|
+
email
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.user_name
|
|
34
|
+
name=''
|
|
35
|
+
begin
|
|
36
|
+
name=`git config --list`.scan(/user.name=([\d\w.@\-\+]+)/)[0][0]
|
|
37
|
+
rescue
|
|
38
|
+
name=''
|
|
39
|
+
end
|
|
40
|
+
name
|
|
41
|
+
end
|
|
42
|
+
|
|
23
43
|
def self.remote_origin directory=''
|
|
24
44
|
url=''
|
|
25
45
|
directory=Dir.pwd if directory.length == 0
|
data/lib/base/environment.rb
CHANGED
|
@@ -186,7 +186,8 @@ class Environment < Hash
|
|
|
186
186
|
puts " machine: #{self.machine}"
|
|
187
187
|
puts " user: #{self.user}"
|
|
188
188
|
#puts " configuration: #{self.configuration}"
|
|
189
|
-
puts " debug: #{self.debug}"
|
|
189
|
+
puts " debug: #{self.debug?}"
|
|
190
|
+
puts "git user.email: #{Git.user_email}"
|
|
190
191
|
puts " "
|
|
191
192
|
puts "Path Commands"
|
|
192
193
|
['svn --version --quiet','git --version','msbuild /version','nuget','candle','light','gem --version'].each{|cmd|
|
|
@@ -195,7 +196,7 @@ class Environment < Hash
|
|
|
195
196
|
command[:ignore_failure]=true
|
|
196
197
|
command.execute
|
|
197
198
|
if(command[:exit_code] == 0)
|
|
198
|
-
puts "#{cmd.split(' ')[0].fix(14)} #{get_version(command[:output])}"
|
|
199
|
+
puts "#{cmd.split(' ')[0].fix(14)} #{Environment.get_version(command[:output])}"
|
|
199
200
|
else
|
|
200
201
|
puts "#{cmd.split(' ')[0].fix(14)} not found."
|
|
201
202
|
missing_command=true
|
data/lib/tasks/commit.rb
CHANGED
|
@@ -12,7 +12,7 @@ class Commit < Array
|
|
|
12
12
|
message=""
|
|
13
13
|
message=IO.read('commit.message').strip if File.exists?('commit.message')
|
|
14
14
|
|
|
15
|
-
if(File.exists?('.git') && `git config --list`.include?('user.name='))
|
|
15
|
+
if(File.exists?('.git') && `git config --list`.include?('user.name=') && Git.user_email.length > 0)
|
|
16
16
|
if(!`git status`.include?('nothing to commit') &&
|
|
17
17
|
!`git status`.include?('untracked files present'))
|
|
18
18
|
if(message.length==0)
|
data/lib/tasks/info.rb
CHANGED
data/lib/tasks/pull.rb
CHANGED
|
@@ -3,10 +3,8 @@ task :pull do Tasks.execute_task :pull; end
|
|
|
3
3
|
|
|
4
4
|
class Pull < Array
|
|
5
5
|
def update
|
|
6
|
-
if(
|
|
7
|
-
|
|
8
|
-
add_quiet('git pull') if Git.branch == 'master'
|
|
9
|
-
end
|
|
6
|
+
if(File.exists?('.git') && `git config --list`.include?('user.name=') )
|
|
7
|
+
add_quiet('git pull') if Git.branch == 'master'
|
|
10
8
|
end
|
|
11
9
|
end
|
|
12
10
|
end
|
data/lib/tasks/push.rb
CHANGED
|
@@ -3,7 +3,7 @@ task :push do Tasks.execute_task :push;end
|
|
|
3
3
|
|
|
4
4
|
class Push < Array
|
|
5
5
|
def update
|
|
6
|
-
if(File.exists?('.git') && `git config --list`.include?('user.name=') && `git branch`.include?('* master'))
|
|
6
|
+
if(File.exists?('.git') && `git config --list`.include?('user.name=') && `git branch`.include?('* master') )
|
|
7
7
|
add_quiet 'git push'
|
|
8
8
|
add_quiet 'git push --tags'
|
|
9
9
|
end
|
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.275
|
|
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-09-
|
|
11
|
+
date: 2015-09-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|