-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added user env variables and git configuration.
- Loading branch information
Showing
7 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class Git < Thor | ||
|
||
include Thor::Actions | ||
|
||
source_root File.expand_path(File.dirname(__FILE__), 'git') | ||
|
||
desc 'setup', 'Setup git environment.' | ||
def setup | ||
email = ENV['EMAIL_ADDRESS'] || ask('What email address would you like to associate with git?', default: 'example@example.com'.gsub(/example/, ENV['USERNAME'])) | ||
name = ENV['FULL_NAME'] || ask('What is the full name associate with git?') | ||
template 'git/.gitconfig', '~/.gitconfig', email: email, name: name | ||
template 'git/.gitignore_global', '~/.gitingore_global' | ||
end | ||
|
||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[color] | ||
ui = true | ||
[user] | ||
email = <%= config[:email] %> | ||
name = <%= config[:name] %> | ||
[core] | ||
excludesfile = <%= "#{ENV['HOME']}" %>/.gitignore_global |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Project ruby settings | ||
.ruby-gemset | ||
.ruby-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class Ruby < Thor | ||
|
||
include Thor::Actions | ||
|
||
desc 'setup', 'Setup ruby environment.' | ||
def setup | ||
create_file '~/.gemrc', 'gem: --no-document' | ||
end | ||
|
||
end |