Sha256: 40e788f3bb1bcc6e962931730d01283d45b8734c59c671f59bb5f2c5c232e6d4

Contents?: true

Size: 605 Bytes

Versions: 3

Compression:

Stored size: 605 Bytes

Contents

difficulty 3
description "Contribute to this repository by making a pull request on Github"

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

  contributor = false

  repo = Grit::Repo.new(location)
  repo.commits.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

3 entries across 3 versions & 1 rubygems

Version Path
gitscrub-0.0.8 levels/contribute.rb
gitscrub-0.0.7 levels/contribute.rb
gitscrub-0.0.6 levels/contribute.rb