dotify 0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +52 -11
- data/dotify.gemspec +0 -1
- data/lib/dotify/cli.rb +3 -0
- data/lib/dotify/version.rb +1 -1
- metadata +2 -18
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://secure.travis-ci.org/mattdbridges/dotify.png)](http://travis-ci.org/mattdbridges/dotify) [![Dependency Status](https://gemnasium.com/mattdbridges/dotify.png)](https://gemnasium.com/mattdbridges/dotify)
|
4
4
|
|
5
|
-
Dotify is a simple CLI tool to make managing dotfiles on your system easy. When developing on a Linux/Unix basic system, keeping track of all of those dotfiles in the home directory can be pain. Some developers do not even bother managing them and many have come up with their own static or even dynamic way of managing them. This is a need in the community
|
5
|
+
Dotify is a simple CLI tool to make managing dotfiles on your system easy. When developing on a Linux/Unix basic system, keeping track of all of those dotfiles in the home directory can be pain. Some developers do not even bother managing them and many have come up with their own static or even dynamic way of managing them. This is a need in the community, and this tool makes managing these crazy files a breeze.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -22,28 +22,69 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
As dotify is a CLI tool, everything is done in the command line. Here are the current available methods for managing dotfiles.
|
24
24
|
|
25
|
-
###
|
25
|
+
### Setup Dotify
|
26
26
|
|
27
|
-
|
27
|
+
To setup Dotify, you must first run `dotify setup` in your terminal.
|
28
28
|
|
29
|
-
|
29
|
+
$ dotify setup
|
30
|
+
create /Users/computer-user/.dotify
|
31
|
+
Do you want to add .bachrc to Dotify? [Yn] n
|
32
|
+
Do you want to add .gitconfig to Dotify? [Yn] y
|
33
|
+
...
|
30
34
|
|
31
|
-
|
35
|
+
This will first create a `.dotify` directory in your home directory (yes, only one more dot directory, but this time it is a good thing). It will then ask which files you want to copy from your home directory into your `.dotify` directory.
|
32
36
|
|
33
|
-
This
|
37
|
+
**This will *not* link up the dotfiles. This command simply copies the files over for you without having to go searching for them manually.**
|
34
38
|
|
35
|
-
###
|
39
|
+
### Link up your files
|
36
40
|
|
37
|
-
|
41
|
+
This is the heart of the Dotify tool. This command will link the files within the `~/.dotify` directory into your home directory.
|
38
42
|
|
39
|
-
|
43
|
+
$ dotify link
|
44
|
+
Do you want to link ~/.bashrc? [Yn] Y
|
45
|
+
create /Users/computer-user/.bashrc
|
46
|
+
Do you want to link ~/.gemrc? [Yn] Y
|
47
|
+
identical /Users/computer-user/.gemrc
|
48
|
+
Do you want to link ~/.gitconfig? [Yn] Y
|
49
|
+
create /Users/computer-user/.gitconfig
|
50
|
+
Do you want to link ~/.gitignore? [Yn] Y
|
51
|
+
...
|
52
|
+
|
53
|
+
### Unlink everything
|
54
|
+
|
55
|
+
Don't want any of the dotfiles anymore? Well, I'm not one to question. Go ahead and wipe them out.
|
56
|
+
|
57
|
+
$ dotify unlink
|
58
|
+
Are you sure you want to remove ~/.bashrc? [Yn] Y
|
59
|
+
remove /Users/computer-user/.bashrc
|
60
|
+
Are you sure you want to remove ~/.gemrc? [Yn] Y
|
61
|
+
remove /Users/computer-user/.gemrc
|
62
|
+
Are you sure you want to remove ~/.gitconfig? [Yn] n
|
63
|
+
...
|
64
|
+
|
65
|
+
Should you run this horrid task accidentally, you can simply run `dotify link` again if you want to restore your previous settings.
|
66
|
+
|
67
|
+
## Not sure what to do?
|
68
|
+
|
69
|
+
This tool is powered by the amazing library, [Thor](http://whatisthor.com/). You can use the `help` task like so:
|
70
|
+
|
71
|
+
$ dotify help
|
72
|
+
Tasks:
|
73
|
+
dotify help [TASK] # Describe available tasks or one specific task
|
74
|
+
dotify link # Link up all of your dotfiles
|
75
|
+
dotify setup # Setup your system for Dotify to manage your dotfiles
|
76
|
+
dotify unlink # Unlink all of your dotfiles
|
77
|
+
|
78
|
+
And if you want a little clarity on one of the command you can run `dotify help [TASK]` to find out what other options you have in the other tasks.
|
40
79
|
|
41
80
|
## Contributing
|
42
81
|
|
43
|
-
This tool is developed with much influence from *37singals*' fantastic idea of **Do Less**. This is meant to be a *simple* tool.
|
82
|
+
This tool is developed with much influence from *37singals*' fantastic idea of **Do Less**. This is meant to be a *simple* tool.
|
83
|
+
|
84
|
+
Contributions are welcome and encouraged. The contrubution process is the typical Github one.
|
44
85
|
|
45
86
|
1. Fork it
|
46
87
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
47
88
|
3. Commit your changes (`git commit -am 'Added some feature'`)
|
48
89
|
4. Push to the branch (`git push origin my-new-feature`)
|
49
|
-
5. Create new Pull Request
|
90
|
+
5. Create new [Pull Request](https://github.com/mattdbridges/dotify/pull/new/master)
|
data/dotify.gemspec
CHANGED
data/lib/dotify/cli.rb
CHANGED
@@ -66,11 +66,14 @@ module Dotify
|
|
66
66
|
desc :unlink, "Unlink all of your dotfiles"
|
67
67
|
method_option :all, :default => false, :type => :boolean, :aliases => '-a', :desc => 'Remove all installed dotfiles without confirmation'
|
68
68
|
def unlink
|
69
|
+
count = 0
|
69
70
|
Files.installed do |file, dot|
|
70
71
|
if options[:all] || yes?("Are you sure you want to remove ~/#{dot}? [Yn]", :blue)
|
71
72
|
remove_file Files.dotfile(file)
|
73
|
+
count += 1
|
72
74
|
end
|
73
75
|
end
|
76
|
+
say "No files were unlinked.", :blue if count == 0
|
74
77
|
end
|
75
78
|
|
76
79
|
no_tasks do
|
data/lib/dotify/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dotify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -27,22 +27,6 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: rake
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ! '>='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '0'
|
38
|
-
type: :runtime
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
46
30
|
- !ruby/object:Gem::Dependency
|
47
31
|
name: rspec
|
48
32
|
requirement: !ruby/object:Gem::Requirement
|