oban 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +6 -0
  2. data/lib/oban/oban.rb +28 -8
  3. data/lib/oban/version.rb +1 -1
  4. metadata +4 -4
data/README.md CHANGED
@@ -13,3 +13,9 @@ submodules
13
13
  me@myhost:~/my_proj$ oban
14
14
 
15
15
  ####TODO:
16
+ * be able to deploy in any directory of the project
17
+ * right now if you have a fairly large repo it can take some time to
18
+ upload -- I'd like to get rid of the push --force hack and do some
19
+ intelligent diffing instead
20
+ * testing!
21
+ * support for multiple submodules (right now it only does one)
@@ -8,15 +8,8 @@ class Oban
8
8
  attr_accessor :submods # TODO: should be a list eventually
9
9
 
10
10
  def initialize
11
- conf_file = ENV['HOME'] + '/.oban.yml'
12
11
 
13
- unless FileTest.exist?(conf_file)
14
- puts colorRed('Missing Conf File!')
15
- puts colorRed('\tPlease copy oban.yml.example to ~/.oban.yml and edit')
16
- exit
17
- end
18
-
19
- self.config = YAML::load(File.open(conf_file) { |f| @stuff = f.read })
12
+ set_config
20
13
 
21
14
  # grab config for current repository (based on github)
22
15
  current = `git remote show origin | grep Fetch`
@@ -48,6 +41,29 @@ class Oban
48
41
  puts colorBlue("using #{heroku_remote}")
49
42
  end
50
43
 
44
+ def set_config
45
+ home_conf_file = ENV['HOME'] + '/.oban.yml'
46
+ cwd_conf_file = '.oban.yml'
47
+
48
+ g2g = false
49
+
50
+ if FileTest.exist?(home_conf_file) then
51
+ self.config = YAML::load(File.open(home_conf_file) { |f| @stuff = f.read })
52
+ g2g = true
53
+ end
54
+
55
+ if FileTest.exist?(cwd_conf_file) then
56
+ self.config = YAML::load(File.open(cwd_conf_file) { |f| @stuff = f.read })
57
+ g2g = true
58
+ end
59
+
60
+ unless g2g
61
+ puts colorRed("Missing Conf File!")
62
+ puts colorRed("\tPlease copy oban.yml.example to ~/.oban.yml or project_root and edit")
63
+ exit
64
+ end
65
+ end
66
+
51
67
  # only supports one right now -- FIXME
52
68
  def set_submods
53
69
  submods = `git submodule status`
@@ -116,6 +132,10 @@ class Oban
116
132
  `git checkout master`
117
133
  `git submodule init`
118
134
  `git submodule update`
135
+
136
+ # ensure we checkout master (cause it'll default to headless)
137
+ `git --git-dir=#{self.submods}/.git checkout master`
138
+
119
139
  end
120
140
 
121
141
  end
@@ -1,3 +1,3 @@
1
1
  module Oban
2
- VERSION = "0.1.3" unless defined?(::Oban::VERSION)
2
+ VERSION = "0.1.4" unless defined?(::Oban::VERSION)
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oban
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ian Eyberg
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-06 00:00:00 -05:00
18
+ date: 2010-10-08 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency