popo 0.1.8 → 0.1.9
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/popo.rb +0 -1
- data/lib/popo/git_utils.rb +9 -3
- data/lib/popo/runner.rb +6 -10
- data/lib/popo/sync.rb +1 -1
- data/lib/popo/version.rb +1 -1
- metadata +8 -8
data/lib/popo.rb
CHANGED
@@ -15,7 +15,6 @@ module Popo
|
|
15
15
|
autoload :Initializer, File.join(POPO_LIB_ROOT, 'initializer')
|
16
16
|
autoload :Runner, File.join(POPO_LIB_ROOT, 'runner')
|
17
17
|
autoload :RVM, File.join(POPO_LIB_ROOT, 'rvm')
|
18
|
-
autoload :Service, File.join(POPO_LIB_ROOT, 'service')
|
19
18
|
autoload :Sync, File.join(POPO_LIB_ROOT, 'sync')
|
20
19
|
autoload :Utils, File.join(POPO_LIB_ROOT, 'utils')
|
21
20
|
end
|
data/lib/popo/git_utils.rb
CHANGED
@@ -62,17 +62,23 @@ module Popo
|
|
62
62
|
|
63
63
|
parsed = diff_msg.scan(/(commit [0-9a-f]+)\n+(.*?)\n+(.*?)(?:\n|$)/)
|
64
64
|
|
65
|
-
|
65
|
+
Utils.say "#{File.basename(cwd).capitalize}"
|
66
66
|
|
67
67
|
parsed.each do |p|
|
68
68
|
commit_id = p[0].gsub(/commit/,'').strip
|
69
69
|
author = p[1].scan(/Author: (.*) <.*>/)
|
70
70
|
commit_msg = p[2].strip
|
71
71
|
|
72
|
-
Utils.say "#{commit_id} \<#{author}\> #{commit_msg}"
|
72
|
+
Utils.say "#{commit_id} \<#{author}\> #{commit_msg}", true
|
73
73
|
end
|
74
74
|
else
|
75
|
-
|
75
|
+
repos = Dir.entries(cwd) - [ '.', '..' ]
|
76
|
+
|
77
|
+
repos.each do |r|
|
78
|
+
if File.directory?(r)
|
79
|
+
FileUtils.cd(r) { branch_diff(File.join(cwd, r)) }
|
80
|
+
end
|
81
|
+
end
|
76
82
|
end
|
77
83
|
|
78
84
|
end
|
data/lib/popo/runner.rb
CHANGED
@@ -65,16 +65,17 @@ module Popo
|
|
65
65
|
if args.length < 1
|
66
66
|
Utils.say optparse.help
|
67
67
|
else
|
68
|
+
@db_opts[:path] = File.join(@app_root, POPO_WORK_PATH)
|
69
|
+
@db_opts[:target] = ENV['CABLING_TARGET'] || @options[:target] || DEFAULT_POPO_TARGET
|
70
|
+
@db_opts[:location] = ENV['CABLING_LOCATION'] || @options[:location]
|
71
|
+
@db_opts[:verbose] = @options[:verbose]
|
72
|
+
|
68
73
|
# set manifest usable constants
|
69
74
|
Object.const_set("POPO_PATH", @app_root)
|
70
|
-
Object.const_set("POPO_TARGET",
|
75
|
+
Object.const_set("POPO_TARGET", @db_opts[:target])
|
71
76
|
Object.const_set("POPO_LOCATION", @options[:location])
|
72
77
|
Object.const_set("POPO_USER", @options[:user])
|
73
78
|
|
74
|
-
@db_opts[:path] = File.join(@app_root, POPO_WORK_PATH)
|
75
|
-
@db_opts[:target] = ENV['CABLING_TARGET'] || @options[:target] || DEFAULT_POPO_TARGET
|
76
|
-
@db_opts[:location] = ENV['CABLING_LOCATION'] || @options[:location]
|
77
|
-
@db_opts[:verbose] = @options[:verbose]
|
78
79
|
|
79
80
|
mandatory = [:path, :manifest]
|
80
81
|
mandatory = mandatory.select { |p| @options[p].nil? }
|
@@ -132,11 +133,6 @@ module Popo
|
|
132
133
|
sh!(cmd)
|
133
134
|
when 'diff'
|
134
135
|
GitUtils.branch_diff(Dir.pwd)
|
135
|
-
when 'stop' || 'start' || 'restart'
|
136
|
-
db = Database.new(@app_root, @db_opts)
|
137
|
-
db.boot_database
|
138
|
-
|
139
|
-
Service.new(@app_root, cmd, db).run
|
140
136
|
else
|
141
137
|
Error.say "#{args} not a valid command!"
|
142
138
|
end
|
data/lib/popo/sync.rb
CHANGED
@@ -64,7 +64,7 @@ module Popo
|
|
64
64
|
|
65
65
|
def get_project
|
66
66
|
if !File.exists?(@info['path'])
|
67
|
-
GitUtils.git_clone(@info[''], @info['path'], @info['branch'])
|
67
|
+
GitUtils.git_clone(@info['repo'], @info['path'], @info['branch'])
|
68
68
|
else
|
69
69
|
if POPO_CONFIG['target'] == DEFAULT_POPO_TARGET
|
70
70
|
GitUtils.git_stash(@info['path'])
|
data/lib/popo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: popo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-03-08 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sequel
|
16
|
-
requirement: &
|
16
|
+
requirement: &20227340 !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: *
|
24
|
+
version_requirements: *20227340
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: sqlite3
|
27
|
-
requirement: &
|
27
|
+
requirement: &20226280 !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: *
|
35
|
+
version_requirements: *20226280
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: cableguy
|
38
|
-
requirement: &
|
38
|
+
requirement: &20225240 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *20225240
|
47
47
|
description: Ruby and rails repo tool
|
48
48
|
email:
|
49
49
|
- poymode@gmail.com
|