gitdis 0.0.2.1 → 0.1.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/VERSION +1 -1
- data/bin/gitdis +6 -4
- data/lib/gitdis.rb +9 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd2eab00376771d5429797b7d8a09b569f4b7f7f
|
4
|
+
data.tar.gz: ecf10f0588722294449fa2a492a5b0a361d1d93c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 100c2161584932f2ae5ad0b135afe703c46d80d0185309c05f710f490e9de62a0315ccd7522cbafee51e99a6df7605a19c0b098e2b76f1463c8d030c1e071130
|
7
|
+
data.tar.gz: a16961028305d93c1109231e3b57fa80f91c3ad13c03230a8b8ca05bbb22faa3b127e4e307ef2f778fc3f3e0065dee70dde81fc252277db432506e0bc30b1433
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.1.0.1
|
data/bin/gitdis
CHANGED
@@ -70,7 +70,7 @@ puts "Redis options: #{redis_options}"
|
|
70
70
|
if opts.dump?
|
71
71
|
GitDis.dump(keymap.keys, redis_options)
|
72
72
|
else
|
73
|
-
gd = GitDis.new
|
73
|
+
gd = GitDis.new(config.fetch('git-repo'), redis_options)
|
74
74
|
gd.git_pull config.fetch('git-branch')
|
75
75
|
|
76
76
|
keymap.each { |key, fileglob|
|
@@ -81,9 +81,11 @@ else
|
|
81
81
|
when false
|
82
82
|
puts "#{fileglob} unchanged"
|
83
83
|
else
|
84
|
-
|
85
|
-
|
86
|
-
|
84
|
+
unless opts.dry_run?
|
85
|
+
ver, md5 = *result
|
86
|
+
puts "#{fileglob} updated:"
|
87
|
+
puts "\tVersion: #{ver} (#{md5})"
|
88
|
+
end
|
87
89
|
end
|
88
90
|
}
|
89
91
|
end
|
data/lib/gitdis.rb
CHANGED
@@ -74,10 +74,15 @@ class GitDis
|
|
74
74
|
fkey, vkey, mkey = self.class.keyset(base_key)
|
75
75
|
return false if @redis.get(mkey) == md5
|
76
76
|
|
77
|
-
@
|
78
|
-
|
79
|
-
|
80
|
-
|
77
|
+
if @dry_run
|
78
|
+
puts "DRY RUN: would have updated #{base_key} with md5 #{md5}"
|
79
|
+
true
|
80
|
+
else
|
81
|
+
@redis.set(fkey, file_contents)
|
82
|
+
@redis.set(mkey, md5)
|
83
|
+
ver = @redis.incr(vkey)
|
84
|
+
[ver, md5]
|
85
|
+
end
|
81
86
|
end
|
82
87
|
|
83
88
|
# e.g. update('foo:bar:baz', 'foo/bar/*.baz')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitdis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rick Hull
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slop
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
85
|
rubyforge_project:
|
86
|
-
rubygems_version: 2.
|
86
|
+
rubygems_version: 2.2.2
|
87
87
|
signing_key:
|
88
88
|
specification_version: 4
|
89
89
|
summary: Pull from git, push to redis and beyond!
|