phcdevworks_scripts 3.0.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/phcdevworks_scripts/script/versions_controller.rb +1 -1
- data/app/controllers/phcdevworks_scripts/snippet/urls_controller.rb +16 -16
- data/app/models/phcdevworks_scripts/script/author.rb +1 -1
- data/app/models/phcdevworks_scripts/script/extension.rb +1 -1
- data/app/models/phcdevworks_scripts/script/listing.rb +1 -1
- data/app/models/phcdevworks_scripts/script/url.rb +1 -1
- data/app/models/phcdevworks_scripts/script/version.rb +3 -3
- data/app/models/phcdevworks_scripts/{author_versions.rb → script_author_versions.rb} +1 -1
- data/app/models/phcdevworks_scripts/{extension_versions.rb → script_extension_versions.rb} +1 -1
- data/app/models/phcdevworks_scripts/{listing_versions.rb → script_listing_versions.rb} +1 -1
- data/app/models/phcdevworks_scripts/{url_versions.rb → script_url_versions.rb} +1 -1
- data/app/models/phcdevworks_scripts/script_version_versions.rb +5 -0
- data/app/models/phcdevworks_scripts/snippet/post.rb +4 -1
- data/app/models/phcdevworks_scripts/snippet/url.rb +4 -1
- data/app/models/phcdevworks_scripts/snippet_post_versions.rb +5 -0
- data/app/models/phcdevworks_scripts/snippet_url_versions.rb +5 -0
- data/app/views/phcdevworks_scripts/script/versions/_form.html.erb +2 -2
- data/app/views/phcdevworks_scripts/script/versions/index.html.erb +1 -1
- data/app/views/phcdevworks_scripts/snippet/urls/_form.html.erb +4 -4
- data/app/views/phcdevworks_scripts/snippet/urls/index.html.erb +5 -5
- data/app/views/phcdevworks_scripts/snippet/urls/show.html.erb +1 -1
- data/config/routes.rb +11 -32
- data/db/migrate/20170517064030_create_phcdevworks_scripts_extension_versions.rb +2 -2
- data/db/migrate/20170517064049_create_phcdevworks_scripts_listing_versions.rb +2 -2
- data/db/migrate/20170517064114_create_phcdevworks_scripts_script_version_versions.rb +17 -0
- data/db/migrate/20170517064150_create_phcdevworks_scripts_url_versions.rb +2 -2
- data/db/migrate/20170517064208_create_phcdevworks_scripts_author_versions.rb +2 -2
- data/db/migrate/20170517064427_create_phcdevworks_scripts_licence_versions.rb +2 -2
- data/db/migrate/20190818031653_create_phcdevworks_scripts_script_versions.rb +1 -1
- data/db/migrate/{20170517064114_create_phcdevworks_scripts_scriptversion_versions.rb → 20191102092649_create_phcdevworks_scripts_snippet_url_versions.rb} +5 -3
- data/db/migrate/20191102092711_create_phcdevworks_scripts_snippet_post_versions.rb +19 -0
- data/lib/phcdevworks_scripts/version.rb +1 -1
- metadata +12 -8
- data/app/models/phcdevworks_scripts/scriptversion_versions.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2a20abf78d7048f2bf574e0a61b8414698634e2e76f96d9de2bc96357a28d6a
|
4
|
+
data.tar.gz: f1e93c89baae3e9ec2027e83bea845dc2cbeba00ef70dc7d0b032775398464f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d530e6b89cb5901a96c8eaf151a28adf880280a51a685ed3ed410ff225d72907b8d6e228432973dc4a4bc514bad8b1871ab2af83f2f3fd2564fac823f7919a6
|
7
|
+
data.tar.gz: 323e0219415effce3acb5d5e1ea89cabcd60493982e366a7b9b75f2cdee51f8193f5ce3df9fca741c616375a5115c402970df22feb8dba58e6f8323346046914
|
@@ -5,23 +5,23 @@ module PhcdevworksScripts
|
|
5
5
|
|
6
6
|
# Filters & Security
|
7
7
|
#include PhcdevworksCore::PhcpluginsHelper
|
8
|
-
|
8
|
+
before_action :authenticate_user!
|
9
9
|
before_action :set_paper_trail_whodunnit
|
10
10
|
before_action :set_snippet_url, only: [:show, :edit, :update, :destroy]
|
11
11
|
|
12
12
|
# INDEX
|
13
13
|
def index
|
14
|
-
@
|
14
|
+
@snippet_urls = snippet_post.urls.all
|
15
15
|
end
|
16
16
|
|
17
17
|
# SHOW
|
18
18
|
def show
|
19
|
-
@
|
19
|
+
@snippet_url = snippet_post.urls.find(params[:id])
|
20
20
|
end
|
21
21
|
|
22
22
|
# NEW
|
23
23
|
def new
|
24
|
-
@
|
24
|
+
@snippet_url = snippet_post.urls.build
|
25
25
|
end
|
26
26
|
|
27
27
|
# EDIT
|
@@ -30,11 +30,11 @@ module PhcdevworksScripts
|
|
30
30
|
|
31
31
|
# CREATE
|
32
32
|
def create
|
33
|
-
@
|
34
|
-
@
|
35
|
-
@
|
36
|
-
if @
|
37
|
-
redirect_to
|
33
|
+
@snippet_url = snippet_post.urls.create(snippet_url_params)
|
34
|
+
@snippet_url.user_id = current_user.id
|
35
|
+
@snippet_url.org_id = current_user.org_id
|
36
|
+
if @snippet_url.save
|
37
|
+
redirect_to snippet_post_urls_path, :flash => { :success => 'Script url was successfully created.' }
|
38
38
|
else
|
39
39
|
render :new
|
40
40
|
end
|
@@ -42,9 +42,9 @@ module PhcdevworksScripts
|
|
42
42
|
|
43
43
|
# UPDATE
|
44
44
|
def update
|
45
|
-
@
|
46
|
-
if @
|
47
|
-
redirect_to
|
45
|
+
@snippet_post = Snippet::Post.friendly.find(params[:post_id])
|
46
|
+
if @snippet_url.update(snippet_url_params)
|
47
|
+
redirect_to snippet_post_urls_path, :flash => { :success => 'Script url was successfully updated.' }
|
48
48
|
else
|
49
49
|
render :edit
|
50
50
|
end
|
@@ -52,9 +52,9 @@ module PhcdevworksScripts
|
|
52
52
|
|
53
53
|
# DELETE
|
54
54
|
def destroy
|
55
|
-
@
|
56
|
-
@
|
57
|
-
redirect_to
|
55
|
+
@snippet_url = snippet_post.urls.find(params[:id])
|
56
|
+
@snippet_url.destroy
|
57
|
+
redirect_to snippet_post_urls_path, :flash => { :error => 'Script url was successfully destroyed.' }
|
58
58
|
end
|
59
59
|
|
60
60
|
private
|
@@ -70,7 +70,7 @@ module PhcdevworksScripts
|
|
70
70
|
|
71
71
|
# Whitelist
|
72
72
|
def snippet_url_params
|
73
|
-
params.require(:snippet_url).permit(:snippet_url)
|
73
|
+
params.require(:snippet_url).permit(:snippet_url, :post_id, :slug, :user_id, :org_id)
|
74
74
|
end
|
75
75
|
|
76
76
|
end
|
@@ -5,7 +5,7 @@ module PhcdevworksScripts
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
# Paper Trail Initialize
|
8
|
-
has_paper_trail :class_name => 'PhcdevworksScripts::
|
8
|
+
has_paper_trail :class_name => 'PhcdevworksScripts::ScriptAuthorVersions'
|
9
9
|
|
10
10
|
# Relationships
|
11
11
|
has_many :listings, class_name: 'PhcdevworksScripts::Script::Listing'
|
@@ -5,7 +5,7 @@ module PhcdevworksScripts
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
# Paper Trail Initialize
|
8
|
-
has_paper_trail :class_name => 'PhcdevworksScripts::
|
8
|
+
has_paper_trail :class_name => 'PhcdevworksScripts::ScriptExtensionVersions'
|
9
9
|
|
10
10
|
# Relationships
|
11
11
|
has_many :listings, class_name: 'PhcdevworksScripts::Script::Listing', :through => :urls
|
@@ -5,7 +5,7 @@ module PhcdevworksScripts
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
# Paper Trail Initialize
|
8
|
-
has_paper_trail :class_name => 'PhcdevworksScripts::
|
8
|
+
has_paper_trail :class_name => 'PhcdevworksScripts::ScriptListingVersions'
|
9
9
|
|
10
10
|
# Relationships
|
11
11
|
has_many :urls, class_name: 'PhcdevworksScripts::Script::Url', :dependent => :destroy
|
@@ -2,7 +2,7 @@ module PhcdevworksScripts
|
|
2
2
|
class Script::Url < ApplicationRecord
|
3
3
|
|
4
4
|
# Paper Trail Initialize
|
5
|
-
has_paper_trail :class_name => 'PhcdevworksScripts::
|
5
|
+
has_paper_trail :class_name => 'PhcdevworksScripts::ScriptUrlVersions'
|
6
6
|
|
7
7
|
# Relationships
|
8
8
|
belongs_to :listing, class_name: 'PhcdevworksScripts::Script::Listing'
|
@@ -5,21 +5,21 @@ module PhcdevworksScripts
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
# Paper Trail Initialize
|
8
|
-
has_paper_trail :class_name => 'PhcdevworksScripts::
|
8
|
+
has_paper_trail :class_name => 'PhcdevworksScripts::ScriptVersionVersions'
|
9
9
|
|
10
10
|
# Relationships
|
11
11
|
has_many :listings, class_name: 'PhcdevworksScripts::Script::Listing', :through => :urls
|
12
12
|
has_many :urls, class_name: 'PhcdevworksScripts::Script::Url'
|
13
13
|
|
14
14
|
# Form Fields Validation
|
15
|
-
validates :
|
15
|
+
validates :script_version_number,
|
16
16
|
presence: true
|
17
17
|
|
18
18
|
# Clean URL Define
|
19
19
|
friendly_id :phcdev_script_version_nice_urls, use: [:slugged, :finders]
|
20
20
|
|
21
21
|
def phcdev_script_version_nice_urls
|
22
|
-
[:
|
22
|
+
[:script_version_number]
|
23
23
|
end
|
24
24
|
|
25
25
|
end
|
@@ -4,8 +4,11 @@ module PhcdevworksScripts
|
|
4
4
|
# Clean URL Initialize
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
|
+
# Paper Trail Initialize
|
8
|
+
has_paper_trail :class_name => 'PhcdevworksScripts::SnippetPostVersions'
|
9
|
+
|
7
10
|
# Relationships
|
8
|
-
has_many :urls, class_name: 'PhcdevworksScripts::
|
11
|
+
has_many :urls, class_name: 'PhcdevworksScripts::Snippet::Url'
|
9
12
|
|
10
13
|
# Form Fields Validation
|
11
14
|
validates :snippet_title,
|
@@ -4,8 +4,11 @@ module PhcdevworksScripts
|
|
4
4
|
# Include Core Validations
|
5
5
|
phc_domain_regx = URI::regexp(%w(http https))
|
6
6
|
|
7
|
+
# Paper Trail Initialize
|
8
|
+
has_paper_trail :class_name => 'PhcdevworksScripts::SnippetUrlVersions'
|
9
|
+
|
7
10
|
# Relationships
|
8
|
-
belongs_to :
|
11
|
+
belongs_to :post, class_name: 'PhcdevworksScripts::Snippet::Post'
|
9
12
|
|
10
13
|
# Form Fields Validation
|
11
14
|
validates :snippet_url,
|
@@ -7,8 +7,8 @@
|
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
9
|
<div class="form-group field_with_errors">
|
10
|
-
<%= form.label :
|
11
|
-
<%= form.text_field :
|
10
|
+
<%= form.label :script_version_number, "Version Number" %>
|
11
|
+
<%= form.text_field :script_version_number, placeholder: "Version Number", class: "form-control" %>
|
12
12
|
</div>
|
13
13
|
<!-- Form Input Fields -->
|
14
14
|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<!-- Form - Script - Script URLs -->
|
2
|
-
<%= form_with(model: [ @script_snippet, @
|
2
|
+
<%= form_with(model: [ @script_snippet, @snippet_url], url: form_url, local: true) do |form| %>
|
3
3
|
|
4
4
|
<!-- PHCNotifi Render Validation -->
|
5
|
-
<%= render "phcdevworks_notifications/bootstrap/validations", :object => @
|
5
|
+
<%= render "phcdevworks_notifications/bootstrap/validations", :object => @snippet_url %>
|
6
6
|
<!-- PHCNotifi Render Validation -->
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
9
|
<div class="form-group field_with_errors">
|
10
|
-
<%= form.label :
|
11
|
-
<%= form.text_field :
|
10
|
+
<%= form.label :snippet_url %>
|
11
|
+
<%= form.text_field :snippet_url, placeholder: "Script Url", class: "form-control" %>
|
12
12
|
</div>
|
13
13
|
<!-- Form Input Fields -->
|
14
14
|
|
@@ -44,14 +44,14 @@
|
|
44
44
|
</thead>
|
45
45
|
|
46
46
|
<tbody>
|
47
|
-
<% @
|
47
|
+
<% @snippet_urls.each do |snippet_url| %>
|
48
48
|
<tr>
|
49
|
-
<td><%=
|
49
|
+
<td><%= snippet_url.snippet_url %></td>
|
50
50
|
<td>
|
51
51
|
<div class="btn-group d-flex" role="group">
|
52
|
-
<%= link_to "URL Details", snippet_post_url_path(
|
53
|
-
<%= link_to "Update URL", edit_snippet_post_url_path(
|
54
|
-
<%= link_to "Remove URL", snippet_post_url_path(
|
52
|
+
<%= link_to "URL Details", snippet_post_url_path(snippet_url.post, snippet_url), class: "btn btn-purple btn-xs" %>
|
53
|
+
<%= link_to "Update URL", edit_snippet_post_url_path(snippet_url.post, snippet_url), class: "btn btn-primary btn-xs" %>
|
54
|
+
<%= link_to "Remove URL", snippet_post_url_path(snippet_url.post, snippet_url), method: :delete, data: { confirm: "Are you sure? This action cannot be reversed." }, class: "btn btn-danger btn-xs" %>
|
55
55
|
</div>
|
56
56
|
</td>
|
57
57
|
</tr>
|
data/config/routes.rb
CHANGED
@@ -1,53 +1,32 @@
|
|
1
1
|
PhcdevworksScripts::Engine.routes.draw do
|
2
2
|
|
3
|
-
namespace :snippet do
|
4
|
-
resources :urls
|
5
|
-
end
|
6
|
-
namespace :snippet do
|
7
|
-
resources :posts
|
8
|
-
end
|
9
|
-
namespace :script do
|
10
|
-
resources :versions
|
11
|
-
end
|
12
|
-
namespace :script do
|
13
|
-
resources :urls
|
14
|
-
end
|
15
|
-
namespace :script do
|
16
|
-
resources :listings
|
17
|
-
end
|
18
|
-
namespace :script do
|
19
|
-
resources :extensions
|
20
|
-
end
|
21
|
-
namespace :script do
|
22
|
-
resources :authors
|
23
|
-
end
|
24
3
|
# API Routes
|
25
4
|
namespace :api, :path => "", :constraints => {:subdomain => "api"} do
|
26
5
|
namespace :v1 do
|
27
|
-
resources :mains, defaults: {format:
|
28
|
-
resources :informations, defaults: {format:
|
29
|
-
resources :versions, defaults: {format:
|
6
|
+
resources :mains, defaults: {format: "json"}
|
7
|
+
resources :informations, defaults: {format: "json"}
|
8
|
+
resources :versions, defaults: {format: "json"}
|
30
9
|
end
|
31
10
|
end
|
32
11
|
|
33
12
|
# Script CDN Routes
|
34
13
|
namespace :script do
|
35
|
-
resources :listings, class_name:
|
36
|
-
resources :urls, class_name:
|
14
|
+
resources :listings, class_name: "PhcdevworksScripts::Script::Listing" do
|
15
|
+
resources :urls, class_name: "PhcdevworksScripts::Script::Url"
|
37
16
|
end
|
38
|
-
resources :authors, class_name:
|
39
|
-
resources :extensions, class_name:
|
40
|
-
resources :versions, class_name:
|
17
|
+
resources :authors, class_name: "PhcdevworksScripts::Script::Author"
|
18
|
+
resources :extensions, class_name: "PhcdevworksScripts::Script::Extension"
|
19
|
+
resources :versions, class_name: "PhcdevworksScripts::Script::Version"
|
41
20
|
end
|
42
21
|
|
43
22
|
# Script Snippet Routes
|
44
23
|
namespace :snippet do
|
45
|
-
resources :posts, class_name:
|
46
|
-
resources :urls, class_name:
|
24
|
+
resources :posts, class_name: "PhcdevworksScripts::Snippet::Post" do
|
25
|
+
resources :urls, class_name: "PhcdevworksScripts::Snippet::Url"
|
47
26
|
end
|
48
27
|
end
|
49
28
|
|
50
29
|
# Mount Routes
|
51
|
-
mount PhcdevworksAccounts::Engine, :at =>
|
30
|
+
mount PhcdevworksAccounts::Engine, :at => "/"
|
52
31
|
|
53
32
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreatePhcdevworksScriptsExtensionVersions < ActiveRecord::Migration[
|
1
|
+
class CreatePhcdevworksScriptsExtensionVersions < ActiveRecord::Migration[6.0]
|
2
2
|
TEXT_BYTES = 1_073_741_823
|
3
3
|
def change
|
4
4
|
|
@@ -11,7 +11,7 @@ class CreatePhcdevworksScriptsExtensionVersions < ActiveRecord::Migration[5.2]
|
|
11
11
|
t.datetime :created_at
|
12
12
|
end
|
13
13
|
|
14
|
-
add_index :phcdevworks_scripts_extension_versions, %i(item_type item_id), :name => '
|
14
|
+
add_index :phcdevworks_scripts_extension_versions, %i(item_type item_id), :name => 'script_ext_versions'
|
15
15
|
|
16
16
|
end
|
17
17
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreatePhcdevworksScriptsListingVersions < ActiveRecord::Migration[
|
1
|
+
class CreatePhcdevworksScriptsListingVersions < ActiveRecord::Migration[6.0]
|
2
2
|
TEXT_BYTES = 1_073_741_823
|
3
3
|
def change
|
4
4
|
|
@@ -11,7 +11,7 @@ class CreatePhcdevworksScriptsListingVersions < ActiveRecord::Migration[5.2]
|
|
11
11
|
t.datetime :created_at
|
12
12
|
end
|
13
13
|
|
14
|
-
add_index :phcdevworks_scripts_listing_versions, %i(item_type item_id), :name => '
|
14
|
+
add_index :phcdevworks_scripts_listing_versions, %i(item_type item_id), :name => 'script_listing_versions'
|
15
15
|
|
16
16
|
end
|
17
17
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreatePhcdevworksScriptsScriptVersionVersions < ActiveRecord::Migration[6.0]
|
2
|
+
TEXT_BYTES = 1_073_741_823
|
3
|
+
def change
|
4
|
+
|
5
|
+
create_table :phcdevworks_scripts_script_version_versions do |t|
|
6
|
+
t.string :item_type, {:null=>false}
|
7
|
+
t.integer :item_id, null: false
|
8
|
+
t.string :event, null: false
|
9
|
+
t.string :whodunnit
|
10
|
+
t.text :object, limit: TEXT_BYTES
|
11
|
+
t.datetime :created_at
|
12
|
+
end
|
13
|
+
|
14
|
+
add_index :phcdevworks_scripts_script_version_versions, %i(item_type item_id), :name => 'script_version_versions'
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreatePhcdevworksScriptsUrlVersions < ActiveRecord::Migration[
|
1
|
+
class CreatePhcdevworksScriptsUrlVersions < ActiveRecord::Migration[6.0]
|
2
2
|
TEXT_BYTES = 1_073_741_823
|
3
3
|
def change
|
4
4
|
|
@@ -11,7 +11,7 @@ class CreatePhcdevworksScriptsUrlVersions < ActiveRecord::Migration[5.2]
|
|
11
11
|
t.datetime :created_at
|
12
12
|
end
|
13
13
|
|
14
|
-
add_index :phcdevworks_scripts_url_versions, %i(item_type item_id), :name => '
|
14
|
+
add_index :phcdevworks_scripts_url_versions, %i(item_type item_id), :name => 'script_url_versions'
|
15
15
|
|
16
16
|
end
|
17
17
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreatePhcdevworksScriptsAuthorVersions < ActiveRecord::Migration[
|
1
|
+
class CreatePhcdevworksScriptsAuthorVersions < ActiveRecord::Migration[6.0]
|
2
2
|
TEXT_BYTES = 1_073_741_823
|
3
3
|
def change
|
4
4
|
|
@@ -11,7 +11,7 @@ class CreatePhcdevworksScriptsAuthorVersions < ActiveRecord::Migration[5.2]
|
|
11
11
|
t.datetime :created_at
|
12
12
|
end
|
13
13
|
|
14
|
-
add_index :phcdevworks_scripts_author_versions, %i(item_type item_id), :name => '
|
14
|
+
add_index :phcdevworks_scripts_author_versions, %i(item_type item_id), :name => 'script_author_versions'
|
15
15
|
|
16
16
|
end
|
17
17
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreatePhcdevworksScriptsLicenceVersions < ActiveRecord::Migration[
|
1
|
+
class CreatePhcdevworksScriptsLicenceVersions < ActiveRecord::Migration[6.0]
|
2
2
|
TEXT_BYTES = 1_073_741_823
|
3
3
|
def change
|
4
4
|
|
@@ -11,7 +11,7 @@ class CreatePhcdevworksScriptsLicenceVersions < ActiveRecord::Migration[5.2]
|
|
11
11
|
t.datetime :created_at
|
12
12
|
end
|
13
13
|
|
14
|
-
add_index :phcdevworks_scripts_licence_versions, %i(item_type item_id), :name => '
|
14
|
+
add_index :phcdevworks_scripts_licence_versions, %i(item_type item_id), :name => 'script_licence_versions'
|
15
15
|
|
16
16
|
end
|
17
17
|
end
|
@@ -1,17 +1,19 @@
|
|
1
|
-
class
|
1
|
+
class CreatePhcdevworksScriptsSnippetUrlVersions < ActiveRecord::Migration[6.0]
|
2
2
|
TEXT_BYTES = 1_073_741_823
|
3
3
|
def change
|
4
4
|
|
5
|
-
create_table :
|
5
|
+
create_table :phcdevworks_scripts_snippet_url_versions do |t|
|
6
|
+
|
6
7
|
t.string :item_type, {:null=>false}
|
7
8
|
t.integer :item_id, null: false
|
8
9
|
t.string :event, null: false
|
9
10
|
t.string :whodunnit
|
10
11
|
t.text :object, limit: TEXT_BYTES
|
11
12
|
t.datetime :created_at
|
13
|
+
|
12
14
|
end
|
13
15
|
|
14
|
-
add_index :
|
16
|
+
add_index :phcdevworks_scripts_snippet_url_versions, %i(item_type item_id), :name => 'snippet_url_versions'
|
15
17
|
|
16
18
|
end
|
17
19
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class CreatePhcdevworksScriptsSnippetPostVersions < ActiveRecord::Migration[6.0]
|
2
|
+
TEXT_BYTES = 1_073_741_823
|
3
|
+
def change
|
4
|
+
|
5
|
+
create_table :phcdevworks_scripts_snippet_post_versions do |t|
|
6
|
+
|
7
|
+
t.string :item_type, {:null=>false}
|
8
|
+
t.integer :item_id, null: false
|
9
|
+
t.string :event, null: false
|
10
|
+
t.string :whodunnit
|
11
|
+
t.text :object, limit: TEXT_BYTES
|
12
|
+
t.datetime :created_at
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
add_index :phcdevworks_scripts_snippet_post_versions, %i(item_type item_id), :name => 'snippet_post_versions'
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcdevworks_scripts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PHCDevworks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -286,20 +286,22 @@ files:
|
|
286
286
|
- app/jobs/phcdevworks_scripts/application_job.rb
|
287
287
|
- app/mailers/phcdevworks_scripts/application_mailer.rb
|
288
288
|
- app/models/phcdevworks_scripts/application_record.rb
|
289
|
-
- app/models/phcdevworks_scripts/author_versions.rb
|
290
|
-
- app/models/phcdevworks_scripts/extension_versions.rb
|
291
|
-
- app/models/phcdevworks_scripts/listing_versions.rb
|
292
289
|
- app/models/phcdevworks_scripts/script.rb
|
293
290
|
- app/models/phcdevworks_scripts/script/author.rb
|
294
291
|
- app/models/phcdevworks_scripts/script/extension.rb
|
295
292
|
- app/models/phcdevworks_scripts/script/listing.rb
|
296
293
|
- app/models/phcdevworks_scripts/script/url.rb
|
297
294
|
- app/models/phcdevworks_scripts/script/version.rb
|
298
|
-
- app/models/phcdevworks_scripts/
|
295
|
+
- app/models/phcdevworks_scripts/script_author_versions.rb
|
296
|
+
- app/models/phcdevworks_scripts/script_extension_versions.rb
|
297
|
+
- app/models/phcdevworks_scripts/script_listing_versions.rb
|
298
|
+
- app/models/phcdevworks_scripts/script_url_versions.rb
|
299
|
+
- app/models/phcdevworks_scripts/script_version_versions.rb
|
299
300
|
- app/models/phcdevworks_scripts/snippet.rb
|
300
301
|
- app/models/phcdevworks_scripts/snippet/post.rb
|
301
302
|
- app/models/phcdevworks_scripts/snippet/url.rb
|
302
|
-
- app/models/phcdevworks_scripts/
|
303
|
+
- app/models/phcdevworks_scripts/snippet_post_versions.rb
|
304
|
+
- app/models/phcdevworks_scripts/snippet_url_versions.rb
|
303
305
|
- app/views/layouts/phcdevworks_scripts/application.html.erb
|
304
306
|
- app/views/layouts/phcdevworks_scripts/components/backend/footer/_footer.html.erb
|
305
307
|
- app/views/layouts/phcdevworks_scripts/components/backend/navigation/_top_menu.html.erb
|
@@ -342,7 +344,7 @@ files:
|
|
342
344
|
- config/routes.rb
|
343
345
|
- db/migrate/20170517064030_create_phcdevworks_scripts_extension_versions.rb
|
344
346
|
- db/migrate/20170517064049_create_phcdevworks_scripts_listing_versions.rb
|
345
|
-
- db/migrate/
|
347
|
+
- db/migrate/20170517064114_create_phcdevworks_scripts_script_version_versions.rb
|
346
348
|
- db/migrate/20170517064150_create_phcdevworks_scripts_url_versions.rb
|
347
349
|
- db/migrate/20170517064208_create_phcdevworks_scripts_author_versions.rb
|
348
350
|
- db/migrate/20170517064427_create_phcdevworks_scripts_licence_versions.rb
|
@@ -353,6 +355,8 @@ files:
|
|
353
355
|
- db/migrate/20190818023709_create_phcdevworks_scripts_script_extensions.rb
|
354
356
|
- db/migrate/20190818023911_create_phcdevworks_scripts_script_urls.rb
|
355
357
|
- db/migrate/20190818031653_create_phcdevworks_scripts_script_versions.rb
|
358
|
+
- db/migrate/20191102092649_create_phcdevworks_scripts_snippet_url_versions.rb
|
359
|
+
- db/migrate/20191102092711_create_phcdevworks_scripts_snippet_post_versions.rb
|
356
360
|
- lib/phcdevworks_scripts.rb
|
357
361
|
- lib/phcdevworks_scripts/engine.rb
|
358
362
|
- lib/phcdevworks_scripts/version.rb
|