soyuz 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/README.md +1 -1
- data/bin/soyuz +29 -20
- data/lib/soyuz/command.rb +3 -0
- data/lib/soyuz/version.rb +1 -1
- data/soyuz.gemspec +3 -1
- data/spec/soyuz/command_spec.rb +4 -0
- data/spec/soyuz/config_spec.rb +4 -0
- metadata +31 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd3caff53d1ac3465a10f1d59e22d45b951bd303
|
4
|
+
data.tar.gz: 4e9e9253a004283522f0d50db48df1c1186ac59b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d708cc3cccb3e5123f9a5c374980974ec6f42821c2af006bf6a9681ea2010f3e9893c73e1e30c5d22e09b937f2451a8b3bc269ebe618db5348603193c9f4a16d
|
7
|
+
data.tar.gz: c6981603c6e7e5afb331bf86ef3d765d993066c32e60cb9d456a66096713d69ba5635e60d6f8ffe873740a3ca421b470711cfcfa4f9e969d260fa038baf7c0a2
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
data/bin/soyuz
CHANGED
@@ -1,29 +1,38 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'rubygems'
|
3
|
-
require '
|
3
|
+
require 'gli'
|
4
4
|
require 'soyuz'
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
6
|
+
include GLI::App
|
7
|
+
|
8
|
+
program_desc 'The trusty old deployment tool-kit'
|
9
|
+
version Soyuz::VERSION
|
10
|
+
|
11
|
+
wrap_help_text :verbatim
|
12
|
+
|
13
|
+
program_long_desc """
|
14
|
+
DOCUMENTATION
|
15
|
+
For documentation and help in setting up your configuration files,
|
16
|
+
see Soyuz's GitHub repo: https://github.com/sportngin/soyuz
|
17
|
+
"""
|
18
|
+
|
19
|
+
|
20
|
+
desc "Check your config file to ensure it's valid"
|
21
|
+
command 'check' do |c|
|
22
|
+
c.flag [:c, :config], :desc => 'soyuz config file', :default_value => '.soyuz.yml'
|
23
|
+
c.action do |global_options, options, args|
|
24
|
+
options = global_options.merge(options)
|
25
|
+
Soyuz::Config.new(options[:config]).check
|
19
26
|
end
|
20
27
|
end
|
21
28
|
|
22
|
-
|
23
|
-
|
24
|
-
c.
|
25
|
-
c.action do |
|
26
|
-
options
|
27
|
-
Soyuz::Deploy.new(options
|
29
|
+
desc "Deploy your application"
|
30
|
+
command 'deploy' do |c|
|
31
|
+
c.flag [:c, :config], :desc => 'soyuz config file', :default_value => '.soyuz.yml'
|
32
|
+
c.action do |global_options, options, args|
|
33
|
+
options = global_options.merge(options)
|
34
|
+
Soyuz::Deploy.new(options[:config]).execute
|
28
35
|
end
|
29
36
|
end
|
37
|
+
|
38
|
+
exit run(ARGV)
|
data/lib/soyuz/command.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
+
require 'highline/import'
|
1
2
|
require_relative 'command_choice'
|
3
|
+
|
2
4
|
module Soyuz
|
3
5
|
class Command
|
4
6
|
def initialize(cmd)
|
@@ -11,6 +13,7 @@ module Soyuz
|
|
11
13
|
end
|
12
14
|
|
13
15
|
def run
|
16
|
+
say("<%= color('executing [#{@cmd}]...', :green) %>")
|
14
17
|
system(@cmd)
|
15
18
|
end
|
16
19
|
end
|
data/lib/soyuz/version.rb
CHANGED
data/soyuz.gemspec
CHANGED
@@ -18,8 +18,10 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "
|
21
|
+
spec.add_dependency "gli"
|
22
|
+
spec.add_dependency "highline"
|
22
23
|
spec.add_dependency "safe_yaml"
|
24
|
+
spec.add_dependency "psych", ">=2.0.5"
|
23
25
|
|
24
26
|
spec.add_development_dependency "bundler", "~> 1.5"
|
25
27
|
spec.add_development_dependency "rake"
|
data/spec/soyuz/command_spec.rb
CHANGED
data/spec/soyuz/config_spec.rb
CHANGED
@@ -5,6 +5,10 @@ module Soyuz
|
|
5
5
|
let(:valid_config){ "files/soyuz_example.yml" }
|
6
6
|
subject { Config.new(valid_config) }
|
7
7
|
|
8
|
+
before do
|
9
|
+
allow(subject).to receive(:puts)
|
10
|
+
end
|
11
|
+
|
8
12
|
context "#check" do
|
9
13
|
it "to raise an InvalidConfig error if the config is invalid" do
|
10
14
|
allow(subject).to receive(:valid?) { false }
|
metadata
CHANGED
@@ -1,17 +1,31 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soyuz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Fleener
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: gli
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: highline
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - ">="
|
@@ -38,6 +52,20 @@ dependencies:
|
|
38
52
|
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: psych
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.0.5
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.0.5
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: bundler
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|