docman 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b1b4cfc708ee5329713f3b1e36a398aac0473f6
4
- data.tar.gz: df7b6eaeb867c21a977bd493167118be064060bf
3
+ metadata.gz: f6162c342b2d3c1fd47954a3b4b1b1b13bceb220
4
+ data.tar.gz: 2df8cfefe00542382279e457e16e5da77c70d752
5
5
  SHA512:
6
- metadata.gz: 5cec2483a759091c17a0506fdb6562af6c96aa2e70f9f5fc431b7c7885e5e211fea5e828c810a472f80083ed0815004260ec643a9db2965f0afd08c29cebedcc
7
- data.tar.gz: c7d8b64781cfc782d2886a59aee59a886d4a440c72b521a8f7c687d038b4bbf3b802c39ccef21170bdc2735d5f7ac077fd87646b681e2388c90c9d0bf535cbb1
6
+ metadata.gz: 7dd9af90934dc99b3d641cf8112d42e706dd0201f57e67e49aa8e9a3b2e1fe3e379c40ec0f7816fb7730c96f592c5f9384abeb21adaa56ae30f5ec39d821fde3
7
+ data.tar.gz: 64639603503e5c1898fae7c4019960464f37ec6579a3191415c55e8533b167e82c54980b991ec64e077efed522ca3d11cec134083ebf48a5662650c0237d9fbe
@@ -11,11 +11,11 @@ deploy_targets:
11
11
  handler: :git_direct_builder
12
12
  dir:
13
13
  handler: :dir_builder
14
- environments:
14
+ states:
15
15
  development: local
16
16
  staging: local
17
17
  stable: local
18
- acquia:
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
- environments:
49
+ states:
50
50
  development: dev
51
51
  staging: test
52
- stable: test
52
+ stable: prod
53
+ environments:
54
+ local:
55
+ deploy_target: local
56
+ state: development
@@ -1,4 +1,4 @@
1
- Feature: Docroot management - Acquia
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
- @acquia
11
- Scenario: Acquia build development
10
+ @git_target
11
+ Scenario: git_target build development
12
12
  Given I cd to "sample-docroot"
13
- Then I run `docman build acquia development`
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
- @acquia
30
+ @git_target
31
31
  @develop
32
32
  @deploy
33
- Scenario: Acquia deploy sample project 1 develop
33
+ Scenario: git_target deploy sample project 1 develop
34
34
  Given I cd to "sample-docroot"
35
- Then I run `docman deploy acquia sample_project1 branch develop`
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
- @acquia
49
+ @git_target
50
50
  @deploy
51
51
  @master
52
52
  @sample_project2
53
- Scenario: Acquia deploy sample project 2 master
53
+ Scenario: git_target deploy sample project 2 master
54
54
  Given I cd to "sample-docroot"
55
- Then I run `docman deploy acquia sample_project2 branch master`
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 |
@@ -69,7 +69,8 @@ module Docman
69
69
  params['state'] = state
70
70
  params['action'] = action
71
71
  params['name'] = name
72
- params['environment'] = @deploy_target['environments'][state]
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.environment
135
+ value.gsub! '$ENVIRONMENT$', @context.environment_name
136
136
  end
137
137
 
138
138
  end
@@ -30,7 +30,7 @@ module Docman
30
30
  params.each do |param|
31
31
  case param
32
32
  when 'environment'
33
- result << @context.environment
33
+ result << @context.environment_name
34
34
  end
35
35
  end
36
36
  result.join(' ')
@@ -6,7 +6,7 @@ module Docman
6
6
  register_checker :ssh
7
7
 
8
8
  def execute
9
- filename = File.join(self['file_path'], @context['docroot_name'] + @context['environment'], self['filename'])
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
@@ -98,8 +98,8 @@ module Docman
98
98
  []
99
99
  end
100
100
 
101
- def environment
102
- self['docroot_config'].deploy_target['environments'][self['state']]
101
+ def environment_name
102
+ self['docroot_config'].deploy_target['states'][self['state']]
103
103
  end
104
104
 
105
105
  end
@@ -1,3 +1,3 @@
1
1
  module Docman
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
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.11
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/acquia/acquia.feature
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/acquia/acquia.feature
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