cumuli 0.4.0 → 0.4.1
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/.gitignore +3 -0
- data/Rakefile +8 -0
- data/cumuli.gemspec +1 -1
- data/lib/cumuli.rb +1 -0
- data/lib/cumuli/project_manager/manager.rb +1 -0
- data/lib/cumuli/project_manager/project.rb +17 -6
- data/lib/cumuli/tasks/cumuli.rake +7 -2
- data/lib/cumuli/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42f2220f89f952c7401ffdc12925c578e4fe9faf
|
4
|
+
data.tar.gz: 93e24073b5c31ae06e4346688cd90d362efc4455
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81c947e7f4f98a13c0058aa68681bf500c8228134d89dc21891c2b2bc388f3fa4b4473df6ae37d288ee0befeac145953143f1295990088fdd7c495f85c31d01b
|
7
|
+
data.tar.gz: a692b04f8c00d32ae3b6de2abe6551d07f2fb22af043b545104490fee4465fda1c3c7bbe613ce6eccbe2c2c80749ec562a6220b23cd5a8cbd7d4e3083ac9d1c8
|
data/.gitignore
CHANGED
data/Rakefile
CHANGED
@@ -6,3 +6,11 @@ require 'cucumber/rake/task'
|
|
6
6
|
Cucumber::Rake::Task.new(:cucumber) do |t|
|
7
7
|
t.cucumber_opts = "features --format pretty"
|
8
8
|
end
|
9
|
+
|
10
|
+
desc 'run rspec'
|
11
|
+
task :spec do
|
12
|
+
system('rspec')
|
13
|
+
end
|
14
|
+
|
15
|
+
desc "run rspec and cucumber"
|
16
|
+
task :default => [:spec, :cucumber]
|
data/cumuli.gemspec
CHANGED
@@ -6,7 +6,7 @@ require 'cumuli/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "cumuli"
|
8
8
|
spec.version = Cumuli::VERSION
|
9
|
-
spec.authors = ["SocialChorus", "Kane Baccigalupi", "Fito von Zastrow", "Roy Pfaffman", "Sowjanya Mudunuri"]
|
9
|
+
spec.authors = ["SocialChorus", "Kane Baccigalupi", "Fito von Zastrow", "Roy Pfaffman", "Sowjanya Mudunuri", "Bonnie Kwong"]
|
10
10
|
spec.email = ["developers@socialchorus.com"]
|
11
11
|
spec.description = %q{Cumuli runs several foreman processes in different directories}
|
12
12
|
spec.summary = %q{Cumuli makes SOA on Heroku easier by delegating to Foreman in a Procfile}
|
data/lib/cumuli.rb
CHANGED
@@ -6,7 +6,7 @@ module Cumuli
|
|
6
6
|
|
7
7
|
attr_reader :name, :database_config, :database_sample_config, :port, :path,
|
8
8
|
:repository, :type, :setup_scripts, :wait_time, :domain
|
9
|
-
|
9
|
+
|
10
10
|
def initialize(name, opts)
|
11
11
|
@name = name
|
12
12
|
|
@@ -50,12 +50,17 @@ module Cumuli
|
|
50
50
|
"http://#{domain}#{port ? ":#{port}" : ''}"
|
51
51
|
end
|
52
52
|
|
53
|
+
def full_path(partial_path)
|
54
|
+
partial_path.gsub!(/^\.\//, '')
|
55
|
+
"#{Dir.pwd}/#{partial_path}"
|
56
|
+
end
|
57
|
+
|
53
58
|
def database_sample_paths
|
54
|
-
database_sample_config.map { |config_path| "#{path}/#{config_path}" }
|
59
|
+
database_sample_config.map { |config_path| full_path("#{path}/#{config_path}") }
|
55
60
|
end
|
56
61
|
|
57
62
|
def database_config_paths
|
58
|
-
database_config.map { |config_path| "#{path}/#{config_path}" }
|
63
|
+
database_config.map { |config_path| full_path("#{path}/#{config_path}") }
|
59
64
|
end
|
60
65
|
|
61
66
|
def database_configured?(path)
|
@@ -70,7 +75,7 @@ module Cumuli
|
|
70
75
|
|
71
76
|
def write_database_config
|
72
77
|
database_config_paths.each_with_index do |config_path, i|
|
73
|
-
FileUtils.cp(database_sample_paths[i], config_path) unless
|
78
|
+
FileUtils.cp(database_sample_paths[i], config_path) unless database_configured?(config_path)
|
74
79
|
end
|
75
80
|
end
|
76
81
|
|
@@ -90,15 +95,21 @@ module Cumuli
|
|
90
95
|
system "git submodule add #{repository} #{path}" if repository
|
91
96
|
end
|
92
97
|
|
98
|
+
def run_command(command)
|
99
|
+
fork do
|
100
|
+
CLI::RemoteCommand.new([command, "DIR=#{path}"]).perform
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
93
104
|
def setup
|
94
105
|
# checkout master, because sometimes on setup no branch is
|
95
106
|
# checked out
|
96
|
-
|
107
|
+
run_command 'git checkout master'
|
97
108
|
|
98
109
|
write_database_config
|
99
110
|
|
100
111
|
setup_scripts.each do |script|
|
101
|
-
|
112
|
+
run_command script
|
102
113
|
end
|
103
114
|
end
|
104
115
|
end
|
@@ -11,6 +11,11 @@ namespace :cumuli do
|
|
11
11
|
task :config do
|
12
12
|
Cumuli::ProjectManager::Manager.new.setup_projects
|
13
13
|
end
|
14
|
+
|
15
|
+
desc "publish Procfile from projects.yml"
|
16
|
+
task :publish do
|
17
|
+
Cumuli::ProjectManager::Manager.new.publish
|
18
|
+
end
|
14
19
|
end
|
15
20
|
|
16
21
|
namespace :ps do
|
@@ -29,7 +34,7 @@ namespace :cumuli do
|
|
29
34
|
end
|
30
35
|
|
31
36
|
desc "kill the root process"
|
32
|
-
task :kill => ['cumuli:kill:root']
|
37
|
+
task :kill => ['cumuli:ps:kill:root']
|
33
38
|
|
34
39
|
namespace :int do
|
35
40
|
desc "interrupt all foreman related processes"
|
@@ -46,7 +51,7 @@ namespace :cumuli do
|
|
46
51
|
end
|
47
52
|
|
48
53
|
desc "interrupt the root process"
|
49
|
-
task :int => ['cumuli:int:root']
|
54
|
+
task :int => ['cumuli:ps:int:root']
|
50
55
|
end
|
51
56
|
|
52
57
|
desc "look at the list of foreman related processes"
|
data/lib/cumuli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cumuli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SocialChorus
|
@@ -9,6 +9,7 @@ authors:
|
|
9
9
|
- Fito von Zastrow
|
10
10
|
- Roy Pfaffman
|
11
11
|
- Sowjanya Mudunuri
|
12
|
+
- Bonnie Kwong
|
12
13
|
autorequire:
|
13
14
|
bindir: bin
|
14
15
|
cert_chain: []
|