Sha256: 4b1b2af37398ab6c11dec44a747f4990687fcd1442f0d38f0c9bc3ba3ac9c7c8

Contents?: true

Size: 903 Bytes

Versions: 19

Compression:

Stored size: 903 Bytes

Contents

difficulty 3
description "This is the final level, the goal is to contribute to this repository by making a pull request on Github.  Please note that this level is designed to encourage you to add a valid contribution to Githug, not testing your ability to create a pull request.  Contributions that are likely to be accepted are levels, bug fixes and improved documentation."

solution do
  location = "/tmp/githug"
  FileUtils.rm_rf(location)
  puts "Cloning repository to #{location}"
  `git clone git@github.com:Gazler/githug.git #{location}`

  contributor = false

  repo = Grit::Repo.new(location)
  repo.commits('master', false).each do |commit|
    if commit.author.name == repo.config["user.name"]
      if commit.author.email == repo.config["user.email"]
        contributor = true
      end
    end
  end
  contributor
end

hint do
  puts "Forking the repository would be a good start!"
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
githug-0.3.2 levels/contribute.rb
githug-0.3.1 levels/contribute.rb
githug-0.3.0 levels/contribute.rb
githug-0.2.12 levels/contribute.rb
githug-0.2.11 levels/contribute.rb
githug-0.2.10 levels/contribute.rb
githug-0.2.9 levels/contribute.rb
githug-0.2.8 levels/contribute.rb
githug-0.2.7 levels/contribute.rb
githug-0.2.6 levels/contribute.rb
githug-0.2.5 levels/contribute.rb
githug-0.2.4 levels/contribute.rb
githug-0.2.3 levels/contribute.rb
githug-0.2.2 levels/contribute.rb
githug-0.2.1 levels/contribute.rb
githug-0.2.0 levels/contribute.rb
githug-0.1.8 levels/contribute.rb
githug-0.1.7 levels/contribute.rb
githug-0.1.6 levels/contribute.rb