Skip to content

Commit

Permalink
readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mattboldt committed Oct 19, 2019
1 parent 5af2a50 commit 8aa4282
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 94 deletions.
74 changes: 0 additions & 74 deletions CODE_OF_CONDUCT.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Matt Boldt
Copyright (c) 2019 Matt Boldt

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Guac
# Guac 🥑

[![Build Status](https://travis-ci.org/mattboldt/guac.svg?branch=master)](https://travis-ci.org/mattboldt/guac)
[![Code Climate](https://codeclimate.com/github/mattboldt/guac/badges/gpa.svg)](https://codeclimate.com/github/mattboldt/guac)
[![Gem Version](https://badge.fury.io/rb/guac.svg)](https://badge.fury.io/rb/guac)
[![GitHub license](https://img.shields.io/github/license/mattboldt/guac.svg)](https://github.com/mattboldt/guac/blob/master/LICENSE.txt)

Guac is a command line program to update multiple local git repos with one command. Guac stands for `git update cli`, but it's also just a very easy to type command. Furthermore, it's shorthand for Guacamole, e.g.: "Holy Guacamole, this gem makes updating all my repos very fast and easy".
Guac is a command line program to update multiple local git repos with one command. Guac stands for `git update-all cli`, but it's also just a very easy to type command. Furthermore, it's shorthand for Guacamole, e.g.: "Holy Guacamole, this gem makes updating all my repos very fast and easy".

![Guac](./assets/demo.gif)

Expand All @@ -19,13 +19,16 @@ Guac is written in Ruby, so you'll need to have that installed on your machine,

```bash
# Run setup
guac config
guac setup

# Show all statuses
guac status
guac st

# Update all on master
guac up master
# Update all on default branch (master)
guac up
# Update all on release_2019
guac up release_2019
```

## Development
Expand All @@ -38,10 +41,6 @@ To install this gem onto your local machine, run `bundle exec rake install`. To

Bug reports and pull requests are welcome on GitHub at https://github.com/mattboldt/guac. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## Code of Conduct

Everyone interacting in the Guac project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/mattboldt/guac/blob/master/CODE_OF_CONDUCT.md).

## Copyright

Copyright (c) 2018 Matt Boldt. See [MIT License](LICENSE.txt) for further details.
Copyright (c) 2019 Matt Boldt. See [MIT License](LICENSE.txt) for further details.
10 changes: 2 additions & 8 deletions lib/guac/commands/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def execute(_input: $stdin, output: $stdout)
@output.puts "\n"
end

save_config
Guac::Config.save_configs(@body)
@output.puts "🥑 Config saved in ~/.guacrc 🥑\n".bold.green
@output.puts Guac::Config.config.to_yaml
@output.puts Guac::Config.configs.to_yaml
end

private
Expand Down Expand Up @@ -89,12 +89,6 @@ def valid_result?(result)
result && !result.strip.empty?
end

def save_config
file = File.new(Guac::Config::CONFIG_FILE, 'w')
file.puts(@body.to_yaml)
file.close
end

def parse_branch_aliases(result)
branch_pairs = result.split(/ \s*/)
{}.tap do |obj|
Expand Down
8 changes: 7 additions & 1 deletion lib/guac/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Guac
class Config
CONFIG_FILE = File.join(ENV['HOME'], '.guacrc').freeze
DEFAULTS_FILE = File.join(File.dirname(__FILE__), 'templates/config/guacrc.yml').freeze
DEFAULTS_FILE = File.join(__dir__, 'templates/config/guacrc.yml').freeze
REQUIRED_FIELDS = %i(repos pull_strategy default_branch).freeze
OH_NO_YOU_DONTS = %w(push merge rebase commit clone init mv rm reset).freeze

Expand Down Expand Up @@ -47,6 +47,12 @@ def configs(reload: false)
end
end

def save_configs(body)
file = File.new(CONFIG_FILE, 'w')
file.puts(body.to_yaml)
file.close
end

private

def parse(file)
Expand Down

0 comments on commit 8aa4282

Please sign in to comment.