luban 0.10.7 → 0.10.8

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: aec3ded5ecfb310a1b91471bc15227b9928e5965
4
- data.tar.gz: 6bbb2ecfb31d75c609d694c675b6f2b5ebd5848a
3
+ metadata.gz: e2d32a4a1dd92cca13d7871748e3c8092e4f9f2f
4
+ data.tar.gz: baa5d0afb14855fe06ce61149bb4e2e050bd778b
5
5
  SHA512:
6
- metadata.gz: a7ffa7fb3c20a33e39c0ee20649ee3fcd2489ee0459e928e331e636e4b4d6abb1551784160df196dd621475305ea33e6d1de7334723acdeaeb1a7079be437a74
7
- data.tar.gz: d874cc08156832c77626eaa88397fa23a9c69dd4ec7440ef273bce6039e411522d34bb5c80bf02f0daae77af2169953ab0ea5e1e5e2a8fcbbab378e878340603
6
+ metadata.gz: 37b0f795646f60a414d21957bb7213c2284e75fa8670bcd7f5e12f8fcdeac10d641d6aa2c35a092cbbaf953c6119e5eb841b5cdc030a0ec0c69d5041bff8ab02
7
+ data.tar.gz: e5ebf731e97745f01ff47b229261c1ba622fbcbd447e2e0e21761e84b7df919cc5fa6bcef1758c118b39db9195d9c7cae05d5490e546979debb39bcc0ebb6d2b
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Change log
2
2
 
3
- ## Version 0.10.7 (Nov 25, 2016)
3
+ ## Version 0.10.8 (Nov 26, 2016)
4
+
5
+ Minor enhancements:
6
+ Added #control_file_dir to specify directory name for control file
7
+ * By default, control_fir_dir is also used in linked_files handling
4
8
 
5
9
  Bug fixes:
6
10
  * Normalized executable name into proper method name when defining executable for a given package
@@ -67,9 +67,11 @@ module Luban
67
67
  end
68
68
 
69
69
  def control_file_path
70
- @control_file_path ||= profile_path.join(control_file_name)
70
+ @control_file_path ||= profile_path.join(control_file_dir, control_file_name)
71
71
  end
72
72
 
73
+ def control_file_dir; @control_file_dir ||= ""; end
74
+
73
75
  def control_file_name
74
76
  @control_file_name ||= "#{service_name}.conf"
75
77
  end
@@ -5,18 +5,22 @@ module Luban
5
5
  def linked_dirs; @linked_dirs ||= []; end
6
6
  def linked_files; @linked_files ||= []; end
7
7
 
8
- def linked_files_dir
9
- @linked_files_dir ||= 'config'
10
- end
11
-
12
8
  def linked_files_root
13
9
  @linked_files_root ||= config_finder[:application].stage_profile_path.join(profile_name)
14
10
  end
15
11
 
12
+ def linked_files_dir
13
+ @linked_files_dir ||= control_file_dir
14
+ end
15
+
16
16
  def linked_files_from
17
17
  @linked_files_from ||= linked_files_root.join(linked_files_dir)
18
18
  end
19
19
 
20
+ def linked_files_dir_exists?
21
+ !linked_files_dir.to_s.empty? and linked_files_from.directory?
22
+ end
23
+
20
24
  protected
21
25
 
22
26
  def init
@@ -30,7 +34,7 @@ module Luban
30
34
  end
31
35
 
32
36
  def init_linked_files
33
- return unless linked_files_from.directory?
37
+ return unless linked_files_dir_exists?
34
38
  Dir.chdir(linked_files_from) do
35
39
  linked_files.concat(Pathname.glob("**/*").select { |f| f.file? })
36
40
  end
@@ -1,5 +1,5 @@
1
1
  module Luban
2
2
  module Deployment
3
- VERSION = "0.10.7"
3
+ VERSION = "0.10.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luban
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.7
4
+ version: 0.10.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rubyist Lei
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-25 00:00:00.000000000 Z
11
+ date: 2016-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: luban-cli