dandelion 0.3.15 → 0.4.0.beta2
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/.rspec +1 -0
- data/.travis.yml +5 -0
- data/Gemfile +11 -0
- data/LICENSE +1 -1
- data/README.md +15 -26
- data/Rakefile +4 -8
- data/bin/dandelion +4 -3
- data/dandelion.gemspec +23 -20
- data/lib/dandelion.rb +26 -10
- data/lib/dandelion/adapter.rb +45 -0
- data/lib/dandelion/{backend → adapter}/ftp.rb +22 -17
- data/lib/dandelion/adapter/noop.rb +14 -0
- data/lib/dandelion/{backend → adapter}/s3.rb +14 -15
- data/lib/dandelion/{backend → adapter}/sftp.rb +29 -16
- data/lib/dandelion/change.rb +11 -0
- data/lib/dandelion/changeset.rb +49 -0
- data/lib/dandelion/cli.rb +127 -0
- data/lib/dandelion/command.rb +26 -92
- data/lib/dandelion/command/deploy.rb +54 -41
- data/lib/dandelion/command/status.rb +14 -13
- data/lib/dandelion/config.rb +36 -0
- data/lib/dandelion/deployer.rb +53 -0
- data/lib/dandelion/diff.rb +62 -0
- data/lib/dandelion/tree.rb +22 -0
- data/lib/dandelion/utils.rb +13 -0
- data/lib/dandelion/version.rb +2 -2
- data/lib/dandelion/workspace.rb +71 -0
- data/spec/dandelion/adapter_spec.rb +42 -0
- data/spec/dandelion/change_spec.rb +17 -0
- data/spec/dandelion/changeset_spec.rb +73 -0
- data/spec/dandelion/command/deploy_spec.rb +111 -0
- data/spec/dandelion/command/status_spec.rb +4 -0
- data/spec/dandelion/command_spec.rb +70 -0
- data/spec/dandelion/config_spec.rb +15 -0
- data/spec/dandelion/deployer_spec.rb +65 -0
- data/spec/dandelion/diff_spec.rb +54 -0
- data/spec/dandelion/tree_spec.rb +15 -0
- data/spec/dandelion/workspace_spec.rb +77 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/HEAD +0 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/config +1 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/description +0 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/hooks/applypatch-msg.sample +0 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/hooks/commit-msg.sample +0 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/hooks/post-update.sample +0 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/hooks/pre-applypatch.sample +0 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/hooks/pre-commit.sample +6 -2
- data/spec/fixtures/repo.git/hooks/pre-push.sample +53 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/hooks/pre-rebase.sample +0 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/hooks/prepare-commit-msg.sample +0 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/hooks/update.sample +1 -1
- data/{test/test_git.git → spec/fixtures/repo.git}/info/exclude +0 -0
- data/spec/fixtures/repo.git/objects/25/7cc5642cb1a054f08cc83f2d943e56fd3ebe99 +0 -0
- data/spec/fixtures/repo.git/objects/34/e64fe350f3ea80c989cdac7a99c2adb8574fca +0 -0
- data/spec/fixtures/repo.git/objects/3d/9b743acb4a84dd99002d2c6f3fcf1a47e9f06b +0 -0
- data/spec/fixtures/repo.git/objects/4e/44973d41d33bf5342037f56497efe0a9604d25 +0 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/objects/57/16ca5987cbf97d6bb54920bea6adde242d87e6 +0 -0
- data/spec/fixtures/repo.git/objects/6c/a0f54491390579ce9438ec89c64c6b3499683a +0 -0
- data/spec/fixtures/repo.git/objects/8a/e33865a630c5d141c8a498f0c0166ff240b433 +0 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/objects/90/2dce0535b19f0c15ac8407fc4468256ad672d7 +0 -0
- data/spec/fixtures/repo.git/objects/c3/9af82404cc4267b1ba5f4b4437a511e0776abb +0 -0
- data/spec/fixtures/repo.git/objects/c8/85b3f693ed6e2926971ef75680f41b318072ae +0 -0
- data/spec/fixtures/repo.git/objects/d8/7cbcba0e2ede0752bdafc5938da35546803ba5 +0 -0
- data/spec/fixtures/repo.git/objects/e2/89ff1e2729839759dbd6fe99b6e35880910c7c +0 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
- data/{test/test_git.git → spec/fixtures/repo.git}/objects/ea/41dba10b54a794284e0be009a11f0ff3716a28 +0 -0
- data/spec/fixtures/repo.git/objects/ee/314a31b622b027c10981acaed7903a3607dbd4 +0 -0
- data/spec/fixtures/repo.git/objects/f6/66b137794d56880bab05e8fd256713a8fccf92 +0 -0
- data/spec/fixtures/repo.git/refs/heads/master +1 -0
- data/spec/spec_helper.rb +28 -0
- metadata +119 -127
- data/lib/dandelion/application.rb +0 -73
- data/lib/dandelion/backend.rb +0 -54
- data/lib/dandelion/deployment.rb +0 -173
- data/lib/dandelion/git.rb +0 -123
- data/test/fixtures/diff +0 -3
- data/test/fixtures/ls_tree +0 -5
- data/test/test_diff_deployment.rb +0 -122
- data/test/test_ftp.rb +0 -49
- data/test/test_git.git/hooks/post-commit.sample +0 -8
- data/test/test_git.git/hooks/post-receive.sample +0 -15
- data/test/test_git.git/objects/0c/a605e9f0f1d42ce8193ac36db11ec3cc9efc08 +0 -0
- data/test/test_git.git/objects/11/bada4e36fd065c8d1d3ca97b8dffa496c8e021 +0 -0
- data/test/test_git.git/objects/88/d4480861346093048e08ce8dcc577d8aa69379 +0 -1
- data/test/test_git.git/objects/a6/394b3e8a82b76b0dd5b6b317f489dfe22426a6 +0 -0
- data/test/test_git.git/objects/a6/5140d5ec9f47064f614ecf8e43776baa5c0c11 +0 -0
- data/test/test_git.git/objects/f5/5f3c44c89e5d215fbaaef9d33563117fe0b61b +0 -1
- data/test/test_git.git/objects/ff/1f1d4bd0c99e1c9cca047c46b2194accf89504 +0 -4
- data/test/test_git.git/refs/heads/master +0 -1
- data/test/test_git.rb +0 -50
- data/test/test_sftp.rb +0 -54
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# An example hook script to verify what is about to be pushed. Called by "git
|
|
4
|
+
# push" after it has checked the remote status, but before anything has been
|
|
5
|
+
# pushed. If this script exits with a non-zero status nothing will be pushed.
|
|
6
|
+
#
|
|
7
|
+
# This hook is called with the following parameters:
|
|
8
|
+
#
|
|
9
|
+
# $1 -- Name of the remote to which the push is being done
|
|
10
|
+
# $2 -- URL to which the push is being done
|
|
11
|
+
#
|
|
12
|
+
# If pushing without using a named remote those arguments will be equal.
|
|
13
|
+
#
|
|
14
|
+
# Information about the commits which are being pushed is supplied as lines to
|
|
15
|
+
# the standard input in the form:
|
|
16
|
+
#
|
|
17
|
+
# <local ref> <local sha1> <remote ref> <remote sha1>
|
|
18
|
+
#
|
|
19
|
+
# This sample shows how to prevent push of commits where the log message starts
|
|
20
|
+
# with "WIP" (work in progress).
|
|
21
|
+
|
|
22
|
+
remote="$1"
|
|
23
|
+
url="$2"
|
|
24
|
+
|
|
25
|
+
z40=0000000000000000000000000000000000000000
|
|
26
|
+
|
|
27
|
+
IFS=' '
|
|
28
|
+
while read local_ref local_sha remote_ref remote_sha
|
|
29
|
+
do
|
|
30
|
+
if [ "$local_sha" = $z40 ]
|
|
31
|
+
then
|
|
32
|
+
# Handle delete
|
|
33
|
+
else
|
|
34
|
+
if [ "$remote_sha" = $z40 ]
|
|
35
|
+
then
|
|
36
|
+
# New branch, examine all commits
|
|
37
|
+
range="$local_sha"
|
|
38
|
+
else
|
|
39
|
+
# Update to existing branch, examine new commits
|
|
40
|
+
range="$remote_sha..$local_sha"
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
# Check for WIP commit
|
|
44
|
+
commit=`git rev-list -n 1 --grep '^WIP' "$range"`
|
|
45
|
+
if [ -n "$commit" ]
|
|
46
|
+
then
|
|
47
|
+
echo "Found WIP commit in $local_ref, not pushing"
|
|
48
|
+
exit 1
|
|
49
|
+
fi
|
|
50
|
+
fi
|
|
51
|
+
done
|
|
52
|
+
|
|
53
|
+
exit 0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/{test/test_git.git → spec/fixtures/repo.git}/objects/57/16ca5987cbf97d6bb54920bea6adde242d87e6
RENAMED
|
File without changes
|
data/{test/test_git.git → spec/fixtures/repo.git}/objects/90/2dce0535b19f0c15ac8407fc4468256ad672d7
RENAMED
|
File without changes
|
data/{test/test_git.git → spec/fixtures/repo.git}/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
RENAMED
|
File without changes
|
data/{test/test_git.git → spec/fixtures/repo.git}/objects/ea/41dba10b54a794284e0be009a11f0ff3716a28
RENAMED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3d9b743acb4a84dd99002d2c6f3fcf1a47e9f06b
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
require 'dandelion'
|
|
2
|
+
require 'rugged'
|
|
3
|
+
|
|
4
|
+
Dandelion.logger.level = Logger::UNKNOWN
|
|
5
|
+
|
|
6
|
+
def test_repo
|
|
7
|
+
path = File.join(File.dirname(__FILE__), 'fixtures', 'repo.git')
|
|
8
|
+
@repo ||= Rugged::Repository.new(path)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def test_commits
|
|
12
|
+
[
|
|
13
|
+
test_repo.lookup('e289ff1e2729839759dbd6fe99b6e35880910c7c'),
|
|
14
|
+
test_repo.lookup('3d9b743acb4a84dd99002d2c6f3fcf1a47e9f06b')
|
|
15
|
+
]
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def test_tree
|
|
19
|
+
Dandelion::Tree.new(test_repo, test_commits.last)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def test_changeset(options = {})
|
|
23
|
+
Dandelion::Changeset.new(test_tree, test_commits.first, options)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def test_diff
|
|
27
|
+
test_changeset.diff
|
|
28
|
+
end
|
metadata
CHANGED
|
@@ -1,80 +1,40 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dandelion
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0.beta2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Scott Nelson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-03-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: rugged
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ~>
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 0.19.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- -
|
|
24
|
+
- - ~>
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
27
|
-
|
|
28
|
-
name: mocha
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - '>='
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: 0.9.12
|
|
34
|
-
type: :development
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - '>='
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: 0.9.12
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: net-sftp
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - '>='
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: 2.0.5
|
|
48
|
-
type: :development
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - '>='
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: 2.0.5
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: aws-s3
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - '>='
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: 0.6.0
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - '>='
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: 0.6.0
|
|
69
|
-
description: Incremental Git repository deployment
|
|
26
|
+
version: 0.19.0
|
|
27
|
+
description:
|
|
70
28
|
email:
|
|
71
|
-
-
|
|
29
|
+
- scott@scttnlsn.com
|
|
72
30
|
executables:
|
|
73
31
|
- dandelion
|
|
74
32
|
extensions: []
|
|
75
33
|
extra_rdoc_files: []
|
|
76
34
|
files:
|
|
77
35
|
- .gitignore
|
|
36
|
+
- .rspec
|
|
37
|
+
- .travis.yml
|
|
78
38
|
- Gemfile
|
|
79
39
|
- LICENSE
|
|
80
40
|
- README.md
|
|
@@ -82,54 +42,76 @@ files:
|
|
|
82
42
|
- bin/dandelion
|
|
83
43
|
- dandelion.gemspec
|
|
84
44
|
- lib/dandelion.rb
|
|
85
|
-
- lib/dandelion/
|
|
86
|
-
- lib/dandelion/
|
|
87
|
-
- lib/dandelion/
|
|
88
|
-
- lib/dandelion/
|
|
89
|
-
- lib/dandelion/
|
|
45
|
+
- lib/dandelion/adapter.rb
|
|
46
|
+
- lib/dandelion/adapter/ftp.rb
|
|
47
|
+
- lib/dandelion/adapter/noop.rb
|
|
48
|
+
- lib/dandelion/adapter/s3.rb
|
|
49
|
+
- lib/dandelion/adapter/sftp.rb
|
|
50
|
+
- lib/dandelion/change.rb
|
|
51
|
+
- lib/dandelion/changeset.rb
|
|
52
|
+
- lib/dandelion/cli.rb
|
|
90
53
|
- lib/dandelion/command.rb
|
|
91
54
|
- lib/dandelion/command/deploy.rb
|
|
92
55
|
- lib/dandelion/command/status.rb
|
|
93
|
-
- lib/dandelion/
|
|
94
|
-
- lib/dandelion/
|
|
56
|
+
- lib/dandelion/config.rb
|
|
57
|
+
- lib/dandelion/deployer.rb
|
|
58
|
+
- lib/dandelion/diff.rb
|
|
59
|
+
- lib/dandelion/tree.rb
|
|
60
|
+
- lib/dandelion/utils.rb
|
|
95
61
|
- lib/dandelion/version.rb
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
|
|
62
|
+
- lib/dandelion/workspace.rb
|
|
63
|
+
- spec/dandelion/adapter_spec.rb
|
|
64
|
+
- spec/dandelion/change_spec.rb
|
|
65
|
+
- spec/dandelion/changeset_spec.rb
|
|
66
|
+
- spec/dandelion/command/deploy_spec.rb
|
|
67
|
+
- spec/dandelion/command/status_spec.rb
|
|
68
|
+
- spec/dandelion/command_spec.rb
|
|
69
|
+
- spec/dandelion/config_spec.rb
|
|
70
|
+
- spec/dandelion/deployer_spec.rb
|
|
71
|
+
- spec/dandelion/diff_spec.rb
|
|
72
|
+
- spec/dandelion/tree_spec.rb
|
|
73
|
+
- spec/dandelion/workspace_spec.rb
|
|
74
|
+
- spec/fixtures/repo.git/HEAD
|
|
75
|
+
- spec/fixtures/repo.git/config
|
|
76
|
+
- spec/fixtures/repo.git/description
|
|
77
|
+
- spec/fixtures/repo.git/hooks/applypatch-msg.sample
|
|
78
|
+
- spec/fixtures/repo.git/hooks/commit-msg.sample
|
|
79
|
+
- spec/fixtures/repo.git/hooks/post-update.sample
|
|
80
|
+
- spec/fixtures/repo.git/hooks/pre-applypatch.sample
|
|
81
|
+
- spec/fixtures/repo.git/hooks/pre-commit.sample
|
|
82
|
+
- spec/fixtures/repo.git/hooks/pre-push.sample
|
|
83
|
+
- spec/fixtures/repo.git/hooks/pre-rebase.sample
|
|
84
|
+
- spec/fixtures/repo.git/hooks/prepare-commit-msg.sample
|
|
85
|
+
- spec/fixtures/repo.git/hooks/update.sample
|
|
86
|
+
- spec/fixtures/repo.git/info/exclude
|
|
87
|
+
- spec/fixtures/repo.git/objects/25/7cc5642cb1a054f08cc83f2d943e56fd3ebe99
|
|
88
|
+
- spec/fixtures/repo.git/objects/34/e64fe350f3ea80c989cdac7a99c2adb8574fca
|
|
89
|
+
- spec/fixtures/repo.git/objects/3d/9b743acb4a84dd99002d2c6f3fcf1a47e9f06b
|
|
90
|
+
- spec/fixtures/repo.git/objects/4e/44973d41d33bf5342037f56497efe0a9604d25
|
|
91
|
+
- spec/fixtures/repo.git/objects/57/16ca5987cbf97d6bb54920bea6adde242d87e6
|
|
92
|
+
- spec/fixtures/repo.git/objects/6c/a0f54491390579ce9438ec89c64c6b3499683a
|
|
93
|
+
- spec/fixtures/repo.git/objects/8a/e33865a630c5d141c8a498f0c0166ff240b433
|
|
94
|
+
- spec/fixtures/repo.git/objects/90/2dce0535b19f0c15ac8407fc4468256ad672d7
|
|
95
|
+
- spec/fixtures/repo.git/objects/c3/9af82404cc4267b1ba5f4b4437a511e0776abb
|
|
96
|
+
- spec/fixtures/repo.git/objects/c8/85b3f693ed6e2926971ef75680f41b318072ae
|
|
97
|
+
- spec/fixtures/repo.git/objects/d8/7cbcba0e2ede0752bdafc5938da35546803ba5
|
|
98
|
+
- spec/fixtures/repo.git/objects/e2/89ff1e2729839759dbd6fe99b6e35880910c7c
|
|
99
|
+
- spec/fixtures/repo.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
|
|
100
|
+
- spec/fixtures/repo.git/objects/ea/41dba10b54a794284e0be009a11f0ff3716a28
|
|
101
|
+
- spec/fixtures/repo.git/objects/ee/314a31b622b027c10981acaed7903a3607dbd4
|
|
102
|
+
- spec/fixtures/repo.git/objects/f6/66b137794d56880bab05e8fd256713a8fccf92
|
|
103
|
+
- spec/fixtures/repo.git/refs/heads/master
|
|
104
|
+
- spec/spec_helper.rb
|
|
105
|
+
homepage: https://github.com/scttnlsn/dandelion
|
|
129
106
|
licenses:
|
|
130
107
|
- MIT
|
|
131
108
|
metadata: {}
|
|
132
|
-
post_install_message:
|
|
109
|
+
post_install_message: |
|
|
110
|
+
! The 'dandelion' gem is installed but you may need to install additional
|
|
111
|
+
! gems depending on the adapters you intend to use.
|
|
112
|
+
!
|
|
113
|
+
! Running 'dandelion status' in your project directory will indicate which
|
|
114
|
+
! additional gems need to be installed.
|
|
133
115
|
rdoc_options: []
|
|
134
116
|
require_paths:
|
|
135
117
|
- lib
|
|
@@ -140,45 +122,55 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
140
122
|
version: '0'
|
|
141
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
124
|
requirements:
|
|
143
|
-
- - '
|
|
125
|
+
- - '>'
|
|
144
126
|
- !ruby/object:Gem::Version
|
|
145
|
-
version:
|
|
127
|
+
version: 1.3.1
|
|
146
128
|
requirements: []
|
|
147
129
|
rubyforge_project:
|
|
148
130
|
rubygems_version: 2.0.14
|
|
149
131
|
signing_key:
|
|
150
132
|
specification_version: 4
|
|
151
|
-
summary:
|
|
133
|
+
summary: Incremental Git repository deployment
|
|
152
134
|
test_files:
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
162
|
-
-
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
-
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
-
|
|
135
|
+
- spec/dandelion/adapter_spec.rb
|
|
136
|
+
- spec/dandelion/change_spec.rb
|
|
137
|
+
- spec/dandelion/changeset_spec.rb
|
|
138
|
+
- spec/dandelion/command/deploy_spec.rb
|
|
139
|
+
- spec/dandelion/command/status_spec.rb
|
|
140
|
+
- spec/dandelion/command_spec.rb
|
|
141
|
+
- spec/dandelion/config_spec.rb
|
|
142
|
+
- spec/dandelion/deployer_spec.rb
|
|
143
|
+
- spec/dandelion/diff_spec.rb
|
|
144
|
+
- spec/dandelion/tree_spec.rb
|
|
145
|
+
- spec/dandelion/workspace_spec.rb
|
|
146
|
+
- spec/fixtures/repo.git/HEAD
|
|
147
|
+
- spec/fixtures/repo.git/config
|
|
148
|
+
- spec/fixtures/repo.git/description
|
|
149
|
+
- spec/fixtures/repo.git/hooks/applypatch-msg.sample
|
|
150
|
+
- spec/fixtures/repo.git/hooks/commit-msg.sample
|
|
151
|
+
- spec/fixtures/repo.git/hooks/post-update.sample
|
|
152
|
+
- spec/fixtures/repo.git/hooks/pre-applypatch.sample
|
|
153
|
+
- spec/fixtures/repo.git/hooks/pre-commit.sample
|
|
154
|
+
- spec/fixtures/repo.git/hooks/pre-push.sample
|
|
155
|
+
- spec/fixtures/repo.git/hooks/pre-rebase.sample
|
|
156
|
+
- spec/fixtures/repo.git/hooks/prepare-commit-msg.sample
|
|
157
|
+
- spec/fixtures/repo.git/hooks/update.sample
|
|
158
|
+
- spec/fixtures/repo.git/info/exclude
|
|
159
|
+
- spec/fixtures/repo.git/objects/25/7cc5642cb1a054f08cc83f2d943e56fd3ebe99
|
|
160
|
+
- spec/fixtures/repo.git/objects/34/e64fe350f3ea80c989cdac7a99c2adb8574fca
|
|
161
|
+
- spec/fixtures/repo.git/objects/3d/9b743acb4a84dd99002d2c6f3fcf1a47e9f06b
|
|
162
|
+
- spec/fixtures/repo.git/objects/4e/44973d41d33bf5342037f56497efe0a9604d25
|
|
163
|
+
- spec/fixtures/repo.git/objects/57/16ca5987cbf97d6bb54920bea6adde242d87e6
|
|
164
|
+
- spec/fixtures/repo.git/objects/6c/a0f54491390579ce9438ec89c64c6b3499683a
|
|
165
|
+
- spec/fixtures/repo.git/objects/8a/e33865a630c5d141c8a498f0c0166ff240b433
|
|
166
|
+
- spec/fixtures/repo.git/objects/90/2dce0535b19f0c15ac8407fc4468256ad672d7
|
|
167
|
+
- spec/fixtures/repo.git/objects/c3/9af82404cc4267b1ba5f4b4437a511e0776abb
|
|
168
|
+
- spec/fixtures/repo.git/objects/c8/85b3f693ed6e2926971ef75680f41b318072ae
|
|
169
|
+
- spec/fixtures/repo.git/objects/d8/7cbcba0e2ede0752bdafc5938da35546803ba5
|
|
170
|
+
- spec/fixtures/repo.git/objects/e2/89ff1e2729839759dbd6fe99b6e35880910c7c
|
|
171
|
+
- spec/fixtures/repo.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
|
|
172
|
+
- spec/fixtures/repo.git/objects/ea/41dba10b54a794284e0be009a11f0ff3716a28
|
|
173
|
+
- spec/fixtures/repo.git/objects/ee/314a31b622b027c10981acaed7903a3607dbd4
|
|
174
|
+
- spec/fixtures/repo.git/objects/f6/66b137794d56880bab05e8fd256713a8fccf92
|
|
175
|
+
- spec/fixtures/repo.git/refs/heads/master
|
|
176
|
+
- spec/spec_helper.rb
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
require 'dandelion/command'
|
|
2
|
-
|
|
3
|
-
module Dandelion
|
|
4
|
-
class Application
|
|
5
|
-
class << self
|
|
6
|
-
def execute(args)
|
|
7
|
-
new(args).execute
|
|
8
|
-
end
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def initialize(args)
|
|
12
|
-
@args = args
|
|
13
|
-
@options = {}
|
|
14
|
-
@parser = OptionParser.new
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def execute
|
|
18
|
-
global = Command::Base.parser(@options)
|
|
19
|
-
parse(global)
|
|
20
|
-
|
|
21
|
-
begin
|
|
22
|
-
name = @args.shift
|
|
23
|
-
command = Command::Base.create(name)
|
|
24
|
-
parse(command.parser(@options))
|
|
25
|
-
rescue Command::InvalidCommandError
|
|
26
|
-
log.fatal("Invalid command: #{name}")
|
|
27
|
-
log.fatal(global.help)
|
|
28
|
-
log.fatal("Available commands:")
|
|
29
|
-
log.fatal(Command::Base.commands.map { |name| " #{name}" }.join("\n"))
|
|
30
|
-
exit 1
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
prepare
|
|
34
|
-
validate
|
|
35
|
-
|
|
36
|
-
command.new(@options) do |cmd|
|
|
37
|
-
cmd.setup(@args) if cmd.respond_to?(:setup)
|
|
38
|
-
cmd.execute
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def log
|
|
43
|
-
Dandelion.logger
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
private
|
|
47
|
-
|
|
48
|
-
def parse(parser)
|
|
49
|
-
begin
|
|
50
|
-
parser.order!(@args)
|
|
51
|
-
rescue OptionParser::InvalidOption => e
|
|
52
|
-
log.fatal(e.to_s.capitalize)
|
|
53
|
-
log.fatal(parser.help)
|
|
54
|
-
exit 1
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
def prepare
|
|
59
|
-
@options[:config] ||= File.join(@options[:repo], 'dandelion.yml')
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
def validate
|
|
63
|
-
unless File.exists?(File.join(@options[:repo], '.git'))
|
|
64
|
-
log.fatal("Not a git repository: #{@options[:repo]}")
|
|
65
|
-
exit 1
|
|
66
|
-
end
|
|
67
|
-
unless File.exists?(@options[:config])
|
|
68
|
-
log.fatal("Could not find file: #{@options[:config]}")
|
|
69
|
-
exit 1
|
|
70
|
-
end
|
|
71
|
-
end
|
|
72
|
-
end
|
|
73
|
-
end
|