phcscriptcdn 2.0.4 → 3.0.0.pre.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -3
  3. data/app/assets/javascripts/phcscriptcdn/script/licences.js +2 -0
  4. data/app/assets/stylesheets/phcscriptcdn/_custom.scss +9 -0
  5. data/app/assets/stylesheets/phcscriptcdn/application.scss +14 -15
  6. data/app/controllers/phcscriptcdn/script/authors_controller.rb +74 -0
  7. data/app/controllers/phcscriptcdn/script/extensions_controller.rb +65 -0
  8. data/app/controllers/phcscriptcdn/script/licences_controller.rb +65 -0
  9. data/app/controllers/phcscriptcdn/script/listings_controller.rb +65 -0
  10. data/app/controllers/phcscriptcdn/script/urls_controller.rb +75 -0
  11. data/app/controllers/phcscriptcdn/script/versions_controller.rb +65 -0
  12. data/app/helpers/phcscriptcdn/application_helper.rb +2 -2
  13. data/app/helpers/phcscriptcdn/script/licences_helper.rb +4 -0
  14. data/app/models/phcscriptcdn/script/author.rb +10 -0
  15. data/app/models/phcscriptcdn/script/extension.rb +4 -0
  16. data/app/models/phcscriptcdn/script/licence.rb +4 -0
  17. data/app/models/phcscriptcdn/script/listing.rb +13 -0
  18. data/app/models/phcscriptcdn/script/url.rb +10 -0
  19. data/app/models/phcscriptcdn/script/version.rb +5 -0
  20. data/app/models/phcscriptcdn/{scriptcdn.rb → script.rb} +2 -2
  21. data/app/views/layouts/phcscriptcdn/application.html.erb +3 -5
  22. data/app/views/phcscriptcdn/{scriptcdn → script}/authors/_form.html.erb +14 -12
  23. data/app/views/phcscriptcdn/script/authors/edit.html.erb +32 -0
  24. data/app/views/phcscriptcdn/script/authors/index.html.erb +55 -0
  25. data/app/views/phcscriptcdn/script/authors/new.html.erb +32 -0
  26. data/app/views/phcscriptcdn/script/authors/show.html.erb +4 -0
  27. data/app/views/phcscriptcdn/script/extensions/_form.html.erb +22 -0
  28. data/app/views/phcscriptcdn/script/extensions/edit.html.erb +32 -0
  29. data/app/views/phcscriptcdn/script/extensions/index.html.erb +49 -0
  30. data/app/views/phcscriptcdn/script/extensions/new.html.erb +32 -0
  31. data/app/views/phcscriptcdn/script/extensions/show.html.erb +4 -0
  32. data/app/views/phcscriptcdn/script/licences/_form.html.erb +42 -0
  33. data/app/views/phcscriptcdn/script/licences/edit.html.erb +32 -0
  34. data/app/views/phcscriptcdn/script/licences/index.html.erb +59 -0
  35. data/app/views/phcscriptcdn/script/licences/new.html.erb +32 -0
  36. data/app/views/phcscriptcdn/script/licences/show.html.erb +4 -0
  37. data/app/views/phcscriptcdn/{scriptcdn/informations → script/listings}/_form.html.erb +15 -10
  38. data/app/views/phcscriptcdn/script/listings/edit.html.erb +31 -0
  39. data/app/views/phcscriptcdn/script/listings/index.html.erb +54 -0
  40. data/app/views/phcscriptcdn/script/listings/new.html.erb +31 -0
  41. data/app/views/phcscriptcdn/script/listings/show.html.erb +27 -0
  42. data/app/views/phcscriptcdn/script/urls/_form.html.erb +12 -0
  43. data/app/views/phcscriptcdn/script/urls/edit.html.erb +32 -0
  44. data/app/views/phcscriptcdn/script/urls/index.html.erb +47 -0
  45. data/app/views/phcscriptcdn/script/urls/new.html.erb +32 -0
  46. data/app/views/phcscriptcdn/script/urls/show.html.erb +4 -0
  47. data/app/views/phcscriptcdn/script/versions/_form.html.erb +12 -0
  48. data/app/views/phcscriptcdn/script/versions/edit.html.erb +32 -0
  49. data/app/views/phcscriptcdn/script/versions/index.html.erb +47 -0
  50. data/app/views/phcscriptcdn/script/versions/new.html.erb +32 -0
  51. data/app/views/phcscriptcdn/script/versions/show.html.erb +4 -0
  52. data/config/routes.rb +13 -14
  53. data/db/migrate/20160731205205_create_phcscriptcdn_script_extensions.rb +15 -0
  54. data/db/migrate/20160731205917_create_phcscriptcdn_script_listings.rb +26 -0
  55. data/db/migrate/20160731205954_create_phcscriptcdn_script_versions.rb +13 -0
  56. data/db/migrate/20160731210626_create_phcscriptcdn_script_urls.rb +16 -0
  57. data/db/migrate/20160731210723_create_phcscriptcdn_script_authors.rb +20 -0
  58. data/db/migrate/20160801032225_create_phcscriptcdn_script_licences.rb +21 -0
  59. data/lib/phcscriptcdn/version.rb +1 -1
  60. metadata +172 -74
  61. data/app/controllers/phcscriptcdn/scriptcdn/authors_controller.rb +0 -69
  62. data/app/controllers/phcscriptcdn/scriptcdn/informations_controller.rb +0 -69
  63. data/app/controllers/phcscriptcdn/scriptcdn/mains_controller.rb +0 -62
  64. data/app/controllers/phcscriptcdn/scriptcdn/urls_controller.rb +0 -84
  65. data/app/controllers/phcscriptcdn/scriptcdn/versions_controller.rb +0 -69
  66. data/app/models/phcscriptcdn/scriptcdn/author.rb +0 -8
  67. data/app/models/phcscriptcdn/scriptcdn/information.rb +0 -8
  68. data/app/models/phcscriptcdn/scriptcdn/main.rb +0 -11
  69. data/app/models/phcscriptcdn/scriptcdn/url.rb +0 -8
  70. data/app/models/phcscriptcdn/scriptcdn/version.rb +0 -8
  71. data/app/views/phcscriptcdn/scriptcdn/authors/_formpatch.html.erb +0 -29
  72. data/app/views/phcscriptcdn/scriptcdn/authors/edit.html.erb +0 -3
  73. data/app/views/phcscriptcdn/scriptcdn/authors/index.html.erb +0 -23
  74. data/app/views/phcscriptcdn/scriptcdn/authors/new.html.erb +0 -3
  75. data/app/views/phcscriptcdn/scriptcdn/informations/_formpatch.html.erb +0 -49
  76. data/app/views/phcscriptcdn/scriptcdn/informations/edit.html.erb +0 -3
  77. data/app/views/phcscriptcdn/scriptcdn/informations/index.html.erb +0 -26
  78. data/app/views/phcscriptcdn/scriptcdn/informations/new.html.erb +0 -3
  79. data/app/views/phcscriptcdn/scriptcdn/informations/show.html.erb +0 -58
  80. data/app/views/phcscriptcdn/scriptcdn/mains/_form.html.erb +0 -13
  81. data/app/views/phcscriptcdn/scriptcdn/mains/edit.html.erb +0 -3
  82. data/app/views/phcscriptcdn/scriptcdn/mains/index.html.erb +0 -19
  83. data/app/views/phcscriptcdn/scriptcdn/mains/new.html.erb +0 -3
  84. data/app/views/phcscriptcdn/scriptcdn/urls/_form.html.erb +0 -17
  85. data/app/views/phcscriptcdn/scriptcdn/urls/_formpatch.html.erb +0 -17
  86. data/app/views/phcscriptcdn/scriptcdn/urls/edit.html.erb +0 -3
  87. data/app/views/phcscriptcdn/scriptcdn/urls/index.html.erb +0 -21
  88. data/app/views/phcscriptcdn/scriptcdn/urls/new.html.erb +0 -3
  89. data/app/views/phcscriptcdn/scriptcdn/versions/_form.html.erb +0 -13
  90. data/app/views/phcscriptcdn/scriptcdn/versions/_formpatch.html.erb +0 -13
  91. data/app/views/phcscriptcdn/scriptcdn/versions/edit.html.erb +0 -3
  92. data/app/views/phcscriptcdn/scriptcdn/versions/index.html.erb +0 -20
  93. data/app/views/phcscriptcdn/scriptcdn/versions/new.html.erb +0 -3
  94. data/db/migrate/20160704004828_create_phcscriptcdn_scriptcdn_authors.rb +0 -20
  95. data/db/migrate/20160704005455_create_phcscriptcdn_scriptcdn_information.rb +0 -27
  96. data/db/migrate/20160704011123_create_phcscriptcdn_scriptcdn_urls.rb +0 -19
  97. data/db/migrate/20160704011452_create_phcscriptcdn_scriptcdn_versions.rb +0 -15
  98. data/db/migrate/20160704011727_create_phcscriptcdn_scriptcdn_mains.rb +0 -11
@@ -0,0 +1,32 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Script URL Manager" %>
3
+ <% phc_title_tagline "Update Script URL Information" %>
4
+
5
+ <!-- Page Header -->
6
+ <div class="row">
7
+ <div class="col-lg-12">
8
+
9
+ <!-- Bread Crumbs -->
10
+ <ol class="breadcrumb">
11
+ <li><%= link_to "Script Listings Index", script_listings_path %></li>
12
+ <li><%= link_to "URL Index", script_urls_path %></li>
13
+ <li class="active"><%= yield(:phc_title_tagline) %></li>
14
+ </ol>
15
+
16
+ <!-- Page Title -->
17
+ <h3 class="page-title">
18
+ <%= yield(:phc_title) %> </br>
19
+ <small><%= yield(:phc_title_tagline) %></small>
20
+ </h3>
21
+
22
+ </div>
23
+ </div>
24
+
25
+ <!-- Main Content -->
26
+ <div class="row">
27
+ <div class="col-lg-12">
28
+
29
+ <%= render 'form', { form_url: script_listing_url_path } %>
30
+
31
+ </div>
32
+ </div>
@@ -0,0 +1,47 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Script URL Manager" %>
3
+ <% phc_title_tagline "Script URL Index" %>
4
+
5
+ <!-- Page Header -->
6
+ <div class="row">
7
+ <div class="col-lg-12">
8
+
9
+ <!-- Bread Crumbs -->
10
+ <ol class="breadcrumb">
11
+ <li><%= link_to "Script Listings Index", script_listing_urls_path %></li>
12
+ <li class="active"><%= yield(:phc_title_tagline) %></li>
13
+ </ol>
14
+
15
+ <!-- Page Title -->
16
+ <h3 class="page-title">
17
+ <%= yield(:phc_title) %> </br>
18
+ <small><%= yield(:phc_title_tagline) %></small>
19
+ </h3>
20
+
21
+ </div>
22
+ </div>
23
+
24
+ <!-- Main Content -->
25
+ <div class="row">
26
+ <div class="col-lg-12">
27
+
28
+ <table class="table table-striped table-bordered table-advance table-hover">
29
+ <thead>
30
+ <tr>
31
+ <th>Script URL</th>
32
+ </tr>
33
+ </thead>
34
+
35
+ <tbody>
36
+ <% @script_urls.each do |script_url| %>
37
+ <tr>
38
+ <td><%= link_to script_url.scripturl, script_listing_url_path(script_url.listing, script_url) %></td>
39
+ </tr>
40
+ <% end %>
41
+ </tbody>
42
+ </table>
43
+
44
+ <%= link_to 'New Script Url', new_script_listing_url_path, class: "btn btn-primary" %>
45
+
46
+ </div>
47
+ </div>
@@ -0,0 +1,32 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Script URL Manager" %>
3
+ <% phc_title_tagline "Create a New Script URL" %>
4
+
5
+ <!-- Page Header -->
6
+ <div class="row">
7
+ <div class="col-lg-12">
8
+
9
+ <!-- Bread Crumbs -->
10
+ <ol class="breadcrumb">
11
+ <li><%= link_to "Script Listings Index", script_listings_path %></li>
12
+ <li><%= link_to "URL Index", script_listing_urls_path %></li>
13
+ <li class="active"><%= yield(:phc_title_tagline) %></li>
14
+ </ol>
15
+
16
+ <!-- Page Title -->
17
+ <h3 class="page-title">
18
+ <%= yield(:phc_title) %> </br>
19
+ <small><%= yield(:phc_title_tagline) %></small>
20
+ </h3>
21
+
22
+ </div>
23
+ </div>
24
+
25
+ <!-- Main Content -->
26
+ <div class="row">
27
+ <div class="col-lg-12">
28
+
29
+ <%= render 'form', { form_url: script_listing_urls_path } %>
30
+
31
+ </div>
32
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="btn-group" role="group" aria-label="url_button_group">
2
+ <%= link_to 'Edit', edit_script_url_path(@script_url), class: "btn btn-primary" %>
3
+ <%= link_to 'Destroy', script_url_path(@script_url), method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-primary" %>
4
+ </div>
@@ -0,0 +1,12 @@
1
+ <%= form_for(script_version) do |f| %>
2
+
3
+ <div class="form-group field_with_error">
4
+ <%= f.label :scriptversion, "Version Number" %>
5
+ <%= f.text_field :scriptversion, placeholder: "Version Number", class: "form-control" %>
6
+ </div>
7
+
8
+ <div class="actions">
9
+ <%= f.submit class: "btn btn-primary" %>
10
+ </div>
11
+
12
+ <% end %>
@@ -0,0 +1,32 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Script Version" %>
3
+ <% phc_title_tagline "Update Script Version Information" %>
4
+
5
+ <!-- Page Header -->
6
+ <div class="row">
7
+ <div class="col-lg-12">
8
+
9
+ <!-- Bread Crumbs -->
10
+ <ol class="breadcrumb">
11
+ <li><%= link_to "Script Listings Index", script_listings_path %></li>
12
+ <li><%= link_to "Versions Index", script_versions_path %></li>
13
+ <li class="active"><%= yield(:phc_title_tagline) %></li>
14
+ </ol>
15
+
16
+ <!-- Page Title -->
17
+ <h3 class="page-title">
18
+ <%= yield(:phc_title) %> </br>
19
+ <small><%= yield(:phc_title_tagline) %></small>
20
+ </h3>
21
+
22
+ </div>
23
+ </div>
24
+
25
+ <!-- Main Content -->
26
+ <div class="row">
27
+ <div class="col-lg-12">
28
+
29
+ <%= render 'form', script_version: @script_version %>
30
+
31
+ </div>
32
+ </div>
@@ -0,0 +1,47 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Script Version" %>
3
+ <% phc_title_tagline "Script Version Index" %>
4
+
5
+ <!-- Page Header -->
6
+ <div class="row">
7
+ <div class="col-lg-12">
8
+
9
+ <!-- Bread Crumbs -->
10
+ <ol class="breadcrumb">
11
+ <li><%= link_to "Script Listings Index", script_listings_path %></li>
12
+ <li class="active"><%= yield(:phc_title_tagline) %></li>
13
+ </ol>
14
+
15
+ <!-- Page Title -->
16
+ <h3 class="page-title">
17
+ <%= yield(:phc_title) %> </br>
18
+ <small><%= yield(:phc_title_tagline) %></small>
19
+ </h3>
20
+
21
+ </div>
22
+ </div>
23
+
24
+ <!-- Main Content -->
25
+ <div class="row">
26
+ <div class="col-lg-12">
27
+
28
+ <table class="table table-striped table-bordered table-advance table-hover">
29
+ <thead>
30
+ <tr>
31
+ <th>Script Version</th>
32
+ </tr>
33
+ </thead>
34
+
35
+ <tbody>
36
+ <% @script_versions.each do |script_version| %>
37
+ <tr>
38
+ <td><%= link_to script_version.scriptversion, script_version %></td>
39
+ </tr>
40
+ <% end %>
41
+ </tbody>
42
+ </table>
43
+
44
+ <%= link_to 'New Script Version', new_script_version_path, class: "btn btn-primary" %>
45
+
46
+ </div>
47
+ </div>
@@ -0,0 +1,32 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Script Version" %>
3
+ <% phc_title_tagline "Add a Script Version Number" %>
4
+
5
+ <!-- Page Header -->
6
+ <div class="row">
7
+ <div class="col-lg-12">
8
+
9
+ <!-- Bread Crumbs -->
10
+ <ol class="breadcrumb">
11
+ <li><%= link_to "Script Listings Index", script_listings_path %></li>
12
+ <li><%= link_to "Versions Index", script_versions_path %></li>
13
+ <li class="active"><%= yield(:phc_title_tagline) %></li>
14
+ </ol>
15
+
16
+ <!-- Page Title -->
17
+ <h3 class="page-title">
18
+ <%= yield(:phc_title) %> </br>
19
+ <small><%= yield(:phc_title_tagline) %></small>
20
+ </h3>
21
+
22
+ </div>
23
+ </div>
24
+
25
+ <!-- Main Content -->
26
+ <div class="row">
27
+ <div class="col-lg-12">
28
+
29
+ <%= render 'form', script_version: @script_version %>
30
+
31
+ </div>
32
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="btn-group" role="group" aria-label="version_button_group">
2
+ <%= link_to 'Edit', edit_script_version_path(@script_version), class: "btn btn-primary" %>
3
+ <%= link_to 'Destroy', script_version_path(@script_version), method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-primary" %>
4
+ </div>
data/config/routes.rb CHANGED
@@ -2,33 +2,32 @@ Phcscriptcdn::Engine.routes.draw do
2
2
 
3
3
  # CDN Frontend
4
4
  namespace :frontend do
5
-
6
5
  # Frontend Routes
7
6
  resources :cdnpages
8
-
9
7
  end
10
8
 
11
9
  # Script CDN Listing System
12
- namespace :scriptcdn do
13
-
10
+ namespace :script do
14
11
  # Main Script Module
15
- resources :mains do
16
- resources :authors
17
- resources :urls
18
- resources :versions
19
- resources :informations
12
+ resources :listings, class_name: 'Phcscriptcdn::Script::Listing' do
13
+ resources :urls, class_name: 'Phcscriptcdn::Script::Url'
14
+ resources :authors, class_name: 'Phcscriptcdn::Script::Author'
20
15
  end
21
-
16
+ resources :extensions, class_name: 'Phcscriptcdn::Script::Extension'
17
+ resources :versions, class_name: 'Phcscriptcdn::Script::Version'
18
+ resources :licences, class_name: 'Phcscriptcdn::Script::Licence'
22
19
  end
23
20
 
24
21
  # Application API
25
22
  namespace :api, :path => "", :constraints => {:subdomain => "api"} do
23
+ namespace :v1 do
26
24
 
27
- # Routes for API
28
- resources :mains, defaults: {format: 'json'}
29
- resources :informations, defaults: {format: 'json'}
30
- resources :versions, defaults: {format: 'json'}
25
+ # Routes for API
26
+ resources :mains, defaults: {format: 'json'}
27
+ resources :informations, defaults: {format: 'json'}
28
+ resources :versions, defaults: {format: 'json'}
31
29
 
30
+ end
32
31
  end
33
32
 
34
33
  end
@@ -0,0 +1,15 @@
1
+ class CreatePhcscriptcdnScriptExtensions < ActiveRecord::Migration[5.0]
2
+ def change
3
+
4
+ create_table :phcscriptcdn_script_extensions do |t|
5
+
6
+ t.string :scriptextensionname
7
+ t.text :scriptextensiondes
8
+ t.string :scriptextension
9
+
10
+ t.timestamps
11
+
12
+ end
13
+
14
+ end
15
+ end
@@ -0,0 +1,26 @@
1
+ class CreatePhcscriptcdnScriptListings < ActiveRecord::Migration[5.0]
2
+ def change
3
+
4
+ create_table :phcscriptcdn_script_listings do |t|
5
+
6
+ t.string :scripttitle
7
+ t.text :scriptdescription
8
+
9
+ t.string :scriptwebsite
10
+ t.string :scripttwitter
11
+ t.string :scriptgithub
12
+
13
+
14
+ t.date :scriptinitialrelease
15
+ t.date :scriptlastestrelease
16
+ t.date :scriptbetarelease
17
+ t.date :scriptlastestreleasecdn
18
+
19
+ t.string :scriptstatus
20
+
21
+ t.timestamps
22
+
23
+ end
24
+
25
+ end
26
+ end
@@ -0,0 +1,13 @@
1
+ class CreatePhcscriptcdnScriptVersions < ActiveRecord::Migration[5.0]
2
+ def change
3
+
4
+ create_table :phcscriptcdn_script_versions do |t|
5
+
6
+ t.string :scriptversion
7
+
8
+ t.timestamps
9
+
10
+ end
11
+
12
+ end
13
+ end
@@ -0,0 +1,16 @@
1
+ class CreatePhcscriptcdnScriptUrls < ActiveRecord::Migration[5.0]
2
+ def change
3
+
4
+ create_table :phcscriptcdn_script_urls do |t|
5
+
6
+ t.string :scripturl
7
+
8
+ t.references :listing
9
+
10
+ t.timestamps
11
+
12
+
13
+ end
14
+
15
+ end
16
+ end
@@ -0,0 +1,20 @@
1
+ class CreatePhcscriptcdnScriptAuthors < ActiveRecord::Migration[5.0]
2
+ def change
3
+
4
+ create_table :phcscriptcdn_script_authors do |t|
5
+
6
+ t.string :authorfirstname
7
+ t.string :authorlastname
8
+
9
+ t.string :authorwebsite
10
+ t.string :authorgithub
11
+ t.string :authortwitter
12
+
13
+ t.references :listing
14
+
15
+ t.timestamps
16
+
17
+ end
18
+
19
+ end
20
+ end
@@ -0,0 +1,21 @@
1
+ class CreatePhcscriptcdnScriptLicences < ActiveRecord::Migration[5.0]
2
+ def change
3
+
4
+ create_table :phcscriptcdn_script_licences do |t|
5
+
6
+ t.string :lcncname
7
+ t.string :lcncdescript
8
+
9
+ t.string :lcnccomgpl
10
+ t.string :lcncarvlfsf
11
+ t.string :lcncarvlosi
12
+ t.string :lcncarvlcopyfree
13
+ t.string :lcncarvldebian
14
+ t.string :lcncarvlfedora
15
+
16
+ t.timestamps
17
+
18
+ end
19
+
20
+ end
21
+ end
@@ -1,3 +1,3 @@
1
1
  module Phcscriptcdn
2
- VERSION = "2.0.4"
2
+ VERSION = "3.0.0-beta"
3
3
  end