sheldon 6.0.0 → 6.0.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/README.md +7 -25
- data/bin/sheldon +2 -2
- data/lib/sheldon/brain.rb +3 -1
- data/lib/sheldon/exceptions.rb +3 -0
- data/lib/sheldon/sheldon.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13c533961af86e6dcde2706f1740f6400fe1038f
|
4
|
+
data.tar.gz: 79078990bb84e7a37e01428af94f7865826ed9d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0ea87310e6b47401817a26c01e6b6553796b7ba60af80870908ec04fa7055d0f1467f778a4ae36a8c871597efbe1037403fe60c6ed80d951873fb50276f8a78
|
7
|
+
data.tar.gz: 8e757adb6d7d250a1d74b414c5579a71026dbe70e466450bea78273a3e982b8a7c9f0b272db5a86b55a96dc429bcc64794388f322baa0587915bda5a56f6ccd6
|
data/README.md
CHANGED
@@ -3,11 +3,11 @@
|
|
3
3
|
[](https://coveralls.io/github/dvjones89/sheldon?branch=master)
|
4
4
|
[](https://badge.fury.io/rb/sheldon)
|
5
5
|
|
6
|
-
|
6
|
+
Sheldon makes it easy for you to manage your .dotfiles and configs across all your OS X / linux devices.
|
7
7
|
|
8
8
|
### Installation:
|
9
9
|
1) `gem install sheldon`
|
10
|
-
2) `sheldon setup path/to/data
|
10
|
+
2) `sheldon setup path/to/data/directory` to tell Sheldon where your existing data directory resides, or otherwise where a new data directory should be created.
|
11
11
|
3) Sync your data directory across all your different hosts using your preferred method (git, rsync, Dropbox, Resilio Sync), so Sheldon's knowledge is available everywhere.
|
12
12
|
|
13
13
|
### How It Works
|
@@ -41,29 +41,11 @@ Recall git_config (Y/N): y
|
|
41
41
|
Recall .zshrc (Y/N): y
|
42
42
|
```
|
43
43
|
|
44
|
-
####
|
45
|
-
|
46
|
-
|
47
|
-
Split your ssh config into `config_work` and `config_personal`
|
48
|
-
Use Sheldon `learn` and `recall` to make the appropriate `_config` files available on the appropriate hosts.
|
49
|
-
Once the files are in the right place, use Sheldon `build` to create a single `config` file that can be easily sourced.
|
50
|
-
|
44
|
+
#### Open Your Configs In A Flash (sheldon open)
|
45
|
+
Want to quickly tweak that config file but can't remember where it resides on your system? No worries, Sheldon's got your back:
|
51
46
|
```shell
|
52
|
-
|
53
|
-
|
54
|
-
ls -l
|
55
|
-
config_dev -> /Users/dave/sheldon/ssh_config_dev/config_dev
|
56
|
-
config_personal -> /Users/dave/sheldon/ssh_config_personal/config_personal
|
57
|
-
|
58
|
-
sheldon build ~/.ssh
|
59
|
-
💥 Sheldon💥 Built .ssh
|
60
|
-
|
61
|
-
ls -l
|
62
|
-
config_dev -> /Users/dave/sheldon/ssh_config_dev/config_dev
|
63
|
-
config_personal -> /Users/dave/sheldon/ssh_config_personal/config_personal
|
64
|
-
config
|
65
|
-
|
66
|
-
source ~/.ssh/config
|
47
|
+
sheldon open git
|
48
|
+
# Your ~/.gitconfig will be opened in your $EDITOR
|
67
49
|
```
|
68
50
|
|
69
51
|
### Contributing
|
@@ -77,4 +59,4 @@ source ~/.ssh/config
|
|
77
59
|
7. Create a new Pull Request
|
78
60
|
|
79
61
|
### License
|
80
|
-
See LICENSE
|
62
|
+
See [LICENSE](https://github.com/dvjones89/sheldon/blob/master/LICENSE)
|
data/bin/sheldon
CHANGED
@@ -58,7 +58,7 @@ module CLI
|
|
58
58
|
with_exception_handling do
|
59
59
|
memory_entry = sheldon.brain.memory.recall(recall_cue)
|
60
60
|
filepath = add_home(memory_entry[:filepath])
|
61
|
-
system("#{
|
61
|
+
system("#{editor} '#{filepath}'")
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
@@ -72,7 +72,7 @@ module CLI
|
|
72
72
|
with_exception_handling { sheldon.recall(recall_cue) if answer.downcase == "y" }
|
73
73
|
end
|
74
74
|
else
|
75
|
-
recall_cue
|
75
|
+
recall_cue ||= cue_picker("What would you like to recall?")
|
76
76
|
with_exception_handling { sheldon.recall(recall_cue) }
|
77
77
|
end
|
78
78
|
|
data/lib/sheldon/brain.rb
CHANGED
@@ -45,9 +45,11 @@ class Brain
|
|
45
45
|
entry = memory.recall(recall_cue)
|
46
46
|
destination_path = add_home(entry[:filepath])
|
47
47
|
destination_dir = File.dirname(destination_path)
|
48
|
+
raise DestinationNotEmptyException, "#{destination_path} already exists." if File.exist?(destination_path)
|
49
|
+
|
48
50
|
FileUtils.mkdir_p(destination_dir) unless File.directory?(destination_dir)
|
49
51
|
brain_path = brain_path_for_cue(recall_cue)
|
50
|
-
FileUtils.ln_s(get_content(brain_path), destination_path
|
52
|
+
FileUtils.ln_s(get_content(brain_path), destination_path)
|
51
53
|
return true
|
52
54
|
end
|
53
55
|
|
data/lib/sheldon/exceptions.rb
CHANGED
data/lib/sheldon/sheldon.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sheldon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Jones
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|