popo 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -62,17 +62,23 @@ module Popo
62
62
 
63
63
  parsed = diff_msg.scan(/(commit [0-9a-f]+)\n+(.*?)\n+(.*?)(?:\n|$)/)
64
64
 
65
- puts "Commits in #{branches[0]} not found in #{branches[1]}"
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
- Error.say "#{cwd} is not a git repo!"
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
@@ -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", DEFAULT_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
@@ -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'])
@@ -1,3 +1,3 @@
1
1
  module Popo
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
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.8
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-02-29 00:00:00.000000000Z
12
+ date: 2012-03-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sequel
16
- requirement: &23544220 !ruby/object:Gem::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: *23544220
24
+ version_requirements: *20227340
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sqlite3
27
- requirement: &23543520 !ruby/object:Gem::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: *23543520
35
+ version_requirements: *20226280
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: cableguy
38
- requirement: &23542420 !ruby/object:Gem::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: *23542420
46
+ version_requirements: *20225240
47
47
  description: Ruby and rails repo tool
48
48
  email:
49
49
  - poymode@gmail.com