phcscriptcdnpro 14.1.0 → 15.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/models/phcscriptcdnpro/author_versions.rb +5 -0
- data/app/models/phcscriptcdnpro/extension_versions.rb +5 -0
- data/app/models/phcscriptcdnpro/licence_versions.rb +5 -0
- data/app/models/phcscriptcdnpro/listing_versions.rb +5 -0
- data/app/models/phcscriptcdnpro/script/author.rb +4 -4
- data/app/models/phcscriptcdnpro/script/extension.rb +20 -3
- data/app/models/phcscriptcdnpro/script/licence.rb +20 -3
- data/app/models/phcscriptcdnpro/script/listing.rb +10 -9
- data/app/models/phcscriptcdnpro/script/url.rb +19 -7
- data/app/models/phcscriptcdnpro/script/version.rb +20 -5
- data/app/models/phcscriptcdnpro/scriptversion_versions.rb +5 -0
- data/app/models/phcscriptcdnpro/url_versions.rb +5 -0
- data/config/initializers/friendly_id.rb +3 -3
- data/config/initializers/locale.rb +10 -0
- data/config/initializers/paper_trail.rb +1 -0
- data/db/migrate/20170509002355_create_phcscriptcdnpro_friendly_id_slugs.rb +18 -0
- data/db/migrate/20170517064030_create_phcscriptcdnpro_extensions_versions.rb +17 -0
- data/db/migrate/20170517064049_create_phcscriptcdnpro_listings_versions.rb +16 -0
- data/db/migrate/20170517064114_create_phcscriptcdnpro_scriptversion_versions.rb +16 -0
- data/db/migrate/20170517064114_create_phcscriptcdnpro_url_versions.rb +16 -0
- data/db/migrate/20170517064208_create_phcscriptcdnpro_author_versions.rb +16 -0
- data/db/migrate/20170517064427_create_phcscriptcdnpro_licence_versions.rb +16 -0
- data/lib/phcscriptcdnpro/version.rb +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36356094c24f210c444e923c5c90c8e2201569ea
|
4
|
+
data.tar.gz: 005be6943ae2c74df4db5c25092b93fa051f2761
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d43bf1c8bcc1703c36e693644346679dc5df509d185a9f26c3fc2112285e1221d79485c047d7d460512d53af03f895680f76df34b75e6a0aab05b446d0b97b83
|
7
|
+
data.tar.gz: 94694fbe4771a422ee8383191841b0de76df87ffff17bc36d749dd156dd7338f876a919ace0d5f0461b4553a2767a0a91b3b1c0256bcb9ea2390cdb019c126a8
|
@@ -5,16 +5,16 @@ module Phcscriptcdnpro
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
# Add Paper Trail
|
8
|
-
has_paper_trail
|
8
|
+
has_paper_trail :class_name => 'Phcscriptcdnpro::AuthorVersions'
|
9
9
|
|
10
|
-
#
|
10
|
+
# Relationships
|
11
11
|
has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing'
|
12
12
|
|
13
13
|
# Clean URL Define
|
14
|
-
friendly_id :
|
14
|
+
friendly_id :phcscriptcdnpro_author_slug, use: [:slugged, :finders]
|
15
15
|
|
16
16
|
# Define for Multiple Records
|
17
|
-
def
|
17
|
+
def phcscriptcdnpro_author_slug
|
18
18
|
[
|
19
19
|
[:authorfirstname, :authorlastname]
|
20
20
|
]
|
@@ -5,14 +5,31 @@ module Phcscriptcdnpro
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
# Add Paper Trail
|
8
|
-
has_paper_trail
|
8
|
+
has_paper_trail :class_name => 'Phcscriptcdnpro::ExtensionVersions'
|
9
9
|
|
10
|
-
#
|
10
|
+
# Relationships
|
11
11
|
has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing', :through => :urls
|
12
12
|
has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'
|
13
13
|
|
14
|
+
# Validation for Form Fields
|
15
|
+
validates :scriptextensionname,
|
16
|
+
presence: true
|
17
|
+
|
18
|
+
validates :scriptextensiondes,
|
19
|
+
presence: true
|
20
|
+
|
21
|
+
validates :scriptextension,
|
22
|
+
presence: true
|
23
|
+
|
14
24
|
# Clean URL Define
|
15
|
-
friendly_id :
|
25
|
+
friendly_id :phcscriptcdnpro_extentension_slug, use: [:slugged, :finders]
|
26
|
+
|
27
|
+
# Define for Multiple Records
|
28
|
+
def phcscriptcdnpro_extentension_slug
|
29
|
+
[
|
30
|
+
[:scriptextensionname, :scriptextension]
|
31
|
+
]
|
32
|
+
end
|
16
33
|
|
17
34
|
end
|
18
35
|
end
|
@@ -5,13 +5,30 @@ module Phcscriptcdnpro
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
# Add Paper Trail
|
8
|
-
has_paper_trail
|
8
|
+
has_paper_trail :class_name => 'Phcscriptcdnpro::LicenceVersions'
|
9
9
|
|
10
|
-
#
|
10
|
+
# Relationships
|
11
11
|
has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing'
|
12
12
|
|
13
|
+
# Validation for Form Fields
|
14
|
+
validates :lcncname,
|
15
|
+
presence: true
|
16
|
+
|
17
|
+
validates :lcncdescript,
|
18
|
+
presence: true
|
19
|
+
|
20
|
+
validates :lcncdescription,
|
21
|
+
presence: true
|
22
|
+
|
13
23
|
# Clean URL Define
|
14
|
-
friendly_id :
|
24
|
+
friendly_id :phcscriptcdnpro_licence_slug, use: [:slugged, :finders]
|
25
|
+
|
26
|
+
# Define for Multiple Records
|
27
|
+
def phcscriptcdnpro_licence_slug
|
28
|
+
[
|
29
|
+
[:lcncname]
|
30
|
+
]
|
31
|
+
end
|
15
32
|
|
16
33
|
end
|
17
34
|
end
|
@@ -5,22 +5,23 @@ module Phcscriptcdnpro
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
# Add Paper Trail
|
8
|
-
has_paper_trail
|
8
|
+
has_paper_trail :class_name => 'Phcscriptcdnpro::ListingVersions'
|
9
9
|
|
10
|
-
#
|
10
|
+
# Relationships
|
11
11
|
has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'
|
12
|
-
|
13
|
-
# Attach to Author (None Nested)
|
14
12
|
belongs_to :author, class_name: 'Phcscriptcdnpro::Script::Author'
|
15
|
-
|
16
|
-
# Attach to Version (None Nested)
|
17
13
|
belongs_to :version, class_name: 'Phcscriptcdnpro::Script::Version'
|
18
|
-
|
19
|
-
# Attach to Licence (None Nested)
|
20
14
|
belongs_to :licence, class_name: 'Phcscriptcdnpro::Script::Licence'
|
21
15
|
|
22
16
|
# Clean URL Define
|
23
|
-
friendly_id :
|
17
|
+
friendly_id :phcscriptcdnpro_listing_slug, use: [:slugged, :finders]
|
18
|
+
|
19
|
+
# Define for Multiple Records
|
20
|
+
def phcscriptcdnpro_listing_slug
|
21
|
+
[
|
22
|
+
[:scripttitle]
|
23
|
+
]
|
24
|
+
end
|
24
25
|
|
25
26
|
end
|
26
27
|
end
|
@@ -5,20 +5,32 @@ module Phcscriptcdnpro
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
# Add Paper Trail
|
8
|
-
has_paper_trail
|
8
|
+
has_paper_trail :class_name => 'Phcscriptcdnpro::UrlVersions'
|
9
9
|
|
10
|
-
#
|
10
|
+
# Relationships
|
11
11
|
belongs_to :listing, class_name: 'Phcscriptcdnpro::Script::Listing'
|
12
|
-
|
13
|
-
# Attach to Version (None Nested)
|
14
12
|
belongs_to :version, class_name: 'Phcscriptcdnpro::Script::Version'
|
15
|
-
|
16
|
-
# Attach to Extension (None Nested)
|
17
13
|
belongs_to :extension, class_name: 'Phcscriptcdnpro::Script::Extension'
|
18
14
|
|
15
|
+
# Validation for Form Fields
|
16
|
+
validates :scripturl,
|
17
|
+
presence: true
|
18
|
+
|
19
|
+
validates :scripturlrelease,
|
20
|
+
presence: true
|
21
|
+
|
22
|
+
validates :scripturlcdnupdate,
|
23
|
+
presence: true
|
19
24
|
|
20
25
|
# Clean URL Define
|
21
|
-
friendly_id :
|
26
|
+
friendly_id :phcscriptcdnpro_url_slug, use: [:slugged, :finders]
|
27
|
+
|
28
|
+
# Define for Multiple Records
|
29
|
+
def phcscriptcdnpro_url_slug
|
30
|
+
[
|
31
|
+
[:scripturl]
|
32
|
+
]
|
33
|
+
end
|
22
34
|
|
23
35
|
end
|
24
36
|
end
|
@@ -5,16 +5,31 @@ module Phcscriptcdnpro
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
# Add Paper Trail
|
8
|
-
has_paper_trail
|
8
|
+
has_paper_trail :class_name => 'Phcscriptcdnpro::UrlVersions'
|
9
9
|
|
10
|
-
#
|
10
|
+
# Relationships
|
11
11
|
has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing'
|
12
|
-
|
13
|
-
# Attach to URL (None Nested)
|
14
12
|
has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'
|
15
13
|
|
14
|
+
# Validation for Form Fields
|
15
|
+
validates :scripturl,
|
16
|
+
presence: true
|
17
|
+
|
18
|
+
validates :scripturlrelease,
|
19
|
+
presence: true
|
20
|
+
|
21
|
+
validates :scripturlcdnupdate,
|
22
|
+
presence: true
|
23
|
+
|
16
24
|
# Clean URL Define
|
17
|
-
friendly_id :
|
25
|
+
friendly_id :phcscriptcdnpro_url_slug, use: [:slugged, :finders]
|
26
|
+
|
27
|
+
# Define for Multiple Records
|
28
|
+
def phcscriptcdnpro_url_slug
|
29
|
+
[
|
30
|
+
[:scripturl]
|
31
|
+
]
|
32
|
+
end
|
18
33
|
|
19
34
|
end
|
20
35
|
end
|
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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, :pt]
|
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 CreatePhcscriptcdnproFriendlyIdSlugs < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
|
4
|
+
create_table :phcscriptcdnpro_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 :phcscriptcdnpro_friendly_id_slugs, :sluggable_id
|
13
|
+
add_index :phcscriptcdnpro_friendly_id_slugs, [:slug, :sluggable_type], length: { slug: 140, sluggable_type: 50 }
|
14
|
+
add_index :phcscriptcdnpro_friendly_id_slugs, [:slug, :sluggable_type, :scope], name: 'scriptcdnpro_fri_id_slugable_scope_type', length: { slug: 70, sluggable_type: 50, scope: 70 }, unique: true
|
15
|
+
add_index :phcscriptcdnpro_friendly_id_slugs, :sluggable_type
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreatePhcscriptcdnproExtensionsVersions < ActiveRecord::Migration[5.1]
|
2
|
+
TEXT_BYTES = 1_073_741_823
|
3
|
+
def change
|
4
|
+
|
5
|
+
create_table :phcscriptcdnpro_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 :phcscriptcdnpro_extensions_versions, %i(item_type item_id), :name => 'scriptcdnpro_ext_versions'
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreatePhcscriptcdnproListingVersions < ActiveRecord::Migration[5.1]
|
2
|
+
TEXT_BYTES = 1_073_741_823
|
3
|
+
def change
|
4
|
+
|
5
|
+
create_table :phcscriptcdnpro_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 :phcscriptcdnpro_listing_versions, %i(item_type item_id), :name => 'scriptcdnpro_listing_versions'
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreatePhcscriptcdnproScriptversionVersions < ActiveRecord::Migration[5.1]
|
2
|
+
TEXT_BYTES = 1_073_741_823
|
3
|
+
def change
|
4
|
+
|
5
|
+
create_table :phcscriptcdnpro_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 :phcscriptcdnpro_address_versions, %i(item_type item_id), :name => 'scriptcdnpro_address_versions'
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreatePhcscriptcdnproUrlVersions < ActiveRecord::Migration[5.1]
|
2
|
+
TEXT_BYTES = 1_073_741_823
|
3
|
+
def change
|
4
|
+
|
5
|
+
create_table :phcscriptcdnpro_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 :phcscriptcdnpro_url_versions, %i(item_type item_id), :name => 'scriptcdnpro_url_versions'
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreatePhcscriptcdnproAuthorVersions < ActiveRecord::Migration[5.1]
|
2
|
+
TEXT_BYTES = 1_073_741_823
|
3
|
+
def change
|
4
|
+
|
5
|
+
create_table :phcscriptcdnpro_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 :phcscriptcdnpro_author_versions, %i(item_type item_id), :name => 'scriptcdnpro_author_versions'
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreatePhcscriptcdnproLicenceVersions < ActiveRecord::Migration[5.1]
|
2
|
+
TEXT_BYTES = 1_073_741_823
|
3
|
+
def change
|
4
|
+
|
5
|
+
create_table :phcscriptcdnpro_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 :phcscriptcdnpro_licence_versions, %i(item_type item_id), :name => 'scriptcdnpro_licence_versions'
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcscriptcdnpro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 15.0.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-
|
11
|
+
date: 2017-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -745,8 +745,12 @@ files:
|
|
745
745
|
- app/jobs/phcscriptcdnpro/application_job.rb
|
746
746
|
- app/mailers/phcscriptcdnpro/application_mailer.rb
|
747
747
|
- app/models/phcscriptcdnpro/application_record.rb
|
748
|
+
- app/models/phcscriptcdnpro/author_versions.rb
|
749
|
+
- app/models/phcscriptcdnpro/extension_versions.rb
|
748
750
|
- app/models/phcscriptcdnpro/frontend.rb
|
749
751
|
- app/models/phcscriptcdnpro/frontend/listing.rb
|
752
|
+
- app/models/phcscriptcdnpro/licence_versions.rb
|
753
|
+
- app/models/phcscriptcdnpro/listing_versions.rb
|
750
754
|
- app/models/phcscriptcdnpro/script.rb
|
751
755
|
- app/models/phcscriptcdnpro/script/author.rb
|
752
756
|
- app/models/phcscriptcdnpro/script/extension.rb
|
@@ -754,6 +758,8 @@ files:
|
|
754
758
|
- app/models/phcscriptcdnpro/script/listing.rb
|
755
759
|
- app/models/phcscriptcdnpro/script/url.rb
|
756
760
|
- app/models/phcscriptcdnpro/script/version.rb
|
761
|
+
- app/models/phcscriptcdnpro/scriptversion_versions.rb
|
762
|
+
- app/models/phcscriptcdnpro/url_versions.rb
|
757
763
|
- app/views/layouts/phcscriptcdnpro/application.html.erb
|
758
764
|
- app/views/layouts/phcscriptcdnpro/components/backend/footer/_footer.html.erb
|
759
765
|
- app/views/layouts/phcscriptcdnpro/components/backend/navigation/_top_bar.html.erb
|
@@ -793,6 +799,8 @@ files:
|
|
793
799
|
- app/views/phcscriptcdnpro/script/versions/new.html.erb
|
794
800
|
- app/views/phcscriptcdnpro/script/versions/show.html.erb
|
795
801
|
- config/initializers/friendly_id.rb
|
802
|
+
- config/initializers/locale.rb
|
803
|
+
- config/initializers/paper_trail.rb
|
796
804
|
- config/routes.rb
|
797
805
|
- db/migrate/20160821183652_create_phcscriptcdnpro_script_listings.rb
|
798
806
|
- db/migrate/20160821183714_create_phcscriptcdnpro_script_authors.rb
|
@@ -800,6 +808,13 @@ files:
|
|
800
808
|
- db/migrate/20160821183805_create_phcscriptcdnpro_script_licences.rb
|
801
809
|
- db/migrate/20160821183830_create_phcscriptcdnpro_script_urls.rb
|
802
810
|
- db/migrate/20160821183946_create_phcscriptcdnpro_script_versions.rb
|
811
|
+
- db/migrate/20170509002355_create_phcscriptcdnpro_friendly_id_slugs.rb
|
812
|
+
- db/migrate/20170517064030_create_phcscriptcdnpro_extensions_versions.rb
|
813
|
+
- db/migrate/20170517064049_create_phcscriptcdnpro_listings_versions.rb
|
814
|
+
- db/migrate/20170517064114_create_phcscriptcdnpro_scriptversion_versions.rb
|
815
|
+
- db/migrate/20170517064114_create_phcscriptcdnpro_url_versions.rb
|
816
|
+
- db/migrate/20170517064208_create_phcscriptcdnpro_author_versions.rb
|
817
|
+
- db/migrate/20170517064427_create_phcscriptcdnpro_licence_versions.rb
|
803
818
|
- lib/phcscriptcdnpro.rb
|
804
819
|
- lib/phcscriptcdnpro/engine.rb
|
805
820
|
- lib/phcscriptcdnpro/version.rb
|