capistrano_sentinel 0.0.1 → 0.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a85bc5bd4389a2201db6f894977fac6ba3e68916
|
4
|
+
data.tar.gz: e0652f5af4dc2f02d429ac92ff1b02f7972405cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e95267d93ce0d3994d2582215c2e3b51e6950be605eca8c0864e68a9e0a0b4fe4e57f02743aedb125747e1a1519903e8354ec4754a2e582e47d887f1464f745a
|
7
|
+
data.tar.gz: b35e2427ae68a052335967816f38d6dcc82fa0eceb4207fc846a6590c36f662c5f11bebdffb58e4bcd83d421f763c5291556b96d8d82425e900f9d1776935099
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
require 'bundler/setup'
|
4
|
+
|
5
|
+
require 'base64'
|
6
|
+
require 'socket'
|
7
|
+
require 'fileutils'
|
8
|
+
require 'json'
|
9
|
+
require 'uri'
|
10
|
+
require 'digest/md5'
|
11
|
+
require 'openssl'
|
12
|
+
require 'forwardable'
|
13
|
+
require 'thread'
|
14
|
+
require 'monitor'
|
15
|
+
require 'logger'
|
16
|
+
|
17
|
+
require 'websocket'
|
18
|
+
require_relative './classes/gem_finder'
|
19
|
+
|
20
|
+
%w(initializers helpers classes).each do |folder_name|
|
21
|
+
Gem.find_files("#{CapistranoSentinel::GemFinder.get_current_gem_name}/#{folder_name}/**/*.rb").each { |path| require path }
|
22
|
+
end
|
23
|
+
|
24
|
+
if !CapistranoSentinel::GemFinder.value_blank?(ENV[CapistranoSentinel::RequestHooks::ENV_KEY_JOB_ID]) && CapistranoSentinel::GemFinder.fetch_gem_version('capistrano')
|
25
|
+
if CapistranoSentinel::GemFinder.capistrano_version_2?
|
26
|
+
require_relative './patches/capistrano2'
|
27
|
+
else
|
28
|
+
require_relative './patches/rake'
|
29
|
+
end
|
30
|
+
end
|
@@ -3,6 +3,22 @@ module CapistranoSentinel
|
|
3
3
|
class GemFinder
|
4
4
|
class << self
|
5
5
|
|
6
|
+
def get_current_gem_name
|
7
|
+
searcher = if Gem::Specification.respond_to? :find
|
8
|
+
# ruby 2.0
|
9
|
+
Gem::Specification
|
10
|
+
elsif Gem.respond_to? :searcher
|
11
|
+
# ruby 1.8/1.9
|
12
|
+
Gem.searcher.init_gemspecs
|
13
|
+
end
|
14
|
+
spec = unless searcher.nil?
|
15
|
+
searcher.find do |spec|
|
16
|
+
File.fnmatch(File.join(spec.full_gem_path,'*'), __FILE__)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
spec.name unless value_blank?(spec)
|
20
|
+
end
|
21
|
+
|
6
22
|
def capistrano_version_2?
|
7
23
|
cap_version = fetch_gem_version('capistrano')
|
8
24
|
value_blank?(cap_version) ? false : verify_gem_version(cap_version, '3.0', operator: '<')
|
data/lib/capistrano_sentinel.rb
CHANGED
@@ -1,36 +1 @@
|
|
1
|
-
require '
|
2
|
-
require 'bundler'
|
3
|
-
require 'bundler/setup'
|
4
|
-
|
5
|
-
require 'base64'
|
6
|
-
require 'socket'
|
7
|
-
require 'fileutils'
|
8
|
-
require 'json'
|
9
|
-
require 'uri'
|
10
|
-
require 'digest/md5'
|
11
|
-
require 'openssl'
|
12
|
-
require 'forwardable'
|
13
|
-
require 'thread'
|
14
|
-
require 'monitor'
|
15
|
-
|
16
|
-
require 'websocket'
|
17
|
-
|
18
|
-
require_relative './capistrano_sentinel/classes/gem_finder'
|
19
|
-
|
20
|
-
Gem.find_files('capistrano_sentinel/initializers/active_support/**/*.rb').each { |path| require path }
|
21
|
-
|
22
|
-
Gem.find_files('capistrano_sentinel/initializers/core_ext/**/*.rb').each { |path| require path }
|
23
|
-
Gem.find_files('capistrano_sentinel/helpers/**/*.rb').each { |path| require path }
|
24
|
-
Gem.find_files('capistrano_sentinel/classes/**/*.rb').each { |path| require path }
|
25
|
-
|
26
|
-
if CapistranoSentinel::GemFinder.fetch_gem_version('bundler')
|
27
|
-
require_relative './capistrano_sentinel/patches/bundler'
|
28
|
-
end
|
29
|
-
|
30
|
-
if CapistranoSentinel::GemFinder.fetch_gem_version('rake')
|
31
|
-
require_relative './capistrano_sentinel/patches/rake'
|
32
|
-
end
|
33
|
-
|
34
|
-
if CapistranoSentinel::GemFinder.capistrano_version_2?
|
35
|
-
require_relative './capistrano_sentinel/patches/capistrano2'
|
36
|
-
end
|
1
|
+
require 'capistrano_sentinel/all'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano_sentinel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bogdanRada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: websocket
|
@@ -37,6 +37,7 @@ files:
|
|
37
37
|
- Rakefile
|
38
38
|
- capistrano_sentinel.gemspec
|
39
39
|
- lib/capistrano_sentinel.rb
|
40
|
+
- lib/capistrano_sentinel/all.rb
|
40
41
|
- lib/capistrano_sentinel/classes/gem_finder.rb
|
41
42
|
- lib/capistrano_sentinel/classes/input_stream.rb
|
42
43
|
- lib/capistrano_sentinel/classes/output_stream.rb
|
@@ -49,7 +50,6 @@ files:
|
|
49
50
|
- lib/capistrano_sentinel/helpers/logging.rb
|
50
51
|
- lib/capistrano_sentinel/initializers/active_support/blank.rb
|
51
52
|
- lib/capistrano_sentinel/initializers/active_support/hash_keys.rb
|
52
|
-
- lib/capistrano_sentinel/patches/bundler.rb
|
53
53
|
- lib/capistrano_sentinel/patches/capistrano2.rb
|
54
54
|
- lib/capistrano_sentinel/patches/rake.rb
|
55
55
|
- lib/capistrano_sentinel/version.rb
|
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
76
|
rubyforge_project:
|
77
|
-
rubygems_version: 2.4
|
77
|
+
rubygems_version: 2.6.4
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: '"capistrano_sentinel"'
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module Bundler
|
2
|
-
module UI
|
3
|
-
class Shell
|
4
|
-
alias_method :original_tell_me, :tell_me
|
5
|
-
|
6
|
-
def tell_me(msg, color = nil, newline = nil)
|
7
|
-
rake = CapistranoSentinel::RequestHooks.new(msg)
|
8
|
-
rake.show_bundler_progress do
|
9
|
-
original_tell_me(msg, color, newline)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
class << self
|
17
|
-
|
18
|
-
def root=(path)
|
19
|
-
@root = path
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|