mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
fixed: Builded text file(html, css, xml, txt...)'s permission is 0600
In v3-stable branch, builded text file's permission are 0644. But in master(v4) branch, file's permission are 0600. When I deploy(drug-and-drop with sftp), the website isn't displayed. So I fixed this problem.
This commit is contained in:
parent
051f102aa0
commit
013b4a8394
2 changed files with 10 additions and 1 deletions
|
@ -46,4 +46,12 @@ Feature: Builder
|
||||||
Scenario: Build alias (b)
|
Scenario: Build alias (b)
|
||||||
Given a fixture app "large-build-app"
|
Given a fixture app "large-build-app"
|
||||||
When I run `middleman b`
|
When I run `middleman b`
|
||||||
Then was successfully built
|
Then was successfully built
|
||||||
|
|
||||||
|
Scenario: Builded text file(ex: html, css, xml, txt)'s permission is 0644
|
||||||
|
Given a successfully built app at "large-build-app"
|
||||||
|
When I cd to "build"
|
||||||
|
Then the mode of filesystem object "index.html" should match "0644"
|
||||||
|
And the mode of filesystem object "stylesheets/static.css" should match "0644"
|
||||||
|
And the mode of filesystem object "feed.xml" should match "0644"
|
||||||
|
And the mode of filesystem object ".htaccess" should match "0644"
|
||||||
|
|
|
@ -130,6 +130,7 @@ module Middleman
|
||||||
file.binmode
|
file.binmode
|
||||||
file.write(contents)
|
file.write(contents)
|
||||||
file.close
|
file.close
|
||||||
|
File.chmod(0644, file)
|
||||||
file
|
file
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue