shopapp 0.2.17 → 0.2.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shopapp/tasks/shopapp.rake +20 -3
- data/shopapp.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 876cd7a6b9cbee9402cd690d1776cef227fb0c55896cdf6dcee6b64aac94bdaf
|
4
|
+
data.tar.gz: 1ec768685ecad0f93ed1fd5849dc6c5152beb6b83096c2fe5d1d5975d072aab8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6878e4cd64bc57d577f2d75e26abc7601d113a59618aee73f66075d3f08881d7155f4f19b8ca1b0bbbf63fd2ed3a15eb7669e2918d63797c1f464a083eac8870
|
7
|
+
data.tar.gz: d89d1edbf5f6f013590f4d407ec8385797dcdb31e65ed041a8b4760e7d831b54b7fda0dcb2b408dd4879658f7ee39b160ec87b8ccf59443e75b28fc9d115312e
|
@@ -2,17 +2,34 @@ namespace :shopapp do
|
|
2
2
|
desc 'pull prod db to local dev'
|
3
3
|
task pulldb: :environment do
|
4
4
|
timestamp = Time.now.strftime('%Y%m%d%H%M%S')
|
5
|
-
user = Rails.configuration.settings['production_dbuser'] ||
|
5
|
+
user = Rails.configuration.settings['production_dbuser'] || Rails.configuration.settings['production_user']
|
6
6
|
server = Rails.configuration.settings['production_dbserver'] || Rails.configuration.settings['production_server']
|
7
7
|
db_name = Rails.configuration.database_configuration['production']['database']
|
8
8
|
dev_db_name = Rails.configuration.database_configuration['development']['database']
|
9
9
|
dump_filename = "#{db_name}_#{timestamp}.dump"
|
10
10
|
|
11
|
-
puts "
|
11
|
+
puts "Creating production db backup to #{dump_filename}..."
|
12
12
|
system "ssh #{user}@#{server} 'pg_dump -Fc -c #{db_name} > #{dump_filename}'"
|
13
13
|
mkdir_p Rails.root.join('tmp')
|
14
|
+
puts "Copying to local..."
|
14
15
|
system "scp #{user}@#{server}:#{dump_filename} #{Rails.root.join('tmp')}"
|
16
|
+
puts "Restoring to local development database..."
|
15
17
|
system "pg_restore --verbose -c --dbname #{dev_db_name} #{Rails.root.join('tmp', dump_filename)}"
|
16
|
-
puts 'Restored production database to local'
|
18
|
+
puts 'Restored production database to local development.'
|
19
|
+
end
|
20
|
+
|
21
|
+
desc 'execute command on production server'
|
22
|
+
task run: :environment do
|
23
|
+
ARGV.each { |a| task a.to_sym do ; end }
|
24
|
+
user = Rails.configuration.settings['production_user']
|
25
|
+
server = Rails.configuration.settings['production_server']
|
26
|
+
|
27
|
+
deployment_folder_name = (Rails.configuration.settings['deployment_folder']) ||
|
28
|
+
"#{(Rails.configuration.settings['shopapp_name'] ||
|
29
|
+
Rails.application.class.parent_name).to_s.downcase.parameterize.underscore}/current"
|
30
|
+
|
31
|
+
cmd = %(ssh -t #{user}@#{server} 'cd #{deployment_folder_name}; bash --login -c "#{ARGV[1..-1].join(' ')}"')
|
32
|
+
#puts cmd
|
33
|
+
exec cmd
|
17
34
|
end
|
18
35
|
end
|
data/shopapp.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'shopapp'
|
3
|
-
s.version = '0.2.
|
4
|
-
s.date = '2019-01-
|
3
|
+
s.version = '0.2.18'
|
4
|
+
s.date = '2019-01-07'
|
5
5
|
s.summary = 'Do a shoplift.'
|
6
6
|
s.description = 'Ha! Art thou Bedlam? Dost thou thirst base Trojan, to have me fold up Parca\'s fatal web? Hence!\
|
7
7
|
I am qualmish at the smell of leek.'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zeljko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|