phcscriptcdnpro 5.8.4 → 5.8.5
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 +5 -6
- data/Rakefile +11 -14
- data/app/controllers/phcscriptcdnpro/application_controller.rb +48 -46
- data/app/controllers/phcscriptcdnpro/frontend/listings_controller.rb +4 -2
- data/app/controllers/phcscriptcdnpro/script/authors_controller.rb +70 -70
- data/app/controllers/phcscriptcdnpro/script/extensions_controller.rb +70 -70
- data/app/controllers/phcscriptcdnpro/script/licences_controller.rb +70 -70
- data/app/controllers/phcscriptcdnpro/script/listings_controller.rb +70 -70
- data/app/controllers/phcscriptcdnpro/script/urls_controller.rb +79 -79
- data/app/controllers/phcscriptcdnpro/script/versions_controller.rb +71 -69
- data/app/helpers/phcscriptcdnpro/application_helper.rb +9 -10
- data/app/jobs/phcscriptcdnpro/application_job.rb +2 -3
- data/app/mailers/phcscriptcdnpro/application_mailer.rb +4 -4
- data/app/models/phcscriptcdnpro/application_record.rb +3 -3
- data/app/models/phcscriptcdnpro/frontend.rb +2 -0
- data/app/models/phcscriptcdnpro/frontend/listing.rb +1 -2
- data/app/models/phcscriptcdnpro/script.rb +5 -5
- data/app/models/phcscriptcdnpro/script/author.rb +5 -5
- data/app/models/phcscriptcdnpro/script/extension.rb +6 -6
- data/app/models/phcscriptcdnpro/script/licence.rb +5 -5
- data/app/models/phcscriptcdnpro/script/listing.rb +13 -11
- data/app/models/phcscriptcdnpro/script/url.rb +9 -9
- data/app/models/phcscriptcdnpro/script/version.rb +7 -7
- data/app/views/layouts/phcscriptcdnpro/application.html.erb +6 -7
- data/app/views/layouts/phcscriptcdnpro/components/backend/footer/_footer.html.erb +1 -1
- data/app/views/layouts/phcscriptcdnpro/components/backend/navigation/_top_bar.html.erb +0 -1
- data/app/views/layouts/phcscriptcdnpro/components/backend/sidebars/_left_sidebar.html.erb +1 -2
- data/app/views/layouts/phcscriptcdnpro/frontend.html.erb +14 -16
- data/app/views/phcscriptcdnpro/frontend/listings/index.html.erb +30 -30
- data/app/views/phcscriptcdnpro/frontend/listings/show.html.erb +12 -12
- data/app/views/phcscriptcdnpro/script/authors/_form.html.erb +6 -0
- data/app/views/phcscriptcdnpro/script/authors/edit.html.erb +6 -7
- data/app/views/phcscriptcdnpro/script/authors/index.html.erb +19 -23
- data/app/views/phcscriptcdnpro/script/authors/new.html.erb +6 -7
- data/app/views/phcscriptcdnpro/script/authors/show.html.erb +6 -6
- data/app/views/phcscriptcdnpro/script/extensions/_form.html.erb +6 -0
- data/app/views/phcscriptcdnpro/script/extensions/edit.html.erb +8 -9
- data/app/views/phcscriptcdnpro/script/extensions/index.html.erb +6 -8
- data/app/views/phcscriptcdnpro/script/extensions/new.html.erb +8 -9
- data/app/views/phcscriptcdnpro/script/extensions/show.html.erb +7 -9
- data/app/views/phcscriptcdnpro/script/licences/_form.html.erb +7 -0
- data/app/views/phcscriptcdnpro/script/licences/edit.html.erb +6 -7
- data/app/views/phcscriptcdnpro/script/licences/index.html.erb +10 -12
- data/app/views/phcscriptcdnpro/script/licences/new.html.erb +6 -7
- data/app/views/phcscriptcdnpro/script/licences/show.html.erb +5 -7
- data/app/views/phcscriptcdnpro/script/listings/_form.html.erb +7 -1
- data/app/views/phcscriptcdnpro/script/listings/edit.html.erb +15 -0
- data/app/views/phcscriptcdnpro/script/listings/index.html.erb +14 -4
- data/app/views/phcscriptcdnpro/script/listings/new.html.erb +15 -0
- data/app/views/phcscriptcdnpro/script/listings/show.html.erb +14 -0
- data/app/views/phcscriptcdnpro/script/urls/_form.html.erb +6 -0
- data/app/views/phcscriptcdnpro/script/urls/edit.html.erb +17 -6
- data/app/views/phcscriptcdnpro/script/urls/index.html.erb +14 -7
- data/app/views/phcscriptcdnpro/script/urls/new.html.erb +17 -7
- data/app/views/phcscriptcdnpro/script/urls/show.html.erb +14 -10
- data/app/views/phcscriptcdnpro/script/versions/_form.html.erb +7 -0
- data/app/views/phcscriptcdnpro/script/versions/edit.html.erb +12 -8
- data/app/views/phcscriptcdnpro/script/versions/index.html.erb +11 -5
- data/app/views/phcscriptcdnpro/script/versions/new.html.erb +12 -8
- data/app/views/phcscriptcdnpro/script/versions/show.html.erb +11 -6
- data/config/routes.rb +21 -26
- data/db/migrate/20160821183652_create_phcscriptcdnpro_script_listings.rb +23 -23
- data/db/migrate/20160821183714_create_phcscriptcdnpro_script_authors.rb +17 -17
- data/db/migrate/20160821183735_create_phcscriptcdnpro_script_extensions.rb +12 -12
- data/db/migrate/20160821183805_create_phcscriptcdnpro_script_licences.rb +18 -18
- data/db/migrate/20160821183830_create_phcscriptcdnpro_script_urls.rb +16 -16
- data/db/migrate/20160821183946_create_phcscriptcdnpro_script_versions.rb +10 -10
- data/lib/phcscriptcdnpro/engine.rb +62 -61
- data/lib/phcscriptcdnpro/version.rb +1 -1
- metadata +2 -2
@@ -1,74 +1,74 @@
|
|
1
1
|
require_dependency "phcscriptcdnpro/application_controller"
|
2
2
|
|
3
3
|
module Phcscriptcdnpro
|
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
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
4
|
+
class Script::LicencesController < ApplicationController
|
5
|
+
|
6
|
+
# Filters & Security
|
7
|
+
before_action :require_user
|
8
|
+
before_action :set_script_licence, only: [:show, :edit, :update, :destroy]
|
9
|
+
|
10
|
+
# INDEX - Script Licences
|
11
|
+
def index
|
12
|
+
@script_licences = Script::Licence.all
|
13
|
+
end
|
14
|
+
|
15
|
+
# DETAILS - Script Licences
|
16
|
+
def show
|
17
|
+
end
|
18
|
+
|
19
|
+
# NEW - Script Licences
|
20
|
+
def new
|
21
|
+
@script_licence = Script::Licence.new
|
22
|
+
end
|
23
|
+
|
24
|
+
# EDIT - Script Licences
|
25
|
+
def edit
|
26
|
+
end
|
27
|
+
|
28
|
+
# POST - Script Licences
|
29
|
+
def create
|
30
|
+
@script_licence = Script::Licence.new(script_licence_params)
|
31
|
+
@script_licence.user_id = current_user.id
|
32
|
+
@script_licence.user_name = current_user.username
|
33
|
+
@script_licence.membership_id = membership_info.id
|
34
|
+
@script_licence.oganization_id = membership_info.org_id
|
35
|
+
if @script_licence.save
|
36
|
+
redirect_to script_licences_url, notice: 'Licence was successfully created.'
|
37
|
+
else
|
38
|
+
render :new
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# PATCH/PUT - Script Licences
|
43
|
+
def update
|
44
|
+
@script_licence.user_id = current_user.id
|
45
|
+
@script_licence.user_name = current_user.username
|
46
|
+
@script_licence.membership_id = membership_info.id
|
47
|
+
@script_licence.oganization_id = membership_info.org_id
|
48
|
+
if @script_licence.update(script_licence_params)
|
49
|
+
redirect_to script_licences_url, notice: 'Licence was successfully updated.'
|
50
|
+
else
|
51
|
+
render :edit
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
# DELETE - Script Licences
|
56
|
+
def destroy
|
57
|
+
@script_licence.destroy
|
58
|
+
redirect_to script_licences_url, notice: 'Licence was successfully destroyed.'
|
59
|
+
end
|
60
|
+
|
61
|
+
private
|
62
|
+
|
63
|
+
# Common Callbacks
|
64
|
+
def set_script_licence
|
65
|
+
@script_licence = Script::Licence.find(params[:id])
|
66
|
+
end
|
67
|
+
|
68
|
+
# Whitelists
|
69
|
+
def script_licence_params
|
70
|
+
params.require(:script_licence).permit(:lcncname, :lcncdescription, :lcncdescript, :lcnccomgpl, :lcncarvlfsf, :lcncarvlosi, :lcncarvlcopyfree, :lcncarvldebian, :lcncarvlfedora, :user_id, :user_name, :membership_id, :oganization_id)
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
74
|
end
|
@@ -1,74 +1,74 @@
|
|
1
1
|
require_dependency "phcscriptcdnpro/application_controller"
|
2
2
|
|
3
3
|
module Phcscriptcdnpro
|
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
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
4
|
+
class Script::ListingsController < ApplicationController
|
5
|
+
|
6
|
+
# Filters & Security
|
7
|
+
before_action :require_user
|
8
|
+
before_action :set_script_listing, only: [:show, :edit, :update, :destroy]
|
9
|
+
|
10
|
+
# INDEX - Script Listings
|
11
|
+
def index
|
12
|
+
@script_listings = Script::Listing.all
|
13
|
+
end
|
14
|
+
|
15
|
+
# DETAILS - Script Listings
|
16
|
+
def show
|
17
|
+
end
|
18
|
+
|
19
|
+
# NEW - Script Listings
|
20
|
+
def new
|
21
|
+
@script_listing = Script::Listing.new
|
22
|
+
end
|
23
|
+
|
24
|
+
# EDIT - Script Listings
|
25
|
+
def edit
|
26
|
+
end
|
27
|
+
|
28
|
+
# POST - Script Listings
|
29
|
+
def create
|
30
|
+
@script_listing = Script::Listing.new(script_listing_params)
|
31
|
+
@script_listing.user_id = current_user.id
|
32
|
+
@script_listing.user_name = current_user.username
|
33
|
+
@script_listing.membership_id = membership_info.id
|
34
|
+
@script_listing.oganization_id = membership_info.org_id
|
35
|
+
if @script_listing.save
|
36
|
+
redirect_to script_listings_path, notice: 'Listing was successfully created.'
|
37
|
+
else
|
38
|
+
render :new
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# PATCH/PUT - Script Listings
|
43
|
+
def update
|
44
|
+
@script_listing.user_id = current_user.id
|
45
|
+
@script_listing.user_name = current_user.username
|
46
|
+
@script_listing.membership_id = membership_info.id
|
47
|
+
@script_listing.oganization_id = membership_info.org_id
|
48
|
+
if @script_listing.update(script_listing_params)
|
49
|
+
redirect_to script_listings_path, notice: 'Listing was successfully updated.'
|
50
|
+
else
|
51
|
+
render :edit
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
# DELETE - Script Listings
|
56
|
+
def destroy
|
57
|
+
@script_listing.destroy
|
58
|
+
redirect_to script_listings_path, notice: 'Listing was successfully destroyed.'
|
59
|
+
end
|
60
|
+
|
61
|
+
private
|
62
|
+
|
63
|
+
# Common Callbacks
|
64
|
+
def set_script_listing
|
65
|
+
@script_listing = Script::Listing.find(params[:id])
|
66
|
+
end
|
67
|
+
|
68
|
+
# Whitelist
|
69
|
+
def script_listing_params
|
70
|
+
params.require(:script_listing).permit(:scripttitle, :scriptdescription, :descriptionsource, :scriptwebsite, :scripttwitter, :scriptgithub, :scriptinitialrelease, :scriptlastestrelease, :scriptbetarelease, :scriptstatus, :user_id, :user_name, :membership_id, :oganization_id, :version_id, :author_id, :licence_id)
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
74
|
end
|
@@ -1,83 +1,83 @@
|
|
1
1
|
require_dependency "phcscriptcdnpro/application_controller"
|
2
2
|
|
3
3
|
module Phcscriptcdnpro
|
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
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
4
|
+
class Script::UrlsController < ApplicationController
|
5
|
+
|
6
|
+
# Filters & Security
|
7
|
+
before_action :require_user
|
8
|
+
before_action :set_script_url, only: [:show, :edit, :update, :destroy]
|
9
|
+
|
10
|
+
# INDEX - Script Authors
|
11
|
+
def index
|
12
|
+
script_listing = Script::Listing.find(params[:listing_id])
|
13
|
+
@script_urls = script_listing.urls
|
14
|
+
end
|
15
|
+
|
16
|
+
# DETAILED PROFILE - Script Authors
|
17
|
+
def show
|
18
|
+
script_listing = Script::Listing.find(params[:listing_id])
|
19
|
+
@script_url = script_listing.urls.find(params[:id])
|
20
|
+
end
|
21
|
+
|
22
|
+
# NEW - Script Athors
|
23
|
+
def new
|
24
|
+
script_listing = Script::Listing.find(params[:listing_id])
|
25
|
+
@script_url = script_listing.urls.build
|
26
|
+
end
|
27
|
+
|
28
|
+
# EDIT - Script Athors
|
29
|
+
def edit
|
30
|
+
script_listing = Script::Listing.find(params[:listing_id])
|
31
|
+
@script_url = script_listing.urls.find(params[:id])
|
32
|
+
end
|
33
|
+
|
34
|
+
# POST - Script Athors
|
35
|
+
def create
|
36
|
+
@script_listing = Script::Listing.find(params[:listing_id])
|
37
|
+
@script_url = @script_listing.urls.create(script_url_params)
|
38
|
+
@script_url.user_id = current_user.id
|
39
|
+
@script_url.user_name = current_user.username
|
40
|
+
@script_url.membership_id = membership_info.id
|
41
|
+
@script_url.oganization_id = membership_info.org_id
|
42
|
+
if @script_url.save
|
43
|
+
redirect_to script_listing_urls_path, notice: 'Author was successfully created.'
|
44
|
+
else
|
45
|
+
render :new
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# PATCH/PUT - Script Athors
|
50
|
+
def update
|
51
|
+
@script_url.user_id = current_user.id
|
52
|
+
@script_url.user_name = current_user.username
|
53
|
+
@script_url.membership_id = membership_info.id
|
54
|
+
@script_url.oganization_id = membership_info.org_id
|
55
|
+
if @script_url.update(script_url_params)
|
56
|
+
redirect_to script_listing_urls_path, notice: 'Author was successfully updated.'
|
57
|
+
else
|
58
|
+
render :edit
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# DELETE - Script Athors
|
63
|
+
def destroy
|
64
|
+
@script_listing = Script::Listing.find(params[:listing_id])
|
65
|
+
@script_url = @script_listing.urls.find(params[:id])
|
66
|
+
@script_url.destroy
|
67
|
+
redirect_to script_listing_urls_path, notice: 'Author was successfully destroyed.'
|
68
|
+
end
|
69
|
+
|
70
|
+
private
|
71
|
+
|
72
|
+
# Common Callbacks
|
73
|
+
def set_script_url
|
74
|
+
@script_url = Script::Url.find(params[:id])
|
75
|
+
end
|
76
|
+
|
77
|
+
# Whitelists
|
78
|
+
def script_url_params
|
79
|
+
params.require(:script_url).permit(:scripturl, :scripturlrelease, :scripturlcdnupdate, :user_id, :user_name, :membership_id, :oganization_id, :listing_id, :version_id, :extension_id)
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
83
|
end
|