luban 0.7.3 → 0.7.4

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: 7a8f39979ced7b6927daaf816577978103685cbf
4
- data.tar.gz: 49e197ac74dbb02244ce6f7b46633c61ab4326d6
3
+ metadata.gz: cbca715d836e07f8facc579abd81a6ad4d14ebcd
4
+ data.tar.gz: 68945ffab8742dae123414b20631d6f15915ee93
5
5
  SHA512:
6
- metadata.gz: 64b73d9b4172745afe242fc76338334c44a0a7e229667ac04cd2ee54210c492610f795c7082d3fbbba74d1615cad8ce92fb3af1f8b97225258ba064184973b6b
7
- data.tar.gz: f4cf86cedf713679ce2fb578c685f157932c1b940930185ab5faa8adeea67c26e7b33ca86db9b3f9d234208404952385df40f79669084535db9a18dd4bd4d2e4
6
+ metadata.gz: d61488ad6cadfa12ce43fc4507297eafd2c1b08d15b5e022db482ea14dde6f98da896920fdffa17e3142cf4d82116416384ef77a3b9d8bf9a5a103b802f81da6
7
+ data.tar.gz: 06aa49374f03b99287598e9c036c3110bae09baf1e621752be52cf6651d1e11fc9096722b25285dff56b64f17f1be708b4d56921e41b866b5dcb9e0aed10b89c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change log
2
2
 
3
+ ## Version 0.7.4 (Aug 26, 2016)
4
+
5
+ Bug fixes:
6
+ * Fixed reading the md5 file for the source package
7
+ * Changed default_templates_paths to an inheritable class instance variable to better handle inheritance for default template paths
8
+
3
9
  ## Version 0.7.3 (Aug 25, 2016)
4
10
 
5
11
  New features:
@@ -165,6 +165,16 @@ module Luban
165
165
  alias_method :undef_task, :undef_command
166
166
 
167
167
  class << self
168
+ def inherited(subclass)
169
+ super
170
+ # Ensure default_templates_paths from base class
171
+ # got inherited to its subclasses
172
+ paths = instance_variable_get('@default_templates_paths')
173
+ subclass.instance_variable_set('@default_templates_paths', paths.nil? ? [] : paths.clone)
174
+ end
175
+
176
+ attr_reader :default_templates_paths
177
+
168
178
  def default_worker_class
169
179
  Luban::Deployment::Worker::Base
170
180
  end
@@ -224,10 +234,12 @@ module Luban
224
234
  def default_templates
225
235
  return @default_templates unless @default_templates.nil?
226
236
  (@default_templates = []).tap do |t|
227
- default_templates_paths[0...-1].each { |p| t.concat(p.children).uniq! }
237
+ default_templates_paths.each { |p| t.concat(p.children).uniq! }
228
238
  end
229
239
  end
230
240
 
241
+ def default_templates_paths; self.class.default_templates_paths; end
242
+
231
243
  protected
232
244
 
233
245
  def on_configure
@@ -5,7 +5,7 @@ module Luban
5
5
  class InstallFailure < Luban::Deployment::Error; end
6
6
 
7
7
  def src_file_md5
8
- @src_file_md5 ||= capture(:cat, src_md5_file_path)
8
+ @src_file_md5 ||= File.read(src_md5_file_path).chomp
9
9
  end
10
10
 
11
11
  def required_packages
@@ -75,8 +75,6 @@ module Luban
75
75
  path
76
76
  end
77
77
 
78
- def default_templates_paths; Finder.default_templates_paths; end
79
-
80
78
  protected
81
79
 
82
80
  def find_template_file_by_config_finder(file_name)
@@ -1,5 +1,5 @@
1
1
  module Luban
2
2
  module Deployment
3
- VERSION = "0.7.3"
3
+ VERSION = "0.7.4"
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.7.3
4
+ version: 0.7.4
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-08-25 00:00:00.000000000 Z
11
+ date: 2016-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: luban-cli