docman 0.0.5 → 0.0.6
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 +17 -4
- data/bin/functions.sh +265 -0
- data/config/config.yaml +36 -39
- data/config/cucumber.yml +2 -0
- data/docman.gemspec +3 -0
- data/features/acquia/acquia.feature +65 -0
- data/features/init/init.feature +27 -0
- data/features/local/local.feature +88 -0
- data/features/local/local_deploy.feature +6 -0
- data/features/support/env.rb +1 -1
- data/lib/application.rb +48 -11
- data/lib/docman/builders/builder.rb +34 -34
- data/lib/docman/builders/dir_builder.rb +21 -0
- data/lib/docman/builders/drupal_drush_builder.rb +22 -0
- data/lib/docman/builders/git_direct_builder.rb +20 -0
- data/lib/docman/builders/git_strip_builder.rb +27 -0
- data/lib/docman/cli.rb +3 -0
- data/lib/docman/commands/clean_changed_cmd.rb +23 -0
- data/lib/docman/commands/command.rb +137 -0
- data/lib/docman/commands/composite_command.rb +28 -0
- data/lib/docman/commands/create_symlink_cmd.rb +24 -0
- data/lib/docman/commands/execute_script_cmd.rb +40 -0
- data/lib/docman/commands/git_commit_cmd.rb +25 -0
- data/lib/docman/commands/ssh_target_checker.rb +28 -0
- data/lib/docman/commands/target_checker.rb +22 -0
- data/lib/docman/config.rb +31 -0
- data/lib/docman/context.rb +11 -0
- data/lib/docman/deployers/common_deployer.rb +2 -1
- data/lib/docman/deployers/deployer.rb +121 -17
- data/lib/docman/deployers/git_deployer.rb +6 -3
- data/lib/docman/docroot_config.rb +15 -17
- data/lib/docman/docroot_controller.rb +23 -35
- data/lib/docman/exceptions/command_validation_error.rb +5 -0
- data/lib/docman/exceptions/no_changes_error.rb +5 -0
- data/lib/docman/exec.rb +1 -1
- data/lib/docman/git_util.rb +43 -15
- data/lib/docman/info.rb +63 -9
- data/lib/docman/logging.rb +41 -0
- data/lib/docman/version.rb +1 -1
- metadata +72 -8
- data/features/local.feature +0 -60
- data/features/local_deploy.feature +0 -37
- data/lib/docman/builders/common_builder.rb +0 -16
- data/lib/docman/builders/git_builder.rb +0 -26
data/lib/docman/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Tolstikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,6 +80,48 @@ dependencies:
|
|
80
80
|
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: hash-deep-merge
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: net-sftp
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: hooks
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
83
125
|
description:
|
84
126
|
email:
|
85
127
|
- atolstikov@adyax.com
|
@@ -88,6 +130,7 @@ executables:
|
|
88
130
|
- dm_repo_clean.sh
|
89
131
|
- docman
|
90
132
|
- docman.rb
|
133
|
+
- functions.sh
|
91
134
|
extensions: []
|
92
135
|
extra_rdoc_files: []
|
93
136
|
files:
|
@@ -100,25 +143,44 @@ files:
|
|
100
143
|
- bin/dm_repo_clean.sh
|
101
144
|
- bin/docman
|
102
145
|
- bin/docman.rb
|
146
|
+
- bin/functions.sh
|
103
147
|
- config/config.yaml
|
148
|
+
- config/cucumber.yml
|
104
149
|
- docman.gemspec
|
105
|
-
- features/
|
106
|
-
- features/
|
150
|
+
- features/acquia/acquia.feature
|
151
|
+
- features/init/init.feature
|
152
|
+
- features/local/local.feature
|
153
|
+
- features/local/local_deploy.feature
|
107
154
|
- features/support/env.rb
|
108
155
|
- features/support/step_definitions/dm_steps.rb
|
109
156
|
- lib/application.rb
|
110
157
|
- lib/docman/builders/builder.rb
|
111
|
-
- lib/docman/builders/
|
112
|
-
- lib/docman/builders/
|
158
|
+
- lib/docman/builders/dir_builder.rb
|
159
|
+
- lib/docman/builders/drupal_drush_builder.rb
|
160
|
+
- lib/docman/builders/git_direct_builder.rb
|
161
|
+
- lib/docman/builders/git_strip_builder.rb
|
113
162
|
- lib/docman/cli.rb
|
163
|
+
- lib/docman/commands/clean_changed_cmd.rb
|
164
|
+
- lib/docman/commands/command.rb
|
165
|
+
- lib/docman/commands/composite_command.rb
|
166
|
+
- lib/docman/commands/create_symlink_cmd.rb
|
167
|
+
- lib/docman/commands/execute_script_cmd.rb
|
168
|
+
- lib/docman/commands/git_commit_cmd.rb
|
169
|
+
- lib/docman/commands/ssh_target_checker.rb
|
170
|
+
- lib/docman/commands/target_checker.rb
|
171
|
+
- lib/docman/config.rb
|
172
|
+
- lib/docman/context.rb
|
114
173
|
- lib/docman/deployers/common_deployer.rb
|
115
174
|
- lib/docman/deployers/deployer.rb
|
116
175
|
- lib/docman/deployers/git_deployer.rb
|
117
176
|
- lib/docman/docroot_config.rb
|
118
177
|
- lib/docman/docroot_controller.rb
|
178
|
+
- lib/docman/exceptions/command_validation_error.rb
|
179
|
+
- lib/docman/exceptions/no_changes_error.rb
|
119
180
|
- lib/docman/exec.rb
|
120
181
|
- lib/docman/git_util.rb
|
121
182
|
- lib/docman/info.rb
|
183
|
+
- lib/docman/logging.rb
|
122
184
|
- lib/docman/version.rb
|
123
185
|
homepage: ''
|
124
186
|
licenses:
|
@@ -145,7 +207,9 @@ signing_key:
|
|
145
207
|
specification_version: 4
|
146
208
|
summary: Docman made for DOCroot MANagement for Drupal projects
|
147
209
|
test_files:
|
148
|
-
- features/
|
149
|
-
- features/
|
210
|
+
- features/acquia/acquia.feature
|
211
|
+
- features/init/init.feature
|
212
|
+
- features/local/local.feature
|
213
|
+
- features/local/local_deploy.feature
|
150
214
|
- features/support/env.rb
|
151
215
|
- features/support/step_definitions/dm_steps.rb
|
data/features/local.feature
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
Feature: Docroot management
|
2
|
-
|
3
|
-
In order to manage docroot
|
4
|
-
As a developer using Cucumber
|
5
|
-
I want to use the deploy steps to deploy to local
|
6
|
-
|
7
|
-
@announce
|
8
|
-
@no-clobber
|
9
|
-
Scenario: Local force init
|
10
|
-
Given I run `docman init sample-docroot https://github.com/aroq/dm-test-docroot-config.git -f`
|
11
|
-
Then the exit status should be 0
|
12
|
-
Then the following directories should exist:
|
13
|
-
| sample-docroot |
|
14
|
-
| sample-docroot/config |
|
15
|
-
|
16
|
-
@announce
|
17
|
-
@no-clobber
|
18
|
-
Scenario: Local interactive init
|
19
|
-
Given I run `docman init sample-docroot https://github.com/aroq/dm-test-docroot-config.git` interactively
|
20
|
-
And I type "yes"
|
21
|
-
Then the exit status should be 0
|
22
|
-
Then the following directories should exist:
|
23
|
-
| sample-docroot |
|
24
|
-
| sample-docroot/config |
|
25
|
-
|
26
|
-
@announce
|
27
|
-
@no-clobber
|
28
|
-
Scenario: Local build development
|
29
|
-
Given I cd to "sample-docroot"
|
30
|
-
Then I run `docman build local development`
|
31
|
-
Then the exit status should be 0
|
32
|
-
Then the following directories should exist:
|
33
|
-
| master |
|
34
|
-
| master/docroot |
|
35
|
-
| master/docroot/sites |
|
36
|
-
| master/hooks |
|
37
|
-
| master/profiles |
|
38
|
-
| master/profiles/sample_profile |
|
39
|
-
| master/projects/sample_project1 |
|
40
|
-
| master/projects/sample_project2 |
|
41
|
-
|
42
|
-
@announce
|
43
|
-
@no-clobber
|
44
|
-
Scenario: Local push into project1 develop
|
45
|
-
Given I cd to "sample-docroot/master/projects/sample_project1"
|
46
|
-
And I run `git checkout develop`
|
47
|
-
And I run `git pull origin develop`
|
48
|
-
Then the exit status should be 0
|
49
|
-
And I store in "name" value "test"
|
50
|
-
And I check stored value of "name" should contain "test"
|
51
|
-
And I create file with random name in "filename" content in "random_name"
|
52
|
-
Given a file named "develop.txt" with:
|
53
|
-
"""
|
54
|
-
test content
|
55
|
-
|
56
|
-
"""
|
57
|
-
And I run `git add -A`
|
58
|
-
And I run `git commit -m "Test commit to develop"`
|
59
|
-
And I run `git push origin develop`
|
60
|
-
Then the exit status should be 0
|
@@ -1,37 +0,0 @@
|
|
1
|
-
Feature: Local deploy
|
2
|
-
|
3
|
-
In order to manage docroot
|
4
|
-
As a developer using Cucumber
|
5
|
-
I want to use the deploy steps to deploy to local
|
6
|
-
|
7
|
-
@announce
|
8
|
-
@no-clobber
|
9
|
-
Scenario: Local deploy sample project 1 develop
|
10
|
-
Given I cd to "sample-docroot"
|
11
|
-
Then I run `docman deploy local sample_project1 branch develop`
|
12
|
-
Then the exit status should be 0
|
13
|
-
Then the following directories should exist:
|
14
|
-
| master |
|
15
|
-
| master/docroot |
|
16
|
-
| master/docroot/sites |
|
17
|
-
| master/hooks |
|
18
|
-
| master/profiles |
|
19
|
-
| master/profiles/sample_profile |
|
20
|
-
| master/projects/sample_project1 |
|
21
|
-
| master/projects/sample_project2 |
|
22
|
-
|
23
|
-
@announce
|
24
|
-
@no-clobber
|
25
|
-
Scenario: Local deploy sample project 2 master
|
26
|
-
Given I cd to "sample-docroot"
|
27
|
-
Then I run `docman deploy local sample_project2 branch master`
|
28
|
-
Then the exit status should be 0
|
29
|
-
Then the following directories should exist:
|
30
|
-
| master |
|
31
|
-
| master/docroot |
|
32
|
-
| master/docroot/sites |
|
33
|
-
| master/hooks |
|
34
|
-
| master/profiles |
|
35
|
-
| master/profiles/sample_profile |
|
36
|
-
| master/projects/sample_project1 |
|
37
|
-
| master/projects/sample_project2 |
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module Docman
|
2
|
-
module Builders
|
3
|
-
class CommonBuilder < Builder
|
4
|
-
|
5
|
-
register_builder :common
|
6
|
-
|
7
|
-
def dir
|
8
|
-
if File.directory? @info['full_build_path']
|
9
|
-
FileUtils.rm_r(@info['full_build_path']) if self.repo? @info['full_build_path']
|
10
|
-
end
|
11
|
-
FileUtils::mkdir_p @info['full_build_path']
|
12
|
-
@info['build_path']
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require 'yaml'
|
2
|
-
|
3
|
-
module Docman
|
4
|
-
module Builders
|
5
|
-
class GitBuilder < Builder
|
6
|
-
|
7
|
-
register_builder :git
|
8
|
-
|
9
|
-
def direct
|
10
|
-
puts 'Do direct'
|
11
|
-
GitUtil.get(@info['repo'], @info['full_build_path'], @info.version_type, @info.version)
|
12
|
-
end
|
13
|
-
|
14
|
-
def strip
|
15
|
-
puts 'Do strip'
|
16
|
-
FileUtils.rm_r(@info['full_build_path']) if File.directory? @info['full_build_path']
|
17
|
-
result = GitUtil.get(@info['repo'], @info['temp_path'], @info.version_type, @info.version)
|
18
|
-
FileUtils.mkdir_p(@info['full_build_path'])
|
19
|
-
FileUtils.cp_r(Dir["#{@info['temp_path']}/."], @info['full_build_path'])
|
20
|
-
FileUtils.rm_r(File.join(@info['full_build_path'], '.git'))
|
21
|
-
result
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|