phcscriptcdn 3.0.0.pre.beta → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/phcscriptcdn/script/listings_controller.rb +1 -1
- data/app/controllers/phcscriptcdn/script/urls_controller.rb +1 -2
- data/app/models/phcscriptcdn/script/extension.rb +6 -2
- data/app/models/phcscriptcdn/script/listing.rb +5 -1
- data/app/models/phcscriptcdn/script/url.rb +6 -0
- data/app/models/phcscriptcdn/script/version.rb +8 -0
- data/app/views/phcscriptcdn/script/listings/_form.html.erb +5 -0
- data/app/views/phcscriptcdn/script/listings/index.html.erb +5 -5
- data/app/views/phcscriptcdn/script/urls/_form.html.erb +20 -0
- data/app/views/phcscriptcdn/script/urls/edit.html.erb +1 -1
- data/app/views/phcscriptcdn/script/urls/index.html.erb +4 -0
- data/app/views/phcscriptcdn/script/urls/show.html.erb +2 -2
- data/db/migrate/20160731205917_create_phcscriptcdn_script_listings.rb +2 -0
- data/db/migrate/20160731210626_create_phcscriptcdn_script_urls.rb +4 -0
- data/lib/phcscriptcdn/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7ad203f89f8eca7697a4edbc3dae5ec9f520259
|
4
|
+
data.tar.gz: af21d4da5e30605bfe6e4ea36d3c4cd57d2a374a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d72f3db12fbea08fa87832851e8632f8723efaf417a329c9e36fbec2ca2de6f44c0d4607e83bb590cba5934279b0dc5cb6f161013f4aab081de67b5bfbb4a00
|
7
|
+
data.tar.gz: 2f5fb7538506968402826f5da8e08e3ec9880c7a7112d445ae0276eea7ba75f4a6c57546dcc7ff6b7dfd421c45f325d6337d39892b60dfe065124ba66feb598f
|
@@ -58,7 +58,7 @@ module Phcscriptcdn
|
|
58
58
|
|
59
59
|
# Whitelist
|
60
60
|
def script_listing_params
|
61
|
-
params.require(:script_listing).permit(:scripttitle, :scriptdescription, :scriptwebsite, :scripttwitter, :scriptgithub, :scriptinitialrelease, :scriptlastestrelease, :scriptbetarelease, :scriptstatus)
|
61
|
+
params.require(:script_listing).permit(:scripttitle, :scriptdescription, :scriptwebsite, :scripttwitter, :scriptgithub, :scriptinitialrelease, :scriptlastestrelease, :scriptbetarelease, :scriptstatus, :version_id)
|
62
62
|
end
|
63
63
|
|
64
64
|
end
|
@@ -60,7 +60,6 @@ module Phcscriptcdn
|
|
60
60
|
|
61
61
|
private
|
62
62
|
|
63
|
-
|
64
63
|
# Common Callbacks
|
65
64
|
def set_script_url
|
66
65
|
@script_url = Script::Url.find(params[:id])
|
@@ -68,7 +67,7 @@ module Phcscriptcdn
|
|
68
67
|
|
69
68
|
# Whitelists
|
70
69
|
def script_url_params
|
71
|
-
params.require(:script_url).permit(:scripturl, :listing_id)
|
70
|
+
params.require(:script_url).permit(:scripturl, :scripturlrelease, :scripturlcdnupdate, :listing_id, :version_id, :extension_id)
|
72
71
|
end
|
73
72
|
|
74
73
|
end
|
@@ -2,12 +2,16 @@ module Phcscriptcdn
|
|
2
2
|
class Script::Listing < ApplicationRecord
|
3
3
|
|
4
4
|
# Relationships
|
5
|
-
|
5
|
+
|
6
6
|
#has_many :informations, class_name: 'Phcscriptcdn::Script::Version'
|
7
7
|
# URL Nested
|
8
8
|
has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
|
9
|
+
|
9
10
|
# Author Nested
|
10
11
|
has_many :authors, class_name: 'Phcscriptcdn::Script::Author'
|
11
12
|
|
13
|
+
# Attach to Version
|
14
|
+
belongs_to :version, class_name: 'Phcscriptcdn::Script::Version'
|
15
|
+
|
12
16
|
end
|
13
17
|
end
|
@@ -6,5 +6,11 @@ module Phcscriptcdn
|
|
6
6
|
# Attach to Listings
|
7
7
|
belongs_to :listing, class_name: 'Phcscriptcdn::Script::Listing'
|
8
8
|
|
9
|
+
# Attach to Version
|
10
|
+
belongs_to :version, class_name: 'Phcscriptcdn::Script::Version'
|
11
|
+
|
12
|
+
# Attach to Extensions
|
13
|
+
belongs_to :extension, class_name: 'Phcscriptcdn::Script::Extension'
|
14
|
+
|
9
15
|
end
|
10
16
|
end
|
@@ -1,5 +1,13 @@
|
|
1
1
|
module Phcscriptcdn
|
2
2
|
class Script::Version < ApplicationRecord
|
3
3
|
|
4
|
+
#Relationships
|
5
|
+
|
6
|
+
# URL Un-Nested
|
7
|
+
has_many :urls, class_name: 'Phcscriptcdn::Script::Url'
|
8
|
+
|
9
|
+
# Listing Un-Nested
|
10
|
+
has_many :listings, class_name: 'Phcscriptcdn::Script::Listing'
|
11
|
+
|
4
12
|
end
|
5
13
|
end
|
@@ -42,6 +42,11 @@
|
|
42
42
|
<%= f.date_select :scriptbetarelease, class: "form-control" %>
|
43
43
|
</div>
|
44
44
|
|
45
|
+
<div class="form-group field_with_errors">
|
46
|
+
<label>Script Version</label>
|
47
|
+
<%= collection_select(:script_listing, :version_id, Phcscriptcdn::Script::Version.order('scriptversion'), :id, :scriptversion, {}, {class: "form-control"}) %>
|
48
|
+
</div>
|
49
|
+
|
45
50
|
<div class="form-group field_with_error">
|
46
51
|
<%= f.label :scriptstatus, "Script Status" %>
|
47
52
|
<%= f.select( :scriptstatus, [['Active','Active'],['Outdated','Out Dated'],['Deactivated','Not Active']], {}, {class: "form-control form-control"}) %>
|
@@ -30,9 +30,9 @@
|
|
30
30
|
<thead>
|
31
31
|
<tr>
|
32
32
|
<th>Title</th>
|
33
|
-
<th>
|
34
|
-
<th>
|
35
|
-
<th
|
33
|
+
<th>Release Date</th>
|
34
|
+
<th>Latest Release Date</th>
|
35
|
+
<th>Beta Release Date</th>
|
36
36
|
</tr>
|
37
37
|
</thead>
|
38
38
|
|
@@ -41,8 +41,8 @@
|
|
41
41
|
<tr>
|
42
42
|
<td class="vert-align"><%= link_to script_listing.scripttitle, script_listing_path(script_listing) %></td>
|
43
43
|
<td class="vert-align"><%= link_to script_listing.scriptinitialrelease, script_listing_path(script_listing) %></td>
|
44
|
-
<td class="vert-align"><%= link_to script_listing.
|
45
|
-
<td class="vert-align"><%= link_to
|
44
|
+
<td class="vert-align"><%= link_to script_listing.scriptlastestrelease, script_listing_path(script_listing) %></td>
|
45
|
+
<td class="vert-align"><%= link_to script_listing.scriptbetarelease, script_listing_path(script_listing) %></td>
|
46
46
|
</tr>
|
47
47
|
<% end %>
|
48
48
|
</tbody>
|
@@ -5,6 +5,26 @@
|
|
5
5
|
<%= f.text_field :scripturl, placeholder: "Script URL", class: "form-control" %>
|
6
6
|
</div>
|
7
7
|
|
8
|
+
<div class="form-group field_with_error">
|
9
|
+
<%= f.label :scripturlrelease, "Initial Release" %>
|
10
|
+
<%= f.date_select :scripturlrelease, class: "form-control" %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="form-group field_with_error">
|
14
|
+
<%= f.label :scripturlcdnupdate, "Latest Release" %>
|
15
|
+
<%= f.date_select :scripturlcdnupdate, class: "form-control" %>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="form-group field_with_errors">
|
19
|
+
<label>Script Version</label>
|
20
|
+
<%= collection_select(:script_url, :version_id, Phcscriptcdn::Script::Version.order('scriptversion'), :id, :scriptversion, {}, {class: "form-control"}) %>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="form-group field_with_errors">
|
24
|
+
<label>Script Extensions</label>
|
25
|
+
<%= collection_select(:script_url, :extension_id, Phcscriptcdn::Script::Extension.order('scriptextensionname'), :id, :scriptextension, {}, {class: "form-control"}) %>
|
26
|
+
</div>
|
27
|
+
|
8
28
|
<div class="actions">
|
9
29
|
<%= f.submit class: "btn btn-primary" %>
|
10
30
|
</div>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<!-- Bread Crumbs -->
|
10
10
|
<ol class="breadcrumb">
|
11
11
|
<li><%= link_to "Script Listings Index", script_listings_path %></li>
|
12
|
-
<li><%= link_to "URL Index",
|
12
|
+
<li><%= link_to "URL Index", script_listing_urls_path %></li>
|
13
13
|
<li class="active"><%= yield(:phc_title_tagline) %></li>
|
14
14
|
</ol>
|
15
15
|
|
@@ -29,6 +29,8 @@
|
|
29
29
|
<thead>
|
30
30
|
<tr>
|
31
31
|
<th>Script URL</th>
|
32
|
+
<th>Release Date</th>
|
33
|
+
<th>CDN Update Date</th>
|
32
34
|
</tr>
|
33
35
|
</thead>
|
34
36
|
|
@@ -36,6 +38,8 @@
|
|
36
38
|
<% @script_urls.each do |script_url| %>
|
37
39
|
<tr>
|
38
40
|
<td><%= link_to script_url.scripturl, script_listing_url_path(script_url.listing, script_url) %></td>
|
41
|
+
<td><%= link_to script_url.scripturlrelease, script_listing_url_path(script_url.listing, script_url) %></td>
|
42
|
+
<td><%= link_to script_url.scripturlcdnupdate, script_listing_url_path(script_url.listing, script_url) %></td>
|
39
43
|
</tr>
|
40
44
|
<% end %>
|
41
45
|
</tbody>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<div class="btn-group" role="group" aria-label="url_button_group">
|
2
|
-
<%= link_to 'Edit',
|
3
|
-
<%= link_to 'Destroy',
|
2
|
+
<%= link_to 'Edit', edit_script_listing_url_path, class: "btn btn-primary" %>
|
3
|
+
<%= link_to 'Destroy', script_listing_url_path, method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-primary" %>
|
4
4
|
</div>
|
@@ -4,8 +4,12 @@ class CreatePhcscriptcdnScriptUrls < ActiveRecord::Migration[5.0]
|
|
4
4
|
create_table :phcscriptcdn_script_urls do |t|
|
5
5
|
|
6
6
|
t.string :scripturl
|
7
|
+
t.date :scripturlrelease
|
8
|
+
t.date :scripturlcdnupdate
|
7
9
|
|
8
10
|
t.references :listing
|
11
|
+
t.references :version
|
12
|
+
t.references :extension
|
9
13
|
|
10
14
|
t.timestamps
|
11
15
|
|
data/lib/phcscriptcdn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcscriptcdn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BradPotts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -558,9 +558,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
558
558
|
version: '0'
|
559
559
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
560
560
|
requirements:
|
561
|
-
- - "
|
561
|
+
- - ">="
|
562
562
|
- !ruby/object:Gem::Version
|
563
|
-
version:
|
563
|
+
version: '0'
|
564
564
|
requirements: []
|
565
565
|
rubyforge_project:
|
566
566
|
rubygems_version: 2.5.1
|