smooster 0.1.4 → 0.1.5
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 +8 -8
- data/lib/smooster/cli/executable.rb +2 -1
- data/lib/smooster/deploy/media_asset.rb +2 -1
- data/lib/smooster/version.rb +1 -1
- data/lib/smooster.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjI0NmY3ZDZiMjAwMWFhNmU2Yzg3YTk5ODIwOTI0MTlmMWNkYWViYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzI2MmUzZmFiYWNjYmU3OTE3OGRmOTcwMDkzNWU4ZTljODEyNzJiYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2E1YTUyMDFlZGIzMjVmN2VlMDM4YjBmNmYxY2QyMjA2NjIyYzViNzZjZGIw
|
10
|
+
MjRjNDg4OGYzNGM0NjZlMmI3YzFlN2ExYWRiNDdmYTczNDBiOWFjMjk3MDlh
|
11
|
+
YWM4ZGUwOWZjMTZlMDQ4MmQzZWQ0MmU5Njg3NGVhY2JlNTEyY2I=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDFhNDc0MzUwNDAyNjlmNjc3M2IzNTQ2NjBjNzg2NTQxZDQ3N2U1MDJlZWIz
|
14
|
+
ZGU3OGI0MWQ1MDRhMTQ4YmVkMDIyMzFiZjg3OWYyNWU1MDM0OWI5YWRiYzFm
|
15
|
+
N2QxNmQ1MmI2MWM3NmEzN2RhOThmOWEyYjM1ZTQ1NDE3ZTNiODI=
|
@@ -61,6 +61,7 @@ module Smooster
|
|
61
61
|
end
|
62
62
|
|
63
63
|
desc "load [TYPE]", "load your project from the smooster cloud DEFAULT=assets [assets,templates,all]"
|
64
|
+
method_option :keep, type: :boolean, default: true, desc: "If the none synced files shall be keeped or deleted"
|
64
65
|
def load(type="assets")
|
65
66
|
puts "Starting loading from smooster..."
|
66
67
|
|
@@ -69,7 +70,7 @@ module Smooster
|
|
69
70
|
status = "[loading]".colorize(:blue)
|
70
71
|
status = "[unchanged]".colorize(:green) if ma.checksum.to_s == ma.load_checksum.to_s
|
71
72
|
puts "#{ma.file_path} #{status}"
|
72
|
-
ma.download
|
73
|
+
ma.download(options[:keep])
|
73
74
|
end
|
74
75
|
end
|
75
76
|
|
@@ -32,7 +32,7 @@ module Smooster
|
|
32
32
|
store.transaction { store[self.file_path][:smo_id] if store[self.file_path].present? }
|
33
33
|
end
|
34
34
|
|
35
|
-
def download
|
35
|
+
def download(keep=true)
|
36
36
|
begin
|
37
37
|
response = RestClient.get("#{Smooster::Application.instance.api_url()}/#{Smooster::Application.instance.site_id()}/media_assets/find_by_slug/#{self.folder_path}/#{File.basename(self.file_path)}", {"Authorization" => 'Token token="'+ Smooster::Application.instance.api_key() +'"', "Accept" => 'application/vnd.smoosterid.v2'})
|
38
38
|
data = JSON.parse(response)
|
@@ -42,6 +42,7 @@ module Smooster
|
|
42
42
|
rescue => e
|
43
43
|
Smooster::Application.instance.logger.error "Error in media_asset download for #{self.file_path}!: #{e} / #{e.backtrace.inspect}"
|
44
44
|
puts "This file failed to load: #{self.file_path}".colorize(:red)
|
45
|
+
File.delete(self.file_path) if keep == false
|
45
46
|
end
|
46
47
|
|
47
48
|
|
data/lib/smooster/version.rb
CHANGED
data/lib/smooster.rb
CHANGED