Sha256: 75ada0d940b29dd758a485d47ae3662ec86de4b415b2679d63e5978c230dd3a6

Contents?: true

Size: 392 Bytes

Versions: 9

Compression:

Stored size: 392 Bytes

Contents

require 'time'

difficulty 2
description "Commit your changes with the future date (e.g. tomorrow)."

setup do
  repo.init

  FileUtils.touch("README")
  repo.add("README")
end

solution do
  repo.commits.length == 1 && repo.commits.first.authored_date > Time.now
end

hint do
  puts "Build a time machine, move to the future and commit your changes, then go back and verify results ;)."
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
mygithug-0.5.1 levels/commit_in_future.rb
githug-0.5.0 levels/commit_in_future.rb
githug-0.4.8 levels/commit_in_future.rb
githug-0.4.7 levels/commit_in_future.rb
githug-0.4.6 levels/commit_in_future.rb
githug-0.4.5 levels/commit_in_future.rb
githug-0.4.4 levels/commit_in_future.rb
githug-0.4.3 levels/commit_in_future.rb
githug-0.4.2 levels/commit_in_future.rb