locomotivecms_wagon 2.1.0.rc3 → 2.1.0.rc4

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: 571f69b042f72f8bf9c9ac09260ed1f5f19af3e1
4
- data.tar.gz: 199bdd8684cfc28ba142652e6652713ee8e633f8
3
+ metadata.gz: c992663746d4414b01ab474e5e4169863dbf246e
4
+ data.tar.gz: 64dcd654ebf23562683183c5313decd1417b0b34
5
5
  SHA512:
6
- metadata.gz: 13ee04e4560d5a032cd52e10774db4bd1e40e0d288e5bd58aad6b25334a83f4a0047b4c293361caf5f2db6afbbe2dfd23144b7939cbf0a9c26a5caa6f4f3a107
7
- data.tar.gz: 40027558ba5aa6b28528be62b6496ea11fcf76d3e77dc158d8b20975c805bc2ba26dd469c88a04914068828cc8c79e54c517788c4c1844f9d574e66888cfa56a
6
+ metadata.gz: f1c80340c057ba5867d1313553bf9e1c05c1181d57a2e2c3fc31988c5e941c3b64ec0791133df2618798c89a4891676243d1f2b9c984adccc332395112828a2c
7
+ data.tar.gz: 63dc747d936d59492842b1cf34d0418e8878fbbfa68f2c486c9763d1f3bb1dd7ade520e4a041041eebd105d3455ae08f619630733abf173959b57babd2e5701a
data/Gemfile CHANGED
@@ -8,7 +8,7 @@ gem 'rb-fsevent', '~> 0.9.1'
8
8
  # Development
9
9
  # gem 'locomotivecms_common', github: 'locomotivecms/common', ref: '257047b', require: false
10
10
  # gem 'locomotivecms_coal', github: 'locomotivecms/coal', ref: 'f4ff435', require: false
11
- # gem 'locomotivecms_steam', github: 'locomotivecms/steam', ref: '62c274f', require: false
11
+ # gem 'locomotivecms_steam', github: 'locomotivecms/steam', ref: 'c44f003', require: false
12
12
 
13
13
  # Local development
14
14
  # gem 'locomotivecms_coal', path: '../gems/coal', require: false
@@ -27,6 +27,12 @@ seo_title: <%= @name %>
27
27
  meta_keywords: "some meta keywords"
28
28
  meta_description: "some meta description"
29
29
 
30
+ # You can control the display of the "Properties" section in the back-office
31
+ # metafields_ui:
32
+ # label: Store settings # use a hash for localized versions
33
+ # icon: shopping-cart # FontAwesome icons without the leading "fa-" string.
34
+ # hint: "Lorem ipsum..."
35
+
30
36
  # Each site can have its own set of custom properties organized in namespaces.
31
37
  # First, define namespaces and their fields in the config/metafields_schema.yml file.
32
38
  # Finally, set default values below as described in the example.
@@ -27,6 +27,12 @@ seo_title: <%= @name %>
27
27
  meta_keywords: "some meta keywords"
28
28
  meta_description: "some meta description"
29
29
 
30
+ # You can control the display of the "Properties" section in the back-office
31
+ # metafields_ui:
32
+ # label: Store settings # use a hash for localized versions
33
+ # icon: shopping-cart # FontAwesome icons without the leading "fa-" string.
34
+ # hint: "Lorem ipsum..."
35
+
30
36
  # Each site can have its own set of custom properties organized in namespaces.
31
37
  # First, define namespaces and their fields in the config/metafields_schema.yml file.
32
38
  # Finally, set default values below as described in the example.
@@ -27,6 +27,12 @@ seo_title: <%= @name %>
27
27
  meta_keywords: "some meta keywords"
28
28
  meta_description: "some meta description"
29
29
 
30
+ # You can control the display of the "Properties" section in the back-office
31
+ # metafields_ui:
32
+ # label: Store settings # use a hash for localized versions
33
+ # icon: shopping-cart # FontAwesome icons without the leading "fa-" string.
34
+ # hint: "Lorem ipsum..."
35
+
30
36
  # Each site can have its own set of custom properties organized in namespaces.
31
37
  # First, define namespaces and their fields in the config/metafields_schema.yml file.
32
38
  # Finally, set default values below as described in the example.
@@ -399,9 +399,13 @@ module Locomotive
399
399
  # @param [ Boolean ] verbose Print the full backtrace if true
400
400
  #
401
401
  def print_exception(exception, verbose)
402
- say exception.message, :red
403
402
  if verbose
404
- say "\t" + exception.backtrace.join("\n\t")
403
+ say "\n# Error description:", :bold
404
+ say exception.message, :red
405
+ say "\n# Backtrace:", :bold
406
+ say "\n\t" + exception.backtrace.join("\n\t")
407
+ else
408
+ say "\n\nError(s) found. Please use the -v option to display the full exception", :red
405
409
  end
406
410
  end
407
411
 
@@ -11,7 +11,7 @@ module Locomotive::Wagon
11
11
  config.mode = :test
12
12
  config.adapter = { name: :filesystem, path: path }
13
13
  config.asset_path = File.expand_path(File.join(path, 'public'))
14
- config.minify_assets = true
14
+ config.minify_assets = false
15
15
  end
16
16
 
17
17
  @steam_services = Locomotive::Steam::Services.build_instance.tap do |services|
@@ -3,7 +3,7 @@ module Locomotive::Wagon
3
3
  class PullSiteCommand < PullBaseCommand
4
4
 
5
5
  def _pull
6
- attributes = current_site.attributes.slice('name', 'locales', 'domains', 'timezone', 'seo_title', 'meta_keywords', 'meta_description', 'picture_thumbnail_url', 'metafields', 'metafields_schema')
6
+ attributes = current_site.attributes.slice('name', 'locales', 'domains', 'timezone', 'seo_title', 'meta_keywords', 'meta_description', 'picture_thumbnail_url', 'metafields', 'metafields_schema', 'metafields_ui')
7
7
 
8
8
  locales.each_with_index do |locale, index|
9
9
  if index == 0
@@ -35,6 +35,9 @@ module Locomotive::Wagon
35
35
  instrument :persist_with_success
36
36
  rescue SkipPersistingException => e
37
37
  instrument :skip_persisting
38
+ rescue Locomotive::Coal::ServerSideError => e
39
+ instrument :persist_with_error, message: 'Locomotive Back-office error. Contact your administrator or check your application logs.'
40
+ raise e
38
41
  rescue Exception => e
39
42
  instrument :persist_with_error, message: e.message
40
43
  raise e
@@ -86,7 +86,8 @@ module Locomotive::Wagon
86
86
  end
87
87
 
88
88
  def sprockets_env
89
- @sprockets_env ||= Locomotive::Steam::SprocketsEnvironment.new(File.join(path, 'public'), minify: true)
89
+ @sprockets_env ||= Locomotive::Steam::SprocketsEnvironment.new(File.join(path, 'public'),
90
+ minify: ENV['WAGON_NO_MINIFY_ASSETS'].present? ? false : true)
90
91
  end
91
92
 
92
93
  def skip?(entity)
@@ -12,6 +12,10 @@ module Locomotive
12
12
  (__getobj__.domains || []) - ['localhost']
13
13
  end
14
14
 
15
+ def metafields_ui
16
+ self[:metafields_ui].try(:to_json)
17
+ end
18
+
15
19
  def metafields_schema
16
20
  self[:metafields_schema].try(:to_json)
17
21
  end
@@ -37,7 +41,7 @@ module Locomotive
37
41
  end
38
42
 
39
43
  def __attributes__
40
- %i(name handle robots_txt locales timezone seo_title meta_keywords meta_description picture metafields_schema metafields)
44
+ %i(name handle robots_txt locales timezone seo_title meta_keywords meta_description picture metafields_schema metafields metafields_ui)
41
45
  end
42
46
 
43
47
  def edited?
@@ -49,7 +53,7 @@ module Locomotive
49
53
  class UpdateSiteDecorator < SiteDecorator
50
54
 
51
55
  def __attributes__
52
- %i(picture locales metafields_schema metafields)
56
+ %i(picture locales metafields_schema metafields metafields_ui)
53
57
  end
54
58
 
55
59
  end
@@ -21,6 +21,12 @@ module Locomotive
21
21
  def add_instructions
22
22
  append_to_file 'config/site.yml', <<-EOF
23
23
 
24
+ # You can control the display of the "Properties" section in the back-office
25
+ # metafields_ui:
26
+ # label: Store settings # use a hash for localized versions
27
+ # icon: shopping-cart # FontAwesome icons without the leading "fa-" string.
28
+ # hint: "Lorem ipsum..."
29
+
24
30
  # Each site can have its own set of custom properties organized in namespaces.
25
31
  # First, define namespaces and their fields in the config/metafields_schema.yml file.
26
32
  # Finally, set default values below as described in the example.
@@ -1,5 +1,5 @@
1
1
  module Locomotive
2
2
  module Wagon
3
- VERSION = '2.1.0.rc3'
3
+ VERSION = '2.1.0.rc4'
4
4
  end
5
5
  end
@@ -28,7 +28,7 @@ Gem::Specification.new do |gem|
28
28
 
29
29
  gem.add_dependency 'locomotivecms_common', '~> 0.1.0'
30
30
  gem.add_dependency 'locomotivecms_coal', '~> 1.1.0'
31
- gem.add_dependency 'locomotivecms_steam', '~> 1.1.0.rc1'
31
+ gem.add_dependency 'locomotivecms_steam', '~> 1.1.0.rc2'
32
32
 
33
33
  gem.add_dependency 'listen', '~> 3.0.4'
34
34
  gem.add_dependency 'rack-livereload', '~> 0.3.16'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locomotivecms_wagon
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0.rc3
4
+ version: 2.1.0.rc4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Didier Lafforgue
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-03-08 00:00:00.000000000 Z
12
+ date: 2016-03-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -115,14 +115,14 @@ dependencies:
115
115
  requirements:
116
116
  - - "~>"
117
117
  - !ruby/object:Gem::Version
118
- version: 1.1.0.rc1
118
+ version: 1.1.0.rc2
119
119
  type: :runtime
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - "~>"
124
124
  - !ruby/object:Gem::Version
125
- version: 1.1.0.rc1
125
+ version: 1.1.0.rc2
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: listen
128
128
  requirement: !ruby/object:Gem::Requirement