bootic_cli 0.8.0 → 0.8.1

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: d2765e7635f1721bf89ff0c5f35e089229a917bf
4
- data.tar.gz: 585e9460e97ee451c0ff8167a74177843231a7bb
3
+ metadata.gz: 716548aa0709e93e4e976350ccd730d19e084e1e
4
+ data.tar.gz: bfec94186d0b83e056b37b0b71318da3469c95df
5
5
  SHA512:
6
- metadata.gz: 126f5bd5af00aefdbca55b4a7a474042b80ddb36e83719b5fde9ee68d6a7c2c551053d6c76b6d47445b29181d005d42252b31e2d95cfba1c364f4498a5105bfd
7
- data.tar.gz: 5a9f2eb890175edb519bac77d7b472055f13b9de15a13c1e7040ead4a7db96a4d05b7f59153105c4fe2ea7d1dd5b0ab2e74a75b689f6531b4d003d8e9ab4d072
6
+ metadata.gz: c0982bf6bb52c178318983c835d5c29833ed22261721807136f2ddb1c2506e130a8197b0e14471e86b13fd232a9155edb7beffce1d0396094947be9c80b1adaf
7
+ data.tar.gz: f3f5d752b1c7bdb4832f3326179ee39cfcd016504edeed1afd14b4d30bbb951d3383192736fb79b20559c660c607cbcb711c0907fb6fb13884a70ae63a611fa5
@@ -46,12 +46,13 @@ module BooticCli
46
46
  def self.resolve_file(path, workdir)
47
47
  file = File.new(path)
48
48
  type = resolve_type(path)
49
- file_name = resolve_path(path, workdir)
50
49
 
51
50
  # initialize a new asset or template as it might be a new file
52
51
  item = if path =~ /assets\//
52
+ file_name = File.basename(path)
53
53
  ThemeAsset.new(file_name, file, file.mtime.utc)
54
54
  else
55
+ file_name = resolve_path(path, workdir)
55
56
  Template.new(file_name, file.read, file.mtime.utc)
56
57
  end
57
58
 
@@ -339,11 +339,12 @@ module BooticCli
339
339
 
340
340
  def delete_file(theme, path, dir)
341
341
  type = FSTheme.resolve_type(path)
342
- file_name = FSTheme.resolve_path(path, dir)
343
342
  success = case type
344
343
  when :template
344
+ file_name = FSTheme.resolve_path(path, dir)
345
345
  theme.remove_template(file_name)
346
346
  when :asset
347
+ file_name = File.basename(path)
347
348
  theme.remove_asset(file_name)
348
349
  else
349
350
  raise "Invalid type: #{type}"
@@ -1,3 +1,3 @@
1
1
  module BooticCli
2
- VERSION = '0.8.0'
2
+ VERSION = '0.8.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootic_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ismael Celis
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-05-13 00:00:00.000000000 Z
12
+ date: 2020-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor