File tree Expand file tree Collapse file tree 3 files changed +52
-9
lines changed Expand file tree Collapse file tree 3 files changed +52
-9
lines changed Original file line number Diff line number Diff line change 1
1
PATH
2
2
remote: .
3
3
specs:
4
- fastlane-plugin-wpmreleasetoolkit (0.8 .2 )
4
+ fastlane-plugin-wpmreleasetoolkit (0.9 .2 )
5
5
activesupport (~> 4 )
6
6
chroma (= 0.2.0 )
7
7
diffy (~> 3.3 )
97
97
xcpretty (~> 0.3.0 )
98
98
xcpretty-travis-formatter (>= 0.0.3 )
99
99
gh_inspector (1.1.3 )
100
- git (1.6 .0 )
100
+ git (1.7 .0 )
101
101
rchardet (~> 1.8 )
102
102
google-api-client (0.23.9 )
103
103
addressable (~> 2.5 , >= 2.5.1 )
@@ -148,13 +148,13 @@ GEM
148
148
multipart-post (2.0.0 )
149
149
nanaimo (0.2.6 )
150
150
naturally (2.2.0 )
151
- nokogiri (1.10.8 )
151
+ nokogiri (1.10.9 )
152
152
mini_portile2 (~> 2.4.0 )
153
- octokit (4.16 .0 )
153
+ octokit (4.18 .0 )
154
154
faraday (>= 0.9 )
155
155
sawyer (~> 0.8.0 , >= 0.5.3 )
156
- oj (3.10.2 )
157
- optimist (3.0.0 )
156
+ oj (3.10.6 )
157
+ optimist (3.0.1 )
158
158
options (2.3.2 )
159
159
os (1.0.1 )
160
160
parallel (1.17.0 )
234
234
tty-screen (0.7.0 )
235
235
tty-spinner (0.9.1 )
236
236
tty-cursor (~> 0.7 )
237
- tzinfo (1.2.6 )
237
+ tzinfo (1.2.7 )
238
238
thread_safe (~> 0.1 )
239
239
uber (0.1.0 )
240
240
unf (0.1.4 )
Original file line number Diff line number Diff line change 54
54
55
55
describe '#source_contents' do
56
56
it 'gets the contents from the secrets repo' do
57
- allow ( File ) . to receive ( :read ) . with ( subject . secrets_repository_file_path ) . and_return ( 'source contents' )
58
- expect ( subject . source_contents ) . to eq ( 'source contents' )
57
+ set_circle_env ( false ) do
58
+ allow ( File ) . to receive ( :read ) . with ( subject . secrets_repository_file_path ) . and_return ( 'source contents' )
59
+ expect ( subject . source_contents ) . to eq ( 'source contents' )
60
+ end
61
+ end
62
+ end
63
+
64
+ describe '#source_contents_on_ci' do
65
+ it 'gets the contents from the secrets repo' do
66
+ set_circle_env ( true ) do
67
+ allow ( File ) . to receive ( :read ) . with ( subject . secrets_repository_file_path ) . and_return ( 'source contents' )
68
+ expect ( subject . source_contents ) . to eq ( nil )
69
+ end
59
70
end
60
71
end
61
72
Original file line number Diff line number Diff line change @@ -25,3 +25,35 @@ module SpecHelper
25
25
RSpec . configure do |config |
26
26
config . filter_run_when_matching :focus
27
27
end
28
+
29
+ def set_circle_env ( define_ci )
30
+ is_ci = ENV . key? ( 'CIRCLECI' )
31
+ orig_circle_ci = ENV [ 'CIRCLECI' ]
32
+ if ( define_ci )
33
+ ENV [ 'CIRCLECI' ] = 'CircleCI'
34
+ else
35
+ ENV . delete 'CIRCLECI'
36
+ end
37
+
38
+ yield
39
+ ensure
40
+ if ( is_ci )
41
+ ENV [ 'CIRCLECI' ] = orig_circle_ci
42
+ else
43
+ ENV . delete 'CIRCLECI'
44
+ end
45
+ end
46
+
47
+ def define_circle_env ( )
48
+ is_ci = ENV . key? ( 'CIRCLECI' )
49
+ orig_circle_ci = ENV [ 'CIRCLECI' ]
50
+
51
+
52
+ yield
53
+ ensure
54
+ if ( is_ci )
55
+ ENV [ 'CIRCLECI' ] = orig_circle_ci
56
+ else
57
+ ENV . delete 'CIRCLECI'
58
+ end
59
+ end
You can’t perform that action at this time.
0 commit comments