docman 0.0.18 → 0.0.19

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: 6d91c91e2da9dc5481483fc7e9bdbd5483f2690b
4
- data.tar.gz: 387e3605485f728f50a760f9800e8c579904a9e4
3
+ metadata.gz: 5e2b2270da91cbcdc54d9bce217cd8c4969a3cb1
4
+ data.tar.gz: 613a17b47d5f2315b4fad66ef188b6225b54e598
5
5
  SHA512:
6
- metadata.gz: 7028de3b0029ac4e81bd537171ad23474573a62fda966c099a747cc4e23c2953ffd2fa6a2198c718a730727e4f87bd0bf50253b95fcfdb0343501c5f818eae43
7
- data.tar.gz: 7da3e17324ae345528ae23b4d01d77b86e0a7e9086fd68378eb6413eba60cb07340c93f402e42018e9fdcd6942898fb42a72714f080d20316cfeb09b1cd0a69c
6
+ metadata.gz: 4a7291fbe5463507e8774a3077dd4a35c81719bb726304dc3c94c083ce207ed044db841df96a3d922ce2378519c97dfea6a072c1730ea6513545f618135c4f7e
7
+ data.tar.gz: 5cfd599ed2a7edb241a1f5e0a6133b8ec9d243d46c12d1db3fac19f4586d03e9beb08888f890d412dbba37f1f486ca7917a49647a60d0356d544faad7562a4f9
data/bin/bump-version.sh CHANGED
@@ -77,7 +77,7 @@ if [ -n "$1" ]; then
77
77
  echo "type: tag" > info.yaml
78
78
  echo "version: $TAG" >> info.yaml
79
79
  git add -A
80
- git commit -m "[skip] Changed tag to: $TAG" & git push origin ${BRANCH}
81
- git checkout -
80
+ git commit -m "[skip] Changed tag to: $TAG" & git push -u origin ${BRANCH}
81
+ #git checkout -
82
82
  echo ${TAG}
83
83
  fi
@@ -151,7 +151,7 @@ module Docman
151
151
  def build_recursive(info = nil)
152
152
  info = info ? info : @docroot_config.structure
153
153
  build_dir(info)
154
- info['children'].each do |child|
154
+ info['children'].sort.map do |key, child|
155
155
  build_recursive(child)
156
156
  end
157
157
  end
@@ -27,7 +27,7 @@ module Docman
27
27
  def structure_build(path, prefix = '', parent = nil)
28
28
  return unless File.file? File.join(path, 'info.yaml')
29
29
 
30
- children = []
30
+ children = {}
31
31
  info = YAML::load_file(File.join(path, 'info.yaml'))
32
32
  @raw_infos[File.basename path] = YAML::load_file(File.join(path, 'info.yaml'))
33
33
  unless info['status'].nil?
@@ -40,8 +40,10 @@ module Docman
40
40
  info['build_path'] = prefix
41
41
  info['full_build_path'] = File.join(@docroot_dir, prefix)
42
42
  info['temp_path'] = File.join(@docroot_dir, 'tmp', info['build_path'])
43
+ info['states_path'] = File.join(@docroot_dir, 'states', info['build_path'])
43
44
  info['name'] = name
44
45
  info['parent'] = parent
46
+ info['order'] = info.has_key?('order') ? info['order'] : 10
45
47
  info['children'] = children
46
48
 
47
49
  i = Docman::Info.new(info)
@@ -56,7 +58,7 @@ module Docman
56
58
  if File.directory?(full_path)
57
59
  dir_hash = structure_build(full_path, prefix, i)
58
60
  unless dir_hash == nil
59
- children << dir_hash
61
+ children[dir_hash['order']] = dir_hash
60
62
  end
61
63
  end
62
64
  end
data/lib/docman/info.rb CHANGED
@@ -21,7 +21,7 @@ module Docman
21
21
  if state.has_key?('source')
22
22
  if state['source']['type'] == :retrieve_from_repo
23
23
  repo = state['source']['repo'] == :project_repo ? self['repo'] : state['source']['repo']
24
- external_state_info = read_yaml_from_file(repo, self['temp_path'], state['source']['branch'], state['source']['file'])
24
+ external_state_info = read_yaml_from_file(repo, self['states_path'], state['source']['branch'], state['source']['file'])
25
25
  state.deep_merge! external_state_info
26
26
  end
27
27
  end
@@ -30,7 +30,7 @@ module Docman
30
30
  end
31
31
 
32
32
  def read_yaml_from_file(repo, path, version, filename)
33
- GitUtil.get(repo, path, 'branch', version, nil, nil, need_rebuild?)
33
+ GitUtil.get(repo, path, 'branch', version, true, 1, need_rebuild?)
34
34
  filepath = File.join(path, filename)
35
35
  return YAML::load_file(filepath) if File.file? filepath
36
36
  nil
@@ -85,7 +85,7 @@ module Docman
85
85
  def set_rebuild_recursive(obj, value)
86
86
  obj.need_rebuild[@state_name] = value
87
87
  if obj.has_key?('children')
88
- obj['children'].each do |info|
88
+ obj['children'].values.each do |info|
89
89
  set_rebuild_recursive(info, value)
90
90
  end
91
91
  end
@@ -1,3 +1,3 @@
1
1
  module Docman
2
- VERSION = "0.0.18"
2
+ VERSION = "0.0.19"
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.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Tolstikov