docman 0.0.89 → 0.0.90

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: f0ac3bcd4a97348dc03ffabb17c79065005ec957
4
- data.tar.gz: cb0e8a5da008c18a133a345dbc351287a65195bb
3
+ metadata.gz: 0235b4037d0b39e8d6ecacc51dff99748ad0f572
4
+ data.tar.gz: 3ab7cb55420bf98c2474bb542101df4f48c0bcee
5
5
  SHA512:
6
- metadata.gz: db36cb86d014d45bd9b70cd553b94adfb3ee552214cc3ea8afb1b83784599166181fab0d37a6d0895bdb938be0d881f3e722887784a025eb97e698b6d34304db
7
- data.tar.gz: a43fe1dc7c1df0a0d1185e24d9754e3d0f639e5c2d9c409c214b7d112198ade3a169f298c632cc3696faa604d4b3132c413998c0622b04aca09016184d0aa148
6
+ metadata.gz: 9795656e57f0cc077772d41fd97a588f36e1181b42bc73a531765e116441cbbf27062cb87926072979fde00c175db16628ab51306bf27f6ee5caaaafc14b2f60
7
+ data.tar.gz: ccae394788689f549b47a311ee8d7040bff8417ceb8953f6935fbaf4b46dd03db28215943e3c2ab8c12cf9fc6de4ee8f9b14ce9c9d2029dd8f9e05e6babee654
data/lib/application.rb CHANGED
@@ -37,6 +37,7 @@ require 'docman/taggers/tagger'
37
37
  require 'docman/taggers/incremental_tagger'
38
38
  require 'docman/taggers/option_tagger'
39
39
  require 'docman/taggers/source_tagger'
40
+ require 'docman/taggers/components_tagger'
40
41
 
41
42
  module Docman
42
43
  class Application < Docman::Command
@@ -10,7 +10,7 @@ module Docman
10
10
 
11
11
  define_hooks :before_push, :after_push, :before_build, :after_build, :before_deploy, :after_deploy
12
12
 
13
- attr_accessor :build_results
13
+ attr_accessor :build_results, :docroot_config, :versions
14
14
 
15
15
  @@deployers = {}
16
16
 
@@ -97,8 +97,8 @@ module Docman
97
97
  @names[name.to_s] = i
98
98
 
99
99
  unless children_components_config.nil?
100
- children_components_config['components'].each {|name, config|
101
- children << structure_build_from_config_file(children_components_config, prefix, i, name)
100
+ children_components_config['components'].each {|child_name, child_config|
101
+ children << structure_build_from_config_file(children_components_config, prefix, i, child_name)
102
102
  }
103
103
  end
104
104
  i
@@ -0,0 +1,33 @@
1
+ require 'docman/taggers/tagger'
2
+
3
+ module Docman
4
+ class ComponentsTagger < Docman::Taggers::Tagger
5
+
6
+ register_tagger :components
7
+
8
+ def execute
9
+ tag = ''
10
+ time = Time.now.strftime("%Y-%m-%d-%H-%M-%S")
11
+ state = @caller['state']
12
+ if @caller.docroot_config.structure['root']['type'] == 'root'
13
+ tag_parts = []
14
+ tag_parts << "#{state}--#{time}"
15
+ @caller.build_results.each { |component_name, component_build_result|
16
+ unless component_name == 'master'
17
+ tag_parts << "#{component_name}:#{component_build_result['version']}"
18
+ end
19
+ }
20
+ tag = tag_parts.join('--')
21
+ else
22
+ if @caller.build_results['master']['version_type'] == 'tag'
23
+ tag = "#{state}--#{@caller.build_results['master']['version']}"
24
+ else
25
+ tag = "#{state}--#{time}--#{@caller.build_results['master']['version']}"
26
+ end
27
+ end
28
+ tag_sliced = tag.slice(0, 250).slice(/^(.+)[^a-zA-Z0-9]*$/, 1)
29
+ tag_sliced
30
+ end
31
+
32
+ end
33
+ end
@@ -1,3 +1,3 @@
1
1
  module Docman
2
- VERSION = "0.0.89"
2
+ VERSION = "0.0.90"
3
3
  end
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.89
4
+ version: 0.0.90
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Tolstikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-28 00:00:00.000000000 Z
11
+ date: 2018-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -231,6 +231,7 @@ files:
231
231
  - lib/docman/git_util.rb
232
232
  - lib/docman/info.rb
233
233
  - lib/docman/logging.rb
234
+ - lib/docman/taggers/components_tagger.rb
234
235
  - lib/docman/taggers/incremental_tagger.rb
235
236
  - lib/docman/taggers/option_tagger.rb
236
237
  - lib/docman/taggers/source_tagger.rb