weapon 0.1.4 → 0.1.6

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/weapon.rb +12 -8
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e41f3b41099196ae19a48053b50d6ced363bb798
4
- data.tar.gz: 7a4e95b893d4d6f886107d0de647530da14cdd51
3
+ metadata.gz: 46e089d53f603cc8fa32d4f3778925386691355e
4
+ data.tar.gz: d279941fd0cec2fb7ced2a7016caff987e92ffe7
5
5
  SHA512:
6
- metadata.gz: 4176ce495905bd7756f644a8e661a086db698e17ae06c550bcc6ff9ee38e071b375e6f1ad200f32e8872a1723f2b0c70a7c5f346487bbe681075b7ca37ccfade
7
- data.tar.gz: 9d6fd074e7f608318313b7112572aa0b261d2edfd0d709597c085e8e8a1882fd8f1486bd8f0a06d9497378d3462fe374cd9850fd003f8eb0b92e6b5541d27965
6
+ metadata.gz: 77a5fe320058b05aef9c4d1d054dd7d53a5de7a0357c515da845c0333644a72226af63a348a5ba84e918969308d1888b6e2d4f3f6c60686e1bd9abf351d3a576
7
+ data.tar.gz: daa5e793b2367c7ef112d4e5933721639fbcecab39fb3a820fa57749ca11cc9733a50ccbf4e0d39f1005e4294fd982bd9fae827ed4fa3abea04b278ae1eba266
data/lib/weapon.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'thor'
2
2
  require 'awesome_print'
3
+ require 'colorize'
3
4
  require 'rails'
4
5
  require 'rails/generators/actions'
5
6
  require 'fileutils'
@@ -81,25 +82,28 @@ class Weapon < Thor
81
82
  run setup_staging_dir_command
82
83
 
83
84
 
84
- run 'scp config/database.yml ' + username + '@' + domain + ':' + deploy_directory + '/shared/config/'
85
- run 'scp config/application.yml ' + username + '@' + domain + ':' + deploy_directory + '/shared/config/'
86
- run 'scp config/secrets.yml ' + username + '@' + domain + ':' + deploy_directory + '/shared/config/'
87
-
88
- run 'scp config/database.yml ' + username + '@' + domain + ':' + deploy_directory + '_staging/shared/config/'
89
- run 'scp config/application.yml ' + username + '@' + domain + ':' + deploy_directory + '_staging/shared/config/'
90
- run 'scp config/secrets.yml ' + username + '@' + domain + ':' + deploy_directory + '_staging/shared/config/'
91
-
92
85
  #run 'scp unicorn-nginx.conf ' + username + '@' + domain + ':' + "/etc/nginx/sites-enabled/#{app_name}.conf"
93
86
  =begin
94
87
  run "git clone https://github.com/sstephenson/rbenv.git ~/.rbenv"
95
88
  run "echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc"
96
89
  run "echo 'eval "$(rbenv init -)"' >> ~/.zshrc"
97
90
  =end
91
+ run "ssh-copy-id #{username}@#{domain}"
98
92
 
99
93
  run 'mina setup'
94
+
95
+ run 'scp config/database.yml ' + username + '@' + domain + ':' + deploy_directory + '/shared/config/'
96
+ run 'scp config/application.yml ' + username + '@' + domain + ':' + deploy_directory + '/shared/config/'
97
+ run 'scp config/secrets.yml ' + username + '@' + domain + ':' + deploy_directory + '/shared/config/'
98
+
99
+ run 'scp config/database.yml ' + username + '@' + domain + ':' + deploy_directory + '_staging/shared/config/'
100
+ run 'scp config/application.yml ' + username + '@' + domain + ':' + deploy_directory + '_staging/shared/config/'
101
+ run 'scp config/secrets.yml ' + username + '@' + domain + ':' + deploy_directory + '_staging/shared/config/'
102
+
100
103
  run 'mina deploy'
101
104
  puts "remember to make soft link to unicorn-nginx.conf && staging-unicorn-nginx.conf".colorize(:blue)
102
105
  puts "remember to restart nginx server".colorize(:blue)
106
+ puts "remember to add ssh key to your repo setting url".colorize(:blue)
103
107
  end
104
108
 
105
109
  desc "setup_settings_ui", "setup settings ui"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weapon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - seaify