dandelion 0.4.16 → 0.4.17
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 +9 -3
- data/lib/dandelion/diff.rb +3 -7
- data/lib/dandelion/version.rb +1 -1
- data/spec/dandelion/changeset_spec.rb +5 -5
- 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: 317add4350e3f191268e262e1947f35313f4a13b
|
4
|
+
data.tar.gz: f8a1ea25badbe77e8723a32a45aef8a22c05be08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94800c3e6a2b28d747912075c51ca31826ecc6cc5281505fe59420786dd1a4b4f6bc87bfb2cf0807a224e5a34393d84bebe6cf1ccea0eefad39682524f1c24ea
|
7
|
+
data.tar.gz: 82936f82f49cbc03de7e3881d13cc5f5c5ba168fb66457ba18e50e5e13a710a3cfff5acef811fe0db2d96f18a6908aacc83a4129b1a4103a1ed85857c5d92734
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Incremental Git repository deployment.
|
|
10
10
|
Install
|
11
11
|
-------
|
12
12
|
|
13
|
-
Ensure that Ruby >=
|
13
|
+
Ensure that Ruby >= 2.0.0 is installed, then run:
|
14
14
|
|
15
15
|
$ gem install dandelion
|
16
16
|
|
@@ -59,14 +59,20 @@ Optional:
|
|
59
59
|
* `revision_file` (remote file in which revision SHA is stored, defaults to .revision)
|
60
60
|
|
61
61
|
The `additional` section can either take a list of local file names or key-value formats if you want to upload something to a specific path:
|
62
|
-
|
62
|
+
|
63
|
+
```yaml
|
63
64
|
additional:
|
64
65
|
- localdir: remotedir
|
65
66
|
- file.txt: remotedir/file.txt
|
66
67
|
```
|
68
|
+
|
67
69
|
The `localdir` in this example is relative to the repository root (ignoring `local_path` if you set it).
|
68
70
|
|
69
|
-
Each adapter also has additional required and optional configuration parameters (see below).
|
71
|
+
Each adapter also has additional required and optional configuration parameters (see below). Note that you can dynamically set configuration values by using environment variables. For example:
|
72
|
+
|
73
|
+
```yaml
|
74
|
+
password: <%= ENV['DANDELION_PASSWORD'] %>
|
75
|
+
```
|
70
76
|
|
71
77
|
Adapters
|
72
78
|
--------
|
data/lib/dandelion/diff.rb
CHANGED
@@ -34,13 +34,9 @@ private
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def each
|
37
|
-
@deltas.
|
38
|
-
|
39
|
-
|
40
|
-
else
|
41
|
-
yield Change.new(delta.new_file[:path], :write)
|
42
|
-
end
|
43
|
-
end
|
37
|
+
deletes, writes = @deltas.partition(&:deleted?)
|
38
|
+
deletes.each { |delta| yield Change.new(delta.old_file[:path], :delete) }
|
39
|
+
writes.each { |delta| yield Change.new(delta.new_file[:path], :write) }
|
44
40
|
end
|
45
41
|
end
|
46
42
|
|
data/lib/dandelion/version.rb
CHANGED
@@ -10,8 +10,8 @@ describe Dandelion::Changeset do
|
|
10
10
|
it 'returns all changes' do
|
11
11
|
expect(changes).to be_a(Array)
|
12
12
|
expect(changes.length).to eq 5
|
13
|
-
expect(changes.map(&:path)).to eq ['bar', 'baz/
|
14
|
-
expect(changes.map(&:type)).to eq [:delete, :
|
13
|
+
expect(changes.map(&:path)).to eq ['bar', 'baz/foo', 'baz/bar', 'foo', 'qux']
|
14
|
+
expect(changes.map(&:type)).to eq [:delete, :delete, :write, :write, :write]
|
15
15
|
end
|
16
16
|
|
17
17
|
it 'returns data for write changes' do
|
@@ -35,12 +35,12 @@ describe Dandelion::Changeset do
|
|
35
35
|
it 'returns all changes' do
|
36
36
|
expect(changes).to be_a(Array)
|
37
37
|
expect(changes.length).to eq 2
|
38
|
-
expect(changes.map(&:path)).to eq ['
|
39
|
-
expect(changes.map(&:type)).to eq [:
|
38
|
+
expect(changes.map(&:path)).to eq ['foo', 'bar']
|
39
|
+
expect(changes.map(&:type)).to eq [:delete, :write]
|
40
40
|
end
|
41
41
|
|
42
42
|
it 'returns data for write changes' do
|
43
|
-
expect(changes.
|
43
|
+
expect(changes.last.data).to eq "bar\n"
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dandelion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Nelson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rugged
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.
|
184
|
+
rubygems_version: 2.5.1
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: Incremental Git repository deployment
|