inploy 1.6.6 → 1.6.7
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.
- data/Rakefile +1 -1
- data/lib/inploy/deploy.rb +9 -6
- data/lib/inploy/dsl.rb +4 -0
- data/lib/inploy/helper.rb +13 -1
- data/lib/inploy/templates/rails3.rb +2 -17
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/inploy/deploy.rb
CHANGED
@@ -38,12 +38,7 @@ module Inploy
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def remote_setup
|
41
|
-
|
42
|
-
checkout = ""
|
43
|
-
else
|
44
|
-
checkout = "&& $(git branch | grep -vq #{branch}) && git checkout -f -b #{branch} origin/#{branch}"
|
45
|
-
end
|
46
|
-
remote_run "cd #{path} && #{@sudo}git clone --depth 1 #{repository} #{application} && cd #{application} #{checkout} && #{@sudo}rake inploy:local:setup environment=#{environment}#{skip_steps_cmd}"
|
41
|
+
remote_run "cd #{path} && #{@sudo}git clone --depth 1 #{repository} #{application} && cd #{application} #{checkout}#{bundle} && #{@sudo}rake inploy:local:setup environment=#{environment}#{skip_steps_cmd}"
|
47
42
|
end
|
48
43
|
|
49
44
|
def local_setup
|
@@ -77,6 +72,14 @@ module Inploy
|
|
77
72
|
|
78
73
|
private
|
79
74
|
|
75
|
+
def checkout
|
76
|
+
branch.eql?("master") ? "" : "&& $(git branch | grep -vq #{branch}) && git checkout -f -b #{branch} origin/#{branch}"
|
77
|
+
end
|
78
|
+
|
79
|
+
def bundle
|
80
|
+
" && #{bundle_cmd}" if using_bundler?
|
81
|
+
end
|
82
|
+
|
80
83
|
def after_update_code
|
81
84
|
run "git submodule update --init"
|
82
85
|
copy_sample_files
|
data/lib/inploy/dsl.rb
CHANGED
data/lib/inploy/helper.rb
CHANGED
@@ -52,8 +52,20 @@ module Inploy
|
|
52
52
|
`rake -T`
|
53
53
|
end
|
54
54
|
|
55
|
+
def bundle_cmd
|
56
|
+
"bundle install ~/.bundle --without development test"
|
57
|
+
end
|
58
|
+
|
59
|
+
def bundle_install
|
60
|
+
run bundle_cmd
|
61
|
+
end
|
62
|
+
|
55
63
|
def install_gems
|
56
|
-
|
64
|
+
if using_bundler?
|
65
|
+
bundle_install
|
66
|
+
else
|
67
|
+
rake "gems:install RAILS_ENV=#{environment}" unless skip_step?('install_gems')
|
68
|
+
end
|
57
69
|
end
|
58
70
|
|
59
71
|
def update_crontab
|
@@ -1,23 +1,8 @@
|
|
1
1
|
module Inploy
|
2
2
|
module Templates
|
3
3
|
module Rails3
|
4
|
-
def
|
5
|
-
|
6
|
-
checkout = ""
|
7
|
-
else
|
8
|
-
checkout = "&& $(git branch | grep -vq #{branch}) && git checkout -f -b #{branch} origin/#{branch}"
|
9
|
-
end
|
10
|
-
remote_run "cd #{path} && #{@sudo}git clone --depth 1 #{repository} #{application} && cd #{application} #{checkout} && bundle install ~/.bundle && #{@sudo}rake inploy:local:setup environment=#{environment}"
|
11
|
-
end
|
12
|
-
|
13
|
-
def install_gems
|
14
|
-
run bundle
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def bundle
|
20
|
-
"bundle install ~/.bundle"
|
4
|
+
def using_bundler?
|
5
|
+
true
|
21
6
|
end
|
22
7
|
end
|
23
8
|
end
|