dotman 0.0.3 → 0.0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/dot +10 -1
- data/lib/dotman.rb +1 -0
- data/lib/dotman/collect.rb +27 -0
- data/lib/dotman/dotfile_collection.rb +8 -0
- data/lib/dotman/git.rb +0 -1
- data/lib/dotman/version.rb +1 -1
- data/spec/data/Timbinous_dotfiles/.bashrc +121 -0
- data/spec/data/Timbinous_dotfiles/.gitignore +5 -0
- data/spec/data/Timbinous_dotfiles/.tmux.conf +15 -0
- data/spec/data/Timbinous_dotfiles/.vim/autoload/pathogen.vim +245 -0
- data/spec/data/Timbinous_dotfiles/.vim/bundle/.gitkeep +0 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/Black.vim +16 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/Dark.vim +63 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/autumnleaf.vim +154 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/c.vim +32 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/darkzen.vim +25 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/grb.vim +13 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/grb.vim~ +13 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/grb2.vim +59 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/grb256.vim +32 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/grb3.vim +23 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/grb4.vim +17 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/grblight.vim +15 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/grblight.vim~ +14 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/ir_black.vim +212 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/moria.vim +227 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/pyte.vim +92 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/redstring.vim +26 -0
- data/spec/data/Timbinous_dotfiles/.vim/colors/xterm16.vim +811 -0
- data/spec/data/Timbinous_dotfiles/.vim/spell/en.utf-8.add +5 -0
- data/spec/data/Timbinous_dotfiles/.vim/spell/en.utf-8.add.spl +0 -0
- data/spec/data/Timbinous_dotfiles/.vimrc +70 -0
- data/spec/data/Timbinous_dotfiles/.zshrc +62 -0
- data/spec/data/Timbinous_dotfiles/symlinkify +58 -0
- data/spec/data/Timbinous_dotfiles/tim.zsh-theme +29 -0
- data/spec/dotman/collect_spec.rb +59 -0
- data/spec/integration/dotfile_collection_integration_spec.rb +18 -4
- data/spec/integration/git_integration_spec.rb +6 -10
- data/spec/integration/user_integration_spec.rb +12 -5
- data/spec/spec_helper.rb +9 -1
- metadata +63 -2
Binary file
|
@@ -0,0 +1,70 @@
|
|
1
|
+
call pathogen#infect()
|
2
|
+
"colorscheme grb2
|
3
|
+
syntax on
|
4
|
+
filetype plugin indent on
|
5
|
+
set tabstop=2 softtabstop=2 shiftwidth=2 expandtab
|
6
|
+
autocmd FileType ruby compiler ruby
|
7
|
+
no ,w <C-w><C-w>
|
8
|
+
map ,s <C-w><C-v><C-w><C-w>
|
9
|
+
map ,t :w\|:!rspec %<cr>
|
10
|
+
map ,r :w\|:!RAILS_ENV=qa rspec %<cr>
|
11
|
+
|
12
|
+
imap <Nul> <ESC>
|
13
|
+
imap jk <ESC>
|
14
|
+
imap kj <ESC>
|
15
|
+
imap <C-h> <C-W>
|
16
|
+
map <C-n> :tabn<cr>
|
17
|
+
map <C-p> :tabp<cr>
|
18
|
+
map <C-b> :tabnew<cr>
|
19
|
+
"nmap n nzz
|
20
|
+
"nmap N Nzz
|
21
|
+
no J 8j
|
22
|
+
no K 8k
|
23
|
+
" set winwidth=104
|
24
|
+
set winheight=5
|
25
|
+
set winminheight=5
|
26
|
+
set winheight=999
|
27
|
+
set wildmode=longest,list
|
28
|
+
set wildmenu
|
29
|
+
set nu
|
30
|
+
set viminfo='100,<50,s10,h,:100
|
31
|
+
set modeline
|
32
|
+
set ls=2
|
33
|
+
set switchbuf=usetab
|
34
|
+
let g:EclimJavascriptValidate = 0
|
35
|
+
|
36
|
+
""""""""""""""""""""""""""""""
|
37
|
+
" => Visual mode related
|
38
|
+
""""""""""""""""""""""""""""""
|
39
|
+
" Really useful!
|
40
|
+
" In visual mode when you press * or # to search for the current selection
|
41
|
+
vnoremap <silent> * :call VisualSearch('f')<CR>
|
42
|
+
vnoremap <silent> # :call VisualSearch('b')<CR>
|
43
|
+
|
44
|
+
" When you press gv you vimgrep after the selected text
|
45
|
+
vmap <silent>gg :call VisualSearch('gv')<CR>
|
46
|
+
vmap <silent>gd :call VisualSearch('gd')<CR>
|
47
|
+
map ,g :Ack
|
48
|
+
map cc <C-_><C-_>
|
49
|
+
|
50
|
+
" From an idea by Michael Naumann
|
51
|
+
function! VisualSearch(direction) range
|
52
|
+
let l:saved_reg = @"
|
53
|
+
execute "normal! vgvy"
|
54
|
+
|
55
|
+
let l:pattern = escape(@", '\\/.*$^~[]')
|
56
|
+
let l:pattern = substitute(l:pattern, "\n$", "", "")
|
57
|
+
|
58
|
+
if a:direction == 'b'
|
59
|
+
execute "normal ?" . l:pattern . "^M"
|
60
|
+
elseif a:direction == 'gv'
|
61
|
+
execute "Ack " . l:pattern
|
62
|
+
elseif a:direction == 'gd'
|
63
|
+
execute "Ack \"(def|function|class) " . l:pattern . "\""
|
64
|
+
elseif a:direction == 'f'
|
65
|
+
execute "normal /" . l:pattern . "^M"
|
66
|
+
endif
|
67
|
+
|
68
|
+
let @/ = l:pattern
|
69
|
+
let @" = l:saved_reg
|
70
|
+
endfunction
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# Path to your oh-my-zsh configuration.
|
2
|
+
ZSH=$HOME/.oh-my-zsh
|
3
|
+
|
4
|
+
# Set name of the theme to load.
|
5
|
+
# Look in ~/.oh-my-zsh/themes/
|
6
|
+
# Optionally, if you set this to "random", it'll load a random theme each
|
7
|
+
# time that oh-my-zsh is loaded.
|
8
|
+
ZSH_THEME="tim"
|
9
|
+
|
10
|
+
# Example aliases
|
11
|
+
# alias zshconfig="mate ~/.zshrc"
|
12
|
+
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
13
|
+
|
14
|
+
# Set to this to use case-sensitive completion
|
15
|
+
# CASE_SENSITIVE="true"
|
16
|
+
|
17
|
+
# Comment this out to disable bi-weekly auto-update checks
|
18
|
+
# DISABLE_AUTO_UPDATE="true"
|
19
|
+
|
20
|
+
# Uncomment to change how many often would you like to wait before auto-updates occur? (in days)
|
21
|
+
# export UPDATE_ZSH_DAYS=13
|
22
|
+
|
23
|
+
# Uncomment following line if you want to disable colors in ls
|
24
|
+
# DISABLE_LS_COLORS="true"
|
25
|
+
|
26
|
+
# Uncomment following line if you want to disable autosetting terminal title.
|
27
|
+
# DISABLE_AUTO_TITLE="true"
|
28
|
+
|
29
|
+
# Uncomment following line if you want red dots to be displayed while waiting for completion
|
30
|
+
# COMPLETION_WAITING_DOTS="true"
|
31
|
+
|
32
|
+
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
33
|
+
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
34
|
+
# Example format: plugins=(rails git textmate ruby lighthouse)
|
35
|
+
plugins=(git)
|
36
|
+
|
37
|
+
source $ZSH/oh-my-zsh.sh
|
38
|
+
|
39
|
+
# Customize to your needs...
|
40
|
+
export PATH=$PATH:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/tim/.rvm/bin
|
41
|
+
|
42
|
+
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
|
43
|
+
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
|
44
|
+
|
45
|
+
function byebye {
|
46
|
+
pair=`ps -U pair | grep sshd | awk '{ print $1 }'`
|
47
|
+
sudo kill $pair
|
48
|
+
}
|
49
|
+
|
50
|
+
function tstart {
|
51
|
+
tmux -S /tmux/prog new-session -s prog -d
|
52
|
+
`chmod 777 /tmux/prog`
|
53
|
+
`tjoin`
|
54
|
+
}
|
55
|
+
|
56
|
+
function tjoin {
|
57
|
+
tmux -S /tmux/prog attach
|
58
|
+
}
|
59
|
+
|
60
|
+
function tlist {
|
61
|
+
ps -o ruser,command -ax | grep '[n]ew-session -s' | ruby -ne '$_ =~ /^(\w+).*-s (\w+)/; puts "#{$1} started #{$2}"'
|
62
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
############################
|
3
|
+
# .make.sh
|
4
|
+
# This script creates symlinks from the home directory to any desired dotfiles in ~/dotfiles
|
5
|
+
############################
|
6
|
+
|
7
|
+
########## Variables
|
8
|
+
|
9
|
+
olddir=~/.dotfiles_old # old dotfiles backup directory
|
10
|
+
files=".bashrc .vimrc .vim .zshrc .tmux.conf .oh-my-zsh" # list of files/folders to symlink in homedir
|
11
|
+
bundle=`pwd`/.vim/bundle
|
12
|
+
|
13
|
+
##########
|
14
|
+
|
15
|
+
# clone my pathogen vim goodies
|
16
|
+
if [ ! -e $bundle/Command-T ]; then
|
17
|
+
git clone git@github.com:wincent/Command-T.git $bundle/Command-T/
|
18
|
+
fi
|
19
|
+
|
20
|
+
if [ ! -e $bundle/ack.vim ]; then
|
21
|
+
git clone git@github.com:mileszs/ack.vim.git $bundle/ack.vim/
|
22
|
+
fi
|
23
|
+
|
24
|
+
if [ ! -e $bundle/tcomment_vim ]; then
|
25
|
+
git clone git@github.com:tomtom/tcomment_vim.git $bundle/tcomment_vim/
|
26
|
+
fi
|
27
|
+
|
28
|
+
if [ ! -e $bundle/vim-fugitive ]; then
|
29
|
+
git clone git@github.com:tpope/vim-fugitive.git $bundle/vim-fugitive/
|
30
|
+
fi
|
31
|
+
|
32
|
+
if [ ! -e $bundle/vim-rails ]; then
|
33
|
+
git clone git@github.com:tpope/vim-rails.git $bundle/vim-rails/
|
34
|
+
fi
|
35
|
+
|
36
|
+
if [ ! -e $bundle/vim-ruby ]; then
|
37
|
+
git clone git@github.com:vim-ruby/vim-ruby.git $bundle/vim-ruby/
|
38
|
+
fi
|
39
|
+
|
40
|
+
# if [ ! -e $bundle/vim-ruby-debugger ]; then
|
41
|
+
# git clone git@github.com:astashov/vim-ruby-debugger.git $bundle/vim-ruby-debugger/
|
42
|
+
# fi
|
43
|
+
|
44
|
+
mkdir -p $olddir
|
45
|
+
|
46
|
+
# move any existing dotfiles in homedir to dotfiles_old directory, then create symlinks
|
47
|
+
for file in $files; do
|
48
|
+
if [ -h ~/$file ]
|
49
|
+
then
|
50
|
+
rm ~/$file
|
51
|
+
elif [ -e ~/$file ]
|
52
|
+
then
|
53
|
+
echo "Moving any existing dotfiles from ~ to $olddir"
|
54
|
+
mv ~/$file $olddir/$file
|
55
|
+
fi
|
56
|
+
echo "Creating symlink to $file in home directory."
|
57
|
+
ln -s `pwd`/$file ~/$file
|
58
|
+
done
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Personalized!
|
2
|
+
|
3
|
+
# Grab the current date (%D) and time (%T) wrapped in {}: {%D %T}
|
4
|
+
DALLAS_CURRENT_TIME_="%{$fg[white]%}{%{$fg[yellow]%}%D %T%{$fg[white]%}}%{$reset_color%}"
|
5
|
+
# Grab the current version of ruby in use (via RVM): [ruby-1.8.7]
|
6
|
+
if [ -e ~/.rvm/bin/rvm-prompt ]; then
|
7
|
+
DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}"
|
8
|
+
else
|
9
|
+
if which rbenv &> /dev/null; then
|
10
|
+
DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg[white]%}]%{$reset_color%}"
|
11
|
+
fi
|
12
|
+
fi
|
13
|
+
# Grab the current machine name: muscato
|
14
|
+
DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}"
|
15
|
+
# Grab the current filepath, use shortcuts: ~/Desktop
|
16
|
+
# Append the current git branch, if in a git repository: ~aw@master
|
17
|
+
DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~ \$(git_prompt_info)%{$reset_color%}"
|
18
|
+
# Grab the current username: dallas
|
19
|
+
DALLAS_CURRENT_USER_="%{$fg[red]%}%n%{$reset_color%}"
|
20
|
+
# Use a % for normal users and a # for privelaged (root) users.
|
21
|
+
# DALLAS_PROMPT_CHAR_="%{$fg[white]%}%(!.#.%%)%{$reset_color%}"
|
22
|
+
|
23
|
+
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[magenta]%}<%{$fg[red]%}"
|
24
|
+
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
25
|
+
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[yellow]%}x%{$reset_color%}"
|
26
|
+
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
27
|
+
|
28
|
+
# Put it all together!
|
29
|
+
PROMPT="$DALLAS_CURRENT_TIME_$DALLAS_CURRENT_RUBY_$DALLAS_CURRENT_LOCA_%{$fg[magenta]%}>%{$reset_color%} "
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Dotman::Collect do
|
4
|
+
|
5
|
+
let(:collect) { Dotman::Collect.new }
|
6
|
+
|
7
|
+
context '#create_dotman' do
|
8
|
+
|
9
|
+
it 'should check for dotfiles directory and not create if exists' do
|
10
|
+
File.stub(:directory?).and_return(true)
|
11
|
+
FileUtils.should_not_receive(:mkdir)
|
12
|
+
collect.create_dotman
|
13
|
+
end
|
14
|
+
|
15
|
+
xit 'should check for dotfiles directory and create if does not exist' do
|
16
|
+
File.stub(:directory?).and_return(false)
|
17
|
+
FileUtils.should_receive(:mkdir)
|
18
|
+
collect.create_dotman
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should call collect_dotfiles to continue execution' do
|
22
|
+
File.stub(:directory?).and_return(true)
|
23
|
+
collect.should_receive(:collect_dotfiles)
|
24
|
+
collect.create_dotman
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
context '#collect_dotfiles' do
|
30
|
+
|
31
|
+
it 'should call copy_over_dot for each dotfile in pwd' do
|
32
|
+
Dir.stub(:entries).and_return(['test1', 'test2', 'test3'])
|
33
|
+
collect.should_receive(:copy_over_dot).exactly(3).times
|
34
|
+
collect.collect_dotfiles
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'should print collecting for script status' do
|
38
|
+
collect.stub(:copy_over_dot)
|
39
|
+
collect.should_receive(:puts).with('collecting...')
|
40
|
+
collect.collect_dotfiles
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
context '#copy_over_dot' do
|
45
|
+
|
46
|
+
it 'should copy dot files over if correct file format' do
|
47
|
+
FileUtils.should_receive(:copy).exactly(1).times
|
48
|
+
collect.copy_over_dot(File.join(ENV['HOME'], '.dotman'))
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'should print out file being copied for user' do
|
52
|
+
collect.should_receive(:puts).with("copying #{File.join(ENV['HOME'], '.dotman')} to dotfiles")
|
53
|
+
FileUtils.stub(:copy)
|
54
|
+
collect.copy_over_dot(File.join(ENV['HOME'], '.dotman'))
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
describe Dotman::DotfileCollection do
|
3
|
-
before :
|
3
|
+
before :each do
|
4
4
|
Dotman::Git.clone_repository('git@github.com:Timbinous/dotfiles.git', 'tim')
|
5
5
|
end
|
6
6
|
|
@@ -9,13 +9,27 @@ describe Dotman::DotfileCollection do
|
|
9
9
|
let (:alias_name) { 'tim' }
|
10
10
|
let (:dotfile_collection_name) { 'Timbinous_dotfiles' }
|
11
11
|
let! (:dotfile_configuration) { Dotman::DotfileCollection.new_configuration(dotfile_collection_name, alias_name) }
|
12
|
+
|
12
13
|
it "returns the dotfile collection" do
|
13
14
|
Dotman::DotfileCollection.find_by_alias(alias_name).should be_an_instance_of(Dotman::DotfileCollection)
|
14
15
|
end
|
15
16
|
end
|
16
17
|
end
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
|
19
|
+
describe ".all_aliases" do
|
20
|
+
context "when an alias exists in the collection" do
|
21
|
+
it "lists the alias" do
|
22
|
+
Dotman::DotfileCollection.all_aliases.should include('tim')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe ".show_all_aliases" do
|
28
|
+
context "when aliases exist in the collection" do
|
29
|
+
it "shows all the aliases" do
|
30
|
+
STDOUT.should_receive(:puts).with("default\ntim")
|
31
|
+
Dotman::DotfileCollection.show_all_aliases
|
32
|
+
end
|
33
|
+
end
|
20
34
|
end
|
21
35
|
end
|
@@ -5,6 +5,12 @@
|
|
5
5
|
require 'spec_helper'
|
6
6
|
describe Dotman::Git do
|
7
7
|
|
8
|
+
before :each do
|
9
|
+
Dotman::Base.ensure_dotman_folder_exists
|
10
|
+
Dotman::Base.ensure_default_folder_exists
|
11
|
+
Dotman::Base.ensure_current_dotman_file_exists
|
12
|
+
end
|
13
|
+
|
8
14
|
context "cloning a new repo" do
|
9
15
|
|
10
16
|
let (:git_dotfile_repo_path) { "git@github.com:Timbinous/dotfiles.git" }
|
@@ -22,11 +28,6 @@ describe Dotman::Git do
|
|
22
28
|
Dotman::DotfileCollection.find_by_alias(git_folder_name).should_not be_false
|
23
29
|
end
|
24
30
|
|
25
|
-
after :all do
|
26
|
-
FileUtils.rm_r("#{ENV['HOME']}/.dotman/dotfiles.yml")
|
27
|
-
FileUtils.rm_rf("#{ENV['HOME']}/.dotman/Timbinous_dotfiles")
|
28
|
-
end
|
29
|
-
|
30
31
|
end
|
31
32
|
|
32
33
|
context "when alias was passed" do
|
@@ -41,11 +42,6 @@ describe Dotman::Git do
|
|
41
42
|
Dotman::DotfileCollection.find_by_alias('tim').should_not be_false
|
42
43
|
end
|
43
44
|
|
44
|
-
after :all do
|
45
|
-
FileUtils.rm_r("#{ENV['HOME']}/.dotman/dotfiles.yml")
|
46
|
-
FileUtils.rm_rf("#{ENV['HOME']}/.dotman/Timbinous_dotfiles")
|
47
|
-
end
|
48
|
-
|
49
45
|
end
|
50
46
|
end
|
51
47
|
|
@@ -2,12 +2,9 @@ require 'spec_helper'
|
|
2
2
|
describe Dotman::User do
|
3
3
|
let (:tim) { Dotman::User.new('tim') }
|
4
4
|
|
5
|
-
before :all do
|
6
|
-
Dotman::Git.clone_repository("git@github.com:Timbinous/dotfiles.git", 'tim')
|
7
|
-
end
|
8
|
-
|
9
5
|
describe ".current_user_alias" do
|
10
6
|
before :all do
|
7
|
+
Dotman::Base.ensure_dotman_folder_exists
|
11
8
|
File.open(Dotman::Base.current_dotman, 'w') { |f| f.write 'tim' }
|
12
9
|
end
|
13
10
|
|
@@ -17,6 +14,10 @@ describe Dotman::User do
|
|
17
14
|
end
|
18
15
|
|
19
16
|
describe "#set_current_user" do
|
17
|
+
before :each do
|
18
|
+
Dotman::Base.ensure_dotman_folder_exists
|
19
|
+
Dotman::Git.clone_repository("git@github.com:Timbinous/dotfiles.git", 'tim')
|
20
|
+
end
|
20
21
|
|
21
22
|
it 'writes to the .current file, the alias of the current user' do
|
22
23
|
tim.set_current_user
|
@@ -26,6 +27,10 @@ describe Dotman::User do
|
|
26
27
|
|
27
28
|
|
28
29
|
describe ".current" do
|
30
|
+
before :each do
|
31
|
+
Dotman::Base.ensure_dotman_folder_exists
|
32
|
+
Dotman::Git.clone_repository("git@github.com:Timbinous/dotfiles.git", 'tim')
|
33
|
+
end
|
29
34
|
|
30
35
|
it 'returns the current users information' do
|
31
36
|
tim.set_current_user
|
@@ -35,7 +40,9 @@ describe Dotman::User do
|
|
35
40
|
|
36
41
|
describe "#set" do
|
37
42
|
|
38
|
-
before :
|
43
|
+
before :each do
|
44
|
+
Dotman::Base.ensure_dotman_folder_exists
|
45
|
+
Dotman::Git.clone_repository("git@github.com:Timbinous/dotfiles.git", 'tim')
|
39
46
|
$default_user.set_current_user
|
40
47
|
FileUtils.touch(["#{ENV['HOME']}/.vimrc", "#{ENV['HOME']}/.zshrc", "#{ENV['HOME']}/.bashrc"])
|
41
48
|
FileUtils.mkdir("#{ENV['HOME']}/.dotman/default")
|
data/spec/spec_helper.rb
CHANGED
@@ -4,7 +4,15 @@ require_relative "../lib/dotman"
|
|
4
4
|
|
5
5
|
RSpec.configure do |config|
|
6
6
|
|
7
|
-
config.
|
7
|
+
config.before(:each) do
|
8
|
+
Dotman::Git.stub(:system) do |arg|
|
9
|
+
if arg == "git clone git@github.com:Timbinous/dotfiles.git /home/tim/source/dotman/spec/data/home/.dotman/Timbinous_dotfiles"
|
10
|
+
FileUtils.cp_r(File.expand_path('../data/Timbinous_dotfiles', __FILE__), File.join(ENV['HOME'], '.dotman'))
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
config.after(:each) do
|
8
16
|
FileUtils.rm_rf(File.join(ENV['HOME'], '.dotman')) if File.directory? (File.join(ENV['HOME'], '.dotman'))
|
9
17
|
FileUtils.rm(File.join(ENV['HOME'], '.bashrc')) if File.symlink? (File.join(ENV['HOME'], '.bashrc'))
|
10
18
|
FileUtils.rm(File.join(ENV['HOME'], '.gitignore')) if File.symlink? (File.join(ENV['HOME'], '.gitignore'))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dotman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.3
|
4
|
+
version: 0.0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,12 +84,43 @@ files:
|
|
84
84
|
- dotman.gemspec
|
85
85
|
- lib/dotman.rb
|
86
86
|
- lib/dotman/base.rb
|
87
|
+
- lib/dotman/collect.rb
|
87
88
|
- lib/dotman/dotfile_collection.rb
|
88
89
|
- lib/dotman/git.rb
|
89
90
|
- lib/dotman/user.rb
|
90
91
|
- lib/dotman/version.rb
|
92
|
+
- spec/data/Timbinous_dotfiles/.bashrc
|
93
|
+
- spec/data/Timbinous_dotfiles/.gitignore
|
94
|
+
- spec/data/Timbinous_dotfiles/.tmux.conf
|
95
|
+
- spec/data/Timbinous_dotfiles/.vim/autoload/pathogen.vim
|
96
|
+
- spec/data/Timbinous_dotfiles/.vim/bundle/.gitkeep
|
97
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/Black.vim
|
98
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/Dark.vim
|
99
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/autumnleaf.vim
|
100
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/c.vim
|
101
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/darkzen.vim
|
102
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grb.vim
|
103
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grb.vim~
|
104
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grb2.vim
|
105
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grb256.vim
|
106
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grb3.vim
|
107
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grb4.vim
|
108
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grblight.vim
|
109
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grblight.vim~
|
110
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/ir_black.vim
|
111
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/moria.vim
|
112
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/pyte.vim
|
113
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/redstring.vim
|
114
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/xterm16.vim
|
115
|
+
- spec/data/Timbinous_dotfiles/.vim/spell/en.utf-8.add
|
116
|
+
- spec/data/Timbinous_dotfiles/.vim/spell/en.utf-8.add.spl
|
117
|
+
- spec/data/Timbinous_dotfiles/.vimrc
|
118
|
+
- spec/data/Timbinous_dotfiles/.zshrc
|
119
|
+
- spec/data/Timbinous_dotfiles/symlinkify
|
120
|
+
- spec/data/Timbinous_dotfiles/tim.zsh-theme
|
91
121
|
- spec/data/home/.gitkeep
|
92
122
|
- spec/dotman/base_spec.rb
|
123
|
+
- spec/dotman/collect_spec.rb
|
93
124
|
- spec/dotman/dotfile_collection_spec.rb
|
94
125
|
- spec/dotman_spec.rb
|
95
126
|
- spec/git_spec.rb
|
@@ -124,8 +155,38 @@ specification_version: 4
|
|
124
155
|
summary: Use this utility to manage your dotfiles and others who may use the same
|
125
156
|
login user as yourself
|
126
157
|
test_files:
|
158
|
+
- spec/data/Timbinous_dotfiles/.bashrc
|
159
|
+
- spec/data/Timbinous_dotfiles/.gitignore
|
160
|
+
- spec/data/Timbinous_dotfiles/.tmux.conf
|
161
|
+
- spec/data/Timbinous_dotfiles/.vim/autoload/pathogen.vim
|
162
|
+
- spec/data/Timbinous_dotfiles/.vim/bundle/.gitkeep
|
163
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/Black.vim
|
164
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/Dark.vim
|
165
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/autumnleaf.vim
|
166
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/c.vim
|
167
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/darkzen.vim
|
168
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grb.vim
|
169
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grb.vim~
|
170
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grb2.vim
|
171
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grb256.vim
|
172
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grb3.vim
|
173
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grb4.vim
|
174
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grblight.vim
|
175
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/grblight.vim~
|
176
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/ir_black.vim
|
177
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/moria.vim
|
178
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/pyte.vim
|
179
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/redstring.vim
|
180
|
+
- spec/data/Timbinous_dotfiles/.vim/colors/xterm16.vim
|
181
|
+
- spec/data/Timbinous_dotfiles/.vim/spell/en.utf-8.add
|
182
|
+
- spec/data/Timbinous_dotfiles/.vim/spell/en.utf-8.add.spl
|
183
|
+
- spec/data/Timbinous_dotfiles/.vimrc
|
184
|
+
- spec/data/Timbinous_dotfiles/.zshrc
|
185
|
+
- spec/data/Timbinous_dotfiles/symlinkify
|
186
|
+
- spec/data/Timbinous_dotfiles/tim.zsh-theme
|
127
187
|
- spec/data/home/.gitkeep
|
128
188
|
- spec/dotman/base_spec.rb
|
189
|
+
- spec/dotman/collect_spec.rb
|
129
190
|
- spec/dotman/dotfile_collection_spec.rb
|
130
191
|
- spec/dotman_spec.rb
|
131
192
|
- spec/git_spec.rb
|