Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ctime is changed_at, not created_at

  • Loading branch information...
commit db53ff9dcf9faf3fd31489909efc6df9e18e7e89 1 parent c0cf7d5
@adamwiggins authored
Showing with 6 additions and 6 deletions.
  1. +4 −4 lib/rush/entry.rb
  2. +2 −2 spec/entry_spec.rb
View
8 lib/rush/entry.rb
@@ -62,17 +62,17 @@ def exists?
false
end
- # Timestamp of entry creation.
- def created_at
+ # Timestamp of most recent change to the entry (permissions, contents, etc).
+ def changed_at
stat[:ctime]
end
- # Timestamp that entry was last modified on.
+ # Timestamp of last modification of the contents.
def last_modified
stat[:mtime]
end
- # Timestamp that entry was last accessed on.
+ # Timestamp that entry was last accessed (read from or written to).
def last_accessed
stat[:atime]
end
View
4 spec/entry_spec.rb
@@ -30,8 +30,8 @@
Rush::Entry.new('/1/2/../3').full_path.should == '/1/3'
end
- it "knows its created_at time" do
- @entry.created_at.should == File.stat(@filename).ctime
+ it "knows its changed_at time" do
+ @entry.changed_at.should == File.stat(@filename).ctime
end
it "knows its last_modified time" do
Please sign in to comment.
Something went wrong with that request. Please try again.