locum 0.1.0 → 0.1.1
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/lib/locum/cap.rb +11 -0
- data/lib/locum/cli.rb +1 -19
- data/lib/locum/console.rb +25 -0
- data/lib/locum/version.rb +1 -1
- data/templates/deploy.erb +3 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3be7e2b712cb891b3dbf406e93c4da186d93cbef
|
|
4
|
+
data.tar.gz: 7d2d1cf91969ed80af532c25cd447b4a67624f4c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 87c1de1b07d00e21531db9c300fa0cdecdd5c2350102f09da14fa0f2939b223ca0b60fa1755afdeef42bda87adc3803a9ced752038c7b7a8957d2e57d57a7c28
|
|
7
|
+
data.tar.gz: 52fa6dec6d157bd1a55dd76727f82cd665d710b887c3fc0d8d2e3ece0520c849de1fe6ab322096e8a1dcdaaa0665cc6b43d1190fb17a971b0d2a422e26fe7f65
|
data/lib/locum/cap.rb
CHANGED
|
@@ -37,5 +37,16 @@ module Locum
|
|
|
37
37
|
def ssh_key
|
|
38
38
|
Locum::CLI.start(['ssh_key', 'add'])
|
|
39
39
|
end
|
|
40
|
+
|
|
41
|
+
def notify
|
|
42
|
+
cn.say <<EOFBLOCK
|
|
43
|
+
|
|
44
|
+
Для проекта создана конфигурация Capistrano и настроен деплой для
|
|
45
|
+
окружения locum. Проверьте версию ruby в файле <%= color('config/deploy.rb', BOLD) %>
|
|
46
|
+
и используйте <%= color('cap locum deploy', BOLD) %> для выкладки изменений на сервер.
|
|
47
|
+
|
|
48
|
+
EOFBLOCK
|
|
49
|
+
end
|
|
50
|
+
|
|
40
51
|
end
|
|
41
52
|
end
|
data/lib/locum/cli.rb
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
require 'thor'
|
|
3
|
-
require 'highline/import'
|
|
4
3
|
require 'locum'
|
|
5
4
|
|
|
6
5
|
module Locum
|
|
@@ -97,21 +96,4 @@ EOFBLOCK
|
|
|
97
96
|
|
|
98
97
|
end
|
|
99
98
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
def display_error e
|
|
103
|
-
cn = HighLine.new
|
|
104
|
-
cn.say("\n<%= color('Произошла ошибка:', RED) %> #{e.message}")
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
def cn
|
|
108
|
-
@cn ||= HighLine.new
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
def s_out(s)
|
|
112
|
-
cn.say("\n<%= color('->', GREEN) %> #{s}")
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
def s_in(s)
|
|
116
|
-
cn.say("<%= color('<-', CYAN) %> #{s}")
|
|
117
|
-
end
|
|
99
|
+
include Locum::Console
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
require 'highline/import'
|
|
3
|
+
|
|
4
|
+
module Locum
|
|
5
|
+
module Console
|
|
6
|
+
private
|
|
7
|
+
|
|
8
|
+
def display_error e
|
|
9
|
+
cn = HighLine.new
|
|
10
|
+
cn.say("\n<%= color('Произошла ошибка:', RED) %> #{e.message}")
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def cn
|
|
14
|
+
@cn ||= HighLine.new
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def s_out(s)
|
|
18
|
+
cn.say("\n<%= color('->', GREEN) %> #{s}")
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def s_in(s)
|
|
22
|
+
cn.say("<%= color('<-', CYAN) %> #{s}")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
data/lib/locum/version.rb
CHANGED
data/templates/deploy.erb
CHANGED
|
@@ -38,11 +38,13 @@ set :linked_dirs, %w(bin log tmp/cache vendor/bundle public/system)
|
|
|
38
38
|
# Default value for keep_releases is 5
|
|
39
39
|
# set :keep_releases, 5
|
|
40
40
|
|
|
41
|
+
# Configure RVM
|
|
42
|
+
set :rvm_ruby_version, '2.2'
|
|
43
|
+
|
|
41
44
|
# You unlikely have to change below this line
|
|
42
45
|
# -----------------------------------------------------------------------------
|
|
43
46
|
|
|
44
47
|
# Configure RVM
|
|
45
|
-
set :rvm_ruby_version, '2.1.5'
|
|
46
48
|
set :rake, "rvm use #{fetch(:rvm_ruby_version)} do bundle exec rake"
|
|
47
49
|
set :bundle_cmd, "rvm use #{fetch(:rvm_ruby_version)} do bundle"
|
|
48
50
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: locum
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vasily Shmelev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-10-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -130,6 +130,7 @@ files:
|
|
|
130
130
|
- lib/locum/cli.rb
|
|
131
131
|
- lib/locum/config.rb
|
|
132
132
|
- lib/locum/config_builder.rb
|
|
133
|
+
- lib/locum/console.rb
|
|
133
134
|
- lib/locum/hosting_unit.rb
|
|
134
135
|
- lib/locum/ping.rb
|
|
135
136
|
- lib/locum/projects.rb
|
|
@@ -159,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
159
160
|
version: '0'
|
|
160
161
|
requirements: []
|
|
161
162
|
rubyforge_project:
|
|
162
|
-
rubygems_version: 2.4.
|
|
163
|
+
rubygems_version: 2.4.3
|
|
163
164
|
signing_key:
|
|
164
165
|
specification_version: 4
|
|
165
166
|
summary: Locum.ru maintenance interface
|