dpl-script 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 109bb5cad82d9f16708dd557019cccb6876c9349
4
+ data.tar.gz: 8505d6c5d5bb406030005bd0df8afc02b6b3531e
5
+ SHA512:
6
+ metadata.gz: d7214778b9c20b63b455bf3dda25279fa8a38557fc861eab7e06b94be111f6a8cce4aca54b04b940ff55c2a2ded4484ece2145678cd326db467af7033a66375e
7
+ data.tar.gz: 513b4038995c31215069421fb3ec02b0fe4caa93a02b65ebeab5c6d6ebf5ecb604faab17adc5e578c2846315fc74031d9028dae80048b9e0a2d9ac10fa3b7219
@@ -0,0 +1,3 @@
1
+ require './gemspec_helper'
2
+
3
+ gemspec_for 'script'
@@ -0,0 +1,29 @@
1
+ module DPL
2
+ class Provider
3
+ class Script < Provider
4
+
5
+ experimental 'Script'
6
+
7
+ def check_auth
8
+ end
9
+
10
+ def check_app
11
+ end
12
+
13
+ def needs_key?
14
+ false
15
+ end
16
+
17
+ def push_app
18
+ context.shell script
19
+ if $?.exitstatus != 0
20
+ raise Error, "Script failed with status #{$?.exitstatus}"
21
+ end
22
+ end
23
+
24
+ def script
25
+ options[:script]
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,27 @@
1
+ require 'spec_helper'
2
+ require 'dpl/provider/script'
3
+
4
+ describe DPL::Provider::Script do
5
+
6
+ subject :provider do
7
+ described_class.new(DummyContext.new, { script: script })
8
+ end
9
+
10
+ let(:script) { 'scripts/deploy_script' }
11
+
12
+ it 'runs command "script" given' do
13
+ expect(provider.context).to receive(:shell).with(script)
14
+ provider.push_app
15
+ end
16
+
17
+ context 'when script exits with nonzero status' do
18
+ before :each do
19
+ # TODO: Found a better way to test this
20
+ Process::Status.any_instance.stub(:exitstatus).and_return(1)
21
+ end
22
+
23
+ it 'raises error' do
24
+ expect { provider.push_app }.to raise_error(DPL::Error)
25
+ end
26
+ end
27
+ end
metadata ADDED
@@ -0,0 +1,159 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dpl-script
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.9.0
5
+ platform: ruby
6
+ authors:
7
+ - Konstantin Haase
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-03-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: dpl
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 1.9.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.9.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec-its
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: json_pure
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: tins
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: coveralls
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: highline
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: deploy tool abstraction for clients
126
+ email: konstantin.mailinglists@googlemail.com
127
+ executables: []
128
+ extensions: []
129
+ extra_rdoc_files: []
130
+ files:
131
+ - dpl-script.gemspec
132
+ - lib/dpl/provider/script.rb
133
+ - spec/provider/script_spec.rb
134
+ homepage: https://github.com/travis-ci/dpl
135
+ licenses:
136
+ - MIT
137
+ metadata: {}
138
+ post_install_message:
139
+ rdoc_options: []
140
+ require_paths:
141
+ - lib
142
+ required_ruby_version: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: '2.2'
147
+ required_rubygems_version: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ requirements: []
153
+ rubyforge_project:
154
+ rubygems_version: 2.6.13
155
+ signing_key:
156
+ specification_version: 4
157
+ summary: deploy tool
158
+ test_files:
159
+ - spec/provider/script_spec.rb