opskeleton 0.9.7 → 0.9.8
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/Gemfile.lock +1 -1
- data/lib/opskeleton/git.rb +10 -6
- data/lib/opskeleton/uncommited.rb +0 -37
- data/lib/opskeleton/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 26d32885b62a88bd0bd3fd0efe5488a7354f5c80
|
|
4
|
+
data.tar.gz: 55c592d0a60a47ee379c312f7def6321254efed0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 01e7c53f0f89763dd0ff559fd62488a3ca6eab03c7b5872d0c86636b89c20ad2fc3cbc093662279481c0ead19432cbd205a5436e9d4eddc24fcf79bf50822f48
|
|
7
|
+
data.tar.gz: 19f77f77c16957c07db7d24c033fcce43ca0bb6dafd7594ca5cdef4527200613009d31f876e361e479531b0747e76ff218ae9d8283a10df69a92a3205b8dd666
|
data/Gemfile.lock
CHANGED
data/lib/opskeleton/git.rb
CHANGED
|
@@ -15,16 +15,20 @@ module Opsk
|
|
|
15
15
|
def_delegator :@g, :pull, :pull
|
|
16
16
|
|
|
17
17
|
def changed?
|
|
18
|
-
git_run('status')
|
|
18
|
+
res = git_run('status')
|
|
19
|
+
%w(modified deleted untracked).detect{|c| res.include?(c)}
|
|
19
20
|
end
|
|
20
21
|
|
|
21
22
|
def report
|
|
22
|
-
%i(changed added untracked).each do |state|
|
|
23
|
-
@
|
|
24
|
-
|
|
25
|
-
@thor.say "
|
|
23
|
+
%i(changed added untracked deleted).each do |state|
|
|
24
|
+
res = @g.status.send(state)
|
|
25
|
+
if(res.length > 0)
|
|
26
|
+
@thor.say "#{state} files:\n\n"
|
|
27
|
+
res.each do |k,v|
|
|
28
|
+
@thor.say "- #{k}"
|
|
29
|
+
end
|
|
30
|
+
@thor.say "\n"
|
|
26
31
|
end
|
|
27
|
-
@thor.say "\n"
|
|
28
32
|
end
|
|
29
33
|
end
|
|
30
34
|
|
|
@@ -1,42 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
module Opsk
|
|
4
|
-
class CommitGit
|
|
5
|
-
def initialize(d,options,thor)
|
|
6
|
-
@g = Git.init(d)
|
|
7
|
-
@options = options
|
|
8
|
-
@thor = thor
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def changed?
|
|
12
|
-
@g.status.changed.keys.length > 0
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def report
|
|
16
|
-
%i(changed added untracked).each do |state|
|
|
17
|
-
@thor.say "#{state} files:\n\n"
|
|
18
|
-
@g.status.send(state).each do |k,v|
|
|
19
|
-
@thor.say "- #{k}"
|
|
20
|
-
end
|
|
21
|
-
@thor.say "\n"
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def master_commit(d)
|
|
26
|
-
resp = @thor.yes? "Commit the changes under #{d}? (y/n)" unless @options['all']
|
|
27
|
-
if(@options['all'] or resp)
|
|
28
|
-
@g.checkout('master')
|
|
29
|
-
if @options['message']
|
|
30
|
-
@g.commit_all(@options['message'])
|
|
31
|
-
else
|
|
32
|
-
@thor.say 'Commit message:'
|
|
33
|
-
@g.commit_all(STDIN.gets.chomp)
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
|
|
40
4
|
class Uncommited < Thor::Group
|
|
41
5
|
include Thorable, Thor::Actions
|
|
42
6
|
|
|
@@ -44,7 +8,6 @@ module Opsk
|
|
|
44
8
|
check_root
|
|
45
9
|
end
|
|
46
10
|
|
|
47
|
-
|
|
48
11
|
def uncommited
|
|
49
12
|
Dir["modules/*"].reject{|o| not File.directory?(o)}.each do |d|
|
|
50
13
|
if File.exists?("#{d}/.git")
|
data/lib/opskeleton/version.rb
CHANGED