Sha256: c3e30b81528345ad893b2cacdf0772c4edce82ba109655f062ac2bb6deca15de
Contents?: true
Size: 618 Bytes
Versions: 8
Compression:
Stored size: 618 Bytes
Contents
difficulty 3 description "Contribute to this repository by making a pull request on Github" 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
8 entries across 8 versions & 1 rubygems