comfy_blog 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ced1c8ddc66db697dd6df8d669e2fc6a32841a667cd63b323cebe1d466f15b7d
4
- data.tar.gz: 2b97e015ac0480fb61bd5779e18e5d77d31be90c9cb562a7b779348199b9a579
3
+ metadata.gz: 17f8e86969065a0b1d7dc9e810b01be4fca6adc991fd992a2aec729375440f62
4
+ data.tar.gz: f41cba1159e1a0cda6d4f7d6389e7b273718bcf163f07b7ed9491bb352b9391d
5
5
  SHA512:
6
- metadata.gz: 5c113c5b36b83fed58049f41cb8f990c20e2b752bac862069740456ce46e7bbd58e2b4e58876ce57f0d39f80b14fde625de106563595f237fb30acb063a9329e
7
- data.tar.gz: 7b9c2bbffe4f9e29f908b100522b8433309f112eb5bb0e8ad41e68a5e335ec760b65f06fd17e0ee96f5d1cb29479f82474274fd275489025a3406938c62be199
6
+ metadata.gz: 5d5d32c1f928835fbfd0c3c140a45e0b69df795a367240451c37bb27622eb00a04b7bb0bb8356c32d0fc2ebc1603180b2638eb8a6c7094a08d07e3c83820c690
7
+ data.tar.gz: 63d747aae5e8a869c91eee5e62f58f9682b10256ee5f1d330e415fac7d63c17d689f7d85e1dac368dd1d398649358f82d93f33b223f926045764bda00b8123e0
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.2
2
+ TargetRubyVersion: 2.3
3
3
  Exclude:
4
4
  - bin/*
5
5
  - db/schema.rb
@@ -1,9 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.9
4
- - 2.3.6
5
- - 2.4.3
6
- - 2.5.0
3
+ - 2.3.7
4
+ - 2.4.4
5
+ - 2.5.1
6
+ - ruby-head
7
7
  gemfile:
8
8
  - test/gemfiles/5.2.gemfile
9
9
  branches:
@@ -12,8 +12,10 @@ branches:
12
12
  before_install:
13
13
  - gem update --system
14
14
  - gem update bundler
15
- before_script:
16
- - rake db:migrate
17
15
  script:
16
+ - bundle exec rake db:migrate
18
17
  - bundle exec rake test
19
18
  - bundle exec rubocop
19
+ matrix:
20
+ allow_failures:
21
+ - rvm: ruby-head
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "http://rubygems.org"
2
4
 
3
5
  gemspec
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "config/application"
2
4
 
3
5
  Rails.application.load_tasks
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Comfy::Admin::Blog::PostsController < Comfy::Admin::Cms::BaseController
2
4
 
3
5
  before_action :build_post, only: %i[new create]
@@ -51,6 +53,12 @@ class Comfy::Admin::Blog::PostsController < Comfy::Admin::Cms::BaseController
51
53
  def form_fragments
52
54
  @post = @site.blog_posts.find_by(id: params[:id]) || @site.blog_posts.new
53
55
  @post.layout = @site.layouts.find_by(id: params[:layout_id])
56
+
57
+ render(
58
+ partial: "comfy/admin/cms/fragments/form_fragments",
59
+ locals: { record: @post, scope: :post },
60
+ layout: false
61
+ )
54
62
  end
55
63
 
56
64
  protected
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Comfy::Admin::Blog::Revisions::PostController < Comfy::Admin::Cms::Revisions::BaseController
2
4
 
3
5
  def show
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Comfy::Blog::PostsController < Comfy::Cms::BaseController
2
4
 
3
5
  include Comfy::Paginate
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Comfy::Blog::Post < ActiveRecord::Base
2
4
 
3
5
  self.table_name = "comfy_blog_posts"
@@ -6,18 +6,17 @@
6
6
  - if (options = ::Comfy::Cms::Layout.options_for_select(@site)).present?
7
7
  = form.select :layout_id, options, {}, {data: {url: form_fragments_comfy_admin_blog_post_path(@site, @post.id.to_i)}, id: "fragments-toggle"}
8
8
 
9
- = render "comfy/admin/cms/fragments/form_fragments", form: form, record: @post
9
+ #form-fragments-container
10
+ = render "comfy/admin/cms/fragments/form_fragments", record: @post, scope: :post
10
11
 
11
- = render 'comfy/admin/cms/categories/form', form: form
12
+ = render "comfy/admin/cms/categories/form", form: form
12
13
 
13
14
  = form.text_field :published_at, value: @post.published_at.try(:to_s, :db), data: {'cms-datetime' => true}
14
15
 
15
- .row
16
- .col-sm-10.ml-auto
17
- = form.check_box :is_published
16
+ = form.check_box :is_published
18
17
 
19
18
  = comfy_admin_partial "comfy/admin/blog/partials/post_form_after", form: form
20
19
 
21
20
  = form.form_actions do
22
- = form.submit t(@post.new_record?? '.create' : '.update'), class: "btn btn-primary"
23
- = link_to t('.cancel'), comfy_admin_blog_posts_path(@site, @blog), class: 'btn btn-link'
21
+ = submit_tag t(@post.new_record?? ".create" : ".update"), class: "btn btn-primary ml-sm-1", data: {disable_with: false}
22
+ = link_to t(".cancel"), comfy_admin_blog_posts_path(@site, @blog), class: "btn btn-link"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  xml.instruct! :xml, version: "1.0"
2
4
  xml.rss version: "2.0" do
3
5
  xml.channel do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  $LOAD_PATH.push File.expand_path("../lib", __FILE__)
2
4
 
3
5
  require "comfy_blog/version"
@@ -19,7 +21,7 @@ Gem::Specification.new do |s|
19
21
 
20
22
  s.require_paths = ["lib"]
21
23
 
22
- s.required_ruby_version = ">= 2.2.2"
24
+ s.required_ruby_version = ">= 2.3.0"
23
25
 
24
- s.add_dependency "comfortable_mexican_sofa", ">= 2.0.10"
26
+ s.add_dependency "comfortable_mexican_sofa", ">= 2.0.14"
25
27
  end
data/config.ru CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file is used by Rack-based servers to start the application.
2
4
 
3
5
  require ::File.expand_path("../config/environment", __FILE__)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "boot"
2
4
 
3
5
  require "rails/all"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ComfyBlog::Application.routes.draw do
2
4
  comfy_route :cms_admin
3
5
  comfy_route :blog_admin
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Set up gems listed in the Gemfile.
2
4
  ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Load the rails application
2
4
  require File.expand_path("../application", __FILE__)
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  defined?(ComfyBlog::Application) && ComfyBlog::Application.configure do
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  defined?(ComfyBlog::Application) && ComfyBlog::Application.configure do
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ComfyBlog.configure do |config|
2
4
  # application layout to be used to index blog posts
3
5
  # config.app_layout = 'comfy/blog/application'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "comfy_blog/version"
2
4
  require_relative "comfy_blog/engine"
3
5
  require_relative "comfy_blog/configuration"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ComfyBlog
2
4
  class Configuration
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rubygems"
2
4
  require "rails"
3
5
  require "comfortable_mexican_sofa"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class ActionDispatch::Routing::Mapper
2
4
 
3
5
  def comfy_route_blog(options = {})
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class ActionDispatch::Routing::Mapper
2
4
 
3
5
  def comfy_route_blog_admin(options = {})
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "routes/blog_admin"
2
4
  require_relative "routes/blog"
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ComfyBlog
2
4
 
3
- VERSION = "2.0.5".freeze
5
+ VERSION = "2.0.6"
4
6
 
5
7
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rails/generators/active_record"
2
4
 
3
5
  module Comfy
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comfy_blog
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Khabarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-08 00:00:00.000000000 Z
11
+ date: 2018-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: comfortable_mexican_sofa
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.10
19
+ version: 2.0.14
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.10
26
+ version: 2.0.14
27
27
  description: Simple Blog Engine for ComfortableMexicanSofa
28
28
  email:
29
29
  - oleg@khabarov.ca
@@ -48,7 +48,6 @@ files:
48
48
  - app/views/comfy/admin/blog/partials/_navigation.html.haml
49
49
  - app/views/comfy/admin/blog/posts/_form.html.haml
50
50
  - app/views/comfy/admin/blog/posts/edit.html.haml
51
- - app/views/comfy/admin/blog/posts/form_fragments.js.erb
52
51
  - app/views/comfy/admin/blog/posts/index.html.haml
53
52
  - app/views/comfy/admin/blog/posts/new.html.haml
54
53
  - app/views/comfy/blog/posts/index.html.haml
@@ -114,7 +113,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
114
113
  requirements:
115
114
  - - ">="
116
115
  - !ruby/object:Gem::Version
117
- version: 2.2.2
116
+ version: 2.3.0
118
117
  required_rubygems_version: !ruby/object:Gem::Requirement
119
118
  requirements:
120
119
  - - ">="
@@ -1 +0,0 @@
1
- $('#form-fragments').replaceWith('<%= escape_javascript(render("comfy/admin/cms/fragments/form_fragments", record: @post)) %>');