magic_recipes 0.0.27 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/git_cap +8 -4
- data/bin/git_cap_old +35 -0
- data/lib/magic_recipes/rvm.rb +12 -1
- metadata +2 -1
data/bin/git_cap
CHANGED
@@ -13,22 +13,26 @@ spawn cap deploy
|
|
13
13
|
match_max 100000
|
14
14
|
|
15
15
|
# Look for user prompt
|
16
|
-
expect "*?sername:*"
|
16
|
+
# expect "*?sername:*"
|
17
|
+
expect "*?sername for 'https://github.com':*"
|
17
18
|
send -- "$g_user\r"
|
18
19
|
send -- "\r"
|
19
20
|
|
20
21
|
# Look for passwod prompt
|
21
|
-
expect "*?assword:*"
|
22
|
+
# expect "*?assword:*"
|
23
|
+
expect "*?assword for *@github.com':*"
|
22
24
|
send -- "$g_pwd\r"
|
23
25
|
send -- "\r"
|
24
26
|
|
25
27
|
# Look for user prompt
|
26
|
-
expect "*?sername:*"
|
28
|
+
# expect "*?sername:*"
|
29
|
+
expect "*?sername for 'https://github.com':*"
|
27
30
|
send -- "$g_user\r"
|
28
31
|
send -- "\r"
|
29
32
|
|
30
33
|
# Look for passwod prompt
|
31
|
-
expect "*?assword:*"
|
34
|
+
# expect "*?assword:*"
|
35
|
+
expect "*?assword for *@github.com':*"
|
32
36
|
send -- "$g_pwd\r"
|
33
37
|
send -- "\r"
|
34
38
|
|
data/bin/git_cap_old
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
#!/usr/bin/expect -f
|
2
|
+
# Expect script to supply username/password to cap deploy to git private repository
|
3
|
+
# This script needs username and password as arguments to connect to git server:
|
4
|
+
# ------------------------------------------------------------------------
|
5
|
+
# ./git_cap gitusr gitpwd
|
6
|
+
# -------------------------------------------------------------------------
|
7
|
+
# set Variables
|
8
|
+
set g_user [lrange $argv 0 0]
|
9
|
+
set g_pwd [lrange $argv 1 1]
|
10
|
+
set timeout -1
|
11
|
+
|
12
|
+
spawn cap deploy
|
13
|
+
match_max 100000
|
14
|
+
|
15
|
+
# Look for user prompt
|
16
|
+
expect "*?sername:*"
|
17
|
+
send -- "$g_user\r"
|
18
|
+
send -- "\r"
|
19
|
+
|
20
|
+
# Look for passwod prompt
|
21
|
+
expect "*?assword:*"
|
22
|
+
send -- "$g_pwd\r"
|
23
|
+
send -- "\r"
|
24
|
+
|
25
|
+
# Look for user prompt
|
26
|
+
expect "*?sername:*"
|
27
|
+
send -- "$g_user\r"
|
28
|
+
send -- "\r"
|
29
|
+
|
30
|
+
# Look for passwod prompt
|
31
|
+
expect "*?assword:*"
|
32
|
+
send -- "$g_pwd\r"
|
33
|
+
send -- "\r"
|
34
|
+
|
35
|
+
expect eof
|
data/lib/magic_recipes/rvm.rb
CHANGED
@@ -19,13 +19,24 @@ module MagicRecipes
|
|
19
19
|
|
20
20
|
## change to rvm-capistrano gem, so commited out
|
21
21
|
# $:.unshift(File.expand_path('./lib', ENV['rvm_path']))
|
22
|
-
|
22
|
+
require 'rvm/capistrano'
|
23
|
+
|
24
|
+
|
25
|
+
Example:
|
26
|
+
|
27
|
+
# set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"")
|
28
|
+
# set :rvm_install_ruby_params, '--1.9' # for jruby/rbx default to 1.9 mode
|
29
|
+
|
30
|
+
# before 'deploy:setup', 'rvm:install_rvm' # install RVM
|
31
|
+
# before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, or:
|
32
|
+
# before 'deploy:setup', 'rvm:create_gemset' # only create gemset
|
23
33
|
|
24
34
|
set_default :rails_env, 'production'
|
25
35
|
set_default :rvm_ruby, '1.9.3'
|
26
36
|
set_default :rvm_patch, 'p0'
|
27
37
|
set_default :rvm_gemset, 'global'
|
28
38
|
set_default :rvm_path, '/usr/local/rvm'
|
39
|
+
|
29
40
|
# set :rvm_type, :system
|
30
41
|
set :rvm_type, :user
|
31
42
|
set :rvm_ruby_string, "ruby-#{rvm_ruby}-#{rvm_patch}@#{rvm_gemset}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magic_recipes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.28
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -197,6 +197,7 @@ extra_rdoc_files: []
|
|
197
197
|
files:
|
198
198
|
- bin/g_cap
|
199
199
|
- bin/git_cap
|
200
|
+
- bin/git_cap_old
|
200
201
|
- lib/generators/magic_recipes/capify_generator.rb
|
201
202
|
- lib/generators/magic_recipes/git_cap_generator.rb
|
202
203
|
- lib/generators/magic_recipes/templates/Capfile.tt
|