Skip to content
Snippets Groups Projects
Commit 1edb50b3 authored by Eric Franz's avatar Eric Franz
Browse files

rename method to follow ruby conventions

parent 1d82f88e
No related branches found
Tags v0.10.1
No related merge requests found
......@@ -36,7 +36,7 @@ module AweSim
def restart
abort_if_app_not_shared_app
unless AweSim::PosixACL.rx_other(app.restart_dir)
unless AweSim::PosixACL.rx_other?(app.restart_dir)
say ["Everybody does not have read and execute access to restart directory: #{app.restart_dir}.",
"Running this command might fix it:\n",
" chmod 755 ~ ~/awesim_shared_apps ~/awesim_shared_apps/.tmp #{app.restart_dir}\n",
......
......@@ -29,7 +29,7 @@ module AweSim
# and make sure that all of those users have rx to the restart directory
# But that would take more thought and might be expensive computationally
# (but this is just for awesim lint, so thats okay)
def self.rx_other(path)
def self.rx_other?(path)
paths = []
Pathname.new(path).realpath.ascend { |p| paths << p }
paths.all? do |p|
......
......@@ -14,7 +14,7 @@ class TestPosixACL < Minitest::Test
# test that you can check the real rx on a directory
# for everyone
def test_rx_other
def test_rx_other?
skip if Gem::Platform.local.os == "darwin" # OS X doesn't have ACLs
@dir_shared = @tmpdir.join("awesim_shared_apps")
......@@ -23,22 +23,22 @@ class TestPosixACL < Minitest::Test
@dir_restart.mkpath
FileUtils.chmod_R "o+rx", @tmpdir
assert AweSim::PosixACL.rx_other(@dir_restart)
assert AweSim::PosixACL.rx_other?(@dir_restart)
rm_rx_other @tmpdir
assert ! AweSim::PosixACL.rx_other(@dir_restart)
assert ! AweSim::PosixACL.rx_other?(@dir_restart)
add_rx_other @tmpdir
assert AweSim::PosixACL.rx_other(@dir_restart)
assert AweSim::PosixACL.rx_other?(@dir_restart)
rm_rx_other @dir_shared
assert ! AweSim::PosixACL.rx_other(@dir_restart)
assert ! AweSim::PosixACL.rx_other?(@dir_restart)
add_rx_other @dir_shared
assert AweSim::PosixACL.rx_other(@dir_restart)
assert AweSim::PosixACL.rx_other?(@dir_restart)
rm_rx_other @dir_restart
assert ! AweSim::PosixACL.rx_other(@dir_restart)
assert ! AweSim::PosixACL.rx_other?(@dir_restart)
add_rx_other @dir_restart
assert AweSim::PosixACL.rx_other(@dir_restart)
assert AweSim::PosixACL.rx_other?(@dir_restart)
end
def add_rx_other(path)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment