Class: Zapnito::Cli::Commands::Theme
- Inherits:
-
Thor
- Object
- Thor
- Zapnito::Cli::Commands::Theme
show all
- Defined in:
- lib/zapnito/cli/commands/theme.rb
Instance Method Summary
collapse
Instance Method Details
#preview ⇒ Object
42
43
44
45
46
47
|
# File 'lib/zapnito/cli/commands/theme.rb', line 42
def preview
theme = Services.local.load
link = zapnito.preview_link(theme)
puts "link: #{link}"
Launchy.open(link)
end
|
#preview_link ⇒ Object
35
36
37
38
39
|
# File 'lib/zapnito/cli/commands/theme.rb', line 35
def preview_link
theme = Services.local.load
link = zapnito.preview_link(theme)
puts "---> #{link}"
end
|
#publish ⇒ Object
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/zapnito/cli/commands/theme.rb', line 17
def publish
theme = Services.local.load
puts "---> Publishing #{theme.tenant_slug}"
release_config = zapnito.s3_upload_urls_for_theme(theme)
Services.s3.upload_theme(theme, release_config)
zapnito.build_release(theme)
puts "---> Published #{theme.tenant_slug}/#{theme.revision}"
rescue Exception => e
if e.response.code == 406
show_sass_error(e)
else
raise e
end
end
|