phcscriptcdnpro 1.13.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +7 -10
  4. data/Rakefile +16 -3
  5. data/app/assets/config/phcscriptcdnpro_manifest.js +2 -0
  6. data/app/assets/javascripts/phcscriptcdnpro/application.js +1 -1
  7. data/app/assets/javascripts/phcscriptcdnpro/{api/informations.js → cdnsite/cdnpages.js} +0 -0
  8. data/app/assets/javascripts/phcscriptcdnpro/{api/versions.js → scriptcdn/authors.js} +0 -0
  9. data/app/assets/javascripts/phcscriptcdnpro/scriptcdn/information.js +2 -0
  10. data/app/assets/javascripts/phcscriptcdnpro/scriptcdn/mains.js +2 -0
  11. data/app/assets/javascripts/phcscriptcdnpro/scriptcdn/urls.js +2 -0
  12. data/app/assets/javascripts/phcscriptcdnpro/scriptcdn/versions.js +2 -0
  13. data/app/assets/stylesheets/phcscriptcdnpro/application.scss +22 -0
  14. data/app/assets/stylesheets/phcscriptcdnpro/{api/informations.scss → cdnsite/cdnpages.scss} +1 -1
  15. data/app/assets/stylesheets/phcscriptcdnpro/custom.scss +0 -4
  16. data/app/assets/stylesheets/phcscriptcdnpro/scriptcdn/authors.scss +3 -0
  17. data/app/assets/stylesheets/phcscriptcdnpro/scriptcdn/information.scss +3 -0
  18. data/app/assets/stylesheets/phcscriptcdnpro/scriptcdn/mains.scss +3 -0
  19. data/app/assets/stylesheets/phcscriptcdnpro/{api/versions.scss → scriptcdn/urls.scss} +1 -1
  20. data/app/assets/stylesheets/phcscriptcdnpro/scriptcdn/versions.scss +3 -0
  21. data/app/assets/stylesheets/scaffolds.scss +89 -0
  22. data/app/controllers/phcscriptcdnpro/application_controller.rb +3 -0
  23. data/app/controllers/phcscriptcdnpro/{frontend → cdnsite}/cdnpages_controller.rb +1 -1
  24. data/app/controllers/phcscriptcdnpro/scriptcdn/urls_controller.rb +1 -1
  25. data/app/controllers/phcscriptcdnpro/scriptcdn/versions_controller.rb +1 -1
  26. data/app/helpers/phcscriptcdnpro/application_helper.rb +2 -2
  27. data/app/helpers/phcscriptcdnpro/{api/informations_helper.rb → cdnsite/cdnpages_helper.rb} +1 -1
  28. data/app/helpers/phcscriptcdnpro/scriptcdn/authors_helper.rb +4 -0
  29. data/app/helpers/phcscriptcdnpro/scriptcdn/information_helper.rb +4 -0
  30. data/app/helpers/phcscriptcdnpro/scriptcdn/mains_helper.rb +4 -0
  31. data/app/helpers/phcscriptcdnpro/{api/versions_helper.rb → scriptcdn/urls_helper.rb} +1 -1
  32. data/app/helpers/phcscriptcdnpro/scriptcdn/versions_helper.rb +4 -0
  33. data/app/jobs/phcscriptcdnpro/application_job.rb +4 -0
  34. data/app/mailers/phcscriptcdnpro/application_mailer.rb +6 -0
  35. data/app/models/phcscriptcdnpro/application_record.rb +5 -0
  36. data/app/models/phcscriptcdnpro/scriptcdn.rb +5 -5
  37. data/app/views/layouts/phcscriptcdnpro/application.html.erb +2 -2
  38. data/app/views/layouts/phcscriptcdnpro/frontend.html.erb +4 -18
  39. data/app/views/phcscriptcdnpro/{frontend → cdnsite}/cdnpages/index.html.erb +0 -0
  40. data/app/views/phcscriptcdnpro/{frontend → cdnsite}/cdnpages/show.html.erb +0 -0
  41. data/app/views/phcscriptcdnpro/scriptcdn/urls/_form.html.erb +1 -1
  42. data/app/views/phcscriptcdnpro/scriptcdn/versions/_form.html.erb +2 -2
  43. data/app/views/phcscriptcdnpro/scriptcdn/versions/_formpatch.html.erb +2 -2
  44. data/app/views/phcscriptcdnpro/scriptcdn/versions/index.html.erb +1 -1
  45. data/db/migrate/{20160617181959_create_phcscriptcdnpro_scriptcdn_authors.rb → 20160704185254_create_phcscriptcdnpro_scriptcdn_authors.rb} +0 -0
  46. data/db/migrate/{20160620233512_create_phcscriptcdnpro_scriptcdn_information.rb → 20160704185337_create_phcscriptcdnpro_scriptcdn_information.rb} +0 -0
  47. data/db/migrate/{20160618200955_create_phcscriptcdnpro_scriptcdn_urls.rb → 20160704185441_create_phcscriptcdnpro_scriptcdn_urls.rb} +0 -0
  48. data/db/migrate/{20160618201703_create_phcscriptcdnpro_scriptcdn_versions.rb → 20160704185454_create_phcscriptcdnpro_scriptcdn_versions.rb} +1 -1
  49. data/db/migrate/{20160618201418_create_phcscriptcdnpro_scriptcdn_mains.rb → 20160704190509_create_phcscriptcdnpro_scriptcdn_mains.rb} +0 -0
  50. data/lib/phcscriptcdnpro/engine.rb +1 -1
  51. data/lib/phcscriptcdnpro/version.rb +2 -2
  52. metadata +139 -106
  53. data/LICENSE +0 -238
  54. data/app/assets/stylesheets/phcscriptcdnpro/application.css.scss +0 -10
  55. data/app/models/phcscriptcdnpro/scripcdn.rb +0 -7
  56. data/app/views/phcscriptcdnpro/scriptcdn/informations/show.html.erb +0 -58
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d88a85d31ae8f0e071682cc2568376d5a69c1da
4
- data.tar.gz: 0cb699a7b104fb41d59ca0956980d3a4c131bd78
3
+ metadata.gz: ea7879d7a41127fb26c42477ebf4d2ce891503e0
4
+ data.tar.gz: 30b6070989b1efad4085dcf05154060da4fc8bb6
5
5
  SHA512:
6
- metadata.gz: c268f18f5a5eb052a9c8324125bca73c12d18a7992582b61f4db550394894a8203b4662c6f248d88a162798a1b7332fe8af39cd370e9605a1401bc3e80bd719a
7
- data.tar.gz: c4ded4e7ac70646a12801835f73efd23e1e862a2f50801c5aa23808b7a566698c02deb7ce15d00f583f5eedf3c944dd2533ef217b0e08f1e65732588c95c2e2c
6
+ metadata.gz: a1ddbdbe81768caf34b0da84af93294bf37676f1008433f53573fbbedbc540803ea6ea6d5735e2c7a6c40ce3827484ba45e5b6ae778523ffe61e4264f3b9908f
7
+ data.tar.gz: 900ab589c66f540940c90a7c2209df0b9814d65c5ed4fe657478260c9c238a9b8cc7ae182ccac0fc921095e8418a1081b10060f96a65a7e36cdb33083eb08878
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2016 BradPotts - PHCNetworks
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,10 +1,7 @@
1
-
2
- ### Installation
3
-
4
- gem 'phcscriptcdnpro', '~> 1.2'
5
- bundle install
6
- rake phcscriptcdnpro:install:migrations
7
- rake db:migrate
8
- mount Phcscriptcdnpro::Engine, :at => '/'
9
- rake assets:clobber
10
- rake assets:precompile
1
+ gem 'phcscriptcdnpro', '~> 1.2'
2
+ bundle install
3
+ rake phcscriptcdnpro:install:migrations
4
+ rake db:migrate
5
+ mount Phcscriptcdnpro::Engine, :at => '/'
6
+ rake assets:clobber
7
+ rake assets:precompile
data/Rakefile CHANGED
@@ -1,5 +1,6 @@
1
1
  begin
2
2
  require 'bundler/setup'
3
+
3
4
  rescue LoadError
4
5
  puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
6
  end
@@ -10,12 +11,24 @@ RDoc::Task.new(:rdoc) do |rdoc|
10
11
  rdoc.rdoc_dir = 'rdoc'
11
12
  rdoc.title = 'Phcscriptcdnpro'
12
13
  rdoc.options << '--line-numbers'
13
- rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('README.md')
14
15
  rdoc.rdoc_files.include('lib/**/*.rb')
15
16
  end
16
17
 
17
- APP_RAKEFILE = File.expand_path("../spec/test_app/Rakefile", __FILE__)
18
+ APP_RAKEFILE = File.expand_path("../spec/testapp/Rakefile", __FILE__)
18
19
  load 'rails/tasks/engine.rake'
20
+
19
21
  load 'rails/tasks/statistics.rake'
20
22
 
21
- Bundler::GemHelper.install_tasks
23
+ require 'bundler/gem_tasks'
24
+
25
+ require 'rake/testtask'
26
+
27
+ Rake::TestTask.new(:test) do |t|
28
+ t.libs << 'lib'
29
+ t.libs << 'test'
30
+ t.pattern = 'test/**/*_test.rb'
31
+ t.verbose = false
32
+ end
33
+
34
+ task default: :test
@@ -0,0 +1,2 @@
1
+ //= link_directory ../javascripts/phcscriptcdnpro .js
2
+ //= link_directory ../stylesheets/phcscriptcdnpro .css
@@ -5,7 +5,7 @@
5
5
  // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
6
  //
7
7
  // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
8
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
9
  //
10
10
  // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,22 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
16
+
17
+ // Load Standard
18
+ @import "bootstrap";
19
+ @import "font-awesome";
20
+
21
+ // Load Custom
22
+ @import "custom";
@@ -1,3 +1,3 @@
1
- // Place all the styles related to the api/informations controller here.
1
+ // Place all the styles related to the cdnsite/cdnpages controller here.
2
2
  // They will automatically be included in application.css.
3
3
  // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -1,4 +0,0 @@
1
- // Main Container Margin
2
- .container {
3
- padding-top: 40px;
4
- }
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the scriptcdn::authors controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the scriptcdn::information controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the scriptcdn::mains controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -1,3 +1,3 @@
1
- // Place all the styles related to the api/versions controller here.
1
+ // Place all the styles related to the scriptcdn::urls controller here.
2
2
  // They will automatically be included in application.css.
3
3
  // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the scriptcdn::versions controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,89 @@
1
+ body {
2
+ background-color: #fff;
3
+ color: #333;
4
+ font-family: verdana, arial, helvetica, sans-serif;
5
+ font-size: 13px;
6
+ line-height: 18px;
7
+ margin: 33px;
8
+ }
9
+
10
+ p, ol, ul, td {
11
+ font-family: verdana, arial, helvetica, sans-serif;
12
+ font-size: 13px;
13
+ line-height: 18px;
14
+ margin: 33px;
15
+ }
16
+
17
+ pre {
18
+ background-color: #eee;
19
+ padding: 10px;
20
+ font-size: 11px;
21
+ }
22
+
23
+ a {
24
+ color: #000;
25
+
26
+ &:visited {
27
+ color: #666;
28
+ }
29
+
30
+ &:hover {
31
+ color: #fff;
32
+ background-color: #000;
33
+ }
34
+ }
35
+
36
+ th {
37
+ padding-bottom: 5px;
38
+ }
39
+
40
+ td {
41
+ padding-bottom: 7px;
42
+ padding-left: 5px;
43
+ padding-right: 5px;
44
+ }
45
+
46
+ div {
47
+ &.field, &.actions {
48
+ margin-bottom: 10px;
49
+ }
50
+ }
51
+
52
+ #notice {
53
+ color: green;
54
+ }
55
+
56
+ .field_with_errors {
57
+ padding: 2px;
58
+ background-color: red;
59
+ display: table;
60
+ }
61
+
62
+ #error_explanation {
63
+ width: 450px;
64
+ border: 2px solid red;
65
+ padding: 7px;
66
+ padding-bottom: 0;
67
+ margin-bottom: 20px;
68
+ background-color: #f0f0f0;
69
+
70
+ h2 {
71
+ text-align: left;
72
+ font-weight: bold;
73
+ padding: 5px 5px 5px 15px;
74
+ font-size: 12px;
75
+ margin: -7px;
76
+ margin-bottom: 0;
77
+ background-color: #c00;
78
+ color: #fff;
79
+ }
80
+
81
+ ul li {
82
+ font-size: 12px;
83
+ list-style: square;
84
+ }
85
+ }
86
+
87
+ label {
88
+ display: block;
89
+ }
@@ -1,6 +1,9 @@
1
1
  module Phcscriptcdnpro
2
2
  class ApplicationController < ActionController::Base
3
3
 
4
+ # Security Filters
5
+ protect_from_forgery with: :exception
6
+
4
7
  # AuthRocket User Helpers
5
8
  def require_user
6
9
  unless current_user
@@ -1,7 +1,7 @@
1
1
  require_dependency "phcscriptcdnpro/application_controller"
2
2
 
3
3
  module Phcscriptcdnpro
4
- class Frontend::CdnpagesController < ApplicationController
4
+ class Cdnsite::CdnpagesController < ApplicationController
5
5
 
6
6
  # Security & Action Filters
7
7
  layout '/layouts/phcscriptcdnpro/frontend.html.erb'
@@ -82,4 +82,4 @@ module Phcscriptcdnpro
82
82
  end
83
83
 
84
84
  end
85
- end
85
+ end
@@ -63,7 +63,7 @@ module Phcscriptcdnpro
63
63
 
64
64
  # Whitelist
65
65
  def scriptcdn_version_params
66
- params.require(:scriptcdn_version).permit(:version, :main_id)
66
+ params.require(:scriptcdn_version).permit(:versionnumber, :main_id)
67
67
  end
68
68
 
69
69
  end
@@ -1,4 +1,4 @@
1
1
  module Phcscriptcdnpro
2
- module ApplicationHelper
3
- end
2
+ module ApplicationHelper
3
+ end
4
4
  end
@@ -1,4 +1,4 @@
1
1
  module Phcscriptcdnpro
2
- module Api::InformationsHelper
2
+ module Cdnsite::CdnpagesHelper
3
3
  end
4
4
  end
@@ -0,0 +1,4 @@
1
+ module Phcscriptcdnpro
2
+ module Scriptcdn::AuthorsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module Phcscriptcdnpro
2
+ module Scriptcdn::InformationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module Phcscriptcdnpro
2
+ module Scriptcdn::MainsHelper
3
+ end
4
+ end
@@ -1,4 +1,4 @@
1
1
  module Phcscriptcdnpro
2
- module Api::VersionsHelper
2
+ module Scriptcdn::UrlsHelper
3
3
  end
4
4
  end
@@ -0,0 +1,4 @@
1
+ module Phcscriptcdnpro
2
+ module Scriptcdn::VersionsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module Phcscriptcdnpro
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module Phcscriptcdnpro
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: 'no-reply@phcnetworks.net'
4
+ layout 'mailer'
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module Phcscriptcdnpro
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -1,7 +1,7 @@
1
1
  module Phcscriptcdnpro
2
- module Scriptcdn
3
- def self.table_name_prefix
4
- 'phcscriptcdnpro_scriptcdn_'
5
- end
6
- end
2
+ module Scriptcdn
3
+ def self.table_name_prefix
4
+ 'phcscriptcdnpro_scriptcdn_'
5
+ end
6
+ end
7
7
  end
@@ -11,10 +11,10 @@
11
11
  <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400%7CRaleway:300,400,500,600,700%7CLato:300,400,400italic,600,700"/>
12
12
 
13
13
  <!-- Requried Style Sheets -->
14
- <%= stylesheet_link_tag "backend", media: "all" %>
14
+ <%= stylesheet_link_tag "backend", media: "all", 'data-turbolinks-track': 'reload' %>
15
15
 
16
16
  <!-- Requried JavaScripts -->
17
- <%= javascript_include_tag "backend" %>
17
+ <%= javascript_include_tag "backend", 'data-turbolinks-track': 'reload' %>
18
18
 
19
19
  <!-- Security -->
20
20
  <%= csrf_meta_tags %>
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
 
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title><%= content_for?(:title) ? yield(:title) : "PHC Script CDN - Script Content Delivery Network" %></title>
6
+ <title><%= content_for?(:title) ? yield(:title) : "Cloud Software & Web Development" %></title>
7
7
 
8
8
  <!-- Meta Info -->
9
9
  <%= render 'layouts/components/frontend/elements/all/all_metainfo' %>
@@ -11,8 +11,9 @@
11
11
  <!-- Font -->
12
12
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400%7CRaleway:300,400,500,600,700%7CLato:300,400,400italic,600,700" rel="stylesheet" type="text/css" />
13
13
 
14
- <%= stylesheet_link_tag "application", media: "all" %>
15
- <%= javascript_include_tag "application" %>
14
+ <!-- Styles and JavaScript -->
15
+ <%= stylesheet_link_tag "application", media: "all", 'data-turbolinks-track': 'reload' %>
16
+ <%= javascript_include_tag "application", 'data-turbolinks-track': 'reload' %>
16
17
  <%= csrf_meta_tags %>
17
18
 
18
19
  </head>
@@ -28,25 +29,10 @@
28
29
  </div>
29
30
  </div>
30
31
 
31
- <%= render 'phcnotifi/notifications' %>
32
-
33
32
  <div id="header" class="sticky dark shadow-after-3 clearfix">
34
33
  <%= render 'layouts/components/frontend/navigation/navigation' %>
35
34
  </div>
36
35
 
37
- <section class="page-header">
38
- <div class="container">
39
-
40
- <h1><%= yield(:phc_title) %></h1>
41
- <span class="font-lato size-18 weight-300"><%= yield(:phc_title_tagline) %></span>
42
- <ol class="breadcrumb">
43
- <li><%= link_to "Home", main_app.root_path %></li>
44
- <li class="active" ><%= yield(:phc_title) %></li>
45
- </ol>
46
-
47
- </div>
48
- </section>
49
-
50
36
  <%= yield %>
51
37
 
52
38
  <footer id="footer">