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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb2eff90ce84762e22035343307ebbb40a348c63
4
- data.tar.gz: a1a91d4909b13e0169c0490acd25182bd3946ee7
3
+ metadata.gz: d9b62a14a8e881d50577eb3271f601d48b170649
4
+ data.tar.gz: 3518ef2c808e7e8d6e9c4f82e6048eddfa81d0c4
5
5
  SHA512:
6
- metadata.gz: 4d24bf02e175ad4368307a41094de0ccf347d94eed6329a3137d024be7a3f70a4580df4457436a2d06c4ee39cff47f4fddaae8d519fd33c398e4035d06c788c0
7
- data.tar.gz: 0f94f2f118ec84f22a46237b9eeba3e1b9b1ff6a2123f0351204fd82ebc3fd76e1e29c77558e75d3fee27a409e801a88517fd90f9cae30518616dac9da5e5f4a
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"] = config.compose_file if config.compose_file
13
- env["VIRTUAL_HOST"] = config.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] => [:puts_comments, :load_target_config] do |t, args|
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 :puts_comments do
28
- alias_method :old_puts, :puts
29
- def puts *args
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
@@ -1,3 +1,3 @@
1
1
  module Rumination
2
- VERSION = "0.12.12"
2
+ VERSION = "0.12.13"
3
3
  end
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.configure do |config|
13
- config.pg = Rumination::Pg.config
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rumination
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.12
4
+ version: 0.12.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Baguinski