effective_posts 2.3.0 → 2.4.0

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: 2750f7ec2bf649ff20b632267b64ed2173123bc06953ed7e8014210120d03353
4
- data.tar.gz: 4fb1ddca7088963dc0d9d67747adfa0da0a64ffd494677fca4abe6ba1060ae0f
3
+ metadata.gz: f3e7d5a92cf4a3f30a7d1adb086578d39ce41162c2d3a36115cceaa2ef7ff564
4
+ data.tar.gz: 8f0ce9dc2350f5c1e16055bf93635218250a913f267b5771a02b8f0d25eb59d9
5
5
  SHA512:
6
- metadata.gz: 6b09dbfaa87390d7aec4d4e7ad43c2ef65815185d364a7098a4a1fb3b7ef9953ae066e5de870ac4a4cf902bbc75bd4e28cab58159b54fc885e0bd22b0375bcdd
7
- data.tar.gz: 6749de2bdbc0cd3c48bc3103078146d8a57ca7d805302be7636aac6b68256940fe1b2b6f549a963aa1d5b2f84b28af1505a7781199c44d45e9dad15b5159825e
6
+ metadata.gz: 6135e7161d3d75428f72907e652b91cbf7468b9ab8b107121ba2f6a645fce47b7c0c0414b8bad01b7f943b591d8fc21b926234a52f770a32327ab86968dba3b5
7
+ data.tar.gz: be804eb10157afd5b90b23504b0330f4a38c98debc232fdb2974bc5d26ff4ff390cc9e847e84f26b8e0ce6a038c73d97f162d781a28179297c9418707ca1d5a1
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2021 Code and Effect Inc.
1
+ Copyright 2023 Code and Effect Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -125,14 +125,17 @@ module Effective
125
125
 
126
126
  # Returns a duplicated post object, or throws an exception
127
127
  def duplicate
128
- Post.new(attributes.except('id', 'updated_at', 'created_at')).tap do |post|
129
- post.title = post.title + ' (Copy)'
130
- post.slug = post.slug + '-copy'
131
- post.draft = true
128
+ post = Post.new(attributes.except('id', 'updated_at', 'created_at', 'tags'))
132
129
 
133
- post.body = body
134
- post.excerpt = excerpt
135
- end
130
+ post.assign_attributes(
131
+ title: post.title + ' (Copy)',
132
+ slug: post.slug + '-copy',
133
+ draft: true,
134
+ body: body,
135
+ excerpt: excerpt
136
+ )
137
+
138
+ post
136
139
  end
137
140
 
138
141
  def duplicate!
@@ -1,6 +1,4 @@
1
1
  EffectivePosts.setup do |config|
2
- config.posts_table_name = :posts
3
-
4
2
  # Every post must have a category
5
3
  # Each of these categories parameterized value will be a top level route
6
4
  config.categories = ['News', 'Events']
@@ -1,6 +1,6 @@
1
- class CreateEffectivePosts < ActiveRecord::Migration[4.2]
2
- def self.up
3
- create_table <%= @posts_table_name %> do |t|
1
+ class CreateEffectivePosts < ActiveRecord::Migration[6.0]
2
+ def change
3
+ create_table :posts do |t|
4
4
  t.integer :user_id
5
5
  t.string :user_type
6
6
 
@@ -30,9 +30,4 @@ class CreateEffectivePosts < ActiveRecord::Migration[4.2]
30
30
  t.datetime :created_at
31
31
  end
32
32
  end
33
-
34
- def self.down
35
- drop_table <%= @posts_table_name %>
36
- end
37
-
38
33
  end
@@ -1,3 +1,3 @@
1
1
  module EffectivePosts
2
- VERSION = '2.3.0'.freeze
2
+ VERSION = '2.4.0'.freeze
3
3
  end
@@ -20,9 +20,7 @@ module EffectivePosts
20
20
  end
21
21
 
22
22
  def create_migration_file
23
- @posts_table_name = ':' + EffectivePosts.posts_table_name.to_s
24
-
25
- migration_template ('../' * 3) + 'db/migrate/01_create_effective_posts.rb.erb', 'db/migrate/create_effective_posts.rb'
23
+ migration_template ('../' * 3) + 'db/migrate/101_create_effective_posts.rb', 'db/migrate/create_effective_posts.rb'
26
24
  end
27
25
 
28
26
  def copy_mailer_preview
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_posts
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-30 00:00:00.000000000 Z
11
+ date: 2023-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '6'
27
27
  - !ruby/object:Gem::Dependency
28
- name: sass
28
+ name: sassc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -80,6 +80,90 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: sqlite3
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: devise
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry-byebug
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: effective_test_bot
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: effective_developer
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: psych
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "<"
158
+ - !ruby/object:Gem::Version
159
+ version: '4'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "<"
165
+ - !ruby/object:Gem::Version
166
+ version: '4'
83
167
  description: A blog implementation with WYSIWYG content editing, post scheduling,
84
168
  pagination and optional top level routes for each post category.
85
169
  email:
@@ -122,7 +206,7 @@ files:
122
206
  - app/views/effective/posts_mailer/post_submitted.html.haml
123
207
  - config/effective_posts.rb
124
208
  - config/routes.rb
125
- - db/migrate/01_create_effective_posts.rb.erb
209
+ - db/migrate/101_create_effective_posts.rb
126
210
  - lib/effective_posts.rb
127
211
  - lib/effective_posts/engine.rb
128
212
  - lib/effective_posts/version.rb
@@ -147,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
231
  - !ruby/object:Gem::Version
148
232
  version: '0'
149
233
  requirements: []
150
- rubygems_version: 3.4.10
234
+ rubygems_version: 3.3.7
151
235
  signing_key:
152
236
  specification_version: 4
153
237
  summary: A blog implementation with WYSIWYG content editing, post scheduling, pagination