locomotivecms_mounter 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,6 +11,7 @@ module Locomotive
11
11
  field :hint
12
12
  field :position, default: 0
13
13
  field :required, default: false
14
+ field :unique, default: false
14
15
  field :localized, default: false
15
16
 
16
17
  # text
@@ -90,7 +91,7 @@ module Locomotive
90
91
  # @return [ Hash ] The params
91
92
  #
92
93
  def to_params
93
- params = self.filter_attributes %w(label name type hint position required localized)
94
+ params = self.filter_attributes %w(label name type hint position required localized unique)
94
95
 
95
96
  # we set the _id / _destroy attributes for embedded documents
96
97
  params[:_id] = self._id if self.persisted?
@@ -167,7 +167,7 @@ module Locomotive
167
167
  def to_params(options = nil)
168
168
  options = { all_fields: false }.merge(options || {})
169
169
 
170
- params = self.filter_attributes %w(name slug description label_field_name group_by_field_name order_by order_by_direction public_submission_enabled raw_item_template)
170
+ params = self.filter_attributes %w(name slug description label_field_name group_by_field_name order_by order_direction public_submission_enabled raw_item_template)
171
171
 
172
172
  # order by
173
173
  params[:order_by] = '_position' if self.order_by == 'manually'
@@ -185,7 +185,7 @@ module Locomotive
185
185
  # @return [ Hash ] A hash used by the to_yaml method
186
186
  #
187
187
  def to_hash
188
- fields = %w(name slug description label_field_name order_by order_by_direction public_submission_enabled public_submission_accounts raw_item_template)
188
+ fields = %w(name slug description label_field_name order_by order_direction public_submission_enabled public_submission_accounts raw_item_template)
189
189
 
190
190
  _attributes = self.attributes.delete_if { |k, v| !fields.include?(k.to_s) || v.blank? }.deep_stringify_keys
191
191
 
@@ -13,6 +13,7 @@ module Locomotive
13
13
  field :meta_keywords, localized: true
14
14
  field :meta_description, localized: true
15
15
  field :robots_txt
16
+ field :timezone
16
17
 
17
18
  ## methods ##
18
19
 
@@ -28,7 +28,7 @@ module Locomotive
28
28
  end
29
29
 
30
30
  def safe_attributes
31
- %w(name locales seo_title meta_keywords meta_description domains subdomain created_at updated_at)
31
+ %w(name locales seo_title meta_keywords meta_description domains subdomain timezone created_at updated_at)
32
32
  end
33
33
 
34
34
  end
@@ -2,7 +2,7 @@
2
2
  module Locomotive
3
3
  module Mounter #:nodoc
4
4
 
5
- VERSION = '1.2.2'
5
+ VERSION = '1.2.3'
6
6
 
7
7
  end
8
8
  end
@@ -12,16 +12,6 @@ module Locomotive
12
12
  super
13
13
 
14
14
  self.fetch_site
15
-
16
- # if self.fetch_site.nil?
17
- # Mounter.logger.warn 'The site does not exist. Trying to create it.'
18
-
19
- # unless self.has_admin_rights?
20
- # raise Mounter::WriterException.new('Your account does not own admin rights.')
21
- # end
22
- # else
23
- # self.check_locales
24
- # end
25
15
  end
26
16
 
27
17
  # Create the site if it does not exist
@@ -81,7 +71,7 @@ module Locomotive
81
71
  end
82
72
 
83
73
  def safe_attributes
84
- %w(id locales)
74
+ %w(id locales timezone)
85
75
  end
86
76
 
87
77
  def fetch_site
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locomotivecms_mounter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-28 00:00:00.000000000 Z
12
+ date: 2013-08-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: tilt
@@ -146,7 +146,7 @@ dependencies:
146
146
  requirements:
147
147
  - - ~>
148
148
  - !ruby/object:Gem::Version
149
- version: 3.2.5
149
+ version: 3.2.14
150
150
  type: :runtime
151
151
  prerelease: false
152
152
  version_requirements: !ruby/object:Gem::Requirement
@@ -154,7 +154,7 @@ dependencies:
154
154
  requirements:
155
155
  - - ~>
156
156
  - !ruby/object:Gem::Version
157
- version: 3.2.5
157
+ version: 3.2.14
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: i18n
160
160
  requirement: !ruby/object:Gem::Requirement
@@ -520,7 +520,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
520
520
  version: '0'
521
521
  segments:
522
522
  - 0
523
- hash: 1068346951777047981
523
+ hash: 1812543072173302618
524
524
  required_rubygems_version: !ruby/object:Gem::Requirement
525
525
  none: false
526
526
  requirements: