psychic-runner 0.0.5 → 0.0.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddeb92cd3cc077d00d420c884f093a58caeb73b2
|
4
|
+
data.tar.gz: 3cf00eaa3ce0715e3080296136e5a5cc18350032
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c78919ea3b15b03a7ff6c8cc33029908d79a268d5d0891202421bc7b4dd060255875f2f6257ed5b57bdb6d08f453c98b36e773bf3dc097f0e55bd7e9e496ec80
|
7
|
+
data.tar.gz: 45d34b63d64c64fa3dca6ae70defe7fc04e93eac5320993d3335f5ed94aab182940ff00c0b7f9d319ef130f2471ffbac8d5bcb2767631b6058e1d49c542e5d7d
|
data/lib/psychic/runner.rb
CHANGED
@@ -21,6 +21,7 @@ module Psychic
|
|
21
21
|
|
22
22
|
def initialize(opts = { cwd: Dir.pwd })
|
23
23
|
fail 'cwd is required' unless opts[:cwd]
|
24
|
+
opts[:cwd] = Pathname(opts[:cwd]).to_s # must be a string on windows...
|
24
25
|
super
|
25
26
|
@hot_runner = HotRunner.new(opts)
|
26
27
|
@cold_runners = ColdRunnerRegistry.active_runners(opts)
|
@@ -36,8 +36,8 @@ module Psychic
|
|
36
36
|
@logger = opts[:logger] || new_logger
|
37
37
|
@env = opts[:env] || ENV.to_hash
|
38
38
|
@parameters = load_parameters(opts[:parameters])
|
39
|
-
@cli, @interactive_mode
|
40
|
-
|
39
|
+
@cli, @interactive_mode, @parameter_mode, @restore_mode, @dry_run = opts.values_at(
|
40
|
+
:cli, :interactive, :parameter_mode, :restore_mode, :dry_run)
|
41
41
|
# Make sure to delete any option that isn't a MixLib::ShellOut option
|
42
42
|
@shell_opts = opts.select { |key, _| Psychic::Shell::AVAILABLE_OPTIONS.include? key }
|
43
43
|
end
|
@@ -83,7 +83,7 @@ module Psychic
|
|
83
83
|
private
|
84
84
|
|
85
85
|
def load_hints
|
86
|
-
hints_file = Dir["#{@cwd}/psychic
|
86
|
+
hints_file = Dir["#{@cwd}/psychic.{yaml,yml}"].first
|
87
87
|
YAML.load(File.read(hints_file)) unless hints_file.nil?
|
88
88
|
end
|
89
89
|
|
data/psychic-runner.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_dependency 'mixlib-shellout', '~> 1.3' # Used for MRI
|
23
23
|
# spec.add_dependency "buff-shell_out", "~> 0.1" # Used for JRuby
|
24
24
|
spec.add_dependency 'mustache', '~> 0.99'
|
25
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.5'
|
26
26
|
spec.add_development_dependency 'rake', '~> 10.0'
|
27
27
|
spec.add_development_dependency 'rake-notes'
|
28
28
|
spec.add_development_dependency 'simplecov'
|
@@ -40,12 +40,12 @@ module Psychic
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
context 'task map stored in psychic
|
43
|
+
context 'task map stored in psychic.yml' do
|
44
44
|
let(:hints) do
|
45
45
|
{ 'tasks' => task_map }
|
46
46
|
end
|
47
47
|
before(:each) do
|
48
|
-
write_file 'psychic
|
48
|
+
write_file 'psychic.yml', YAML.dump(hints)
|
49
49
|
end
|
50
50
|
subject { described_class.new(cwd: current_dir) }
|
51
51
|
include_examples 'runs tasks'
|
data/spec/psychic/runner_spec.rb
CHANGED
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
module Psychic
|
4
4
|
RSpec.describe Runner do
|
5
5
|
subject { described_class.new(cwd: current_dir) }
|
6
|
-
context 'when psychic
|
6
|
+
context 'when psychic.yml exists' do
|
7
7
|
let(:hints) do
|
8
8
|
{
|
9
9
|
'tasks' =>
|
@@ -16,7 +16,7 @@ module Psychic
|
|
16
16
|
end
|
17
17
|
|
18
18
|
before(:each) do
|
19
|
-
write_file 'psychic
|
19
|
+
write_file 'psychic.yml', YAML.dump(hints)
|
20
20
|
end
|
21
21
|
|
22
22
|
describe 'initialize' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: psychic-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Lincoln
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.5'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.5'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|