phcscriptcdn 48.0.0 → 49.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -2
  3. data/app/assets/javascripts/phcscriptcdn/application.js +2 -2
  4. data/app/assets/stylesheets/phcscriptcdn/application.scss +2 -2
  5. data/app/controllers/phcscriptcdn/application_controller.rb +20 -10
  6. data/app/controllers/phcscriptcdn/script/authors_controller.rb +19 -8
  7. data/app/controllers/phcscriptcdn/script/extensions_controller.rb +17 -6
  8. data/app/controllers/phcscriptcdn/script/licences_controller.rb +16 -5
  9. data/app/controllers/phcscriptcdn/script/listings_controller.rb +15 -6
  10. data/app/controllers/phcscriptcdn/script/urls_controller.rb +13 -4
  11. data/app/controllers/phcscriptcdn/script/versions_controller.rb +15 -4
  12. data/app/helpers/phcscriptcdn/application_helper.rb +0 -10
  13. data/app/helpers/phcscriptcdn/script/authors_helper.rb +4 -0
  14. data/app/helpers/phcscriptcdn/script/extensions_helper.rb +4 -0
  15. data/app/helpers/phcscriptcdn/script/licences_helper.rb +4 -0
  16. data/app/helpers/phcscriptcdn/script/listings_helper.rb +4 -0
  17. data/app/helpers/phcscriptcdn/script/urls_helper.rb +4 -0
  18. data/app/helpers/phcscriptcdn/script/versions_helper.rb +4 -0
  19. data/app/jobs/phcscriptcdn/application_job.rb +2 -2
  20. data/app/mailers/phcscriptcdn/application_mailer.rb +6 -0
  21. data/app/models/phcscriptcdn/application_record.rb +5 -3
  22. data/app/models/phcscriptcdn/script.rb +7 -5
  23. data/app/models/phcscriptcdn/script/author.rb +0 -7
  24. data/app/models/phcscriptcdn/script/listing.rb +3 -13
  25. data/app/models/phcscriptcdn/script/url.rb +2 -2
  26. data/app/models/phcscriptcdn/script/version.rb +1 -1
  27. data/app/views/layouts/phcscriptcdn/application.html.erb +64 -41
  28. data/app/views/layouts/phcscriptcdn/components/backend/footer/_footer.html.erb +9 -4
  29. data/app/views/layouts/phcscriptcdn/components/backend/navigation/_top_menu.html.erb +78 -0
  30. data/app/views/layouts/phcscriptcdn/components/backend/sidebars/_side_menu.html.erb +154 -0
  31. data/app/views/phcscriptcdn/script/authors/_form.html.erb +15 -20
  32. data/app/views/phcscriptcdn/script/authors/edit.html.erb +32 -32
  33. data/app/views/phcscriptcdn/script/authors/index.html.erb +50 -60
  34. data/app/views/phcscriptcdn/script/authors/new.html.erb +33 -32
  35. data/app/views/phcscriptcdn/script/authors/show.html.erb +42 -32
  36. data/app/views/phcscriptcdn/script/extensions/_form.html.erb +13 -14
  37. data/app/views/phcscriptcdn/script/extensions/edit.html.erb +32 -31
  38. data/app/views/phcscriptcdn/script/extensions/index.html.erb +45 -52
  39. data/app/views/phcscriptcdn/script/extensions/new.html.erb +31 -30
  40. data/app/views/phcscriptcdn/script/extensions/show.html.erb +41 -31
  41. data/app/views/phcscriptcdn/script/licences/_form.html.erb +21 -21
  42. data/app/views/phcscriptcdn/script/licences/edit.html.erb +31 -31
  43. data/app/views/phcscriptcdn/script/licences/index.html.erb +55 -62
  44. data/app/views/phcscriptcdn/script/licences/new.html.erb +31 -31
  45. data/app/views/phcscriptcdn/script/licences/show.html.erb +41 -31
  46. data/app/views/phcscriptcdn/script/listings/_form.html.erb +27 -28
  47. data/app/views/phcscriptcdn/script/listings/edit.html.erb +29 -30
  48. data/app/views/phcscriptcdn/script/listings/index.html.erb +45 -54
  49. data/app/views/phcscriptcdn/script/listings/new.html.erb +28 -30
  50. data/app/views/phcscriptcdn/script/listings/show.html.erb +38 -28
  51. data/app/views/phcscriptcdn/script/urls/_form.html.erb +13 -14
  52. data/app/views/phcscriptcdn/script/urls/edit.html.erb +17 -30
  53. data/app/views/phcscriptcdn/script/urls/index.html.erb +47 -54
  54. data/app/views/phcscriptcdn/script/urls/new.html.erb +31 -31
  55. data/app/views/phcscriptcdn/script/urls/show.html.erb +41 -30
  56. data/app/views/phcscriptcdn/script/versions/_form.html.erb +9 -10
  57. data/app/views/phcscriptcdn/script/versions/edit.html.erb +31 -31
  58. data/app/views/phcscriptcdn/script/versions/index.html.erb +43 -50
  59. data/app/views/phcscriptcdn/script/versions/new.html.erb +31 -31
  60. data/app/views/phcscriptcdn/script/versions/show.html.erb +41 -31
  61. data/config/routes.rb +19 -22
  62. data/db/migrate/{20160731205917_create_phcscriptcdn_script_listings.rb → 20160821183652_create_phcscriptcdn_script_listings.rb} +5 -6
  63. data/db/migrate/{20160731210723_create_phcscriptcdn_script_authors.rb → 20160821183714_create_phcscriptcdn_script_authors.rb} +1 -2
  64. data/db/migrate/{20160731205205_create_phcscriptcdn_script_extensions.rb → 20160821183735_create_phcscriptcdn_script_extensions.rb} +1 -1
  65. data/db/migrate/{20160801032225_create_phcscriptcdn_script_licences.rb → 20160821183805_create_phcscriptcdn_script_licences.rb} +1 -1
  66. data/db/migrate/{20160731210626_create_phcscriptcdn_script_urls.rb → 20160821183830_create_phcscriptcdn_script_urls.rb} +5 -5
  67. data/db/migrate/{20160731205954_create_phcscriptcdn_script_versions.rb → 20160821183946_create_phcscriptcdn_script_versions.rb} +1 -1
  68. data/db/migrate/20170517064049_create_phcscriptcdn_listing_versions.rb +1 -0
  69. data/db/migrate/20170517064114_create_phcscriptcdn_scriptversion_versions.rb +1 -0
  70. data/db/migrate/20170517064150_create_phcscriptcdn_url_versions.rb +17 -16
  71. data/db/migrate/20170517064208_create_phcscriptcdn_author_versions.rb +1 -0
  72. data/db/migrate/20170517064427_create_phcscriptcdn_licence_versions.rb +1 -0
  73. data/lib/phcscriptcdn/engine.rb +6 -1
  74. data/lib/phcscriptcdn/version.rb +1 -1
  75. metadata +100 -116
  76. data/app/assets/javascripts/phcscriptcdn/frontend/listings.js +0 -2
  77. data/app/assets/stylesheets/phcscriptcdn/frontend/listings.scss +0 -3
  78. data/app/controllers/phcscriptcdn/frontend/listings_controller.rb +0 -20
  79. data/app/helpers/phcscriptcdn/frontend/listings_helper.rb +0 -4
  80. data/app/models/phcscriptcdn/frontend/listing.rb +0 -8
  81. data/app/views/layouts/phcscriptcdn/components/backend/navigation/_navigation.html.erb +0 -56
  82. data/app/views/layouts/phcscriptcdn/components/backend/topbar/_topbar.html.erb +0 -5
  83. data/app/views/layouts/phcscriptcdn/components/backend/topbar/_topbar_links.html.erb +0 -0
  84. data/app/views/layouts/phcscriptcdn/frontend.html.erb +0 -22
  85. data/app/views/phcscriptcdn/frontend/listings/index.html.erb +0 -46
  86. data/app/views/phcscriptcdn/frontend/listings/show.html.erb +0 -59
@@ -1,39 +1,39 @@
1
1
  <!-- Title System -->
2
2
  <% phc_title "Script Listings Manager" %>
3
3
  <% phc_title_tagline "Update Script Version Information" %>
4
- <% phc_breadcrumb_one link_to "Script Version Index", phcscriptcdn.script_versions_path %>
5
- <% phc_breadcrumb_two yield(:phc_title_tagline) %>
4
+ <% phc_breadcrumb_one link_to "Script Index", phcscriptcdn.script_listings_path %>
5
+ <% phc_breadcrumb_two link_to "Script Version Index", phcscriptcdn.script_versions_path %>
6
+ <% phc_breadcrumb_three yield(:phc_title_tagline) %>
6
7
  <!-- Title System -->
7
8
 
8
- <!-- Page Title Bar -->
9
- <section class="content-header">
10
- <!-- Page Title and BreadCrumb -->
11
- <h1><%= yield(:phc_title) %> <small><%= yield(:phc_title_tagline) %></small></h1>
12
- <ol class="breadcrumb">
13
- <li><%= yield(:phc_breadcrumb_one) %></li>
14
- <li class="active"><%= yield(:phc_breadcrumb_two) %></li>
15
- </ol>
16
- <!-- Page Title and BreadCrumb -->
17
- </section>
18
- <!-- Page Title Bar -->
9
+ <!-- Page Bradcrumbs -->
10
+ <ol class="breadcrumb pull-right">
11
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
12
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_two) %></li>
13
+ <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_three) %></li>
14
+ </ol>
15
+ <!-- Page Bradcrumbs -->
19
16
 
20
- <!-- Main Content -->
21
- <section class="content">
22
- <div class="row">
23
- <div class="col-lg-12">
24
- <div class="box">
25
- <div class="box-header with-border">
26
- <h3 class="box-title"><%= yield(:phc_title) %></h3>
27
- </div>
28
- <div class="box-body">
29
-
30
- <!-- Page Form (Edit) -->
31
- <%= render 'form', script_version: @script_version %>
32
- <!-- Page Form (Edit) -->
33
-
34
- </div>
35
- </div>
17
+ <!-- Page Header -->
18
+ <h1 class="page-header"><%= yield(:phc_title) %></h1>
19
+ <!-- Page Header -->
20
+
21
+ <!-- Page Content -->
22
+ <div class="panel panel-inverse">
23
+ <div class="panel-heading">
24
+ <div class="panel-heading-btn">
25
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
26
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
27
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
36
28
  </div>
29
+ <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
30
+ </div>
31
+ <div class="panel-body">
32
+
33
+ <!-- -->
34
+ <%= render 'form', script_version: @script_version %>
35
+ <!-- -->
36
+
37
37
  </div>
38
- </section>
39
- <!-- Main Content -->
38
+ </div>
39
+ <!-- Page Content -->
@@ -1,59 +1,52 @@
1
1
  <!-- Title System -->
2
2
  <% phc_title "Script Listings Manager" %>
3
3
  <% phc_title_tagline "Script Version Index" %>
4
- <% phc_breadcrumb_one yield(:phc_title_tagline) %>
4
+ <% phc_breadcrumb_one link_to "Script Index", phcscriptcdn.script_listings_path %>
5
+ <% phc_breadcrumb_two link_to "Script Version Index", phcscriptcdn.script_versions_path %>
6
+ <% phc_breadcrumb_three yield(:phc_title_tagline) %>
5
7
  <!-- Title System -->
6
8
 
7
- <!-- Page Title Bar -->
8
- <section class="content-header">
9
- <!-- Page Title and BreadCrumb -->
10
- <h1><%= yield(:phc_title) %> <small><%= yield(:phc_title_tagline) %></small></h1>
11
- <ol class="breadcrumb">
12
- <li><%= yield(:phc_breadcrumb_one) %></li>
13
- <li class="active"><%= yield(:phc_breadcrumb_two) %></li>
14
- </ol>
15
- <!-- Page Title and BreadCrumb -->
16
- </section>
17
- <!-- Page Title Bar -->
9
+ <!-- Page Bradcrumbs -->
10
+ <ol class="breadcrumb pull-right">
11
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
12
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_two) %></li>
13
+ <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_three) %></li>
14
+ </ol>
15
+ <!-- Page Bradcrumbs -->
18
16
 
19
- <!-- Main Content -->
20
- <section class="content">
21
- <div class="row">
22
- <div class="col-lg-12">
23
- <div class="box">
24
- <div class="box-header with-border">
25
- <h3 class="box-title"><%= yield(:phc_title) %></h3>
26
- </div>
27
- <div class="box-body">
28
-
29
- <!-- Index Table -->
30
- <div class="table-responsive">
31
- <table class="table table-bordered table-striped table-hover">
32
- <thead>
33
- <tr>
34
- <th>Script Version</th>
35
- </tr>
36
- </thead>
37
- <tbody>
38
- <% @script_versions.each do |script_version| %>
39
- <tr>
40
- <td><%= link_to script_version.scriptversion, script_version %></td>
41
- </tr>
42
- <% end %>
43
- </tbody>
44
- </table>
45
- </div>
46
- <!-- Index Table -->
47
-
48
- <!-- Panel Footer -->
49
- <div class="box-footer clearfix">
50
- <%= link_to 'New Script Version', new_script_version_path, class: "btn btn-primary" %>
51
- </div>
52
- <!-- Panel Footer -->
17
+ <!-- Page Header -->
18
+ <h1 class="page-header"><%= yield(:phc_title) %></h1>
19
+ <!-- Page Header -->
20
+
21
+ <!-- Page Content -->
22
+ <div class="panel panel-inverse">
23
+ <div class="panel-heading">
24
+ <div class="panel-heading-btn">
25
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
26
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
27
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
28
+ </div>
29
+ <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
30
+ </div>
31
+ <div class="panel-body">
32
+ <!-- Table - Article Index -->
33
+ <div class="table-responsive">
34
+ <table class="table table-striped table-bordered">
35
+ <thead>
36
+ <tr>
37
+ <th>Script Version</th>
38
+ </tr>
39
+ </thead>
40
+ <tbody>
41
+ <% @script_versions.each do |script_version| %>
42
+ <tr>
43
+ <td><%= link_to script_version.scriptversion, script_version %></td>
44
+ </tr>
45
+ <% end %>
46
+ </tbody>
47
+ </table>
53
48
 
54
- </div>
55
- </div>
56
49
  </div>
57
50
  </div>
58
- </section>
59
- <!-- Main Content -->
51
+ </div>
52
+ <!-- Page Content -->
@@ -1,39 +1,39 @@
1
1
  <!-- Title System -->
2
2
  <% phc_title "Script Listings Manager" %>
3
3
  <% phc_title_tagline "Create a New Version" %>
4
- <% phc_breadcrumb_one link_to "Script Version Index", phcscriptcdn.script_versions_path %>
5
- <% phc_breadcrumb_two yield(:phc_title_tagline) %>
4
+ <% phc_breadcrumb_one link_to "Script Index", phcscriptcdn.script_listings_path %>
5
+ <% phc_breadcrumb_two link_to "Script Version Index", phcscriptcdn.script_versions_path %>
6
+ <% phc_breadcrumb_three yield(:phc_title_tagline) %>
6
7
  <!-- Title System -->
7
8
 
8
- <!-- Page Title Bar -->
9
- <section class="content-header">
10
- <!-- Page Title and BreadCrumb -->
11
- <h1><%= yield(:phc_title) %> <small><%= yield(:phc_title_tagline) %></small></h1>
12
- <ol class="breadcrumb">
13
- <li><%= yield(:phc_breadcrumb_one) %></li>
14
- <li class="active"><%= yield(:phc_breadcrumb_two) %></li>
15
- </ol>
16
- <!-- Page Title and BreadCrumb -->
17
- </section>
18
- <!-- Page Title Bar -->
9
+ <!-- Page Bradcrumbs -->
10
+ <ol class="breadcrumb pull-right">
11
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
12
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_two) %></li>
13
+ <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_three) %></li>
14
+ </ol>
15
+ <!-- Page Bradcrumbs -->
19
16
 
20
- <!-- Main Content -->
21
- <section class="content">
22
- <div class="row">
23
- <div class="col-lg-12">
24
- <div class="box">
25
- <div class="box-header with-border">
26
- <h3 class="box-title"><%= yield(:phc_title) %></h3>
27
- </div>
28
- <div class="box-body">
29
-
30
- <!-- Page Form (New) -->
31
- <%= render 'form', script_version: @script_version %>
32
- <!-- Page Form (New) -->
33
-
34
- </div>
35
- </div>
17
+ <!-- Page Header -->
18
+ <h1 class="page-header"><%= yield(:phc_title) %></h1>
19
+ <!-- Page Header -->
20
+
21
+ <!-- Page Content -->
22
+ <div class="panel panel-inverse">
23
+ <div class="panel-heading">
24
+ <div class="panel-heading-btn">
25
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
26
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
27
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
36
28
  </div>
29
+ <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
30
+ </div>
31
+ <div class="panel-body">
32
+
33
+ <!-- -->
34
+ <%= render 'form', script_version: @script_version %>
35
+ <!-- -->
36
+
37
37
  </div>
38
- </section>
39
- <!-- Main Content -->
38
+ </div>
39
+ <!-- Page Content -->
@@ -1,42 +1,52 @@
1
1
  <!-- Title System -->
2
2
  <% phc_title "Script Listings Manager" %>
3
3
  <% phc_title_tagline "Script Version Details" %>
4
- <% phc_breadcrumb_one link_to "Script Version Index", phcscriptcdn.script_versions_path %>
5
- <% phc_breadcrumb_two yield(:phc_title_tagline) %>
4
+ <% phc_breadcrumb_one link_to "Script Index", phcscriptcdn.script_listings_path %>
5
+ <% phc_breadcrumb_two link_to "Script Version Index", phcscriptcdn.script_versions_path %>
6
+ <% phc_breadcrumb_three yield(:phc_title_tagline) %>
6
7
  <!-- Title System -->
7
8
 
8
- <!-- Page Title Bar -->
9
- <section class="content-header">
10
- <!-- Page Title and BreadCrumb -->
11
- <h1><%= yield(:phc_title) %> <small><%= yield(:phc_title_tagline) %></small></h1>
12
- <ol class="breadcrumb">
13
- <li><%= yield(:phc_breadcrumb_one) %></li>
14
- <li class="active"><%= yield(:phc_breadcrumb_two) %></li>
15
- </ol>
16
- <!-- Page Title and BreadCrumb -->
17
- </section>
18
- <!-- Page Title Bar -->
19
-
20
- <!-- Main Content -->
21
- <section class="content">
22
- <div class="row">
23
- <div class="col-lg-12">
24
- <div class="box">
25
- <div class="box-header with-border">
26
- <h3 class="box-title"><%= yield(:phc_title) %></h3>
27
- </div>
28
- <div class="box-body">
9
+ <!-- Page Bradcrumbs -->
10
+ <ol class="breadcrumb pull-right">
11
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
12
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_two) %></li>
13
+ <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_three) %></li>
14
+ </ol>
15
+ <!-- Page Bradcrumbs -->
16
+
17
+ <!-- Page Header -->
18
+ <h1 class="page-header"><%= yield(:phc_title) %></h1>
19
+ <!-- Page Header -->
20
+
21
+ <!-- Page Content -->
22
+ <div class="row">
29
23
 
30
- <!-- Show Content -->
31
- <div class="btn-group" role="group" aria-label="version_button_group">
32
- <%= link_to 'Edit', edit_script_version_path(@script_version), class: "btn btn-primary" %>
33
- <%= link_to 'Destroy', script_version_path(@script_version), method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-primary" %>
34
- </div>
35
- <!-- Show Content -->
24
+ <!-- Button Panel -->
25
+ <div class="col-lg-4">
36
26
 
27
+ <div class="panel panel-inverse">
28
+ <div class="panel-heading">
29
+ <div class="panel-heading-btn">
37
30
  </div>
38
31
  </div>
32
+ <div class="panel-body">
33
+
34
+ <div class="btn-group d-flex" role="group">
35
+ <%= link_to 'Update', phcscriptcdn.edit_script_version_path, class: "btn btn-primary" %>
36
+ <%= link_to 'Remove', phcscriptcdn.script_version_path, method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-danger" %>
37
+ </div>
38
+
39
+ </div>
39
40
  </div>
41
+
40
42
  </div>
41
- </section>
42
- <!-- Main Content -->
43
+ <!-- Button Panel -->
44
+
45
+ <!-- Main Panel -->
46
+ <div class="col-lg-8">
47
+
48
+ </div>
49
+ <!-- Main Panel -->
50
+
51
+ </div>
52
+ <!-- Page Content -->
@@ -1,30 +1,27 @@
1
1
  Phcscriptcdn::Engine.routes.draw do
2
2
 
3
- # Frontend Routes
4
- namespace :frontend do
5
- resources :listings
6
- end
3
+ # Mount Accounts Engine
4
+ mount Phcaccounts::Engine, :at => '/'
7
5
 
8
- # Script CDN Listing System
9
- namespace :script do
10
- # Main Script Module
11
- resources :listings, class_name: 'Phcscriptcdn::Script::Listing' do
12
- resources :urls, class_name: 'Phcscriptcdn::Script::Url'
6
+ # Application Scripts
7
+ namespace :script do
8
+ # Main Script Module
9
+ resources :listings, class_name: 'Phcscriptcdn::Script::Listing' do
10
+ resources :urls, class_name: 'Phcscriptcdn::Script::Url'
11
+ end
12
+ resources :authors, class_name: 'Phcscriptcdn::Script::Author'
13
+ resources :extensions, class_name: 'Phcscriptcdn::Script::Extension'
14
+ resources :versions, class_name: 'Phcscriptcdn::Script::Version'
15
+ resources :licences, class_name: 'Phcscriptcdn::Script::Licence'
13
16
  end
14
- resources :authors, class_name: 'Phcscriptcdn::Script::Author'
15
- resources :extensions, class_name: 'Phcscriptcdn::Script::Extension'
16
- resources :versions, class_name: 'Phcscriptcdn::Script::Version'
17
- resources :licences, class_name: 'Phcscriptcdn::Script::Licence'
18
- end
19
17
 
20
- # Application API
21
- namespace :api, :path => "", :constraints => {:subdomain => "api"} do
22
- namespace :v1 do
23
- # Routes for API
24
- resources :mains, defaults: {format: 'json'}
25
- resources :informations, defaults: {format: 'json'}
26
- resources :versions, defaults: {format: 'json'}
18
+ # Application API
19
+ namespace :api, :path => "", :constraints => {:subdomain => "api"} do
20
+ namespace :v1 do
21
+ resources :mains, defaults: {format: 'json'}
22
+ resources :informations, defaults: {format: 'json'}
23
+ resources :versions, defaults: {format: 'json'}
24
+ end
27
25
  end
28
- end
29
26
 
30
27
  end
@@ -8,7 +8,6 @@ class CreatePhcscriptcdnScriptListings < ActiveRecord::Migration[5.2]
8
8
  t.string :descriptionsource
9
9
 
10
10
  t.string :scriptwebsite
11
- t.string :scripttwitter
12
11
  t.string :scriptgithub
13
12
 
14
13
  t.date :scriptinitialrelease
@@ -18,14 +17,14 @@ class CreatePhcscriptcdnScriptListings < ActiveRecord::Migration[5.2]
18
17
 
19
18
  t.string :scriptstatus
20
19
 
21
- t.references :version
22
- t.references :licence
23
- t.references :author
24
-
25
20
  t.string :slug
26
21
 
27
22
  t.string :user_id
28
- t.string :user_name
23
+ t.string :org_id
24
+
25
+ t.references :version
26
+ t.references :licence
27
+ t.references :author
29
28
 
30
29
  t.timestamps
31
30
 
@@ -8,12 +8,11 @@ class CreatePhcscriptcdnScriptAuthors < ActiveRecord::Migration[5.2]
8
8
 
9
9
  t.string :authorwebsite
10
10
  t.string :authorgithub
11
- t.string :authortwitter
12
11
 
13
12
  t.string :slug
14
13
 
15
14
  t.string :user_id
16
- t.string :user_name
15
+ t.string :org_id
17
16
 
18
17
  t.timestamps
19
18
 
@@ -10,7 +10,7 @@ class CreatePhcscriptcdnScriptExtensions < ActiveRecord::Migration[5.2]
10
10
  t.string :slug
11
11
 
12
12
  t.string :user_id
13
- t.string :user_name
13
+ t.string :org_id
14
14
 
15
15
  t.timestamps
16
16
 
@@ -17,7 +17,7 @@ class CreatePhcscriptcdnScriptLicences < ActiveRecord::Migration[5.2]
17
17
  t.string :slug
18
18
 
19
19
  t.string :user_id
20
- t.string :user_name
20
+ t.string :org_id
21
21
 
22
22
  t.timestamps
23
23
 
@@ -7,14 +7,14 @@ class CreatePhcscriptcdnScriptUrls < ActiveRecord::Migration[5.2]
7
7
  t.date :scripturlrelease
8
8
  t.date :scripturlcdnupdate
9
9
 
10
- t.references :listing
11
- t.references :version
12
- t.references :extension
13
-
14
10
  t.string :slug
15
11
 
16
12
  t.string :user_id
17
- t.string :user_name
13
+ t.string :org_id
14
+
15
+ t.references :listing
16
+ t.references :version
17
+ t.references :extension
18
18
 
19
19
  t.timestamps
20
20