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: 4aa976528b7be4dcad3697f01c7ce3cfcee6876c
4
- data.tar.gz: da118aed81d5088fbf3953c311d74187529bfe85
3
+ metadata.gz: ddeb92cd3cc077d00d420c884f093a58caeb73b2
4
+ data.tar.gz: 3cf00eaa3ce0715e3080296136e5a5cc18350032
5
5
  SHA512:
6
- metadata.gz: de9f3d589b989a93168226b41e90be64f8fc6ebbb5b6fd8ff20b7426083a51f7c183fbbf5a40018332086b25c384044e20b42a76eedc1af03b9042dadfac5f86
7
- data.tar.gz: 165286563dd79570c4205c62134a9b752b0d86b37566ece5471a7518de4111c831eab42c9223e81673812f42eec49ee2e074b15624622d697a782844790e61e7
6
+ metadata.gz: c78919ea3b15b03a7ff6c8cc33029908d79a268d5d0891202421bc7b4dd060255875f2f6257ed5b57bdb6d08f453c98b36e773bf3dc097f0e55bd7e9e496ec80
7
+ data.tar.gz: 45d34b63d64c64fa3dca6ae70defe7fc04e93eac5320993d3335f5ed94aab182940ff00c0b7f9d319ef130f2471ffbac8d5bcb2767631b6058e1d49c542e5d7d
@@ -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 = opts[:cli], opts[:interactive]
40
- @parameter_mode, @restore_mode, @dry_run = opts[:parameter_mode], opts[:restore_mode], opts[:dry_run]
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-hints.{yaml,yml}"].first
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
 
@@ -1,5 +1,5 @@
1
1
  module Psychic
2
2
  class Runner
3
- VERSION = '0.0.5'
3
+ VERSION = '0.0.6'
4
4
  end
5
5
  end
@@ -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.7'
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-hints.yml' do
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-hints.yml', YAML.dump(hints)
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'
@@ -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-hints.yml exists' do
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-hints.yml', YAML.dump(hints)
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.5
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-08 00:00:00.000000000 Z
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.7'
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.7'
68
+ version: '1.5'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement