cmor_blog 0.0.39.pre → 0.0.40.pre

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
  SHA256:
3
- metadata.gz: '0219261c1567fd19f69f1e96c1ab5d3912d849afcc94da79031f8d8f247f3654'
4
- data.tar.gz: caddf75393d23978c34ae00c2c731de189dc89bf11df3214a59eeb5bb9f31347
3
+ metadata.gz: 0fc857e86a91e648a4f4ff238fffa0af4f1fb925712dcc54807cff7471819f80
4
+ data.tar.gz: cd57c5b371ddcb640bc0f025bd6d5d190a3973daf02aefac488c0b5e3b14807c
5
5
  SHA512:
6
- metadata.gz: 8372bddae8fa6feb26b9e3acf3fbb22d44effb264546da1e0380909ac8dfc3d468985f6488281f48f7c7586b9da2d2e37871483a86f32f498b3496eae87397ff
7
- data.tar.gz: b3928edec8bf40d23006270ff8ee75423a5ee1dd6a102f061a973039fb72ac7f5cd96c58d9a31350f4db518e3015b20f8a2b8e5ab7739312a29b58518298b3ca
6
+ metadata.gz: 363b54cf9a9fe5b547234266b07ba3379be55609f1f956e773048b19095f72be308c8b2fd204f1b557b8e78ac5086e52efe89ca8dc06aba2b442d5f8f9e3ee01
7
+ data.tar.gz: 25c79e21acb7f5799be32b472da05c940f51ede31ea889ecd50aa131170059030b8b7c284daf1ce75bdfe9c2d872ec875464f8d335c0e5bff59650fe1be5a050
@@ -8,7 +8,7 @@ module Cmor
8
8
  include Rao::ResourcesController::KaminariConcern
9
9
  include Rao::ResourcesController::LocationHistoryConcern
10
10
 
11
- helper Cmor::Comments::ApplicationHelper if Cmor::Blog.features?(:cmor_comments)
11
+ helper Cmor::Comments::ApplicationHelper if Cmor::Core.features?(:cmor_comments)
12
12
 
13
13
  def self.resource_class
14
14
  Cmor::Blog::Post
@@ -1,8 +1,8 @@
1
1
  module Cmor
2
2
  module Blog
3
3
  class Post < ActiveRecord::Base
4
- include Model::Cmor::Comments::CommentableConcern if Cmor::Blog.features?(:cmor_comments)
5
- include Model::Cmor::Tags::TaggableConcern if Cmor::Blog.features?(:cmor_tags)
4
+ include Model::Cmor::Comments::CommentableConcern if Cmor::Core.features?(:cmor_comments)
5
+ include Model::Cmor::Tags::TaggableConcern if Cmor::Core.features?(:cmor_tags)
6
6
 
7
7
  # publishing
8
8
  include ActsAsPublished::ActiveRecord
@@ -4,11 +4,11 @@
4
4
  %small
5
5
  %span.post-creation-information.text-muted
6
6
  = "#{l(post.created_at)} | #{post.creator.send(Cmor::Blog::Configuration.creator_label_method_name)}"
7
- - if Cmor::Blog.features?(:cmor_comments)
7
+ - if Cmor::Core.features?(:cmor_comments)
8
8
  |
9
9
  %span.comments-information
10
10
  = link_to(t('cmor.comments.commentable.comments_information', comments_count: post.comments.count), cmor_blog.post_url(post, anchor: 'comments'))
11
- - if Cmor::Blog.features?(:cmor_tags)
11
+ - if Cmor::Core.features?(:cmor_tags)
12
12
  |
13
13
  %span.post-tags
14
14
  = tags_helper(self).render_tags_for(post)
@@ -5,11 +5,11 @@
5
5
  %small
6
6
  %span.post-creation-information.text-muted
7
7
  = "#{l(post.created_at)} | #{post.creator.send(Cmor::Blog::Configuration.creator_label_method_name)}"
8
- - if Cmor::Blog.features?(:cmor_comments)
8
+ - if Cmor::Core.features?(:cmor_comments)
9
9
  |
10
10
  %span.comments-information
11
11
  = link_to(t('cmor.comments.commentable.comments_information', comments_count: post.comments.count), cmor_blog.post_url(post, anchor: 'comments'))
12
- - if Cmor::Blog.features?(:cmor_tags)
12
+ - if Cmor::Core.features?(:cmor_tags)
13
13
  |
14
14
  %span.post-tags
15
15
  = tags_helper(self).render_tags_for(post)
@@ -1,17 +1,18 @@
1
1
  %div{ id: dom_id(post), class: "row #{dom_class(post)} bottom-margin-5 mb-4" }
2
2
  .col-lg-4
3
- = image_tag(main_app.url_for(post.preview_picture.asset.variant(Cmor::Blog::Configuration.preview_picture_asset_variant_options)), class: 'img-fluid')
3
+ .post-preview-picture
4
+ = image_tag(main_app.url_for(post.preview_picture.asset.variant(Cmor::Blog::Configuration.preview_picture_asset_variant_options)), class: 'img-fluid')
4
5
  .col-lg-8
5
6
  %h2.post-title
6
7
  = link_to(post.title, cmor_blog.url_for(post))
7
8
  %small
8
9
  %span.post-creation-information.text-muted
9
10
  = "#{l(post.created_at)} | #{post.creator.send(Cmor::Blog::Configuration.creator_label_method_name)}"
10
- - if Cmor::Blog.features?(:cmor_comments)
11
+ - if Cmor::Core.features?(:cmor_comments)
11
12
  |
12
13
  %span.comments-information
13
14
  = link_to(t('cmor.comments.commentable.comments_information', comments_count: post.comments.count), cmor_blog.post_url(post, anchor: 'comments'))
14
- - if Cmor::Blog.features?(:cmor_tags)
15
+ - if Cmor::Core.features?(:cmor_tags)
15
16
  |
16
17
  %span.post-tags
17
18
  = tag_labels_for(post)
@@ -1,4 +1,4 @@
1
1
  = render @resource
2
2
 
3
- - if Cmor::Blog.features?(:cmor_comments)
3
+ - if Cmor::Core.features?(:cmor_comments)
4
4
  = commentable(@resource)
@@ -1,4 +1,3 @@
1
- require 'cmor/blog/feature'
2
1
  require 'cmor/blog/configuration'
3
2
  require 'cmor/blog/engine'
4
3
 
@@ -9,20 +9,31 @@ module Cmor
9
9
  yield self
10
10
  end
11
11
 
12
- mattr_accessor(:base_controller) { '::FrontendController' }
13
- mattr_accessor(:creator_class_name) { 'User' }
14
- mattr_accessor(:user_factory_name) { :user }
15
- mattr_accessor(:posts_index_page_title_proc) { ->(view) { view.resource_class.model_name.human(count: :other) } }
16
- mattr_accessor(:pagination_options_proc) { ->(view) { { theme: 'twitter-bootstrap-3' } } }
17
- mattr_accessor(:preview_picture_asset_variant_options) { { resize: '320x240' } }
18
- mattr_accessor(:creator_label_method_name) { :to_s }
19
- mattr_accessor(:features) { {} }
20
- def enable_feature(name, options = {})
21
- @@features[name] = Cmor::Blog::Feature.new(name, options)
12
+ mattr_accessor(:base_controller) do
13
+ '::FrontendController'
22
14
  end
23
15
 
24
- def features?(name)
25
- @@features.has_key?(name)
16
+ mattr_accessor(:creator_class_name) do
17
+ 'User'
18
+ end
19
+
20
+ mattr_accessor(:user_factory_name) do
21
+ :user
22
+ end
23
+
24
+ mattr_accessor(:posts_index_page_title_proc) do
25
+ ->(view) { view.resource_class.model_name.human(count: :other) }
26
+ end
27
+
28
+ mattr_accessor(:pagination_options_proc) do
29
+ ->(view) { { theme: 'twitter-bootstrap-3' } }
30
+ end
31
+ mattr_accessor(:preview_picture_asset_variant_options) do
32
+ { resize: '320x240' }
33
+ end
34
+
35
+ mattr_accessor(:creator_label_method_name) do
36
+ :to_s
26
37
  end
27
38
  end
28
39
  end
@@ -46,14 +46,6 @@ Cmor::Blog.configure do |config|
46
46
  #
47
47
  config.preview_picture_asset_variant_options = { resize: '320x240' }
48
48
 
49
- # Enables the Cmor::Comments integration
50
- #
51
- # config.enable_feature :cmor_comments, {}
52
-
53
- # Enables the Cmor::Tags integration
54
- #
55
- # config.enable_feature :cmor_tags, {}
56
-
57
49
  # Method to call on creator for display.
58
50
  #
59
51
  # default: config.creator_label_method_name = :to_s
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmor_blog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.39.pre
4
+ version: 0.0.40.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-30 00:00:00.000000000 Z
11
+ date: 2019-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.0.39.pre
33
+ version: 0.0.40.pre
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.0.39.pre
40
+ version: 0.0.40.pre
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cmor_core_frontend
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.0.39.pre
47
+ version: 0.0.40.pre
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.0.39.pre
54
+ version: 0.0.40.pre
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sqlite3
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -452,7 +452,6 @@ files:
452
452
  - lib/cmor/blog.rb
453
453
  - lib/cmor/blog/configuration.rb
454
454
  - lib/cmor/blog/engine.rb
455
- - lib/cmor/blog/feature.rb
456
455
  - lib/cmor/blog/version.rb
457
456
  - lib/cmor_blog.rb
458
457
  - lib/generators/cmor/blog/install/install_generator.rb
@@ -1,9 +0,0 @@
1
- module Cmor
2
- module Blog
3
- class Feature
4
- def initialize(name, options = {})
5
- @name, @options = name, options
6
- end
7
- end
8
- end
9
- end