sheldon 0.2.6 → 0.2.7
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 +8 -5
- data/bin/sheldon +8 -1
- data/lib/sheldon.rb +1 -0
- data/lib/sheldon/exceptions.rb +2 -0
- data/lib/sheldon/sheldon.rb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a362c2944967c5547fc8852394c16806721dd0a
|
4
|
+
data.tar.gz: 5b0c19f8e27bd0e339b799ff674a6ac8654bfe6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c1fdec9e95e9bd92b3ff7713020a2ac529d4de9e94dab5d80de14d4cc7af23366c09e8b2b08a4d19cae55f2b16c76f2f86584fcce2a4c11e9fb4a3ef3dd5261
|
7
|
+
data.tar.gz: 3144792bd5606157f305e4be30465c8712b390c1f4023e1e44602c1fb93783a84457d220fa559303158ebb74c973d441c9dcb2c983dfa23813562ad2f52dbd77
|
data/README.md
CHANGED
@@ -1,8 +1,16 @@
|
|
1
1
|
# Sheldon
|
2
2
|
[](https://travis-ci.org/dvjones89/sheldon)
|
3
|
+
[](https://badge.fury.io/rb/sheldon)
|
4
|
+
|
3
5
|
|
4
6
|
Designed with the obsessive developer in mind, Sheldon makes it easy for you to manage your .dotfiles and configs across all your OS X / linux devices.
|
5
7
|
|
8
|
+
### Installation:
|
9
|
+
1) `gem install sheldon`
|
10
|
+
|
11
|
+
2) Sync Sheldon's data directory (`~/sheldon` by default) across all of your machines.
|
12
|
+
You can override the default folder location by setting the`SHELDON_DATA_DIR` environment variable on each host.
|
13
|
+
|
6
14
|
### How It Works
|
7
15
|
#### Add files/folders to Sheldon (sheldon learn)
|
8
16
|
Teach Sheldon about new files or directories using the `learn` command:
|
@@ -62,11 +70,6 @@ config
|
|
62
70
|
source ~/.ssh/config
|
63
71
|
```
|
64
72
|
|
65
|
-
### Installation:
|
66
|
-
1) `gem install Sheldon-<version>.gem`
|
67
|
-
|
68
|
-
2) Sync Sheldon's data directory (`~/sheldon` by default) across all of your machines. You can override the default folder location by setting the`SHELDON_DATA_DIR` environment variable on each host.
|
69
|
-
|
70
73
|
### Isn't This Just Homesick?
|
71
74
|
Yes, yes it is. Unfortunately, I'd written 90% of Sheldon before I discovered the awesome [homesick](https://github.com/technicalpickles/homesick) so I decided to keep going.
|
72
75
|
Sheldon's `build` command is (as far as I know) unique to Sheldon and will perhaps prove useful to those who chunk their configs.
|
data/bin/sheldon
CHANGED
@@ -6,6 +6,8 @@ module CLI
|
|
6
6
|
class Sheldon < Thor
|
7
7
|
map link: :recall
|
8
8
|
map ls: :list
|
9
|
+
map "-v" => :version
|
10
|
+
map "--version" => :version
|
9
11
|
|
10
12
|
desc "build path", "Tell Sheldon to build all config_ files in a directory to single master config"
|
11
13
|
def build(rel_path_to_target)
|
@@ -61,7 +63,12 @@ module CLI
|
|
61
63
|
end
|
62
64
|
|
63
65
|
def sheldon
|
64
|
-
|
66
|
+
begin
|
67
|
+
@sheldon ||= ::Sheldon.new(sheldon_data_dir)
|
68
|
+
rescue MissingDataDirectoryException
|
69
|
+
announce "The data directory (#{sheldon_data_dir}) doesn't exist. Please create the directory or set an alternative using the $SHELDON_DATA_DIR environment variable."
|
70
|
+
exit
|
71
|
+
end
|
65
72
|
end
|
66
73
|
|
67
74
|
def sheldon_data_dir
|
data/lib/sheldon.rb
CHANGED
data/lib/sheldon/sheldon.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
require "fileutils"
|
2
2
|
|
3
3
|
class Sheldon
|
4
|
-
VERSION = "0.2.
|
4
|
+
VERSION = "0.2.7".freeze
|
5
5
|
attr_reader :brain, :builder
|
6
6
|
|
7
7
|
def initialize(sheldon_data_dir, opts = {})
|
8
|
-
raise
|
8
|
+
raise MissingDataDirectoryException unless Dir.exists?(sheldon_data_dir)
|
9
9
|
@brain = opts[:brain] || Brain.new(sheldon_data_dir)
|
10
10
|
@builder = opts[:builder] || Builder.new
|
11
11
|
end
|
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: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Jones
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- lib/sheldon.rb
|
80
80
|
- lib/sheldon/brain.rb
|
81
81
|
- lib/sheldon/builder.rb
|
82
|
+
- lib/sheldon/exceptions.rb
|
82
83
|
- lib/sheldon/helpers.rb
|
83
84
|
- lib/sheldon/memory.rb
|
84
85
|
- lib/sheldon/sheldon.rb
|