pushapp 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pushapp/commands.rb +6 -6
- data/lib/pushapp/config.rb +8 -1
- data/lib/pushapp/tasks/unicorn_signal.rb +1 -1
- data/lib/pushapp/version.rb +1 -1
- data/templates/config.rb.erb +1 -5
- 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: a90bcaeac4b94c006852afa1b39a6a6e47fac27f
|
4
|
+
data.tar.gz: 8c252eb2cf6063b113b125194e918b43d096ec88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc6c2a10d4e21936629acc2ac1d3077d1a189040d5dd88e6050196c3f9ce784ac705251cba3c1076fa56ee9cc2aa12eb144f1fc8d80d0f1c2b191b82d542183b
|
7
|
+
data.tar.gz: 717c1c269b6153a34d652565871d1e31e575918de16e0222ffc0886f3fbc60317c482b94dfb123c87c25d237a20e463063a22253515327ad34dc01c771d5126d
|
data/lib/pushapp/commands.rb
CHANGED
@@ -15,31 +15,31 @@ module Pushapp
|
|
15
15
|
|
16
16
|
def init
|
17
17
|
logger.info "Creating an example config file in #{Pushapp::DEFAULT_CONFIG_LOCATION}"
|
18
|
-
logger.info
|
18
|
+
logger.info 'Customize it to your needs'
|
19
19
|
create_config_directory
|
20
20
|
write_config_file
|
21
21
|
end
|
22
22
|
|
23
23
|
def update_refs
|
24
|
-
logger.info
|
24
|
+
logger.info 'Updating .git/config. Setting up refs to all remotes'
|
25
25
|
Pushapp::Git.new.update_tracked_repos(config)
|
26
26
|
end
|
27
27
|
|
28
28
|
def list_remotes
|
29
|
-
logger.info
|
29
|
+
logger.info 'Known remotes:'
|
30
30
|
remotes_table = config.remotes.map {|r| [r.full_name, r.location, r.env]}
|
31
31
|
remotes_table.unshift ['Full Name', 'Location', 'ENV']
|
32
32
|
logger.shell.print_table(remotes_table)
|
33
33
|
end
|
34
34
|
|
35
35
|
def setup
|
36
|
-
logger.info
|
36
|
+
logger.info 'Setting up remotes'
|
37
37
|
remotes.each { |r| r.setup! }
|
38
38
|
update
|
39
39
|
end
|
40
40
|
|
41
41
|
def update
|
42
|
-
logger.info
|
42
|
+
logger.info 'Updating remotes'
|
43
43
|
remotes.each { |r| r.update! }
|
44
44
|
end
|
45
45
|
|
@@ -63,7 +63,7 @@ module Pushapp
|
|
63
63
|
logger.info "STARTING TASKS ON EVENT #{event}"
|
64
64
|
remotes.each do |r|
|
65
65
|
r.tasks_on(event).each do |t|
|
66
|
-
logger.info "
|
66
|
+
logger.info "task: #{t.inspect}"
|
67
67
|
Pushapp::Pipe.run(t)
|
68
68
|
end
|
69
69
|
end
|
data/lib/pushapp/config.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'pushapp/remote'
|
2
|
-
require 'pushapp/tasks/base'
|
3
2
|
|
4
3
|
class Pushapp::Config
|
5
4
|
|
@@ -9,6 +8,14 @@ class Pushapp::Config
|
|
9
8
|
@@known_tasks = {}
|
10
9
|
|
11
10
|
def self.parse(configuration_file = nil)
|
11
|
+
require 'pushapp/tasks/base'
|
12
|
+
require 'pushapp/tasks/script'
|
13
|
+
require 'pushapp/tasks/rake'
|
14
|
+
require 'pushapp/tasks/upstart'
|
15
|
+
require 'pushapp/tasks/nginx_export'
|
16
|
+
require 'pushapp/tasks/foreman_export'
|
17
|
+
require 'pushapp/tasks/unicorn_signal'
|
18
|
+
|
12
19
|
config = self.new(configuration_file)
|
13
20
|
config.instance_eval(File.read(config.file))
|
14
21
|
|
data/lib/pushapp/version.rb
CHANGED
data/templates/config.rb.erb
CHANGED
@@ -1,8 +1,4 @@
|
|
1
1
|
# Pushapp Configuration File
|
2
|
-
require 'pushapp/tasks/upstart'
|
3
|
-
require 'pushapp/tasks/nginx_export'
|
4
|
-
require 'pushapp/tasks/foreman_export'
|
5
|
-
require 'pushapp/tasks/unicorn_restart'
|
6
2
|
|
7
3
|
# Sample remote definition:
|
8
4
|
#
|
@@ -36,5 +32,5 @@ on :push do
|
|
36
32
|
rake('db:migrate')
|
37
33
|
rake('assets:precompile', env: {RAILS_GROUP: :assets})
|
38
34
|
task(:upstart_restart) # restarting options[:upstart_jobs]
|
39
|
-
task(:
|
35
|
+
task(:unicorn_signal) # sending USR2 signal to unicorn
|
40
36
|
end
|