phcscriptcdn 7.2.2 → 8.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/controllers/phcscriptcdn/script/authors_controller.rb +1 -1
  4. data/app/controllers/phcscriptcdn/script/extensions_controller.rb +1 -1
  5. data/app/controllers/phcscriptcdn/script/licences_controller.rb +1 -1
  6. data/app/controllers/phcscriptcdn/script/listings_controller.rb +1 -1
  7. data/app/controllers/phcscriptcdn/script/urls_controller.rb +1 -1
  8. data/app/controllers/phcscriptcdn/script/versions_controller.rb +1 -1
  9. data/app/models/phcscriptcdn/application_record.rb +1 -1
  10. data/app/models/phcscriptcdn/author_versions.rb +5 -0
  11. data/app/models/phcscriptcdn/extension_versions.rb +5 -0
  12. data/app/models/phcscriptcdn/licence_versions.rb +5 -0
  13. data/app/models/phcscriptcdn/listing_versions.rb +5 -0
  14. data/app/models/phcscriptcdn/script.rb +1 -1
  15. data/app/models/phcscriptcdn/script/author.rb +15 -5
  16. data/app/models/phcscriptcdn/script/extension.rb +15 -5
  17. data/app/models/phcscriptcdn/script/licence.rb +15 -5
  18. data/app/models/phcscriptcdn/script/listing.rb +15 -11
  19. data/app/models/phcscriptcdn/script/url.rb +16 -7
  20. data/app/models/phcscriptcdn/script/version.rb +15 -7
  21. data/app/models/phcscriptcdn/scriptversion_versions.rb +5 -0
  22. data/app/models/phcscriptcdn/url_versions.rb +5 -0
  23. data/app/views/layouts/phcscriptcdn/application.html.erb +2 -2
  24. data/app/views/layouts/phcscriptcdn/components/backend/footer/_footer.html.erb +1 -1
  25. data/config/initializers/friendly_id.rb +3 -3
  26. data/config/initializers/locale.rb +10 -0
  27. data/config/initializers/paper_trail.rb +1 -0
  28. data/db/migrate/20170509002355_create_phcscriptcdn_friendly_id_slugs.rb +18 -0
  29. data/db/migrate/20170517064030_create_phcscriptcdn_extensions_versions.rb +17 -0
  30. data/db/migrate/20170517064049_create_phcscriptcdn_listing_versions.rb +16 -0
  31. data/db/migrate/20170517064114_create_phcscriptcdn_scriptversion_versions.rb +16 -0
  32. data/db/migrate/20170517064150_create_phcscriptcdn_url_versions.rb +16 -0
  33. data/db/migrate/20170517064208_create_phcscriptcdn_author_versions.rb +16 -0
  34. data/db/migrate/20170517064427_create_phcscriptcdn_licence_versions.rb +16 -0
  35. data/lib/phcscriptcdn/version.rb +1 -1
  36. metadata +56 -66
  37. data/db/migrate/20170423022446_create_friendly_id_slugs.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecc8827c12b824eef784277aa85c21fc35c75f0b
4
- data.tar.gz: 9aac615af5ce204f7b0956c11dec4faf8fe1a07b
3
+ metadata.gz: bb6d79792ae09812fda9e8c60007f5d28e790fc9
4
+ data.tar.gz: 2eb7201dc3c970fac4787770663e0c9887ea68db
5
5
  SHA512:
6
- metadata.gz: 1c160144e674db2ed1e64a99a34c6a943b28de168c6077382cf50f6f08b211b9ef330ce9344ca69abb118dac8ed78872c511d018365c77388185378597a8a993
7
- data.tar.gz: b7e5756bfca290613430b686b464bf17b6bbffc848528ef311e29debd13de19a726b9093586377ef118e804020cd4103a9b21a766fc379445e65d8d975069393
6
+ metadata.gz: 819c88e76dc1d57b04bec6f7a67c17a219a3a8ab9df4c9bded749da261a186f23aebbf6315db850b4dad817009331bd23d62fd9ad150a810461aa5fac0e358a0
7
+ data.tar.gz: 21bddd297b43d9e9d772facd8e178e1de17624b0634d078d052383aaca657604568d7bbf6d2e175e69788cfbc0f6918463f2d1a5009ea6c668e68d0fc20d5f39
data/README.md CHANGED
@@ -13,7 +13,7 @@ PHCScriptCDN Rails 5.1 script management engine for website script CDN listings.
13
13
 
14
14
  #### Step 1 - Add PHCScriptCDN to your gemfile and run command
15
15
 
16
- gem 'phcscriptcdn', '~> 7.2', '>= 7.2.1'
16
+ gem 'phcscriptcdn', '~> 7.2', '>= 7.2.2'
17
17
  bundle install
18
18
 
19
19
  #### Step 2 - Copy PHCScriptCDN Database Tables
@@ -58,7 +58,7 @@ module Phcscriptcdn
58
58
 
59
59
  # Whitelist
60
60
  def script_author_params
61
- params.require(:script_author).permit(:authorfirstname, :authorlastname, :authorwebsite, :authorgithub, :authortwitter, :user_id, :user_name)
61
+ params.require(:script_author).permit(:authorfirstname, :authorlastname, :authorwebsite, :authorgithub, :authortwitter, :slug, :user_id, :user_name)
62
62
  end
63
63
 
64
64
  end
@@ -58,7 +58,7 @@ module Phcscriptcdn
58
58
 
59
59
  # Whitelists
60
60
  def script_extension_params
61
- params.require(:script_extension).permit(:scriptextensionname, :scriptextensiondes, :scriptextension, :user_id, :user_name)
61
+ params.require(:script_extension).permit(:scriptextensionname, :scriptextensiondes, :scriptextension, :slug, :user_id, :user_name)
62
62
  end
63
63
 
64
64
  end
@@ -58,7 +58,7 @@ module Phcscriptcdn
58
58
 
59
59
  # Whitelists
60
60
  def script_licence_params
61
- params.require(:script_licence).permit(:lcncname, :lcncdescription, :lcncdescript, :lcnccomgpl, :lcncarvlfsf, :lcncarvlosi, :lcncarvlcopyfree, :lcncarvldebian, :lcncarvlfedora, :user_id, :user_name)
61
+ params.require(:script_licence).permit(:lcncname, :lcncdescription, :lcncdescript, :lcnccomgpl, :lcncarvlfsf, :lcncarvlosi, :lcncarvlcopyfree, :lcncarvldebian, :lcncarvlfedora, :slug, :user_id, :user_name)
62
62
  end
63
63
 
64
64
  end
@@ -58,7 +58,7 @@ module Phcscriptcdn
58
58
 
59
59
  # Whitelist
60
60
  def script_listing_params
61
- params.require(:script_listing).permit(:scripttitle, :scriptdescription, :descriptionsource, :scriptwebsite, :scripttwitter, :scriptgithub, :scriptinitialrelease, :scriptlastestrelease, :scriptbetarelease, :scriptstatus, :user_id, :user_name, :version_id, :author_id, :licence_id)
61
+ params.require(:script_listing).permit(:scripttitle, :scriptdescription, :descriptionsource, :scriptwebsite, :scripttwitter, :scriptgithub, :scriptinitialrelease, :scriptlastestrelease, :scriptbetarelease, :scriptstatus, :slug, :user_id, :user_name, :version_id, :author_id, :licence_id)
62
62
  end
63
63
 
64
64
  end
@@ -67,7 +67,7 @@ module Phcscriptcdn
67
67
 
68
68
  # Whitelists
69
69
  def script_url_params
70
- params.require(:script_url).permit(:scripturl, :scripturlrelease, :scripturlcdnupdate, :user_id, :user_name, :listing_id, :version_id, :extension_id)
70
+ params.require(:script_url).permit(:scripturl, :scripturlrelease, :scripturlcdnupdate, :slug, :user_id, :user_name, :listing_id, :version_id, :extension_id)
71
71
  end
72
72
 
73
73
  end
@@ -58,7 +58,7 @@ module Phcscriptcdn
58
58
 
59
59
  # Only allow a trusted parameter "white list" through.
60
60
  def script_version_params
61
- params.require(:script_version).permit(:scriptversion, :user_id, :user_name)
61
+ params.require(:script_version).permit(:scriptversion, :slug, :user_id, :user_name)
62
62
  end
63
63
 
64
64
  end
@@ -2,4 +2,4 @@ module Phcscriptcdn
2
2
  class ApplicationRecord < ActiveRecord::Base
3
3
  self.abstract_class = true
4
4
  end
5
- end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Phcscriptcdn
2
+ class AuthorVersions < PaperTrail::Version
3
+ self.table_name = :phcscriptcdn_author_versions
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Phcscriptcdn
2
+ class ExtensionVersions < PaperTrail::Version
3
+ self.table_name = :phcscriptcdn_extension_versions
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Phcscriptcdn
2
+ class LicenceVersions < PaperTrail::Version
3
+ self.table_name = :phcscriptcdn_licence_versions
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Phcscriptcdn
2
+ class ListingVersions < PaperTrail::Version
3
+ self.table_name = :phcscriptcdn_listing_versions
4
+ end
5
+ end
@@ -4,4 +4,4 @@ module Phcscriptcdn
4
4
  'phcscriptcdn_script_'
5
5
  end
6
6
  end
7
- end
7
+ end
@@ -1,10 +1,13 @@
1
1
  module Phcscriptcdn
2
2
  class Script::Author < ApplicationRecord
3
3
 
4
- # Clean URLS
4
+ # Clean URL Initialize
5
5
  extend FriendlyId
6
6
 
7
- # Listing (None Nested)
7
+ # Add Paper Trail
8
+ has_paper_trail :class_name => 'Phcscriptcdn::AuthorVersions'
9
+
10
+ # Relationships
8
11
  has_many :listings, class_name: 'Phcscriptcdn::Script::Listing'
9
12
 
10
13
  # Validation for Form Fields
@@ -14,8 +17,15 @@ module Phcscriptcdn
14
17
  validates :authorlastname,
15
18
  presence: true
16
19
 
17
- # Clean URLS Slugs
18
- friendly_id :authorfirstname, use: :slugged
20
+ # Clean URL Define
21
+ friendly_id :phcscriptcdn_author_slug, use: [:slugged, :finders]
22
+
23
+ # Define for Multiple Records
24
+ def phcscriptcdn_author_slug
25
+ [
26
+ [:authorfirstname, :authorlastname]
27
+ ]
28
+ end
19
29
 
20
30
  end
21
- end
31
+ end
@@ -1,10 +1,13 @@
1
1
  module Phcscriptcdn
2
2
  class Script::Extension < ApplicationRecord
3
3
 
4
- # Clean URLS
4
+ # Clean URL Initialize
5
5
  extend FriendlyId
6
6
 
7
- # URLs & Extensions (None Nested)
7
+ # Add Paper Trail
8
+ has_paper_trail :class_name => 'Phcscriptcdn::ExtensionVersions'
9
+
10
+ # Relationships
8
11
  has_many :listings, class_name: 'Phcscriptcdn::Script::Listing', :through => :urls
9
12
  has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
10
13
 
@@ -18,8 +21,15 @@ module Phcscriptcdn
18
21
  validates :scriptextension,
19
22
  presence: true
20
23
 
21
- # Clean URLS Slugs
22
- friendly_id :scriptextensionname, use: :slugged
24
+ # Clean URL Define
25
+ friendly_id :phcscriptcdn_extentension_slug, use: [:slugged, :finders]
26
+
27
+ # Define for Multiple Records
28
+ def phcscriptcdn_extentension_slug
29
+ [
30
+ [:scriptextensionname, :scriptextension]
31
+ ]
32
+ end
23
33
 
24
34
  end
25
- end
35
+ end
@@ -1,10 +1,13 @@
1
1
  module Phcscriptcdn
2
2
  class Script::Licence < ApplicationRecord
3
3
 
4
- # Clean URLS
4
+ # Clean URL Initialize
5
5
  extend FriendlyId
6
6
 
7
- # Listing (None Nested)
7
+ # Add Paper Trail
8
+ has_paper_trail :class_name => 'Phcscriptcdn::LicenceVersions'
9
+
10
+ # Relationships
8
11
  has_many :listings, class_name: 'Phcscriptcdn::Script::Listing'
9
12
 
10
13
  # Validation for Form Fields
@@ -17,8 +20,15 @@ module Phcscriptcdn
17
20
  validates :lcncdescription,
18
21
  presence: true
19
22
 
20
- # Clean URLS Slugs
21
- friendly_id :lcncname, use: :slugged
23
+ # Clean URL Define
24
+ friendly_id :phcscriptcdn_licence_slug, use: [:slugged, :finders]
25
+
26
+ # Define for Multiple Records
27
+ def phcscriptcdn_licence_slug
28
+ [
29
+ [:lcncname]
30
+ ]
31
+ end
22
32
 
23
33
  end
24
- end
34
+ end
@@ -1,19 +1,16 @@
1
1
  module Phcscriptcdn
2
2
  class Script::Listing < ApplicationRecord
3
3
 
4
- # Clean URLS
4
+ # Clean URL Initialize
5
5
  extend FriendlyId
6
6
 
7
- # Attach to URL (Nested)
8
- has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
7
+ # Add Paper Trail
8
+ has_paper_trail :class_name => 'Phcscriptcdn::ListingVersions'
9
9
 
10
- # Attach to Author (None Nested)
10
+ # Relationships
11
+ has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
11
12
  belongs_to :author, class_name: 'Phcscriptcdn::Script::Author'
12
-
13
- # Attach to Version (None Nested)
14
13
  belongs_to :version, class_name: 'Phcscriptcdn::Script::Version'
15
-
16
- # Attach to Licence (None Nested)
17
14
  belongs_to :licence, class_name: 'Phcscriptcdn::Script::Licence'
18
15
 
19
16
  # Validation for Form Fields
@@ -26,8 +23,15 @@ module Phcscriptcdn
26
23
  validates :scriptstatus,
27
24
  presence: true
28
25
 
29
- # Clean URLS Slugs
30
- friendly_id :scripttitle, use: :slugged
26
+ # Clean URL Define
27
+ friendly_id :phcscriptcdn_listing_slug, use: [:slugged, :finders]
28
+
29
+ # Define for Multiple Records
30
+ def phcscriptcdn_listing_slug
31
+ [
32
+ [:scripttitle]
33
+ ]
34
+ end
31
35
 
32
36
  end
33
- end
37
+ end
@@ -1,16 +1,15 @@
1
1
  module Phcscriptcdn
2
2
  class Script::Url < ApplicationRecord
3
3
 
4
- # Clean URLS
4
+ # Clean URL Initialize
5
5
  extend FriendlyId
6
6
 
7
- # Attach to Listings (Nested)
8
- belongs_to :listing, class_name: 'Phcscriptcdn::Script::Listing'
7
+ # Add Paper Trail
8
+ has_paper_trail :class_name => 'Phcscriptcdn::UrlVersions'
9
9
 
10
- # Attach to Version (None Nested)
10
+ # Relationships
11
+ belongs_to :listing, class_name: 'Phcscriptcdn::Script::Listing'
11
12
  belongs_to :version, class_name: 'Phcscriptcdn::Script::Version'
12
-
13
- # Attach to Extension (None Nested)
14
13
  belongs_to :extension, class_name: 'Phcscriptcdn::Script::Extension'
15
14
 
16
15
  # Validation for Form Fields
@@ -23,5 +22,15 @@ module Phcscriptcdn
23
22
  validates :scripturlcdnupdate,
24
23
  presence: true
25
24
 
25
+ # Clean URL Define
26
+ friendly_id :phcscriptcdn_url_slug, use: [:slugged, :finders]
27
+
28
+ # Define for Multiple Records
29
+ def phcscriptcdn_url_slug
30
+ [
31
+ [:scripturl]
32
+ ]
33
+ end
34
+
26
35
  end
27
- end
36
+ end
@@ -1,21 +1,29 @@
1
1
  module Phcscriptcdn
2
2
  class Script::Version < ApplicationRecord
3
3
 
4
- # Clean URLS
4
+ # Clean URL Initialize
5
5
  extend FriendlyId
6
6
 
7
- # Attach to Listing (None Nested)
8
- has_many :listings, class_name: 'Phcscriptcdn::Script::Listing'
7
+ # Add Paper Trail
8
+ has_paper_trail :class_name => 'Phcscriptcdn::ScriptversionVersions'
9
9
 
10
- # Attach to URL (None Nested)
10
+ # Relationships
11
+ has_many :listings, class_name: 'Phcscriptcdn::Script::Listing'
11
12
  has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
12
13
 
13
14
  # Validation for Form Fields
14
15
  validates :scriptversion,
15
16
  presence: true
16
17
 
17
- # Clean URLS Slugs
18
- friendly_id :scriptversion, use: :slugged
18
+ # Clean URL Define
19
+ friendly_id :phcscriptcdn_version_slug, use: [:slugged, :finders]
20
+
21
+ # Define for Multiple Records
22
+ def phcscriptcdn_version_slug
23
+ [
24
+ [:scriptversion]
25
+ ]
26
+ end
19
27
 
20
28
  end
21
- end
29
+ end
@@ -0,0 +1,5 @@
1
+ module Phcscriptcdn
2
+ class ScriptversionVersions < PaperTrail::Version
3
+ self.table_name = :phcscriptcdn_scriptversion_versions
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Phcscriptcdn
2
+ class UrlVersions < PaperTrail::Version
3
+ self.table_name = :phcscriptcdn_url_versions
4
+ end
5
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  <head>
5
5
 
6
- <title>PHCMembers - Membership Manager</title>
6
+ <title>PHCScriptCDN - Script Listing Manager</title>
7
7
 
8
8
  <%= stylesheet_link_tag "phcscriptcdn/application", media: "all" %>
9
9
  <%= javascript_include_tag "phcscriptcdn/application" %>
@@ -19,7 +19,7 @@
19
19
  <header class="main-header">
20
20
 
21
21
  <!-- Logo with Link -->
22
- <%= link_to phcmembers.member_profiles_path, class: "logo" do %>
22
+ <%= link_to phcscriptcdn.script_listings_path, class: "logo" do %>
23
23
  <span class="logo-mini">PHC</span>
24
24
  <span class="logo-lg"><b>PHC</b>ScriptCDN</span>
25
25
  <% end %>
@@ -1,4 +1,4 @@
1
1
  <div class="pull-right hidden-xs">
2
- <b>Version</b> 7.2.1 - 06-05-<%= Date.today.year %>
2
+ <b>Version</b> 8.1.0 - 06-20-<%= Date.today.year %>
3
3
  </div>
4
4
  <strong>&copy; 2012-<%= Time.now.year %> <%= link_to "https://phcnetworks.net", target: "_blank", rel: "nofollow" do %>PHCNetworks<% end %></strong>
@@ -17,7 +17,7 @@ FriendlyId.defaults do |config|
17
17
  config.use :reserved
18
18
 
19
19
  config.reserved_words = %w(new edit index session login logout users admin
20
- stylesheets assets javascripts images)
20
+ stylesheets assets javascripts images)
21
21
 
22
22
  # ## Friendly Finders
23
23
  #
@@ -38,14 +38,14 @@ FriendlyId.defaults do |config|
38
38
  # performance because it will avoid Rails-internal code that makes runtime
39
39
  # calls to `Module.extend`.
40
40
  #
41
- # config.use :finders
41
+ config.use :finders
42
42
  #
43
43
  # ## Slugs
44
44
  #
45
45
  # Most applications will use the :slugged module everywhere. If you wish
46
46
  # to do so, uncomment the following line.
47
47
  #
48
- # config.use :slugged
48
+ config.use :slugged
49
49
  #
50
50
  # By default, FriendlyId's :slugged addon expects the slug column to be named
51
51
  # 'slug', but you can change it if you wish.
@@ -0,0 +1,10 @@
1
+ # config/initializers/locale.rb
2
+
3
+ # Where the I18n library should search for translation files
4
+ I18n.load_path += Dir[Rails.root.join('lib', 'locale', '*.{rb,yml}')]
5
+
6
+ # Whitelist locales available for the application
7
+ I18n.available_locales = [:en]
8
+
9
+ # Set default locale to something other than :en
10
+ I18n.default_locale = :en
@@ -0,0 +1 @@
1
+ PaperTrail.config.track_associations = false
@@ -0,0 +1,18 @@
1
+ class CreatePhcscriptcdnFriendlyIdSlugs < ActiveRecord::Migration[5.1]
2
+ def change
3
+
4
+ create_table :phcscriptcdn_friendly_id_slugs do |t|
5
+ t.string :slug, :null => false
6
+ t.integer :sluggable_id, :null => false
7
+ t.string :sluggable_type, :limit => 50
8
+ t.string :scope
9
+ t.datetime :created_at
10
+ end
11
+
12
+ add_index :phcscriptcdn_friendly_id_slugs, :sluggable_id
13
+ add_index :phcscriptcdn_friendly_id_slugs, [:slug, :sluggable_type], name: 'scriptcdn_fri_id_slugable_type', length: { slug: 140, sluggable_type: 50 }
14
+ add_index :phcscriptcdn_friendly_id_slugs, [:slug, :sluggable_type, :scope], name: 'scriptcdn_fri_id_slugable_scope_type', length: { slug: 70, sluggable_type: 50, scope: 70 }, unique: true
15
+ add_index :phcscriptcdn_friendly_id_slugs, :sluggable_type
16
+
17
+ end
18
+ end
@@ -0,0 +1,17 @@
1
+ class CreatePhcscriptcdnExtensionsVersions < ActiveRecord::Migration[5.1]
2
+ TEXT_BYTES = 1_073_741_823
3
+ def change
4
+
5
+ create_table :phcscriptcdn_extensions_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 :phcscriptcdn_extensions_versions, %i(item_type item_id), :name => 'scriptcdn_ext_versions'
15
+
16
+ end
17
+ end
@@ -0,0 +1,16 @@
1
+ class CreatePhcscriptcdnListingVersions < ActiveRecord::Migration[5.1]
2
+ TEXT_BYTES = 1_073_741_823
3
+ def change
4
+
5
+ create_table :phcscriptcdn_listing_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
+ add_index :phcscriptcdn_listing_versions, %i(item_type item_id), :name => 'scriptcdn_listing_versions'
14
+
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ class CreatePhcscriptcdnScriptversionVersions < ActiveRecord::Migration[5.1]
2
+ TEXT_BYTES = 1_073_741_823
3
+ def change
4
+
5
+ create_table :phcscriptcdn_address_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
+ add_index :phcscriptcdn_address_versions, %i(item_type item_id), :name => 'scriptcdn_address_versions'
14
+
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ class CreatePhcscriptcdnUrlVersions < ActiveRecord::Migration[5.1]
2
+ TEXT_BYTES = 1_073_741_823
3
+ def change
4
+
5
+ create_table :phcscriptcdn_url_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
+ add_index :phcscriptcdn_url_versions, %i(item_type item_id), :name => 'scriptcdn_url_versions'
14
+
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ class CreatePhcscriptcdnAuthorVersions < ActiveRecord::Migration[5.1]
2
+ TEXT_BYTES = 1_073_741_823
3
+ def change
4
+
5
+ create_table :phcscriptcdn_author_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
+ add_index :phcscriptcdn_author_versions, %i(item_type item_id), :name => 'scriptcdn_author_versions'
14
+
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ class CreatePhcscriptcdnLicenceVersions < ActiveRecord::Migration[5.1]
2
+ TEXT_BYTES = 1_073_741_823
3
+ def change
4
+
5
+ create_table :phcscriptcdn_licence_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
+ add_index :phcscriptcdn_licence_versions, %i(item_type item_id), :name => 'scriptcdn_licence_versions'
14
+
15
+ end
16
+ end
@@ -1,3 +1,3 @@
1
1
  module Phcscriptcdn
2
- VERSION = "7.2.2"
2
+ VERSION = "8.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcscriptcdn
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.2
4
+ version: 8.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BradPotts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-06 00:00:00.000000000 Z
11
+ date: 2017-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 0.20.0
39
+ version: 0.21.0
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 0.20.0
46
+ version: 0.21.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: paper_trail
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -221,7 +221,7 @@ dependencies:
221
221
  version: '4.6'
222
222
  - - ">="
223
223
  - !ruby/object:Gem::Version
224
- version: 4.6.3
224
+ version: 4.6.4
225
225
  type: :runtime
226
226
  prerelease: false
227
227
  version_requirements: !ruby/object:Gem::Requirement
@@ -231,21 +231,27 @@ dependencies:
231
231
  version: '4.6'
232
232
  - - ">="
233
233
  - !ruby/object:Gem::Version
234
- version: 4.6.3
234
+ version: 4.6.4
235
235
  - !ruby/object:Gem::Dependency
236
236
  name: oj
237
237
  requirement: !ruby/object:Gem::Requirement
238
238
  requirements:
239
239
  - - "~>"
240
240
  - !ruby/object:Gem::Version
241
- version: '3.1'
241
+ version: '3.0'
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ version: 3.0.11
242
245
  type: :runtime
243
246
  prerelease: false
244
247
  version_requirements: !ruby/object:Gem::Requirement
245
248
  requirements:
246
249
  - - "~>"
247
250
  - !ruby/object:Gem::Version
248
- version: '3.1'
251
+ version: '3.0'
252
+ - - ">="
253
+ - !ruby/object:Gem::Version
254
+ version: 3.0.11
249
255
  - !ruby/object:Gem::Dependency
250
256
  name: rabl
251
257
  requirement: !ruby/object:Gem::Requirement
@@ -354,140 +360,98 @@ dependencies:
354
360
  requirements:
355
361
  - - "~>"
356
362
  - !ruby/object:Gem::Version
357
- version: '7.1'
358
- - - ">="
359
- - !ruby/object:Gem::Version
360
- version: 7.1.2
363
+ version: '7.2'
361
364
  type: :runtime
362
365
  prerelease: false
363
366
  version_requirements: !ruby/object:Gem::Requirement
364
367
  requirements:
365
368
  - - "~>"
366
369
  - !ruby/object:Gem::Version
367
- version: '7.1'
368
- - - ">="
369
- - !ruby/object:Gem::Version
370
- version: 7.1.2
370
+ version: '7.2'
371
371
  - !ruby/object:Gem::Dependency
372
372
  name: phcnotifi
373
373
  requirement: !ruby/object:Gem::Requirement
374
374
  requirements:
375
375
  - - "~>"
376
376
  - !ruby/object:Gem::Version
377
- version: '6.1'
378
- - - ">="
379
- - !ruby/object:Gem::Version
380
- version: 6.1.2
377
+ version: '6.2'
381
378
  type: :runtime
382
379
  prerelease: false
383
380
  version_requirements: !ruby/object:Gem::Requirement
384
381
  requirements:
385
382
  - - "~>"
386
383
  - !ruby/object:Gem::Version
387
- version: '6.1'
388
- - - ">="
389
- - !ruby/object:Gem::Version
390
- version: 6.1.2
384
+ version: '6.2'
391
385
  - !ruby/object:Gem::Dependency
392
386
  name: phctheme1
393
387
  requirement: !ruby/object:Gem::Requirement
394
388
  requirements:
395
389
  - - "~>"
396
390
  - !ruby/object:Gem::Version
397
- version: '14.3'
398
- - - ">="
399
- - !ruby/object:Gem::Version
400
- version: 14.3.1
391
+ version: '14.4'
401
392
  type: :runtime
402
393
  prerelease: false
403
394
  version_requirements: !ruby/object:Gem::Requirement
404
395
  requirements:
405
396
  - - "~>"
406
397
  - !ruby/object:Gem::Version
407
- version: '14.3'
408
- - - ">="
409
- - !ruby/object:Gem::Version
410
- version: 14.3.1
398
+ version: '14.4'
411
399
  - !ruby/object:Gem::Dependency
412
400
  name: phctheme2
413
401
  requirement: !ruby/object:Gem::Requirement
414
402
  requirements:
415
403
  - - "~>"
416
404
  - !ruby/object:Gem::Version
417
- version: '5.3'
418
- - - ">="
419
- - !ruby/object:Gem::Version
420
- version: 5.3.1
405
+ version: '5.6'
421
406
  type: :runtime
422
407
  prerelease: false
423
408
  version_requirements: !ruby/object:Gem::Requirement
424
409
  requirements:
425
410
  - - "~>"
426
411
  - !ruby/object:Gem::Version
427
- version: '5.3'
428
- - - ">="
429
- - !ruby/object:Gem::Version
430
- version: 5.3.1
412
+ version: '5.6'
431
413
  - !ruby/object:Gem::Dependency
432
414
  name: phcadmin1
433
415
  requirement: !ruby/object:Gem::Requirement
434
416
  requirements:
435
417
  - - "~>"
436
418
  - !ruby/object:Gem::Version
437
- version: '10.3'
438
- - - ">="
439
- - !ruby/object:Gem::Version
440
- version: 10.3.1
419
+ version: '10.4'
441
420
  type: :runtime
442
421
  prerelease: false
443
422
  version_requirements: !ruby/object:Gem::Requirement
444
423
  requirements:
445
424
  - - "~>"
446
425
  - !ruby/object:Gem::Version
447
- version: '10.3'
448
- - - ">="
449
- - !ruby/object:Gem::Version
450
- version: 10.3.1
426
+ version: '10.4'
451
427
  - !ruby/object:Gem::Dependency
452
428
  name: phcadmin2
453
429
  requirement: !ruby/object:Gem::Requirement
454
430
  requirements:
455
431
  - - "~>"
456
432
  - !ruby/object:Gem::Version
457
- version: '8.3'
458
- - - ">="
459
- - !ruby/object:Gem::Version
460
- version: 8.3.1
433
+ version: '8.4'
461
434
  type: :runtime
462
435
  prerelease: false
463
436
  version_requirements: !ruby/object:Gem::Requirement
464
437
  requirements:
465
438
  - - "~>"
466
439
  - !ruby/object:Gem::Version
467
- version: '8.3'
468
- - - ">="
469
- - !ruby/object:Gem::Version
470
- version: 8.3.1
440
+ version: '8.4'
471
441
  - !ruby/object:Gem::Dependency
472
442
  name: phcadmin3
473
443
  requirement: !ruby/object:Gem::Requirement
474
444
  requirements:
475
445
  - - "~>"
476
446
  - !ruby/object:Gem::Version
477
- version: '5.3'
478
- - - ">="
479
- - !ruby/object:Gem::Version
480
- version: 5.3.1
447
+ version: '5.4'
481
448
  type: :runtime
482
449
  prerelease: false
483
450
  version_requirements: !ruby/object:Gem::Requirement
484
451
  requirements:
485
452
  - - "~>"
486
453
  - !ruby/object:Gem::Version
487
- version: '5.3'
488
- - - ">="
489
- - !ruby/object:Gem::Version
490
- version: 5.3.1
454
+ version: '5.4'
491
455
  - !ruby/object:Gem::Dependency
492
456
  name: rspec-rails
493
457
  requirement: !ruby/object:Gem::Requirement
@@ -523,6 +487,9 @@ dependencies:
523
487
  - - "~>"
524
488
  - !ruby/object:Gem::Version
525
489
  version: '2.14'
490
+ - - ">="
491
+ - !ruby/object:Gem::Version
492
+ version: 2.14.3
526
493
  type: :development
527
494
  prerelease: false
528
495
  version_requirements: !ruby/object:Gem::Requirement
@@ -530,6 +497,9 @@ dependencies:
530
497
  - - "~>"
531
498
  - !ruby/object:Gem::Version
532
499
  version: '2.14'
500
+ - - ">="
501
+ - !ruby/object:Gem::Version
502
+ version: 2.14.3
533
503
  - !ruby/object:Gem::Dependency
534
504
  name: nokogiri
535
505
  requirement: !ruby/object:Gem::Requirement
@@ -651,6 +621,9 @@ dependencies:
651
621
  - - "~>"
652
622
  - !ruby/object:Gem::Version
653
623
  version: '3.4'
624
+ - - ">="
625
+ - !ruby/object:Gem::Version
626
+ version: 3.4.3
654
627
  type: :development
655
628
  prerelease: false
656
629
  version_requirements: !ruby/object:Gem::Requirement
@@ -658,6 +631,9 @@ dependencies:
658
631
  - - "~>"
659
632
  - !ruby/object:Gem::Version
660
633
  version: '3.4'
634
+ - - ">="
635
+ - !ruby/object:Gem::Version
636
+ version: 3.4.3
661
637
  - !ruby/object:Gem::Dependency
662
638
  name: mail
663
639
  requirement: !ruby/object:Gem::Requirement
@@ -696,6 +672,10 @@ files:
696
672
  - app/helpers/phcscriptcdn/application_helper.rb
697
673
  - app/jobs/phcscriptcdn/application_job.rb
698
674
  - app/models/phcscriptcdn/application_record.rb
675
+ - app/models/phcscriptcdn/author_versions.rb
676
+ - app/models/phcscriptcdn/extension_versions.rb
677
+ - app/models/phcscriptcdn/licence_versions.rb
678
+ - app/models/phcscriptcdn/listing_versions.rb
699
679
  - app/models/phcscriptcdn/script.rb
700
680
  - app/models/phcscriptcdn/script/author.rb
701
681
  - app/models/phcscriptcdn/script/extension.rb
@@ -703,6 +683,8 @@ files:
703
683
  - app/models/phcscriptcdn/script/listing.rb
704
684
  - app/models/phcscriptcdn/script/url.rb
705
685
  - app/models/phcscriptcdn/script/version.rb
686
+ - app/models/phcscriptcdn/scriptversion_versions.rb
687
+ - app/models/phcscriptcdn/url_versions.rb
706
688
  - app/views/layouts/phcscriptcdn/application.html.erb
707
689
  - app/views/layouts/phcscriptcdn/components/backend/footer/_footer.html.erb
708
690
  - app/views/layouts/phcscriptcdn/components/backend/navigation/_navigation.html.erb
@@ -740,6 +722,8 @@ files:
740
722
  - app/views/phcscriptcdn/script/versions/new.html.erb
741
723
  - app/views/phcscriptcdn/script/versions/show.html.erb
742
724
  - config/initializers/friendly_id.rb
725
+ - config/initializers/locale.rb
726
+ - config/initializers/paper_trail.rb
743
727
  - config/routes.rb
744
728
  - db/migrate/20160731205205_create_phcscriptcdn_script_extensions.rb
745
729
  - db/migrate/20160731205917_create_phcscriptcdn_script_listings.rb
@@ -747,7 +731,13 @@ files:
747
731
  - db/migrate/20160731210626_create_phcscriptcdn_script_urls.rb
748
732
  - db/migrate/20160731210723_create_phcscriptcdn_script_authors.rb
749
733
  - db/migrate/20160801032225_create_phcscriptcdn_script_licences.rb
750
- - db/migrate/20170423022446_create_friendly_id_slugs.rb
734
+ - db/migrate/20170509002355_create_phcscriptcdn_friendly_id_slugs.rb
735
+ - db/migrate/20170517064030_create_phcscriptcdn_extensions_versions.rb
736
+ - db/migrate/20170517064049_create_phcscriptcdn_listing_versions.rb
737
+ - db/migrate/20170517064114_create_phcscriptcdn_scriptversion_versions.rb
738
+ - db/migrate/20170517064150_create_phcscriptcdn_url_versions.rb
739
+ - db/migrate/20170517064208_create_phcscriptcdn_author_versions.rb
740
+ - db/migrate/20170517064427_create_phcscriptcdn_licence_versions.rb
751
741
  - lib/phcscriptcdn.rb
752
742
  - lib/phcscriptcdn/engine.rb
753
743
  - lib/phcscriptcdn/version.rb
@@ -772,7 +762,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
772
762
  version: '0'
773
763
  requirements: []
774
764
  rubyforge_project:
775
- rubygems_version: 2.6.11
765
+ rubygems_version: 2.6.8
776
766
  signing_key:
777
767
  specification_version: 4
778
768
  summary: Rails 5.1 Engine - PHCScriptCDN(5)
@@ -1,15 +0,0 @@
1
- class CreateFriendlyIdSlugs < ActiveRecord::Migration[5.1]
2
- def change
3
- create_table :friendly_id_slugs do |t|
4
- t.string :slug, :null => false
5
- t.integer :sluggable_id, :null => false
6
- t.string :sluggable_type, :limit => 50
7
- t.string :scope
8
- t.datetime :created_at
9
- end
10
- add_index :friendly_id_slugs, :sluggable_id
11
- add_index :friendly_id_slugs, [:slug, :sluggable_type], length: { slug: 140, sluggable_type: 50 }
12
- add_index :friendly_id_slugs, [:slug, :sluggable_type, :scope], length: { slug: 70, sluggable_type: 50, scope: 70 }, unique: true
13
- add_index :friendly_id_slugs, :sluggable_type
14
- end
15
- end