dotter_dotfiles 0.3.0 → 0.4.0
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/ChangeLog.md +3 -0
- data/README.md +1 -0
- data/lib/dotter/cli.rb +7 -0
- data/lib/dotter/publicgitrepo.rb +22 -0
- data/lib/dotter/version.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: 017248ae109874e59385115be61bb2387c3f5885
|
4
|
+
data.tar.gz: 4fd9d57e34b84d822705471051839c662209e365
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bc42ca7e19a1739617c96184486b6d30d680428238b230fb25a8c0ef0f46e604caff6210031c07b15ec0c2cbe56a30922a993d8cacc2934508582b4e4e434ad
|
7
|
+
data.tar.gz: c93e5c320bd98b1518c89bab3cd3d3b3f65907ba8766c2be91ad92b5edb09047c87da58a760c11e12718279f990f9528fe7c3e2b507c76650d43c377b165689d
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
### 0.4.0 / 2015-12-31
|
2
|
+
* Add a command to update and push the public repository to the 'public' remote.
|
3
|
+
|
1
4
|
### 0.3.0 / 2015-11-10
|
2
5
|
* Attempted (and failed) to implement a smart clone command.
|
3
6
|
* Implemented a dumb clone command that wipes away VCS history and package state after cloning.
|
data/README.md
CHANGED
@@ -38,6 +38,7 @@ Commands:
|
|
38
38
|
dotter update PACKAGE # Updates the specified package
|
39
39
|
dotter update_all # Updates all stowed packages.
|
40
40
|
dotter version # Print the dotter version
|
41
|
+
dotter update_public # Updates the contents of the public git repository and then pushes it
|
41
42
|
```
|
42
43
|
This project tries to follow [Semantic Versioning](http://semver.org/) but no guarantees are made in this regard.
|
43
44
|
## TODO
|
data/lib/dotter/cli.rb
CHANGED
@@ -121,6 +121,13 @@ module Dotter
|
|
121
121
|
package.update
|
122
122
|
end
|
123
123
|
end
|
124
|
+
desc 'update_public', 'Updates the contents of the public git repository and then pushes it'
|
125
|
+
def update_public
|
126
|
+
puts "Updating the public repository."
|
127
|
+
public_repo = PublicGitRepo.new
|
128
|
+
puts public_repo.update
|
129
|
+
public_repo.push
|
130
|
+
end
|
124
131
|
desc 'import PATH PACKAGE', 'Imports a file or directory into the specified package'
|
125
132
|
def import(path, package)
|
126
133
|
puts "Importing #{path} into package #{package}"
|
data/lib/dotter/publicgitrepo.rb
CHANGED
@@ -42,6 +42,28 @@ module Dotter
|
|
42
42
|
conf = Configuration.new
|
43
43
|
conf.unpublish(package)
|
44
44
|
end
|
45
|
+
def update
|
46
|
+
Dir.chdir(@project_path)
|
47
|
+
directory = Pathname.new(@project_path)
|
48
|
+
directories = directory.children.select(&:directory?)
|
49
|
+
package_names = []
|
50
|
+
directories.each do |directory|
|
51
|
+
package_names.push(directory.basename)
|
52
|
+
end
|
53
|
+
packages = []
|
54
|
+
package_names.each do |name|
|
55
|
+
packages.push(Package.new(name))
|
56
|
+
end
|
57
|
+
packages = packages.select(&:public?)
|
58
|
+
subtree_output = ""
|
59
|
+
packages.each do |package|
|
60
|
+
subtree_output = subtree_output.concat(`git subtree pull --prefix #{package.to_s} #{package.to_s} master`)
|
61
|
+
end
|
62
|
+
subtree_output
|
63
|
+
end
|
64
|
+
def push
|
65
|
+
@repo.push
|
66
|
+
end
|
45
67
|
attr_reader :repo
|
46
68
|
end
|
47
69
|
end
|
data/lib/dotter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dotter_dotfiles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Hodgkins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|