rumination 0.12.12 → 0.12.13
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/lib/rumination/deploy/class_methods.rb +2 -2
- data/lib/rumination/tasks/deploy.rake +21 -7
- data/lib/rumination/version.rb +1 -1
- data/lib/rumination.rb +12 -2
- 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: d9b62a14a8e881d50577eb3271f601d48b170649
|
4
|
+
data.tar.gz: 3518ef2c808e7e8d6e9c4f82e6048eddfa81d0c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b172d181638946f12b527fddc71d5fa756562692bd56a3ccd5418b500dd9ace70616d75bcd21ccc12e6e0e4068c8a9f13797471fd51220bf9ec3afcb9fecd593
|
7
|
+
data.tar.gz: eadf29336de5e1341536943c15dcfdcf5d1306466db95b16b89347ae0c65dba3cb9ab750288bcea2f2319145a50ad9d82f3fb6813d56cb8c772e1d6d6e452028
|
@@ -9,8 +9,8 @@ module Rumination
|
|
9
9
|
dm_env_str = `docker-machine env #{config.docker_machine}`
|
10
10
|
env = env.merge(Dotenv::Parser.call(dm_env_str))
|
11
11
|
end
|
12
|
-
env["COMPOSE_FILE"]
|
13
|
-
env["VIRTUAL_HOST"]
|
12
|
+
env["COMPOSE_FILE"] &&= config.compose_file
|
13
|
+
env["VIRTUAL_HOST"] &&= config.virtual_host
|
14
14
|
if config.letsencrypt_email.present?
|
15
15
|
env["LETSENCRYPT_HOST"] = config.virtual_host
|
16
16
|
env["LETSENCRYPT_EMAIL"] = config.letsencrypt_email
|
@@ -1,10 +1,27 @@
|
|
1
1
|
task :deploy, [:target] => "deploy:default"
|
2
2
|
|
3
|
+
module WithHashPuts
|
4
|
+
refine Object do
|
5
|
+
def puts *args
|
6
|
+
print "# "
|
7
|
+
Kernel.puts *args
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
3
12
|
namespace :deploy do
|
4
|
-
task :env, [:target] =>
|
13
|
+
task :env, [:target] => :load_target_config_filterd do |t, args|
|
14
|
+
puts
|
5
15
|
Rumination::Deploy.docker_env.each do |var, val|
|
6
16
|
puts %Q[export #{var}="#{val}"]
|
7
17
|
end
|
18
|
+
puts <<-__
|
19
|
+
|
20
|
+
# to load this into a bash environment run:
|
21
|
+
#
|
22
|
+
# eval $(rake deploy:env[#{Rumination::Deploy.target}])
|
23
|
+
|
24
|
+
__
|
8
25
|
end
|
9
26
|
|
10
27
|
task :default, [:target] => :setup_docker_env do |t, args|
|
@@ -24,12 +41,9 @@ namespace :deploy do
|
|
24
41
|
Rumination::Deploy.load_target_config args.target
|
25
42
|
end
|
26
43
|
|
27
|
-
task :
|
28
|
-
|
29
|
-
|
30
|
-
print "# "
|
31
|
-
old_puts *args
|
32
|
-
end
|
44
|
+
task :load_target_config_filterd, [:target] do |t, args|
|
45
|
+
using WithHashPuts
|
46
|
+
Rake::Task["deploy:load_target_config"].invoke args.target
|
33
47
|
end
|
34
48
|
|
35
49
|
namespace :bootstrap do
|
data/lib/rumination/version.rb
CHANGED
data/lib/rumination.rb
CHANGED
@@ -9,6 +9,16 @@ require_relative "rumination/version"
|
|
9
9
|
require_relative "rumination/dev_user"
|
10
10
|
require_relative "rumination/pg"
|
11
11
|
|
12
|
-
Rumination
|
13
|
-
|
12
|
+
module Rumination
|
13
|
+
def self.factory_reset
|
14
|
+
config.clear
|
15
|
+
if defined? Rumination::Deploy
|
16
|
+
Rumination::Deploy.config.clear
|
17
|
+
end
|
18
|
+
configure do |config|
|
19
|
+
config.pg = Rumination::Pg.config
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
factory_reset
|
14
24
|
end
|