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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00679bc637122da812caacac0edd596e7a488aa8
4
- data.tar.gz: 766b3214d6db7ee1ec92e90debe98ac64f9fb1e7
3
+ metadata.gz: 317add4350e3f191268e262e1947f35313f4a13b
4
+ data.tar.gz: f8a1ea25badbe77e8723a32a45aef8a22c05be08
5
5
  SHA512:
6
- metadata.gz: 3e2aa371bde3d86ceef8ffe6a90efa2e0174dbc7e6172054abe9c3ddee4442bb5bec8fea2522ab375158a37929615a7b02202b6fbcf851d7bbf5ff2662993b04
7
- data.tar.gz: 3794f43c5b54720f58f2844b3a1d2470e30564ac093cf98be64ccbb1e9cea46fc54090a9b35b0ac3e2487df6ec1fb874cd4353f5f1ad4fdc2cad44e0deefae75
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 >= 1.9.2 is installed, then run:
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
  --------
@@ -34,13 +34,9 @@ private
34
34
  end
35
35
 
36
36
  def each
37
- @deltas.each do |delta|
38
- if delta.deleted?
39
- yield Change.new(delta.old_file[:path], :delete)
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
 
@@ -1,3 +1,3 @@
1
1
  module Dandelion
2
- VERSION = '0.4.16'
2
+ VERSION = '0.4.17'
3
3
  end
@@ -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/bar', 'baz/foo', 'foo', 'qux']
14
- expect(changes.map(&:type)).to eq [:delete, :write, :delete, :write, :write]
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 ['bar', 'foo']
39
- expect(changes.map(&:type)).to eq [:write, :delete]
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.first.data).to eq "bar\n"
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.16
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: 2015-11-10 00:00:00.000000000 Z
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.4.5.1
184
+ rubygems_version: 2.5.1
185
185
  signing_key:
186
186
  specification_version: 4
187
187
  summary: Incremental Git repository deployment