phcscriptcdnpro 5.8.4 → 5.8.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +5 -6
  4. data/Rakefile +11 -14
  5. data/app/controllers/phcscriptcdnpro/application_controller.rb +48 -46
  6. data/app/controllers/phcscriptcdnpro/frontend/listings_controller.rb +4 -2
  7. data/app/controllers/phcscriptcdnpro/script/authors_controller.rb +70 -70
  8. data/app/controllers/phcscriptcdnpro/script/extensions_controller.rb +70 -70
  9. data/app/controllers/phcscriptcdnpro/script/licences_controller.rb +70 -70
  10. data/app/controllers/phcscriptcdnpro/script/listings_controller.rb +70 -70
  11. data/app/controllers/phcscriptcdnpro/script/urls_controller.rb +79 -79
  12. data/app/controllers/phcscriptcdnpro/script/versions_controller.rb +71 -69
  13. data/app/helpers/phcscriptcdnpro/application_helper.rb +9 -10
  14. data/app/jobs/phcscriptcdnpro/application_job.rb +2 -3
  15. data/app/mailers/phcscriptcdnpro/application_mailer.rb +4 -4
  16. data/app/models/phcscriptcdnpro/application_record.rb +3 -3
  17. data/app/models/phcscriptcdnpro/frontend.rb +2 -0
  18. data/app/models/phcscriptcdnpro/frontend/listing.rb +1 -2
  19. data/app/models/phcscriptcdnpro/script.rb +5 -5
  20. data/app/models/phcscriptcdnpro/script/author.rb +5 -5
  21. data/app/models/phcscriptcdnpro/script/extension.rb +6 -6
  22. data/app/models/phcscriptcdnpro/script/licence.rb +5 -5
  23. data/app/models/phcscriptcdnpro/script/listing.rb +13 -11
  24. data/app/models/phcscriptcdnpro/script/url.rb +9 -9
  25. data/app/models/phcscriptcdnpro/script/version.rb +7 -7
  26. data/app/views/layouts/phcscriptcdnpro/application.html.erb +6 -7
  27. data/app/views/layouts/phcscriptcdnpro/components/backend/footer/_footer.html.erb +1 -1
  28. data/app/views/layouts/phcscriptcdnpro/components/backend/navigation/_top_bar.html.erb +0 -1
  29. data/app/views/layouts/phcscriptcdnpro/components/backend/sidebars/_left_sidebar.html.erb +1 -2
  30. data/app/views/layouts/phcscriptcdnpro/frontend.html.erb +14 -16
  31. data/app/views/phcscriptcdnpro/frontend/listings/index.html.erb +30 -30
  32. data/app/views/phcscriptcdnpro/frontend/listings/show.html.erb +12 -12
  33. data/app/views/phcscriptcdnpro/script/authors/_form.html.erb +6 -0
  34. data/app/views/phcscriptcdnpro/script/authors/edit.html.erb +6 -7
  35. data/app/views/phcscriptcdnpro/script/authors/index.html.erb +19 -23
  36. data/app/views/phcscriptcdnpro/script/authors/new.html.erb +6 -7
  37. data/app/views/phcscriptcdnpro/script/authors/show.html.erb +6 -6
  38. data/app/views/phcscriptcdnpro/script/extensions/_form.html.erb +6 -0
  39. data/app/views/phcscriptcdnpro/script/extensions/edit.html.erb +8 -9
  40. data/app/views/phcscriptcdnpro/script/extensions/index.html.erb +6 -8
  41. data/app/views/phcscriptcdnpro/script/extensions/new.html.erb +8 -9
  42. data/app/views/phcscriptcdnpro/script/extensions/show.html.erb +7 -9
  43. data/app/views/phcscriptcdnpro/script/licences/_form.html.erb +7 -0
  44. data/app/views/phcscriptcdnpro/script/licences/edit.html.erb +6 -7
  45. data/app/views/phcscriptcdnpro/script/licences/index.html.erb +10 -12
  46. data/app/views/phcscriptcdnpro/script/licences/new.html.erb +6 -7
  47. data/app/views/phcscriptcdnpro/script/licences/show.html.erb +5 -7
  48. data/app/views/phcscriptcdnpro/script/listings/_form.html.erb +7 -1
  49. data/app/views/phcscriptcdnpro/script/listings/edit.html.erb +15 -0
  50. data/app/views/phcscriptcdnpro/script/listings/index.html.erb +14 -4
  51. data/app/views/phcscriptcdnpro/script/listings/new.html.erb +15 -0
  52. data/app/views/phcscriptcdnpro/script/listings/show.html.erb +14 -0
  53. data/app/views/phcscriptcdnpro/script/urls/_form.html.erb +6 -0
  54. data/app/views/phcscriptcdnpro/script/urls/edit.html.erb +17 -6
  55. data/app/views/phcscriptcdnpro/script/urls/index.html.erb +14 -7
  56. data/app/views/phcscriptcdnpro/script/urls/new.html.erb +17 -7
  57. data/app/views/phcscriptcdnpro/script/urls/show.html.erb +14 -10
  58. data/app/views/phcscriptcdnpro/script/versions/_form.html.erb +7 -0
  59. data/app/views/phcscriptcdnpro/script/versions/edit.html.erb +12 -8
  60. data/app/views/phcscriptcdnpro/script/versions/index.html.erb +11 -5
  61. data/app/views/phcscriptcdnpro/script/versions/new.html.erb +12 -8
  62. data/app/views/phcscriptcdnpro/script/versions/show.html.erb +11 -6
  63. data/config/routes.rb +21 -26
  64. data/db/migrate/20160821183652_create_phcscriptcdnpro_script_listings.rb +23 -23
  65. data/db/migrate/20160821183714_create_phcscriptcdnpro_script_authors.rb +17 -17
  66. data/db/migrate/20160821183735_create_phcscriptcdnpro_script_extensions.rb +12 -12
  67. data/db/migrate/20160821183805_create_phcscriptcdnpro_script_licences.rb +18 -18
  68. data/db/migrate/20160821183830_create_phcscriptcdnpro_script_urls.rb +16 -16
  69. data/db/migrate/20160821183946_create_phcscriptcdnpro_script_versions.rb +10 -10
  70. data/lib/phcscriptcdnpro/engine.rb +62 -61
  71. data/lib/phcscriptcdnpro/version.rb +1 -1
  72. metadata +2 -2
@@ -1,74 +1,74 @@
1
1
  require_dependency "phcscriptcdnpro/application_controller"
2
2
 
3
3
  module Phcscriptcdnpro
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
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
- 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
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
- 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
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