dpl 1.5.2.travis.200.2 → 1.5.2.travis.201.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OWUwYjFiZTQyNTViNmUxZmNiM2ZhYzE1NTk0ZjY5NWRhZWFlNzdkNA==
4
+ MTIzYjgzNGJhODY2M2NjNGYxOWVmZGM3ZGM5MTA1NTEyZGNmMGI1NA==
5
5
  data.tar.gz: !binary |-
6
- ZjdlNTE4MGMwY2U0MzcyMTZhZWEzNDlhNDA2MTA1YTVlNTFmOTYwMg==
6
+ MWI2M2ExYTkxMmI1MjE5MGM3OTM5ZGE1YjAxODkzY2JiMjNiM2EzZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YjZiNjcwNGJmNDlmNDY0MzliYjJhYzdlZjEyZThjMmNlMDNlNjA4NmU4ZWY2
10
- YzI3MmJhZjc2ZWZmZDJiOGEyYjgwYWFkODBmOWM5YjNlZmM3Njc2MzAwY2Y2
11
- Y2VhYjBjYzcyZmI2NzljYmUzNjUwZDUzOGE3N2Y1ODcwMGViMTQ=
9
+ Zjc4MjY4NWNkYTBmZThlZWJlMjRkNmQyZWIzNmE2YmE0MjQwMzlhMDk1MWUw
10
+ MTI1YzFiNzJjZDg2OTUzNDg3YzMxMjlmNWRhYmUyODc2ZDk3N2NlNGYyMmEx
11
+ ZGIyNDA3OTQyMDg3M2Q2OGU0ZjRhNmE0NmZhZGM0Y2I3YzY4ZjI=
12
12
  data.tar.gz: !binary |-
13
- YTc4NWE0NDE0NDQ4ZDA1ZjhhYzdkM2RjODMxYmZkMGE0YjM3OTA4MDM3MTQ2
14
- MDlhNzc4MjJhNDU0NjdmMTFhZjY2OTE3NTZmY2E1MTZiNmNmMzFhYmI2ZTli
15
- MzZiMDQ1OWUxZGNjMzY4NmZhN2Q0NDE3OTk3OTEzYzViNDNjNTU=
13
+ YmYyNzc3ODU1ZmY0NWI1NzlhMGNjYTA0MTk2NDEzMjJhMjhjYjA5MWM0NWFj
14
+ OTc4NzA3MGNmMTMxNjNjMGI2OGRhMDI5YWZjYzhhNDIyMDY2ODZkODhmZDA4
15
+ MzkxYTljN2YzZjE3NjlhZTAxNDE5YTgxYzZhNmExM2FhN2VmOTY=
data/lib/dpl/provider.rb CHANGED
@@ -48,7 +48,7 @@ module DPL
48
48
  end
49
49
 
50
50
  def self.shell(command, options = {})
51
- command = "travis_retry #{command}" if options[:retry] and ENV['TRAVIS']
51
+ command = "travis_retry #{command}" if options[:retry] and ENV['TRAVIS'] == 'true'
52
52
  system(command)
53
53
  end
54
54
 
@@ -120,13 +120,34 @@ describe DPL::Provider do
120
120
  end
121
121
 
122
122
  describe :shell do
123
- example "without any options" do
124
- example_provider.should_receive(:system).with("command")
125
- example_provider.shell("command")
126
- end
127
- example "with retry: true" do
128
- example_provider.should_receive(:system).with("travis_retry command")
129
- example_provider.shell("command", retry: true)
123
+ describe 'on Travis' do
124
+ before(:each) do
125
+ stub_const("ENV", {'TRAVIS' => 'true'})
126
+ end
127
+
128
+ example "without any options" do
129
+ example_provider.should_receive(:system).with("command")
130
+ example_provider.shell("command")
131
+ end
132
+ example "with retry: true" do
133
+ example_provider.should_receive(:system).with("travis_retry command")
134
+ example_provider.shell("command", retry: true)
135
+ end
136
+ end
137
+
138
+ describe 'not on Travis' do
139
+ before(:each) do
140
+ stub_const("ENV", {'TRAVIS' => nil})
141
+ end
142
+
143
+ example "without any options" do
144
+ example_provider.should_receive(:system).with("command")
145
+ example_provider.shell("command")
146
+ end
147
+ example "with retry: true" do
148
+ example_provider.should_receive(:system).with("command")
149
+ example_provider.shell("command", retry: true)
150
+ end
130
151
  end
131
152
  end
132
153
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2.travis.200.2
4
+ version: 1.5.2.travis.201.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase