prun-ops 0.0.17 → 0.0.18

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: 94e18afe5052e69899db1708170b24a54a2ea66c
4
- data.tar.gz: 6217454fbb2975c551f4ee06b140d18e7c147b75
3
+ metadata.gz: 4bf7ab5eb0436e0b2172f4e69cfb4ffccc9ec08e
4
+ data.tar.gz: e71c684761e0b9d2594ec4c38354156d67c4c724
5
5
  SHA512:
6
- metadata.gz: efd2a8b0d71fe91ec5e044e8d8364e89bd4991e66bd01726208b450262029f0dfc4fed8fdda659ee4526f3bf4b50388cf55af7f151ade35b15644404ac727692
7
- data.tar.gz: 5401139f2f560abd2008104fca4924346e2b3b39b4d89c14a825b41afaf3c93870b21e6c0949dc46fbb6ab71f6718a36d98005d380326fb092e4d801a717d93f
6
+ metadata.gz: 93e0750f2dcf74661c8252e1049bbe9e04ade58d02b145fc0af84abd86f3526b1bce8fccaa39a8c38c8879de9a922c78438d1f717e450082118c59e0fb919c8c
7
+ data.tar.gz: b759be2e9ac7b6e51e8601c813dc9a62cc7ba75a8f9291ed3c83bec8d08bbd9ed4187b5385f6ea948f9efb1a8abf9b47c1974def22a816e2ea6cfc373a8c69f4
data/README.md CHANGED
@@ -64,6 +64,16 @@ Note: Remember change this line in production.rb file: `config.assets.compile =
64
64
  * `cap [stg] deploy:stop` stop thin server
65
65
  * `cap [stg] deploy:start` start thin server
66
66
  * `cap [stg] db:setup` load schema and seeds for first DB setup
67
+ * `cap [stg] git:remove_repo` Removes repo (useful when repo_url changes)
68
+
69
+ Added the possibility of deploying from local repository. Add to `deploy.rb` or `[stg].rb` files:
70
+
71
+ ```
72
+ before :deploy, "git:deploy_from_local_repo"
73
+ ```
74
+
75
+ Take care to remove the previous repo if you are changing the :repo_url : `cap [stg] git:remove_repo`
76
+
67
77
 
68
78
  ### Backup
69
79
 
@@ -27,17 +27,4 @@ namespace :db do
27
27
  end
28
28
  end
29
29
  end
30
- end
31
-
32
- namespace :git do
33
- desc 'Git pull for common code project'
34
- task :pull_common do
35
- on roles(:app) do
36
- within "/var/www/common" do
37
- execute :git, :pull, :origin, :master
38
- end if test("[ -d /var/www/common ]")
39
- end
40
- end
41
-
42
- after "deploy:updating", "git:pull_common"
43
- end
30
+ end
@@ -0,0 +1,31 @@
1
+ namespace :git do
2
+ desc 'Git pull for common code project'
3
+ task :pull_common do
4
+ on roles(:app) do
5
+ within "/var/www/common" do
6
+ execute :git, :pull, :origin, :master
7
+ end if test("[ -d /var/www/common ]")
8
+ end
9
+ end
10
+ after "deploy:updating", "git:pull_common"
11
+
12
+ desc 'Deploy from local git repository'
13
+ task :deploy_from_local_repo do
14
+ set :repo_url, "file:///tmp/.git"
15
+ run_locally do
16
+ execute "tar -zcvf /tmp/repo.tgz .git"
17
+ end
18
+ on roles(:all) do
19
+ upload! '/tmp/repo.tgz', '/tmp/repo.tgz'
20
+ execute 'tar -zxvf /tmp/repo.tgz -C /tmp'
21
+ end
22
+ end
23
+
24
+ desc 'Removes repo (useful when repo_url changes)'
25
+ task :remove_repo do
26
+ on roles(:all) do
27
+ execute "rm -r #{repo_path}"
28
+ end
29
+ end
30
+
31
+ end
@@ -1,3 +1,3 @@
1
1
  module PrunOps
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prun-ops
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Lebrijo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-09 00:00:00.000000000 Z
11
+ date: 2015-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,6 +97,7 @@ files:
97
97
  - lib/capistrano/all.rake
98
98
  - lib/capistrano/backup.rake
99
99
  - lib/capistrano/diagnosis.rake
100
+ - lib/capistrano/git.rake
100
101
  - lib/capistrano/prun-ops.rb
101
102
  - lib/capistrano/pull.rake
102
103
  - lib/prun-ops.rb