Sha256: 5a5230bcd555254001f1b00d825cb6db4014b90ecbdf5fc5daf877a1bb4bdf2d

Contents?: true

Size: 537 Bytes

Versions: 1

Compression:

Stored size: 537 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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gitscrub-0.0.5 levels/contribute.rb