capsum 1.0.0.alpha2 → 1.0.0
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 +4 -4
- data/CHANGELOG.md +3 -1
- data/capsum.gemspec +2 -2
- data/lib/capistrano/rsync.rb +24 -6
- data/lib/capsum.rb +2 -1
- data/lib/capsum/patch_sshkit_force_encoding_to_utf8.rb +11 -0
- data/lib/capsum/sidekiq.rb +4 -0
- data/lib/capsum/version.rb +2 -1
- metadata +9 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9d09e821480f7f9b5ffcf82f921efa2203413965
|
|
4
|
+
data.tar.gz: cde51a1f96345732f64130c113705c952e7aa4ad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ecd63e8b409392f367bdbe616967ef378db68d82571a65e1845ed82e9ed2a0c4610425a89a9b29ae79739ca26ba1746a7a64eb76a5cab47ce17f439826ce7cc2
|
|
7
|
+
data.tar.gz: 730f24325dacd811277e9e6e4a6dd60aeea2704ec51dc564e6e1b3bad86689da137bca5449f182616e54858de03f599f8a9ba792e4cdb1e5f4fd3cd7c7e4d311
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
## TODO:
|
|
2
2
|
|
|
3
3
|
## v1.0:
|
|
4
|
-
- upgrade capistrano to v3, v2 is not compatible
|
|
4
|
+
- upgrade capistrano to v3.2, v2 is not compatible
|
|
5
|
+
- monkey patch for sshkit to support non-ascii in command
|
|
6
|
+
- upgrade capistrano-sidekiq to 0.2.5
|
|
5
7
|
|
|
6
8
|
## v0.9:
|
|
7
9
|
- use the official whenever recipe
|
data/capsum.gemspec
CHANGED
|
@@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
|
|
|
19
19
|
spec.require_paths = ["lib"]
|
|
20
20
|
|
|
21
21
|
# Dependency Gems
|
|
22
|
-
spec.add_dependency "capistrano", "~> 3.
|
|
22
|
+
spec.add_dependency "capistrano", "~> 3.2.0"
|
|
23
23
|
# spec.add_dependency "capistrano-rsync", "~> 1.0.2" # broken, wait update
|
|
24
24
|
spec.add_dependency "capistrano-rails", "~> 1.1.1"
|
|
25
|
-
spec.add_development_dependency "capistrano-sidekiq",
|
|
25
|
+
spec.add_development_dependency "capistrano-sidekiq", Capsum::CAPISTRANO_SIDEKIQ_REQUIREMENT # optional
|
|
26
26
|
|
|
27
27
|
# spec.add_dependency "capistrano-helpers", "~> 0.7.1"
|
|
28
28
|
# spec.add_dependency "cap-recipes", "~> 0.3.36"
|
data/lib/capistrano/rsync.rb
CHANGED
|
@@ -60,14 +60,35 @@ namespace :rsync do
|
|
|
60
60
|
end
|
|
61
61
|
|
|
62
62
|
task :create_stage do
|
|
63
|
-
|
|
63
|
+
repo_url = fetch(:repo_url, ".")
|
|
64
|
+
deploy_cache_dir = fetch(:rsync_stage)
|
|
65
|
+
if File.directory?(deploy_cache_dir)
|
|
66
|
+
repo_url_changed = false
|
|
67
|
+
Dir.chdir deploy_cache_dir do
|
|
68
|
+
absolute_repo_url = File.absolute_path(repo_url)
|
|
69
|
+
absolute_cache_repo_url = File.absolute_path(`git config --get remote.origin.url`.chomp)
|
|
70
|
+
repo_url_changed = (absolute_repo_url != absolute_cache_repo_url)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
if repo_url_changed
|
|
74
|
+
run_locally { execute :rm, "-rf", deploy_cache_dir }
|
|
75
|
+
else
|
|
76
|
+
next
|
|
77
|
+
end
|
|
78
|
+
end
|
|
64
79
|
|
|
65
80
|
clone = %W[git clone]
|
|
66
|
-
clone <<
|
|
67
|
-
clone <<
|
|
81
|
+
clone << repo_url
|
|
82
|
+
clone << deploy_cache_dir
|
|
68
83
|
run_locally { execute *clone }
|
|
69
84
|
end
|
|
70
85
|
|
|
86
|
+
task :set_current_revision do
|
|
87
|
+
Dir.chdir fetch(:rsync_stage) do
|
|
88
|
+
set :current_revision, "#{`git rev-parse --short HEAD`}".chomp
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
71
92
|
desc "Stage the repository in a local directory."
|
|
72
93
|
task :stage => %w[create_stage] do
|
|
73
94
|
Dir.chdir fetch(:rsync_stage) do
|
|
@@ -76,9 +97,6 @@ namespace :rsync do
|
|
|
76
97
|
|
|
77
98
|
checkout = %W[git reset --hard origin/#{fetch(:branch)}]
|
|
78
99
|
run_locally { execute *checkout }
|
|
79
|
-
|
|
80
|
-
# PATCH https://github.com/moll/capistrano-rsync/pull/8
|
|
81
|
-
set :current_revision, "#{`git rev-parse --short HEAD`}".chomp
|
|
82
100
|
end
|
|
83
101
|
end
|
|
84
102
|
|
data/lib/capsum.rb
CHANGED
data/lib/capsum/sidekiq.rb
CHANGED
|
@@ -3,6 +3,10 @@ require "capsum/daemons"
|
|
|
3
3
|
|
|
4
4
|
begin
|
|
5
5
|
require 'capistrano/sidekiq'
|
|
6
|
+
unless Gem::Requirement.new(Capsum::CAPISTRANO_SIDEKIQ_REQUIREMENT) =~ Gem.loaded_specs["capistrano-sidekiq"].version
|
|
7
|
+
puts "ERROR: Could not find gem 'capistrano-sidekiq (#{Capsum::CAPISTRANO_SIDEKIQ_REQUIREMENT}) ruby' in the gems available on this machine."
|
|
8
|
+
exit 1
|
|
9
|
+
end
|
|
6
10
|
rescue LoadError
|
|
7
11
|
puts 'ERROR: If you want to use the "capsum/sidekiq". you must to add [ gem "capistrano-sidekiq", require: false ] to your Gemfile.'
|
|
8
12
|
exit 1
|
data/lib/capsum/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capsum
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.0
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- sunteya
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-04-
|
|
11
|
+
date: 2014-04-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: capistrano
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 3.2.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: 3.2.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: capistrano-rails
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -44,14 +44,14 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0.
|
|
47
|
+
version: 0.2.5
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 0.
|
|
54
|
+
version: 0.2.5
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: rake
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -103,6 +103,7 @@ files:
|
|
|
103
103
|
- lib/capsum/foundation.rb
|
|
104
104
|
- lib/capsum/git.rb
|
|
105
105
|
- lib/capsum/passenger.rb
|
|
106
|
+
- lib/capsum/patch_sshkit_force_encoding_to_utf8.rb
|
|
106
107
|
- lib/capsum/shared.rb
|
|
107
108
|
- lib/capsum/sidekiq.rb
|
|
108
109
|
- lib/capsum/typical.rb
|
|
@@ -123,9 +124,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
123
124
|
version: '0'
|
|
124
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
126
|
requirements:
|
|
126
|
-
- - "
|
|
127
|
+
- - ">="
|
|
127
128
|
- !ruby/object:Gem::Version
|
|
128
|
-
version:
|
|
129
|
+
version: '0'
|
|
129
130
|
requirements: []
|
|
130
131
|
rubyforge_project:
|
|
131
132
|
rubygems_version: 2.2.0
|