@@ -99,21 +99,21 @@ describe('deployer', function() {
99
99
var extendDirName = pathFn . basename ( extendDir ) ;
100
100
101
101
return fs . writeFile ( pathFn . join ( extendDir , 'ext.txt' ) , 'ext' )
102
- . then ( function ( ) {
103
- return deployer ( {
104
- repo : fakeRemote ,
105
- extend_dirs : extendDirName ,
106
- silent : true
102
+ . then ( function ( ) {
103
+ return deployer ( {
104
+ repo : fakeRemote ,
105
+ extend_dirs : extendDirName ,
106
+ silent : true
107
+ } ) ;
108
+ } ) . then ( function ( ) {
109
+ return validate ( ) ;
110
+ } ) . then ( function ( ) {
111
+ var extTxtFile = pathFn . join ( validateDir , extendDirName , 'ext.txt' ) ;
112
+
113
+ return fs . readFile ( extTxtFile ) ;
114
+ } ) . then ( function ( content ) {
115
+ content . should . eql ( 'ext' ) ;
107
116
} ) ;
108
- } ) . then ( function ( ) {
109
- return validate ( ) ;
110
- } ) . then ( function ( ) {
111
- var extTxtFile = pathFn . join ( validateDir , extendDirName , 'ext.txt' ) ;
112
-
113
- return fs . readFile ( extTxtFile ) ;
114
- } ) . then ( function ( content ) {
115
- content . should . eql ( 'ext' ) ;
116
- } ) ;
117
117
} ) ;
118
118
119
119
it ( 'multi deployment' , function ( ) {
@@ -136,41 +136,41 @@ describe('deployer', function() {
136
136
137
137
it ( 'hidden file' , function ( ) {
138
138
return fs . writeFile ( pathFn . join ( publicDir , '.hid' ) , 'hidden' )
139
- . then ( function ( ) {
140
- return deployer ( {
141
- repo : fakeRemote ,
142
- ignore_hidden : false ,
143
- silent : true
139
+ . then ( function ( ) {
140
+ return deployer ( {
141
+ repo : fakeRemote ,
142
+ ignore_hidden : false ,
143
+ silent : true
144
+ } ) ;
145
+ } ) . then ( function ( ) {
146
+ return validate ( ) ;
147
+ } ) . then ( function ( ) {
148
+ return fs . readFile ( pathFn . join ( validateDir , '.hid' ) ) ;
149
+ } ) . then ( function ( content ) {
150
+ content . should . eql ( 'hidden' ) ;
144
151
} ) ;
145
- } ) . then ( function ( ) {
146
- return validate ( ) ;
147
- } ) . then ( function ( ) {
148
- return fs . readFile ( pathFn . join ( validateDir , '.hid' ) ) ;
149
- } ) . then ( function ( content ) {
150
- content . should . eql ( 'hidden' ) ;
151
- } ) ;
152
152
} ) ;
153
153
154
154
it ( 'hidden extdir' , function ( ) {
155
155
var extendDirName = pathFn . basename ( extendDir ) ;
156
156
157
157
return fs . writeFile ( pathFn . join ( extendDir , '.hid' ) , 'hidden' )
158
- . then ( function ( ) {
159
- return deployer ( {
160
- repo : fakeRemote ,
161
- extend_dirs : extendDirName ,
162
- ignore_hidden : { public : true , extend : false } ,
163
- silent : true
158
+ . then ( function ( ) {
159
+ return deployer ( {
160
+ repo : fakeRemote ,
161
+ extend_dirs : extendDirName ,
162
+ ignore_hidden : { public : true , extend : false } ,
163
+ silent : true
164
+ } ) ;
165
+ } ) . then ( function ( ) {
166
+ return validate ( ) ;
167
+ } ) . then ( function ( ) {
168
+ var extHidFile = pathFn . join ( validateDir , extendDirName , '.hid' ) ;
169
+
170
+ return fs . readFile ( extHidFile ) ;
171
+ } ) . then ( function ( content ) {
172
+ content . should . eql ( 'hidden' ) ;
164
173
} ) ;
165
- } ) . then ( function ( ) {
166
- return validate ( ) ;
167
- } ) . then ( function ( ) {
168
- var extHidFile = pathFn . join ( validateDir , extendDirName , '.hid' ) ;
169
-
170
- return fs . readFile ( extHidFile ) ;
171
- } ) . then ( function ( content ) {
172
- content . should . eql ( 'hidden' ) ;
173
- } ) ;
174
174
} ) ;
175
175
176
176
it ( 'hidden files' , function ( ) {
@@ -182,36 +182,36 @@ describe('deployer', function() {
182
182
var extFileShow = fs . writeFile ( pathFn . join ( extendDir , 'show' ) , 'show' ) ;
183
183
184
184
return Promise . all ( [ pubFileHid , extFileHid , extFileShow ] )
185
- . then ( function ( ) {
186
- return deployer ( {
187
- repo : fakeRemote ,
188
- extend_dirs : extendDirName ,
189
- ignore_pattern : 'hid' ,
190
- silent : true
185
+ . then ( function ( ) {
186
+ return deployer ( {
187
+ repo : fakeRemote ,
188
+ extend_dirs : extendDirName ,
189
+ ignore_pattern : 'hid' ,
190
+ silent : true
191
+ } ) ;
192
+ } ) . then ( function ( ) {
193
+ return validate ( ) ;
194
+ } ) . then ( function ( ) {
195
+ var isPubFileHidExisits = fs . exists ( pathFn . join ( validateDir , 'hid' ) ) ;
196
+ var isExtFileHidExisits = fs . exists ( pathFn . join ( validateDir , extendDirName , 'hid' ) ) ;
197
+ var isExtFileShowExisits = fs . exists ( pathFn . join ( validateDir , extendDirName , 'show' ) ) ;
198
+
199
+ return Promise . all ( [ isPubFileHidExisits , isExtFileHidExisits , isExtFileShowExisits ] ) ;
200
+ } ) . then ( function ( statusLists ) {
201
+ var pubFileHidStatus = statusLists [ 0 ] ;
202
+ var extFileHidStatus = statusLists [ 1 ] ;
203
+ var extFileShowStatus = statusLists [ 2 ] ;
204
+
205
+ pubFileHidStatus . should . eql ( false ) ;
206
+ extFileHidStatus . should . eql ( false ) ;
207
+ extFileShowStatus . should . eql ( true ) ;
208
+ } ) . then ( function ( ) {
209
+ var extShowFile = pathFn . join ( validateDir , extendDirName , 'show' ) ;
210
+
211
+ return fs . readFile ( extShowFile ) ;
212
+ } ) . then ( function ( content ) {
213
+ content . should . eql ( 'show' ) ;
191
214
} ) ;
192
- } ) . then ( function ( ) {
193
- return validate ( ) ;
194
- } ) . then ( function ( ) {
195
- var isPubFileHidExisits = fs . exists ( pathFn . join ( validateDir , 'hid' ) ) ;
196
- var isExtFileHidExisits = fs . exists ( pathFn . join ( validateDir , extendDirName , 'hid' ) ) ;
197
- var isExtFileShowExisits = fs . exists ( pathFn . join ( validateDir , extendDirName , 'show' ) ) ;
198
-
199
- return Promise . all ( [ isPubFileHidExisits , isExtFileHidExisits , isExtFileShowExisits ] ) ;
200
- } ) . then ( function ( statusLists ) {
201
- var pubFileHidStatus = statusLists [ 0 ] ;
202
- var extFileHidStatus = statusLists [ 1 ] ;
203
- var extFileShowStatus = statusLists [ 2 ] ;
204
-
205
- pubFileHidStatus . should . eql ( false ) ;
206
- extFileHidStatus . should . eql ( false ) ;
207
- extFileShowStatus . should . eql ( true ) ;
208
- } ) . then ( function ( ) {
209
- var extShowFile = pathFn . join ( validateDir , extendDirName , 'show' ) ;
210
-
211
- return fs . readFile ( extShowFile ) ;
212
- } ) . then ( function ( content ) {
213
- content . should . eql ( 'show' ) ;
214
- } ) ;
215
215
} ) ;
216
216
217
217
it ( 'hidden extFiles' , function ( ) {
@@ -223,25 +223,25 @@ describe('deployer', function() {
223
223
var pubFileHid = fs . writeFile ( pathFn . join ( publicDir , 'hid' ) , 'hidden' ) ;
224
224
225
225
return Promise . all ( [ extFileHid , extFile2Hid , pubFileHid ] )
226
- . then ( function ( ) {
227
- return deployer ( {
228
- repo : fakeRemote ,
229
- extend_dirs : extendDirName ,
230
- ignore_pattern : { public : 'hid' , extend : '.' } ,
231
- silent : true
226
+ . then ( function ( ) {
227
+ return deployer ( {
228
+ repo : fakeRemote ,
229
+ extend_dirs : extendDirName ,
230
+ ignore_pattern : { public : 'hid' , extend : '.' } ,
231
+ silent : true
232
+ } ) ;
233
+ } ) . then ( function ( ) {
234
+ return validate ( ) ;
235
+ } ) . then ( function ( ) {
236
+ var isExtHidFileExists = fs . exists ( pathFn . join ( validateDir , extendDirName , 'hid' ) ) ;
237
+ var isExtHidFile2Exists = fs . exists ( pathFn . join ( validateDir , extendDirName , 'hid2' ) ) ;
238
+ var isPubHidFileExists = fs . exists ( pathFn . join ( validateDir , 'hid' ) ) ;
239
+
240
+ return Promise . all ( [ isExtHidFileExists , isExtHidFile2Exists , isPubHidFileExists ] ) ;
241
+ } ) . then ( function ( statusLists ) {
242
+ statusLists . forEach ( function ( statusItem ) {
243
+ statusItem . should . eql ( false ) ;
244
+ } ) ;
232
245
} ) ;
233
- } ) . then ( function ( ) {
234
- return validate ( ) ;
235
- } ) . then ( function ( ) {
236
- var isExtHidFileExists = fs . exists ( pathFn . join ( validateDir , extendDirName , 'hid' ) ) ;
237
- var isExtHidFile2Exists = fs . exists ( pathFn . join ( validateDir , extendDirName , 'hid2' ) ) ;
238
- var isPubHidFileExists = fs . exists ( pathFn . join ( validateDir , 'hid' ) ) ;
239
-
240
- return Promise . all ( [ isExtHidFileExists , isExtHidFile2Exists , isPubHidFileExists ] ) ;
241
- } ) . then ( function ( statusLists ) {
242
- statusLists . forEach ( function ( statusItem ) {
243
- statusItem . should . eql ( false ) ;
244
- } ) ;
245
- } ) ;
246
246
} ) ;
247
247
} ) ;
0 commit comments