ants 0.2.6 → 0.2.7

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: baef7329275e079877c06587c6fbfbb21b5272e9
4
- data.tar.gz: 4b9178c6fbbd046368148aa29bee08b9a0b3a1a4
3
+ metadata.gz: a098093f449a893e74a659e3458b5d471b02d206
4
+ data.tar.gz: ffbe2e6fcd1563b03e0d1b6707a2ec537da8955f
5
5
  SHA512:
6
- metadata.gz: 161fe223836e49668d314e92eb2cf6d4b12ad9cac36948a81e461bb976c8ed1dac408da716b336bb3b3b84de5874d91d5d4d2ff0fd863557c03e3fdf24369221
7
- data.tar.gz: 30c1c211a286ddc52b5184f6f1c1bbc55075d659a10f2d8e2d57cf520b2577a01b3f06d00ea9219426ea7c14e9391b51f8e63717cff8f86a4c054b9064445a62
6
+ metadata.gz: 598b4db8d45fb19217c976c58c6e29cb54df5f6e4946f535ba2d069b869c9d90772ae5d4f91e49a4a9565c4e16e0d7616eb89001c5945f2fddd455131ebdc145
7
+ data.tar.gz: a099bfe58c3a666bd757286172edd7d4ef1f9eb9d65927230d5632fb92f51c4cbd707063e086669aebe6750620034fa79367d5e117caab1591d3a9c3151df4af
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ants (0.2.6)
4
+ ants (0.2.7)
5
5
  devise
6
6
  mongoid (>= 4.0)
7
7
  mongoid-slug (>= 4.0.0)
@@ -0,0 +1,29 @@
1
+ class @AntsMetaGroup
2
+ constructor: (extra_config={}) ->
3
+ config =
4
+ type: 'group'
5
+ inputs:
6
+ _meta_title:
7
+ type: 'string'
8
+ label: 'Meta Title'
9
+ limit: 60
10
+ placeholder: "Accurate and concise description of a page's content"
11
+
12
+ _meta_description:
13
+ type: 'text'
14
+ label: 'Meta Description'
15
+ limit: 200
16
+ placeholder: 'Advertise content with short summary'
17
+
18
+ _meta_keywords:
19
+ type: 'text'
20
+ label: 'Meta Keywords'
21
+ placeholder: 'e.g. keyword1, keyword2, keyword3'
22
+
23
+ _opengraph_image_url:
24
+ type: 'loft-image'
25
+ label: 'Open Graph Image'
26
+
27
+ $.extend(config, extra_config)
28
+
29
+ return config
@@ -0,0 +1,15 @@
1
+ class @AntsSlugInput
2
+ constructor: (extra_config={}) ->
3
+ config =
4
+ type: 'string'
5
+ name: '_slug'
6
+ label: 'Permalink'
7
+ placeholder: ''
8
+ onInitialize: (input) ->
9
+ if input.object && input.object._slugs.length
10
+ defaultSlug = input.object._slugs[0]
11
+ input.$input.attr 'placeholder', defaultSlug
12
+
13
+ $.extend(config, extra_config)
14
+
15
+ return config
data/lib/ants/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ants
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
@@ -1,37 +1,29 @@
1
1
  module Ants
2
2
  module Meta
3
3
  extend ActiveSupport::Concern
4
-
5
4
  included do
6
-
7
5
  field :_meta_title, default: ''
8
6
  field :_meta_description, default: ''
9
7
  field :_meta_keywords, default: ''
10
8
  field :_opengraph_image_url, default: ''
11
9
 
12
-
13
10
  # these helpers to be used for meta_tags helper,
14
11
  # override them to add custom logic
15
12
  def meta_title
16
13
  _meta_title
17
14
  end
18
15
 
19
-
20
16
  def meta_description
21
17
  _meta_description
22
18
  end
23
19
 
24
-
25
20
  def meta_keywords
26
21
  _meta_keywords
27
22
  end
28
23
 
29
-
30
24
  def opengraph_image_url
31
25
  _opengraph_image_url
32
26
  end
33
-
34
-
35
27
  end
36
28
  end
37
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ants
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kravets
@@ -156,7 +156,9 @@ files:
156
156
  - app/assets/javascripts/ants.coffee
157
157
  - app/assets/javascripts/ants/admins.coffee
158
158
  - app/assets/javascripts/ants/menu.coffee
159
+ - app/assets/javascripts/ants/meta.coffee
159
160
  - app/assets/javascripts/ants/redirects.coffee
161
+ - app/assets/javascripts/ants/slug.coffee
160
162
  - app/assets/stylesheets/ants.scss
161
163
  - app/assets/stylesheets/chr/header.scss
162
164
  - app/controllers/admin/admins_controller.rb