docman 0.0.11 → 0.0.12
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/config/config.yaml +8 -4
- data/features/{acquia/acquia.feature → git_target/git_target.feature} +10 -10
- data/lib/application.rb +2 -1
- data/lib/docman/commands/command.rb +1 -1
- data/lib/docman/commands/execute_script_cmd.rb +1 -1
- data/lib/docman/commands/ssh_target_checker.rb +1 -1
- data/lib/docman/deployers/deployer.rb +3 -2
- data/lib/docman/info.rb +2 -2
- data/lib/docman/version.rb +1 -1
- 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: f6162c342b2d3c1fd47954a3b4b1b1b13bceb220
|
4
|
+
data.tar.gz: 2df8cfefe00542382279e457e16e5da77c70d752
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dd9af90934dc99b3d641cf8112d42e706dd0201f57e67e49aa8e9a3b2e1fe3e379c40ec0f7816fb7730c96f592c5f9384abeb21adaa56ae30f5ec39d821fde3
|
7
|
+
data.tar.gz: 64639603503e5c1898fae7c4019960464f37ec6579a3191415c55e8533b167e82c54980b991ec64e077efed522ca3d11cec134083ebf48a5662650c0237d9fbe
|
data/config/config.yaml
CHANGED
@@ -11,11 +11,11 @@ deploy_targets:
|
|
11
11
|
handler: :git_direct_builder
|
12
12
|
dir:
|
13
13
|
handler: :dir_builder
|
14
|
-
|
14
|
+
states:
|
15
15
|
development: local
|
16
16
|
staging: local
|
17
17
|
stable: local
|
18
|
-
|
18
|
+
git_target:
|
19
19
|
handler: :git_deployer
|
20
20
|
builders:
|
21
21
|
root:
|
@@ -46,7 +46,11 @@ deploy_targets:
|
|
46
46
|
after_execute:
|
47
47
|
- type: :git_commit
|
48
48
|
execution_dir: $PROJECT$
|
49
|
-
|
49
|
+
states:
|
50
50
|
development: dev
|
51
51
|
staging: test
|
52
|
-
stable:
|
52
|
+
stable: prod
|
53
|
+
environments:
|
54
|
+
local:
|
55
|
+
deploy_target: local
|
56
|
+
state: development
|
@@ -1,4 +1,4 @@
|
|
1
|
-
Feature: Docroot management -
|
1
|
+
Feature: Docroot management - git_target
|
2
2
|
|
3
3
|
In order to manage docroot
|
4
4
|
As a developer using Cucumber
|
@@ -7,10 +7,10 @@ Feature: Docroot management - Acquia
|
|
7
7
|
@announce
|
8
8
|
@no-clobber
|
9
9
|
@build
|
10
|
-
@
|
11
|
-
Scenario:
|
10
|
+
@git_target
|
11
|
+
Scenario: git_target build development
|
12
12
|
Given I cd to "sample-docroot"
|
13
|
-
Then I run `docman build
|
13
|
+
Then I run `docman build git_target development`
|
14
14
|
Then the exit status should be 0
|
15
15
|
Then the following directories should exist:
|
16
16
|
| master |
|
@@ -27,12 +27,12 @@ Feature: Docroot management - Acquia
|
|
27
27
|
|
28
28
|
@announce
|
29
29
|
@no-clobber
|
30
|
-
@
|
30
|
+
@git_target
|
31
31
|
@develop
|
32
32
|
@deploy
|
33
|
-
Scenario:
|
33
|
+
Scenario: git_target deploy sample project 1 develop
|
34
34
|
Given I cd to "sample-docroot"
|
35
|
-
Then I run `docman deploy
|
35
|
+
Then I run `docman deploy git_target sample_project1 branch develop`
|
36
36
|
Then the exit status should be 0
|
37
37
|
Then the following directories should exist:
|
38
38
|
| master |
|
@@ -46,13 +46,13 @@ Feature: Docroot management - Acquia
|
|
46
46
|
|
47
47
|
@announce
|
48
48
|
@no-clobber
|
49
|
-
@
|
49
|
+
@git_target
|
50
50
|
@deploy
|
51
51
|
@master
|
52
52
|
@sample_project2
|
53
|
-
Scenario:
|
53
|
+
Scenario: git_target deploy sample project 2 master
|
54
54
|
Given I cd to "sample-docroot"
|
55
|
-
Then I run `docman deploy
|
55
|
+
Then I run `docman deploy git_target sample_project2 branch master`
|
56
56
|
Then the exit status should be 0
|
57
57
|
Then the following directories should exist:
|
58
58
|
| master |
|
data/lib/application.rb
CHANGED
@@ -69,7 +69,8 @@ module Docman
|
|
69
69
|
params['state'] = state
|
70
70
|
params['action'] = action
|
71
71
|
params['name'] = name
|
72
|
-
params['environment'] = @
|
72
|
+
params['environment'] = @config['environments'][@deploy_target['states'][state]]
|
73
|
+
params['environment_name'] = @deploy_target['states'][state]
|
73
74
|
Docman::Deployers::Deployer.create(params, nil, self).perform
|
74
75
|
end
|
75
76
|
|
@@ -132,7 +132,7 @@ module Docman
|
|
132
132
|
value.gsub! '$DOCROOT$', @context['docroot_config'].docroot_dir
|
133
133
|
value.gsub! '$PROJECT$', @context['full_build_path']
|
134
134
|
value.gsub! '$INFO$', @context['full_path']
|
135
|
-
value.gsub! '$ENVIRONMENT$', @context.
|
135
|
+
value.gsub! '$ENVIRONMENT$', @context.environment_name
|
136
136
|
end
|
137
137
|
|
138
138
|
end
|
@@ -6,7 +6,7 @@ module Docman
|
|
6
6
|
register_checker :ssh
|
7
7
|
|
8
8
|
def execute
|
9
|
-
filename = File.join(self['file_path'],
|
9
|
+
filename = File.join(self['file_path'], self['filename'])
|
10
10
|
Net::SFTP.start(self['ssh_host'], self['ssh_user']) do |sftp|
|
11
11
|
n = 0
|
12
12
|
begin
|
@@ -33,6 +33,7 @@ module Docman
|
|
33
33
|
@docroot_config = caller.docroot_config
|
34
34
|
@builded = []
|
35
35
|
@build_results = {}
|
36
|
+
@environments = Docman::Application.instance.config['envoronments']
|
36
37
|
end
|
37
38
|
|
38
39
|
def config
|
@@ -94,8 +95,8 @@ module Docman
|
|
94
95
|
end
|
95
96
|
|
96
97
|
def files_deployed?(version, filename)
|
97
|
-
return true unless self.has_key? 'target_checker'
|
98
|
-
params = self['target_checker']
|
98
|
+
return true unless self['environment'].has_key? 'target_checker'
|
99
|
+
params = self['environment']['target_checker']
|
99
100
|
params['version'] = version
|
100
101
|
params['filename'] = filename
|
101
102
|
Docman::TargetChecker.create(params, self).perform
|
data/lib/docman/info.rb
CHANGED
data/lib/docman/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Tolstikov
|
@@ -161,7 +161,7 @@ files:
|
|
161
161
|
- config/config.yaml
|
162
162
|
- config/cucumber.yml
|
163
163
|
- docman.gemspec
|
164
|
-
- features/
|
164
|
+
- features/git_target/git_target.feature
|
165
165
|
- features/init/init.feature
|
166
166
|
- features/local/local.feature
|
167
167
|
- features/local/local_deploy.feature
|
@@ -221,7 +221,7 @@ signing_key:
|
|
221
221
|
specification_version: 4
|
222
222
|
summary: Docman made for DOCroot MANagement for Drupal projects
|
223
223
|
test_files:
|
224
|
-
- features/
|
224
|
+
- features/git_target/git_target.feature
|
225
225
|
- features/init/init.feature
|
226
226
|
- features/local/local.feature
|
227
227
|
- features/local/local_deploy.feature
|