phcscriptcdn 7.0.0 → 7.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -20
  3. data/README.md +43 -43
  4. data/Rakefile +33 -33
  5. data/app/assets/config/phcscriptcdn_manifest.js +2 -2
  6. data/app/assets/javascripts/phcscriptcdn/application.js +2 -2
  7. data/app/assets/stylesheets/phcscriptcdn/application.scss +2 -2
  8. data/app/controllers/phcscriptcdn/application_controller.rb +12 -12
  9. data/app/controllers/phcscriptcdn/script/authors_controller.rb +65 -65
  10. data/app/controllers/phcscriptcdn/script/extensions_controller.rb +65 -65
  11. data/app/controllers/phcscriptcdn/script/licences_controller.rb +65 -65
  12. data/app/controllers/phcscriptcdn/script/listings_controller.rb +65 -65
  13. data/app/controllers/phcscriptcdn/script/urls_controller.rb +74 -74
  14. data/app/controllers/phcscriptcdn/script/versions_controller.rb +65 -65
  15. data/app/helpers/phcscriptcdn/application_helper.rb +14 -14
  16. data/app/jobs/phcscriptcdn/application_job.rb +4 -4
  17. data/app/models/phcscriptcdn/application_record.rb +4 -4
  18. data/app/models/phcscriptcdn/script.rb +6 -6
  19. data/app/models/phcscriptcdn/script/author.rb +20 -20
  20. data/app/models/phcscriptcdn/script/extension.rb +24 -24
  21. data/app/models/phcscriptcdn/script/licence.rb +23 -23
  22. data/app/models/phcscriptcdn/script/listing.rb +32 -32
  23. data/app/models/phcscriptcdn/script/url.rb +26 -26
  24. data/app/models/phcscriptcdn/script/version.rb +20 -20
  25. data/app/views/layouts/phcscriptcdn/application.html.erb +56 -56
  26. data/app/views/layouts/phcscriptcdn/components/backend/footer/_footer.html.erb +4 -4
  27. data/app/views/layouts/phcscriptcdn/components/backend/navigation/_navigation.html.erb +56 -56
  28. data/app/views/layouts/phcscriptcdn/components/backend/topbar/_topbar.html.erb +5 -5
  29. data/app/views/layouts/phcscriptcdn/components/backend/topbar/_topbar_links.html.erb +0 -0
  30. data/app/views/layouts/phcscriptcdn/frontend.html.erb +22 -22
  31. data/app/views/phcscriptcdn/script/authors/_form.html.erb +36 -36
  32. data/app/views/phcscriptcdn/script/authors/edit.html.erb +39 -39
  33. data/app/views/phcscriptcdn/script/authors/index.html.erb +67 -67
  34. data/app/views/phcscriptcdn/script/authors/new.html.erb +39 -39
  35. data/app/views/phcscriptcdn/script/authors/show.html.erb +42 -42
  36. data/app/views/phcscriptcdn/script/extensions/_form.html.erb +28 -28
  37. data/app/views/phcscriptcdn/script/extensions/edit.html.erb +39 -39
  38. data/app/views/phcscriptcdn/script/extensions/index.html.erb +61 -61
  39. data/app/views/phcscriptcdn/script/extensions/new.html.erb +38 -38
  40. data/app/views/phcscriptcdn/script/extensions/show.html.erb +42 -42
  41. data/app/views/phcscriptcdn/script/licences/_form.html.erb +47 -47
  42. data/app/views/phcscriptcdn/script/licences/edit.html.erb +39 -39
  43. data/app/views/phcscriptcdn/script/licences/index.html.erb +71 -71
  44. data/app/views/phcscriptcdn/script/licences/new.html.erb +39 -39
  45. data/app/views/phcscriptcdn/script/licences/show.html.erb +42 -42
  46. data/app/views/phcscriptcdn/script/listings/_form.html.erb +68 -68
  47. data/app/views/phcscriptcdn/script/listings/edit.html.erb +39 -39
  48. data/app/views/phcscriptcdn/script/listings/index.html.erb +65 -65
  49. data/app/views/phcscriptcdn/script/listings/new.html.erb +39 -39
  50. data/app/views/phcscriptcdn/script/listings/show.html.erb +40 -40
  51. data/app/views/phcscriptcdn/script/urls/_form.html.erb +36 -36
  52. data/app/views/phcscriptcdn/script/urls/edit.html.erb +39 -39
  53. data/app/views/phcscriptcdn/script/urls/index.html.erb +63 -63
  54. data/app/views/phcscriptcdn/script/urls/new.html.erb +39 -39
  55. data/app/views/phcscriptcdn/script/urls/show.html.erb +41 -41
  56. data/app/views/phcscriptcdn/script/versions/_form.html.erb +20 -20
  57. data/app/views/phcscriptcdn/script/versions/edit.html.erb +39 -39
  58. data/app/views/phcscriptcdn/script/versions/index.html.erb +59 -59
  59. data/app/views/phcscriptcdn/script/versions/new.html.erb +39 -39
  60. data/app/views/phcscriptcdn/script/versions/show.html.erb +42 -42
  61. data/config/initializers/friendly_id.rb +92 -92
  62. data/config/routes.rb +30 -30
  63. data/db/migrate/20160731205205_create_phcscriptcdn_script_extensions.rb +20 -20
  64. data/db/migrate/20160731205917_create_phcscriptcdn_script_listings.rb +35 -35
  65. data/db/migrate/20160731205954_create_phcscriptcdn_script_versions.rb +18 -18
  66. data/db/migrate/20160731210626_create_phcscriptcdn_script_urls.rb +24 -24
  67. data/db/migrate/20160731210723_create_phcscriptcdn_script_authors.rb +23 -23
  68. data/db/migrate/20160801032225_create_phcscriptcdn_script_licences.rb +27 -27
  69. data/db/migrate/20170423022446_create_friendly_id_slugs.rb +15 -15
  70. data/lib/phcscriptcdn.rb +4 -4
  71. data/lib/phcscriptcdn/engine.rb +68 -68
  72. data/lib/phcscriptcdn/version.rb +3 -3
  73. data/lib/tasks/phcscriptcdn_tasks.rake +4 -4
  74. metadata +47 -5
@@ -1,14 +1,14 @@
1
- module Phcscriptcdn
2
- module ApplicationHelper
3
-
4
- # Add Active to Menu
5
- def is_active_controller(controller_name)
6
- params[:controller] == controller_name ? "active open selected" : nil
7
- end
8
-
9
- def is_active_action(action_name)
10
- params[:action] == action_name ? "active" : nil
11
- end
12
-
13
- end
14
- end
1
+ module Phcscriptcdn
2
+ module ApplicationHelper
3
+
4
+ # Add Active to Menu
5
+ def is_active_controller(controller_name)
6
+ params[:controller] == controller_name ? "active open selected" : nil
7
+ end
8
+
9
+ def is_active_action(action_name)
10
+ params[:action] == action_name ? "active" : nil
11
+ end
12
+
13
+ end
14
+ end
@@ -1,4 +1,4 @@
1
- module Phcscriptcdn
2
- class ApplicationJob < ActiveJob::Base
3
- end
4
- end
1
+ module Phcscriptcdn
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -1,5 +1,5 @@
1
- module Phcscriptcdn
2
- class ApplicationRecord < ActiveRecord::Base
3
- self.abstract_class = true
4
- end
1
+ module Phcscriptcdn
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
5
  end
@@ -1,7 +1,7 @@
1
- module Phcscriptcdn
2
- module Script
3
- def self.table_name_prefix
4
- 'phcscriptcdn_script_'
5
- end
6
- end
1
+ module Phcscriptcdn
2
+ module Script
3
+ def self.table_name_prefix
4
+ 'phcscriptcdn_script_'
5
+ end
6
+ end
7
7
  end
@@ -1,21 +1,21 @@
1
- module Phcscriptcdn
2
- class Script::Author < ApplicationRecord
3
-
4
- # Clean URLS
5
- extend FriendlyId
6
-
7
- # Listing (None Nested)
8
- has_many :listings, class_name: 'Phcscriptcdn::Script::Listing'
9
-
10
- # Validation for Form Fields
11
- validates :authorfirstname,
12
- presence: true
13
-
14
- validates :authorlastname,
15
- presence: true
16
-
17
- # Clean URLS Slugs
18
- friendly_id :authorfirstname, use: :slugged
19
-
20
- end
1
+ module Phcscriptcdn
2
+ class Script::Author < ApplicationRecord
3
+
4
+ # Clean URLS
5
+ extend FriendlyId
6
+
7
+ # Listing (None Nested)
8
+ has_many :listings, class_name: 'Phcscriptcdn::Script::Listing'
9
+
10
+ # Validation for Form Fields
11
+ validates :authorfirstname,
12
+ presence: true
13
+
14
+ validates :authorlastname,
15
+ presence: true
16
+
17
+ # Clean URLS Slugs
18
+ friendly_id :authorfirstname, use: :slugged
19
+
20
+ end
21
21
  end
@@ -1,25 +1,25 @@
1
- module Phcscriptcdn
2
- class Script::Extension < ApplicationRecord
3
-
4
- # Clean URLS
5
- extend FriendlyId
6
-
7
- # URLs & Extensions (None Nested)
8
- has_many :listings, class_name: 'Phcscriptcdn::Script::Listing', :through => :urls
9
- has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
10
-
11
- # Validation for Form Fields
12
- validates :scriptextensionname,
13
- presence: true
14
-
15
- validates :scriptextensiondes,
16
- presence: true
17
-
18
- validates :scriptextension,
19
- presence: true
20
-
21
- # Clean URLS Slugs
22
- friendly_id :scriptextensionname, use: :slugged
23
-
24
- end
1
+ module Phcscriptcdn
2
+ class Script::Extension < ApplicationRecord
3
+
4
+ # Clean URLS
5
+ extend FriendlyId
6
+
7
+ # URLs & Extensions (None Nested)
8
+ has_many :listings, class_name: 'Phcscriptcdn::Script::Listing', :through => :urls
9
+ has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
10
+
11
+ # Validation for Form Fields
12
+ validates :scriptextensionname,
13
+ presence: true
14
+
15
+ validates :scriptextensiondes,
16
+ presence: true
17
+
18
+ validates :scriptextension,
19
+ presence: true
20
+
21
+ # Clean URLS Slugs
22
+ friendly_id :scriptextensionname, use: :slugged
23
+
24
+ end
25
25
  end
@@ -1,24 +1,24 @@
1
- module Phcscriptcdn
2
- class Script::Licence < ApplicationRecord
3
-
4
- # Clean URLS
5
- extend FriendlyId
6
-
7
- # Listing (None Nested)
8
- has_many :listings, class_name: 'Phcscriptcdn::Script::Listing'
9
-
10
- # Validation for Form Fields
11
- validates :lcncname,
12
- presence: true
13
-
14
- validates :lcncdescript,
15
- presence: true
16
-
17
- validates :lcncdescription,
18
- presence: true
19
-
20
- # Clean URLS Slugs
21
- friendly_id :lcncname, use: :slugged
22
-
23
- end
1
+ module Phcscriptcdn
2
+ class Script::Licence < ApplicationRecord
3
+
4
+ # Clean URLS
5
+ extend FriendlyId
6
+
7
+ # Listing (None Nested)
8
+ has_many :listings, class_name: 'Phcscriptcdn::Script::Listing'
9
+
10
+ # Validation for Form Fields
11
+ validates :lcncname,
12
+ presence: true
13
+
14
+ validates :lcncdescript,
15
+ presence: true
16
+
17
+ validates :lcncdescription,
18
+ presence: true
19
+
20
+ # Clean URLS Slugs
21
+ friendly_id :lcncname, use: :slugged
22
+
23
+ end
24
24
  end
@@ -1,33 +1,33 @@
1
- module Phcscriptcdn
2
- class Script::Listing < ApplicationRecord
3
-
4
- # Clean URLS
5
- extend FriendlyId
6
-
7
- # Attach to URL (Nested)
8
- has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
9
-
10
- # Attach to Author (None Nested)
11
- belongs_to :author, class_name: 'Phcscriptcdn::Script::Author'
12
-
13
- # Attach to Version (None Nested)
14
- belongs_to :version, class_name: 'Phcscriptcdn::Script::Version'
15
-
16
- # Attach to Licence (None Nested)
17
- belongs_to :licence, class_name: 'Phcscriptcdn::Script::Licence'
18
-
19
- # Validation for Form Fields
20
- validates :scripttitle,
21
- presence: true
22
-
23
- validates :scriptdescription,
24
- presence: true
25
-
26
- validates :scriptstatus,
27
- presence: true
28
-
29
- # Clean URLS Slugs
30
- friendly_id :scripttitle, use: :slugged
31
-
32
- end
1
+ module Phcscriptcdn
2
+ class Script::Listing < ApplicationRecord
3
+
4
+ # Clean URLS
5
+ extend FriendlyId
6
+
7
+ # Attach to URL (Nested)
8
+ has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
9
+
10
+ # Attach to Author (None Nested)
11
+ belongs_to :author, class_name: 'Phcscriptcdn::Script::Author'
12
+
13
+ # Attach to Version (None Nested)
14
+ belongs_to :version, class_name: 'Phcscriptcdn::Script::Version'
15
+
16
+ # Attach to Licence (None Nested)
17
+ belongs_to :licence, class_name: 'Phcscriptcdn::Script::Licence'
18
+
19
+ # Validation for Form Fields
20
+ validates :scripttitle,
21
+ presence: true
22
+
23
+ validates :scriptdescription,
24
+ presence: true
25
+
26
+ validates :scriptstatus,
27
+ presence: true
28
+
29
+ # Clean URLS Slugs
30
+ friendly_id :scripttitle, use: :slugged
31
+
32
+ end
33
33
  end
@@ -1,27 +1,27 @@
1
- module Phcscriptcdn
2
- class Script::Url < ApplicationRecord
3
-
4
- # Clean URLS
5
- extend FriendlyId
6
-
7
- # Attach to Listings (Nested)
8
- belongs_to :listing, class_name: 'Phcscriptcdn::Script::Listing'
9
-
10
- # Attach to Version (None Nested)
11
- belongs_to :version, class_name: 'Phcscriptcdn::Script::Version'
12
-
13
- # Attach to Extension (None Nested)
14
- belongs_to :extension, class_name: 'Phcscriptcdn::Script::Extension'
15
-
16
- # Validation for Form Fields
17
- validates :scripturl,
18
- presence: true
19
-
20
- validates :scripturlrelease,
21
- presence: true
22
-
23
- validates :scripturlcdnupdate,
24
- presence: true
25
-
26
- end
1
+ module Phcscriptcdn
2
+ class Script::Url < ApplicationRecord
3
+
4
+ # Clean URLS
5
+ extend FriendlyId
6
+
7
+ # Attach to Listings (Nested)
8
+ belongs_to :listing, class_name: 'Phcscriptcdn::Script::Listing'
9
+
10
+ # Attach to Version (None Nested)
11
+ belongs_to :version, class_name: 'Phcscriptcdn::Script::Version'
12
+
13
+ # Attach to Extension (None Nested)
14
+ belongs_to :extension, class_name: 'Phcscriptcdn::Script::Extension'
15
+
16
+ # Validation for Form Fields
17
+ validates :scripturl,
18
+ presence: true
19
+
20
+ validates :scripturlrelease,
21
+ presence: true
22
+
23
+ validates :scripturlcdnupdate,
24
+ presence: true
25
+
26
+ end
27
27
  end
@@ -1,21 +1,21 @@
1
- module Phcscriptcdn
2
- class Script::Version < ApplicationRecord
3
-
4
- # Clean URLS
5
- extend FriendlyId
6
-
7
- # Attach to Listing (None Nested)
8
- has_many :listings, class_name: 'Phcscriptcdn::Script::Listing'
9
-
10
- # Attach to URL (None Nested)
11
- has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
12
-
13
- # Validation for Form Fields
14
- validates :scriptversion,
15
- presence: true
16
-
17
- # Clean URLS Slugs
18
- friendly_id :scriptversion, use: :slugged
19
-
20
- end
1
+ module Phcscriptcdn
2
+ class Script::Version < ApplicationRecord
3
+
4
+ # Clean URLS
5
+ extend FriendlyId
6
+
7
+ # Attach to Listing (None Nested)
8
+ has_many :listings, class_name: 'Phcscriptcdn::Script::Listing'
9
+
10
+ # Attach to URL (None Nested)
11
+ has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
12
+
13
+ # Validation for Form Fields
14
+ validates :scriptversion,
15
+ presence: true
16
+
17
+ # Clean URLS Slugs
18
+ friendly_id :scriptversion, use: :slugged
19
+
20
+ end
21
21
  end
@@ -1,56 +1,56 @@
1
- <!DOCTYPE html>
2
- <html>
3
-
4
- <head>
5
-
6
- <title>PHCMembers - Membership Manager</title>
7
-
8
- <%= stylesheet_link_tag "phcscriptcdn/application", media: "all" %>
9
- <%= javascript_include_tag "phcscriptcdn/application" %>
10
- <%= csrf_meta_tags %>
11
-
12
- </head>
13
-
14
- <body class="hold-transition skin-blue sidebar-mini">
15
-
16
- <div class="wrapper">
17
- <div class="main_container">
18
-
19
- <header class="main-header">
20
-
21
- <!-- Logo with Link -->
22
- <%= link_to phcmembers.member_profiles_path, class: "logo" do %>
23
- <span class="logo-mini">PHC</span>
24
- <span class="logo-lg"><b>PHC</b>ScriptCDN</span>
25
- <% end %>
26
- <!-- Logo with Link -->
27
-
28
- <!-- Top Navbar -->
29
- <nav class="navbar navbar-static-top">
30
- <%= render 'layouts/phcscriptcdn/components/backend/topbar/topbar' %>
31
- </nav>
32
- <!-- Top Navbar -->
33
-
34
- </header>
35
-
36
- <aside class="main-sidebar">
37
- <%= render 'layouts/phcscriptcdn/components/backend/navigation/navigation' %>
38
- </aside>
39
-
40
- <!-- Page Content -->
41
- <div class="content-wrapper">
42
- <%= yield %>
43
- </div>
44
- <!-- Page Content -->
45
-
46
- </div>
47
- </div>
48
-
49
- <!-- Footer -->
50
- <footer class="main-footer">
51
- <%= render 'layouts/phcscriptcdn/components/backend/footer/footer' %>
52
- </footer>
53
- <!-- Footer -->
54
-
55
- </body>
56
- </html>
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+
6
+ <title>PHCMembers - Membership Manager</title>
7
+
8
+ <%= stylesheet_link_tag "phcscriptcdn/application", media: "all" %>
9
+ <%= javascript_include_tag "phcscriptcdn/application" %>
10
+ <%= csrf_meta_tags %>
11
+
12
+ </head>
13
+
14
+ <body class="hold-transition skin-blue sidebar-mini">
15
+
16
+ <div class="wrapper">
17
+ <div class="main_container">
18
+
19
+ <header class="main-header">
20
+
21
+ <!-- Logo with Link -->
22
+ <%= link_to phcmembers.member_profiles_path, class: "logo" do %>
23
+ <span class="logo-mini">PHC</span>
24
+ <span class="logo-lg"><b>PHC</b>ScriptCDN</span>
25
+ <% end %>
26
+ <!-- Logo with Link -->
27
+
28
+ <!-- Top Navbar -->
29
+ <nav class="navbar navbar-static-top">
30
+ <%= render 'layouts/phcscriptcdn/components/backend/topbar/topbar' %>
31
+ </nav>
32
+ <!-- Top Navbar -->
33
+
34
+ </header>
35
+
36
+ <aside class="main-sidebar">
37
+ <%= render 'layouts/phcscriptcdn/components/backend/navigation/navigation' %>
38
+ </aside>
39
+
40
+ <!-- Page Content -->
41
+ <div class="content-wrapper">
42
+ <%= yield %>
43
+ </div>
44
+ <!-- Page Content -->
45
+
46
+ </div>
47
+ </div>
48
+
49
+ <!-- Footer -->
50
+ <footer class="main-footer">
51
+ <%= render 'layouts/phcscriptcdn/components/backend/footer/footer' %>
52
+ </footer>
53
+ <!-- Footer -->
54
+
55
+ </body>
56
+ </html>