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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 616e95ef8698ce943bed2b8ea5c090654e625f5f
4
- data.tar.gz: 9236257f9c10d961fa5fea4eee69049958b4bfec
3
+ metadata.gz: dd3caff53d1ac3465a10f1d59e22d45b951bd303
4
+ data.tar.gz: 4e9e9253a004283522f0d50db48df1c1186ac59b
5
5
  SHA512:
6
- metadata.gz: b5d7efa525dcd88fdbe0d2d25d79f48660d5ef530011f07045c8a8f39c11a7800ae6f605332bdc9f339311ae9caeb7dfc8142b3cffa97f773589b6e875e75df7
7
- data.tar.gz: eb661d95bc03183e48836092c902e92b0b06933788c352db0ddb60db74cc3c4d5523d3efe894f78b4dfba42cc460132ccc63b13e31e2338166c0f9ea19786f0a
6
+ metadata.gz: d708cc3cccb3e5123f9a5c374980974ec6f42821c2af006bf6a9681ea2010f3e9893c73e1e30c5d22e09b937f2451a8b3bc269ebe618db5348603193c9f4a16d
7
+ data.tar.gz: c6981603c6e7e5afb331bf86ef3d765d993066c32e60cb9d456a66096713d69ba5635e60d6f8ffe873740a3ca421b470711cfcfa4f9e969d260fa038baf7c0a2
@@ -1,7 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.0
4
- - 2.1
4
+ - 2.1.1
5
+ - 2.1.2
5
6
  - 1.9.3
6
- - jruby-19mode # JRuby in 1.9 mode
7
7
  script: bundle exec rspec
data/README.md CHANGED
@@ -20,7 +20,7 @@ Or install it yourself as:
20
20
 
21
21
  ```yaml
22
22
  # .soyuz.yml in the app you want to deploy with soyuz
23
- default:
23
+ defaults:
24
24
  deploy_cmd: 'opsicle deploy $SOYUZ_ENVIRONMENT'
25
25
 
26
26
 
data/bin/soyuz CHANGED
@@ -1,29 +1,38 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'rubygems'
3
- require 'commander/import'
3
+ require 'gli'
4
4
  require 'soyuz'
5
5
 
6
- # :name is optional, otherwise uses the basename of this executable
7
- program :name, 'soyuz'
8
- program :version, Soyuz::VERSION
9
- program :description, 'The trusty old deployment tool-kit'
10
- default_command :help
11
- global_option('-c', '--config FILE', 'soyuz config file')
12
-
13
- command :check do |c|
14
- c.syntax = "soyuz check [options]"
15
- c.description = "Check your config file to ensure it's valid"
16
- c.action do |args, options|
17
- options.default config: ".soyuz.yml"
18
- Soyuz::Config.new(options.config).check
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
- command :deploy do |c|
23
- c.syntax = "soyuz deploy [options]"
24
- c.description = "Deploy your application"
25
- c.action do |args, options|
26
- options.default config: ".soyuz.yml"
27
- Soyuz::Deploy.new(options.config).execute
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)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Soyuz
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -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 "commander"
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"
@@ -5,6 +5,10 @@ module Soyuz
5
5
  let(:cmd){ "echo derp" }
6
6
  subject { Command.new(cmd) }
7
7
 
8
+ before do
9
+ allow(subject).to receive(:puts)
10
+ end
11
+
8
12
  context "cmd isn't a string" do
9
13
  let(:cmd) { 1234 }
10
14
  subject { Command }
@@ -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.1
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-04-09 00:00:00.000000000 Z
11
+ date: 2014-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: commander
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