pakman 1.0.0 → 1.1.0

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: 22a5cf70dcedaa0eb95834a086d24a7386597853
4
- data.tar.gz: 63c75a8c9c8ccb237bd4c1722cb90b62fe5a0816
3
+ metadata.gz: 84b0207602956da8a61d6ac6475638043b76a580
4
+ data.tar.gz: 8a636a9f82a459e9b76a1e915034645d930f2fc8
5
5
  SHA512:
6
- metadata.gz: 659145fbe1d193a0259751e8e1521ebd9845fef0f358a2a9118f574bfe59b13a6d447088e79503efc83e8e9b5c225d85090d541c9aa99ca3850271aee5e88e34
7
- data.tar.gz: 30238ac4aad11d19dbb1d11f339eae6c323101ab6d48f1e2435da15138907949db3b110d8184fb1902b28ade6afac7dd4cf939e78067efd07c7be5563b9a500b
6
+ metadata.gz: ecc8b14552bc878f573580983a1aaf6359625f907d27789b95b3c582c413e4d0f68ebc9e5991405a371a2a63e05e8a6df8d7dd48d7907b54d98267668637218b
7
+ data.tar.gz: 58120f4afcd9891a30c521426d8c7cc9752542e8313e41f973a25013fa21ef3003765d8cafdc7a91251b52c550b742a5a7b0fefa6d93780e3307e2e348a4ab78
@@ -13,7 +13,7 @@ class Copier
13
13
 
14
14
  pakname = Pakman.pakname_from_file( manifestsrc )
15
15
 
16
- puts "Copying template pack '#{pakname}'"
16
+ logger.info "Copying template pack '#{pakname}'"
17
17
 
18
18
  ## todo: after depreciate change back to just load_file
19
19
  manifest = Manifest.load_file_v2( manifestsrc )
@@ -30,11 +30,11 @@ class Copier
30
30
  logger.debug "destfull=>#{destfull}<"
31
31
  logger.debug "destpath=>#{destpath}<"
32
32
 
33
- puts " Copying to #{dest} from #{source}..."
33
+ logger.info " Copying to #{dest} from #{source}..."
34
34
  FileUtils.copy( source, destfull )
35
35
  end
36
36
 
37
- puts "Done (in #{Time.now-start} s)."
37
+ logger.info "Done (in #{Time.now-start} s)."
38
38
  end # method copy_pak
39
39
 
40
40
  end # class Copier
@@ -5,7 +5,8 @@ module Pakman
5
5
  class ErbTemplate
6
6
 
7
7
  def self.from_file( path )
8
- puts " Loading template (from file) >#{path}<..."
8
+ ## todo/fix: update logutils - (auto-)add ("static") logger helper/mixin too!!!!!
9
+ LogKernel::Logger[ self ].info " Loading template (from file) >#{path}<..."
9
10
  text = File.open( path, 'r:bom|utf-8' ).read ## note: assume utf8
10
11
  self.new( text, path: path ) ## note: pass along path as an option
11
12
  end
@@ -17,7 +17,7 @@ class Templater
17
17
 
18
18
  pakname = Pakman.pakname_from_file( manifestsrc )
19
19
 
20
- puts "Merging template pack '#{pakname}'"
20
+ logger.info "Merging template pack '#{pakname}'"
21
21
 
22
22
  # todo: rename to load_file once depreated API got removed
23
23
  manifest = Manifest.load_file_v2( manifestsrc )
@@ -39,20 +39,20 @@ class Templater
39
39
  logger.debug "destpath=>#{destpath}<"
40
40
 
41
41
  if source =~ /\.erb\.|.erb$/
42
- puts " Merging to #{dest}..."
42
+ logger.info " Merging to #{dest}..."
43
43
 
44
44
  out = File.new( destfull, 'w+:utf-8' ) ## note: use utf8 (by default)
45
45
  out << ErbTemplate.from_file( source ).render( binding )
46
46
  out.flush
47
47
  out.close
48
48
  else
49
- puts " Copying to #{dest} from #{source}..."
49
+ logger.info " Copying to #{dest} from #{source}..."
50
50
 
51
51
  FileUtils.copy( source, destfull )
52
52
  end
53
53
  end # each entry in manifest
54
54
 
55
- puts "Done (in #{Time.now-start} s)."
55
+ logger.info "Done (in #{Time.now-start} s)."
56
56
  end # method merge_pak
57
57
 
58
58
  end # class Templater
@@ -30,14 +30,14 @@ class Fetcher
30
30
 
31
31
  FileUtils.makedirs( pakpath ) unless File.directory?( pakpath )
32
32
 
33
- puts "Fetching template pack '#{pakname}'"
34
- puts " from '#{dlbase}'"
35
- puts " saving to '#{pakpath}'"
33
+ logger.info "Fetching template pack '#{pakname}'"
34
+ logger.info " from '#{dlbase}'"
35
+ logger.info " saving to '#{pakpath}'"
36
36
 
37
37
  # step 1: download manifest
38
38
  manifestdest = "#{pakpath}/#{filename}"
39
39
 
40
- puts " Downloading manifest '#{filename}'..."
40
+ logger.info " Downloading manifest '#{filename}'..."
41
41
 
42
42
  fetch_file( manifestsrc, manifestdest )
43
43
 
@@ -59,14 +59,14 @@ class Fetcher
59
59
  sourcefull = "#{dlbase}/#{source}"
60
60
 
61
61
  if source =~ /\.erb\.|.erb$/
62
- puts " Downloading template '#{source}'..."
62
+ logger.info " Downloading template '#{source}'..."
63
63
  else
64
- puts " Downloading file '#{source}'..."
64
+ logger.info " Downloading file '#{source}'..."
65
65
  end
66
66
 
67
67
  fetch_file( sourcefull, destfull )
68
68
  end
69
- puts "Done (in #{Time.now-start} s)."
69
+ logger.info "Done (in #{Time.now-start} s)."
70
70
  end # method fetch_pak
71
71
 
72
72
  private
@@ -12,7 +12,7 @@ class Manifest
12
12
  end
13
13
 
14
14
  def self.load_file_core( old_logger_do_not_use, path )
15
- puts "*** depreciated API call [Pakman::Manifest.load_file_core] - do NOT pass in logger; no longer required/needed; logger arg will get removed"
15
+ puts "*** deprecated API call [Pakman::Manifest.load_file_core] - do NOT pass in logger; no longer required/needed; logger arg will get removed"
16
16
 
17
17
  obj = self.new
18
18
  obj.load_file_core_worker( path )
@@ -20,7 +20,7 @@ class Manifest
20
20
  end
21
21
 
22
22
  def self.load_file( old_logger_do_not_use, path )
23
- puts "*** depreciated API call [Pakman::Manifest.load_file] - do NOT pass in logger; no longer required/needed; logger arg will get removed"
23
+ puts "*** deprecated API call [Pakman::Manifest.load_file] - do NOT pass in logger; no longer required/needed; logger arg will get removed"
24
24
 
25
25
  obj = self.new
26
26
  obj.load_file_worker( path )
@@ -73,7 +73,7 @@ class Manifest
73
73
  def load_file_worker( path )
74
74
  filename = path
75
75
 
76
- puts " Loading template manifest #{filename}..."
76
+ logger.info " Loading template manifest #{filename}..."
77
77
  load_file_core_worker( filename )
78
78
 
79
79
  # post-processing
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Pakman
4
- VERSION = '1.0.0'
4
+ VERSION = '1.1.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pakman
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-25 00:00:00.000000000 Z
11
+ date: 2017-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fetcher