phcscriptcdn 7.0.0 → 7.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -20
  3. data/README.md +43 -43
  4. data/Rakefile +33 -33
  5. data/app/assets/config/phcscriptcdn_manifest.js +2 -2
  6. data/app/assets/javascripts/phcscriptcdn/application.js +2 -2
  7. data/app/assets/stylesheets/phcscriptcdn/application.scss +2 -2
  8. data/app/controllers/phcscriptcdn/application_controller.rb +12 -12
  9. data/app/controllers/phcscriptcdn/script/authors_controller.rb +65 -65
  10. data/app/controllers/phcscriptcdn/script/extensions_controller.rb +65 -65
  11. data/app/controllers/phcscriptcdn/script/licences_controller.rb +65 -65
  12. data/app/controllers/phcscriptcdn/script/listings_controller.rb +65 -65
  13. data/app/controllers/phcscriptcdn/script/urls_controller.rb +74 -74
  14. data/app/controllers/phcscriptcdn/script/versions_controller.rb +65 -65
  15. data/app/helpers/phcscriptcdn/application_helper.rb +14 -14
  16. data/app/jobs/phcscriptcdn/application_job.rb +4 -4
  17. data/app/models/phcscriptcdn/application_record.rb +4 -4
  18. data/app/models/phcscriptcdn/script.rb +6 -6
  19. data/app/models/phcscriptcdn/script/author.rb +20 -20
  20. data/app/models/phcscriptcdn/script/extension.rb +24 -24
  21. data/app/models/phcscriptcdn/script/licence.rb +23 -23
  22. data/app/models/phcscriptcdn/script/listing.rb +32 -32
  23. data/app/models/phcscriptcdn/script/url.rb +26 -26
  24. data/app/models/phcscriptcdn/script/version.rb +20 -20
  25. data/app/views/layouts/phcscriptcdn/application.html.erb +56 -56
  26. data/app/views/layouts/phcscriptcdn/components/backend/footer/_footer.html.erb +4 -4
  27. data/app/views/layouts/phcscriptcdn/components/backend/navigation/_navigation.html.erb +56 -56
  28. data/app/views/layouts/phcscriptcdn/components/backend/topbar/_topbar.html.erb +5 -5
  29. data/app/views/layouts/phcscriptcdn/components/backend/topbar/_topbar_links.html.erb +0 -0
  30. data/app/views/layouts/phcscriptcdn/frontend.html.erb +22 -22
  31. data/app/views/phcscriptcdn/script/authors/_form.html.erb +36 -36
  32. data/app/views/phcscriptcdn/script/authors/edit.html.erb +39 -39
  33. data/app/views/phcscriptcdn/script/authors/index.html.erb +67 -67
  34. data/app/views/phcscriptcdn/script/authors/new.html.erb +39 -39
  35. data/app/views/phcscriptcdn/script/authors/show.html.erb +42 -42
  36. data/app/views/phcscriptcdn/script/extensions/_form.html.erb +28 -28
  37. data/app/views/phcscriptcdn/script/extensions/edit.html.erb +39 -39
  38. data/app/views/phcscriptcdn/script/extensions/index.html.erb +61 -61
  39. data/app/views/phcscriptcdn/script/extensions/new.html.erb +38 -38
  40. data/app/views/phcscriptcdn/script/extensions/show.html.erb +42 -42
  41. data/app/views/phcscriptcdn/script/licences/_form.html.erb +47 -47
  42. data/app/views/phcscriptcdn/script/licences/edit.html.erb +39 -39
  43. data/app/views/phcscriptcdn/script/licences/index.html.erb +71 -71
  44. data/app/views/phcscriptcdn/script/licences/new.html.erb +39 -39
  45. data/app/views/phcscriptcdn/script/licences/show.html.erb +42 -42
  46. data/app/views/phcscriptcdn/script/listings/_form.html.erb +68 -68
  47. data/app/views/phcscriptcdn/script/listings/edit.html.erb +39 -39
  48. data/app/views/phcscriptcdn/script/listings/index.html.erb +65 -65
  49. data/app/views/phcscriptcdn/script/listings/new.html.erb +39 -39
  50. data/app/views/phcscriptcdn/script/listings/show.html.erb +40 -40
  51. data/app/views/phcscriptcdn/script/urls/_form.html.erb +36 -36
  52. data/app/views/phcscriptcdn/script/urls/edit.html.erb +39 -39
  53. data/app/views/phcscriptcdn/script/urls/index.html.erb +63 -63
  54. data/app/views/phcscriptcdn/script/urls/new.html.erb +39 -39
  55. data/app/views/phcscriptcdn/script/urls/show.html.erb +41 -41
  56. data/app/views/phcscriptcdn/script/versions/_form.html.erb +20 -20
  57. data/app/views/phcscriptcdn/script/versions/edit.html.erb +39 -39
  58. data/app/views/phcscriptcdn/script/versions/index.html.erb +59 -59
  59. data/app/views/phcscriptcdn/script/versions/new.html.erb +39 -39
  60. data/app/views/phcscriptcdn/script/versions/show.html.erb +42 -42
  61. data/config/initializers/friendly_id.rb +92 -92
  62. data/config/routes.rb +30 -30
  63. data/db/migrate/20160731205205_create_phcscriptcdn_script_extensions.rb +20 -20
  64. data/db/migrate/20160731205917_create_phcscriptcdn_script_listings.rb +35 -35
  65. data/db/migrate/20160731205954_create_phcscriptcdn_script_versions.rb +18 -18
  66. data/db/migrate/20160731210626_create_phcscriptcdn_script_urls.rb +24 -24
  67. data/db/migrate/20160731210723_create_phcscriptcdn_script_authors.rb +23 -23
  68. data/db/migrate/20160801032225_create_phcscriptcdn_script_licences.rb +27 -27
  69. data/db/migrate/20170423022446_create_friendly_id_slugs.rb +15 -15
  70. data/lib/phcscriptcdn.rb +4 -4
  71. data/lib/phcscriptcdn/engine.rb +68 -68
  72. data/lib/phcscriptcdn/version.rb +3 -3
  73. data/lib/tasks/phcscriptcdn_tasks.rake +4 -4
  74. metadata +47 -5
@@ -1,65 +1,65 @@
1
- require_dependency "phcscriptcdn/application_controller"
2
-
3
- module Phcscriptcdn
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
- end
1
+ require_dependency "phcscriptcdn/application_controller"
2
+
3
+ module Phcscriptcdn
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
+ end
@@ -1,65 +1,65 @@
1
- require_dependency "phcscriptcdn/application_controller"
2
-
3
- module Phcscriptcdn
4
- class Script::ListingsController < ApplicationController
5
-
6
- # Filters & Security
7
- before_action :set_script_listing, only: [:show, :edit, :update, :destroy]
8
-
9
- # INDEX - Script Listings
10
- def index
11
- @script_listings = Script::Listing.all
12
- end
13
-
14
- # DETAILS - Script Listings
15
- def show
16
- end
17
-
18
- # NEW - Script Listings
19
- def new
20
- @script_listing = Script::Listing.new
21
- end
22
-
23
- # EDIT - Script Listings
24
- def edit
25
- end
26
-
27
- # POST - Script Listings
28
- def create
29
- @script_listing = Script::Listing.new(script_listing_params)
30
- if @script_listing.save
31
- redirect_to script_listings_path, notice: 'Listing was successfully created.'
32
- else
33
- render :new
34
- end
35
- end
36
-
37
- # PATCH/PUT - Script Listings
38
- def update
39
- if @script_listing.update(script_listing_params)
40
- redirect_to script_listings_path, notice: 'Listing was successfully updated.'
41
- else
42
- render :edit
43
- end
44
- end
45
-
46
- # DELETE - Script Listings
47
- def destroy
48
- @script_listing.destroy
49
- redirect_to script_listings_path, notice: 'Listing was successfully destroyed.'
50
- end
51
-
52
- private
53
-
54
- # Common Callbacks
55
- def set_script_listing
56
- @script_listing = Script::Listing.find(params[:id])
57
- end
58
-
59
- # Whitelist
60
- def script_listing_params
61
- params.require(:script_listing).permit(:scripttitle, :scriptdescription, :descriptionsource, :scriptwebsite, :scripttwitter, :scriptgithub, :scriptinitialrelease, :scriptlastestrelease, :scriptbetarelease, :scriptstatus, :user_id, :user_name, :version_id, :author_id, :licence_id)
62
- end
63
-
64
- end
65
- end
1
+ require_dependency "phcscriptcdn/application_controller"
2
+
3
+ module Phcscriptcdn
4
+ class Script::ListingsController < ApplicationController
5
+
6
+ # Filters & Security
7
+ before_action :set_script_listing, only: [:show, :edit, :update, :destroy]
8
+
9
+ # INDEX - Script Listings
10
+ def index
11
+ @script_listings = Script::Listing.all
12
+ end
13
+
14
+ # DETAILS - Script Listings
15
+ def show
16
+ end
17
+
18
+ # NEW - Script Listings
19
+ def new
20
+ @script_listing = Script::Listing.new
21
+ end
22
+
23
+ # EDIT - Script Listings
24
+ def edit
25
+ end
26
+
27
+ # POST - Script Listings
28
+ def create
29
+ @script_listing = Script::Listing.new(script_listing_params)
30
+ if @script_listing.save
31
+ redirect_to script_listings_path, notice: 'Listing was successfully created.'
32
+ else
33
+ render :new
34
+ end
35
+ end
36
+
37
+ # PATCH/PUT - Script Listings
38
+ def update
39
+ if @script_listing.update(script_listing_params)
40
+ redirect_to script_listings_path, notice: 'Listing was successfully updated.'
41
+ else
42
+ render :edit
43
+ end
44
+ end
45
+
46
+ # DELETE - Script Listings
47
+ def destroy
48
+ @script_listing.destroy
49
+ redirect_to script_listings_path, notice: 'Listing was successfully destroyed.'
50
+ end
51
+
52
+ private
53
+
54
+ # Common Callbacks
55
+ def set_script_listing
56
+ @script_listing = Script::Listing.find(params[:id])
57
+ end
58
+
59
+ # Whitelist
60
+ def script_listing_params
61
+ params.require(:script_listing).permit(:scripttitle, :scriptdescription, :descriptionsource, :scriptwebsite, :scripttwitter, :scriptgithub, :scriptinitialrelease, :scriptlastestrelease, :scriptbetarelease, :scriptstatus, :user_id, :user_name, :version_id, :author_id, :licence_id)
62
+ end
63
+
64
+ end
65
+ end
@@ -1,74 +1,74 @@
1
- require_dependency "phcscriptcdn/application_controller"
2
-
3
- module Phcscriptcdn
4
- class Script::UrlsController < ApplicationController
5
-
6
- # Filters & Security
7
- before_action :set_script_url, only: [:show, :edit, :update, :destroy]
8
-
9
- # INDEX - Script Authors
10
- def index
11
- script_listing = Script::Listing.find(params[:listing_id])
12
- @script_urls = script_listing.urls
13
- end
14
-
15
- # DETAILED PROFILE - Script Authors
16
- def show
17
- script_listing = Script::Listing.find(params[:listing_id])
18
- @script_url = script_listing.urls.find(params[:id])
19
- end
20
-
21
- # NEW - Script Athors
22
- def new
23
- script_listing = Script::Listing.find(params[:listing_id])
24
- @script_url = script_listing.urls.build
25
- end
26
-
27
- # EDIT - Script Athors
28
- def edit
29
- script_listing = Script::Listing.find(params[:listing_id])
30
- @script_url = script_listing.urls.find(params[:id])
31
- end
32
-
33
- # POST - Script Athors
34
- def create
35
- @script_listing = Script::Listing.find(params[:listing_id])
36
- @script_url = @script_listing.urls.create(script_url_params)
37
- if @script_url.save
38
- redirect_to script_listing_urls_path, notice: 'Author was successfully created.'
39
- else
40
- render :new
41
- end
42
- end
43
-
44
- # PATCH/PUT - Script Athors
45
- def update
46
- if @script_url.update(script_url_params)
47
- redirect_to script_listing_urls_path, notice: 'Author was successfully updated.'
48
- else
49
- render :edit
50
- end
51
- end
52
-
53
- # DELETE - Script Athors
54
- def destroy
55
- @script_listing = Script::Listing.find(params[:listing_id])
56
- @script_url = @script_listing.urls.find(params[:id])
57
- @script_url.destroy
58
- redirect_to script_listing_urls_path, notice: 'Author was successfully destroyed.'
59
- end
60
-
61
- private
62
-
63
- # Common Callbacks
64
- def set_script_url
65
- @script_url = Script::Url.find(params[:id])
66
- end
67
-
68
- # Whitelists
69
- def script_url_params
70
- params.require(:script_url).permit(:scripturl, :scripturlrelease, :scripturlcdnupdate, :user_id, :user_name, :listing_id, :version_id, :extension_id)
71
- end
72
-
73
- end
74
- end
1
+ require_dependency "phcscriptcdn/application_controller"
2
+
3
+ module Phcscriptcdn
4
+ class Script::UrlsController < ApplicationController
5
+
6
+ # Filters & Security
7
+ before_action :set_script_url, only: [:show, :edit, :update, :destroy]
8
+
9
+ # INDEX - Script Authors
10
+ def index
11
+ script_listing = Script::Listing.find(params[:listing_id])
12
+ @script_urls = script_listing.urls
13
+ end
14
+
15
+ # DETAILED PROFILE - Script Authors
16
+ def show
17
+ script_listing = Script::Listing.find(params[:listing_id])
18
+ @script_url = script_listing.urls.find(params[:id])
19
+ end
20
+
21
+ # NEW - Script Athors
22
+ def new
23
+ script_listing = Script::Listing.find(params[:listing_id])
24
+ @script_url = script_listing.urls.build
25
+ end
26
+
27
+ # EDIT - Script Athors
28
+ def edit
29
+ script_listing = Script::Listing.find(params[:listing_id])
30
+ @script_url = script_listing.urls.find(params[:id])
31
+ end
32
+
33
+ # POST - Script Athors
34
+ def create
35
+ @script_listing = Script::Listing.find(params[:listing_id])
36
+ @script_url = @script_listing.urls.create(script_url_params)
37
+ if @script_url.save
38
+ redirect_to script_listing_urls_path, notice: 'Author was successfully created.'
39
+ else
40
+ render :new
41
+ end
42
+ end
43
+
44
+ # PATCH/PUT - Script Athors
45
+ def update
46
+ if @script_url.update(script_url_params)
47
+ redirect_to script_listing_urls_path, notice: 'Author was successfully updated.'
48
+ else
49
+ render :edit
50
+ end
51
+ end
52
+
53
+ # DELETE - Script Athors
54
+ def destroy
55
+ @script_listing = Script::Listing.find(params[:listing_id])
56
+ @script_url = @script_listing.urls.find(params[:id])
57
+ @script_url.destroy
58
+ redirect_to script_listing_urls_path, notice: 'Author was successfully destroyed.'
59
+ end
60
+
61
+ private
62
+
63
+ # Common Callbacks
64
+ def set_script_url
65
+ @script_url = Script::Url.find(params[:id])
66
+ end
67
+
68
+ # Whitelists
69
+ def script_url_params
70
+ params.require(:script_url).permit(:scripturl, :scripturlrelease, :scripturlcdnupdate, :user_id, :user_name, :listing_id, :version_id, :extension_id)
71
+ end
72
+
73
+ end
74
+ end
@@ -1,65 +1,65 @@
1
- require_dependency "phcscriptcdn/application_controller"
2
-
3
- module Phcscriptcdn
4
- class Script::VersionsController < ApplicationController
5
-
6
- # Filters & Security
7
- before_action :set_script_version, only: [:show, :edit, :update, :destroy]
8
-
9
- # INDEX - Script Versions
10
- def index
11
- @script_versions = Script::Version.all
12
- end
13
-
14
- # DETAILS - Script Versions
15
- def show
16
- end
17
-
18
- # NEW - Script Versions
19
- def new
20
- @script_version = Script::Version.new
21
- end
22
-
23
- # EDIT - Script Versions
24
- def edit
25
- end
26
-
27
- # POST - Script Versions
28
- def create
29
- @script_version = Script::Version.new(script_version_params)
30
- if @script_version.save
31
- redirect_to script_versions_url, notice: 'Version was successfully created.'
32
- else
33
- render :new
34
- end
35
- end
36
-
37
- # PATCH/PUT - Script Versions
38
- def update
39
- if @script_version.update(script_version_params)
40
- redirect_to script_versions_url, notice: 'Version was successfully updated.'
41
- else
42
- render :edit
43
- end
44
- end
45
-
46
- # DELETE - Script Versions
47
- def destroy
48
- @script_version.destroy
49
- redirect_to script_versions_url, notice: 'Version was successfully destroyed.'
50
- end
51
-
52
- private
53
-
54
- # Common Callbacks
55
- def set_script_version
56
- @script_version = Script::Version.find(params[:id])
57
- end
58
-
59
- # Only allow a trusted parameter "white list" through.
60
- def script_version_params
61
- params.require(:script_version).permit(:scriptversion, :user_id, :user_name)
62
- end
63
-
64
- end
65
- end
1
+ require_dependency "phcscriptcdn/application_controller"
2
+
3
+ module Phcscriptcdn
4
+ class Script::VersionsController < ApplicationController
5
+
6
+ # Filters & Security
7
+ before_action :set_script_version, only: [:show, :edit, :update, :destroy]
8
+
9
+ # INDEX - Script Versions
10
+ def index
11
+ @script_versions = Script::Version.all
12
+ end
13
+
14
+ # DETAILS - Script Versions
15
+ def show
16
+ end
17
+
18
+ # NEW - Script Versions
19
+ def new
20
+ @script_version = Script::Version.new
21
+ end
22
+
23
+ # EDIT - Script Versions
24
+ def edit
25
+ end
26
+
27
+ # POST - Script Versions
28
+ def create
29
+ @script_version = Script::Version.new(script_version_params)
30
+ if @script_version.save
31
+ redirect_to script_versions_url, notice: 'Version was successfully created.'
32
+ else
33
+ render :new
34
+ end
35
+ end
36
+
37
+ # PATCH/PUT - Script Versions
38
+ def update
39
+ if @script_version.update(script_version_params)
40
+ redirect_to script_versions_url, notice: 'Version was successfully updated.'
41
+ else
42
+ render :edit
43
+ end
44
+ end
45
+
46
+ # DELETE - Script Versions
47
+ def destroy
48
+ @script_version.destroy
49
+ redirect_to script_versions_url, notice: 'Version was successfully destroyed.'
50
+ end
51
+
52
+ private
53
+
54
+ # Common Callbacks
55
+ def set_script_version
56
+ @script_version = Script::Version.find(params[:id])
57
+ end
58
+
59
+ # Only allow a trusted parameter "white list" through.
60
+ def script_version_params
61
+ params.require(:script_version).permit(:scriptversion, :user_id, :user_name)
62
+ end
63
+
64
+ end
65
+ end