phcscriptcdn 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +9 -9
- data/Rakefile +12 -11
- data/app/controllers/phcscriptcdn/application_controller.rb +10 -10
- data/app/controllers/phcscriptcdn/script/authors_controller.rb +62 -61
- data/app/controllers/phcscriptcdn/script/extensions_controller.rb +62 -60
- data/app/controllers/phcscriptcdn/script/licences_controller.rb +61 -61
- data/app/controllers/phcscriptcdn/script/listings_controller.rb +61 -61
- data/app/controllers/phcscriptcdn/script/urls_controller.rb +70 -70
- data/app/controllers/phcscriptcdn/script/versions_controller.rb +61 -61
- data/config/routes.rb +28 -28
- data/db/migrate/20160731205205_create_phcscriptcdn_script_extensions.rb +13 -13
- data/db/migrate/20160731205917_create_phcscriptcdn_script_listings.rb +32 -31
- data/db/migrate/20160731205954_create_phcscriptcdn_script_versions.rb +14 -14
- data/db/migrate/20160731210626_create_phcscriptcdn_script_urls.rb +20 -20
- data/db/migrate/20160731210723_create_phcscriptcdn_script_authors.rb +19 -19
- data/db/migrate/20160801032225_create_phcscriptcdn_script_licences.rb +23 -23
- data/lib/phcscriptcdn/engine.rb +48 -47
- data/lib/phcscriptcdn/version.rb +1 -1
- metadata +20 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6340f1a35471958e0f0432998a3665849c9a964d
|
4
|
+
data.tar.gz: d25d145c698b9ccd2e4d64895cd87d37cb753c9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0195e4610df9bcd45f1c39899793e05d681ddb18b022599b0c468c42e018d6e35fea94af3c7be70d3f64904651570be57f63c410f03075bbbb3bbcf5f03224d0'
|
7
|
+
data.tar.gz: 5c7fb2b0a08a68f2b256711e3a17b010829afc2d4fe54e5884bc474150fcdb32010ed634c263920d64339728f33bfe4e809c91693b351310be82c7d37f20cef2
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -3,31 +3,31 @@
|
|
3
3
|
[![Dependency Status](https://gemnasium.com/badges/github.com/PHCNetworks/phc-scriptcdn.svg)](https://gemnasium.com/github.com/PHCNetworks/phc-scriptcdn)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/phcscriptcdn.svg)](https://badge.fury.io/rb/phcscriptcdn)
|
5
5
|
|
6
|
-
### PHCScriptCDN(
|
7
|
-
PHCScriptCDN(
|
6
|
+
### PHCScriptCDN(4) (Script Listing Engine) Documentation
|
7
|
+
PHCScriptCDN(4) rails script management engine for website script CDN listings.
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
* Manage script CDN listings for websites.
|
10
|
+
* Main script title and description.
|
11
|
+
* Script versions and script URLs.
|
12
12
|
|
13
13
|
#### Step 1 - Add PHCScriptCDN to your gemfile and run command
|
14
14
|
|
15
|
-
gem 'phcscriptcdn', '~>
|
15
|
+
gem 'phcscriptcdn', '~> 4.0'
|
16
16
|
bundle install
|
17
17
|
|
18
18
|
#### Step 2 - Copy PHCScriptCDN Database Tables
|
19
|
-
To copy PHCScriptCDN's
|
19
|
+
To copy PHCScriptCDN's required database migrations, copy each command individually to your terminal's command line.
|
20
20
|
|
21
21
|
rails phcscriptcdn:install:migrations
|
22
22
|
rails db:migrate
|
23
23
|
|
24
|
-
#### Step 3 - Mount
|
24
|
+
#### Step 3 - Mount PHCScriptCDN & Add Routes
|
25
25
|
Mount PHCMembers by adding code below to your routes file.
|
26
26
|
|
27
27
|
mount Phcscriptcdn::Engine, :at => '/'
|
28
28
|
|
29
29
|
#### Step 4 - Recompile Assets
|
30
|
-
To properly function re-compile your application's assets to copy over
|
30
|
+
To properly function re-compile your application's assets to copy over required files.
|
31
31
|
|
32
32
|
rails assets:clobber
|
33
33
|
rails assets:precompile
|
data/Rakefile
CHANGED
@@ -1,21 +1,22 @@
|
|
1
1
|
begin
|
2
|
-
|
2
|
+
require 'bundler/setup'
|
3
3
|
|
4
4
|
rescue LoadError
|
5
|
-
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
6
|
end
|
7
7
|
|
8
8
|
require 'rdoc/task'
|
9
9
|
|
10
10
|
RDoc::Task.new(:rdoc) do |rdoc|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
rdoc.rdoc_dir = 'rdoc'
|
12
|
+
rdoc.title = 'Phcscriptcdn'
|
13
|
+
rdoc.options << '--line-numbers'
|
14
|
+
rdoc.rdoc_files.include('README.md')
|
15
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
16
16
|
end
|
17
17
|
|
18
18
|
APP_RAKEFILE = File.expand_path("../spec/testapp/Rakefile", __FILE__)
|
19
|
+
|
19
20
|
load 'rails/tasks/engine.rake'
|
20
21
|
load 'rails/tasks/statistics.rake'
|
21
22
|
|
@@ -23,10 +24,10 @@ require 'bundler/gem_tasks'
|
|
23
24
|
require 'rake/testtask'
|
24
25
|
|
25
26
|
Rake::TestTask.new(:test) do |t|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
t.libs << 'lib'
|
28
|
+
t.libs << 'test'
|
29
|
+
t.pattern = 'test/**/*_test.rb'
|
30
|
+
t.verbose = false
|
30
31
|
end
|
31
32
|
|
32
33
|
task default: :test
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module Phcscriptcdn
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
2
|
+
class ApplicationController < ActionController::Base
|
3
|
+
|
4
|
+
# Security
|
5
|
+
protect_from_forgery with: :exception
|
6
|
+
|
7
|
+
# Load Helpers
|
8
|
+
helper Phctitleseo::Engine.helpers
|
9
|
+
helper Phcnotifi::Engine.helpers
|
10
|
+
|
11
|
+
end
|
12
12
|
end
|
@@ -1,65 +1,66 @@
|
|
1
1
|
require_dependency "phcscriptcdn/application_controller"
|
2
2
|
|
3
3
|
module Phcscriptcdn
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
4
|
+
class Script::AuthorsController < ApplicationController
|
5
|
+
|
6
|
+
# Filters & Security
|
7
|
+
before_action :set_script_author, only: [:show, :edit, :update, :destroy]
|
8
|
+
|
9
|
+
# INDEX - Script Author
|
10
|
+
def index
|
11
|
+
@script_authors = Script::Author.all
|
12
|
+
end
|
13
|
+
|
14
|
+
# DETAILS - Script Author
|
15
|
+
def show
|
16
|
+
end
|
17
|
+
|
18
|
+
# NEW - Script Author
|
19
|
+
def new
|
20
|
+
@script_author = Script::Author.new
|
21
|
+
end
|
22
|
+
|
23
|
+
# EDIT - Script Author
|
24
|
+
def edit
|
25
|
+
end
|
26
|
+
|
27
|
+
# CREATE - Script Author
|
28
|
+
def create
|
29
|
+
@script_author = Script::Author.new(script_author_params)
|
30
|
+
if @script_author.save
|
31
|
+
redirect_to script_authors_url, notice: 'Author was successfully created.'
|
32
|
+
else
|
33
|
+
render :new
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# PATCH/PUT - Script Author
|
38
|
+
def update
|
39
|
+
if @script_author.update(script_author_params)
|
40
|
+
redirect_to script_authors_url, notice: 'Author was successfully updated.'
|
41
|
+
else
|
42
|
+
render :edit
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# DELETE - Script Author
|
47
|
+
def destroy
|
48
|
+
@script_author.destroy
|
49
|
+
redirect_to script_authors_url, notice: 'Author was successfully destroyed.'
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
|
54
|
+
# Common Callbacks
|
55
|
+
def set_script_author
|
56
|
+
@script_author = Script::Author.find(params[:id])
|
57
|
+
end
|
58
|
+
|
59
|
+
# Whitelist
|
60
|
+
def script_author_params
|
61
|
+
params.require(:script_author).permit(:authorfirstname, :authorlastname, :authorwebsite, :authorgithub, :authortwitter, :user_id, :user_name)
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
65
|
end
|
66
|
+
|
@@ -1,65 +1,67 @@
|
|
1
1
|
require_dependency "phcscriptcdn/application_controller"
|
2
2
|
|
3
3
|
module Phcscriptcdn
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
4
|
+
class Script::ExtensionsController < ApplicationController
|
5
|
+
|
6
|
+
# Filters & Security
|
7
|
+
before_action :set_script_extension, only: [:show, :edit, :update, :destroy]
|
8
|
+
|
9
|
+
# INDEX - Script Extension
|
10
|
+
def index
|
11
|
+
@script_extensions = Script::Extension.all
|
12
|
+
end
|
13
|
+
|
14
|
+
# DETAILS - Script Extension
|
15
|
+
def show
|
16
|
+
end
|
17
|
+
|
18
|
+
# NEW - Script Extension
|
19
|
+
def new
|
20
|
+
@script_extension = Script::Extension.new
|
21
|
+
end
|
22
|
+
|
23
|
+
# EDIT - Script Extension
|
24
|
+
def edit
|
25
|
+
end
|
26
|
+
|
27
|
+
# CREATE - Script Extension
|
28
|
+
def create
|
29
|
+
@script_extension = Script::Extension.new(script_extension_params)
|
30
|
+
if @script_extension.save
|
31
|
+
redirect_to script_extensions_url, notice: 'Extension was successfully created.'
|
32
|
+
else
|
33
|
+
render :new
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# PATCH/PUT - Script Extension
|
38
|
+
def update
|
39
|
+
if @script_extension.update(script_extension_params)
|
40
|
+
redirect_to script_extensions_url, notice: 'Extension was successfully updated.'
|
41
|
+
else
|
42
|
+
render :edit
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# DELETE - Script Extension
|
47
|
+
def destroy
|
48
|
+
@script_extension.destroy
|
49
|
+
redirect_to script_extensions_url, notice: 'Extension was successfully destroyed.'
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
|
54
|
+
# Common Callbacks
|
55
|
+
def set_script_extension
|
56
|
+
@script_extension = Script::Extension.find(params[:id])
|
57
|
+
end
|
58
|
+
|
59
|
+
# Whitelists
|
60
|
+
def script_extension_params
|
61
|
+
params.require(:script_extension).permit(:scriptextensionname, :scriptextensiondes, :scriptextension, :user_id, :user_name)
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
end
|
58
66
|
|
59
|
-
# Whitelists
|
60
|
-
def script_extension_params
|
61
|
-
params.require(:script_extension).permit(:scriptextensionname, :scriptextensiondes, :scriptextension, :user_id, :user_name)
|
62
|
-
end
|
63
67
|
|
64
|
-
end
|
65
|
-
end
|
@@ -1,65 +1,65 @@
|
|
1
1
|
require_dependency "phcscriptcdn/application_controller"
|
2
2
|
|
3
3
|
module Phcscriptcdn
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
4
|
+
class Script::LicencesController < ApplicationController
|
5
|
+
|
6
|
+
# Filters & Security
|
7
|
+
before_action :set_script_licence, only: [:show, :edit, :update, :destroy]
|
8
|
+
|
9
|
+
# INDEX - Script Licences
|
10
|
+
def index
|
11
|
+
@script_licences = Script::Licence.all
|
12
|
+
end
|
13
|
+
|
14
|
+
# DETAILS - Script Licences
|
15
|
+
def show
|
16
|
+
end
|
17
|
+
|
18
|
+
# NEW - Script Licences
|
19
|
+
def new
|
20
|
+
@script_licence = Script::Licence.new
|
21
|
+
end
|
22
|
+
|
23
|
+
# EDIT - Script Licences
|
24
|
+
def edit
|
25
|
+
end
|
26
|
+
|
27
|
+
# POST - Script Licences
|
28
|
+
def create
|
29
|
+
@script_licence = Script::Licence.new(script_licence_params)
|
30
|
+
if @script_licence.save
|
31
|
+
redirect_to script_licences_url, notice: 'Licence was successfully created.'
|
32
|
+
else
|
33
|
+
render :new
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# PATCH/PUT - Script Licences
|
38
|
+
def update
|
39
|
+
if @script_licence.update(script_licence_params)
|
40
|
+
redirect_to script_licences_url, notice: 'Licence was successfully updated.'
|
41
|
+
else
|
42
|
+
render :edit
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# DELETE - Script Licences
|
47
|
+
def destroy
|
48
|
+
@script_licence.destroy
|
49
|
+
redirect_to script_licences_url, notice: 'Licence was successfully destroyed.'
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
|
54
|
+
# Common Callbacks
|
55
|
+
def set_script_licence
|
56
|
+
@script_licence = Script::Licence.find(params[:id])
|
57
|
+
end
|
58
|
+
|
59
|
+
# Whitelists
|
60
|
+
def script_licence_params
|
61
|
+
params.require(:script_licence).permit(:lcncname, :lcncdescription, :lcncdescript, :lcnccomgpl, :lcncarvlfsf, :lcncarvlosi, :lcncarvlcopyfree, :lcncarvldebian, :lcncarvlfedora, :user_id, :user_name)
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
65
|
end
|