phcdevworks_scripts 2.3.1 → 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/phcdevworks_scripts/script/extensions_controller.rb +1 -1
- data/app/controllers/phcdevworks_scripts/script/urls_controller.rb +1 -1
- data/app/controllers/phcdevworks_scripts/script/versions_controller.rb +1 -1
- data/app/models/phcdevworks_scripts/script/extension.rb +4 -4
- data/app/models/phcdevworks_scripts/script/url.rb +3 -3
- data/app/models/phcdevworks_scripts/script/version.rb +2 -2
- data/app/models/phcdevworks_scripts/snippet/url.rb +1 -1
- data/app/views/phcdevworks_scripts/script/extensions/_form.html.erb +6 -6
- data/app/views/phcdevworks_scripts/script/extensions/index.html.erb +2 -2
- data/app/views/phcdevworks_scripts/script/urls/_form.html.erb +8 -8
- data/app/views/phcdevworks_scripts/script/urls/index.html.erb +3 -3
- data/app/views/phcdevworks_scripts/script/versions/_form.html.erb +2 -2
- data/app/views/phcdevworks_scripts/script/versions/index.html.erb +1 -1
- data/db/migrate/20190818023709_create_phcdevworks_scripts_script_extensions.rb +3 -3
- data/db/migrate/20190818023911_create_phcdevworks_scripts_script_urls.rb +3 -3
- data/db/migrate/20190818031653_create_phcdevworks_scripts_script_versions.rb +1 -1
- data/lib/phcdevworks_scripts/version.rb +1 -1
- metadata +2 -3
- data/app/assets/stylesheets/scaffolds.scss +0 -65
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f1c4678d3d274426be9a10d46ecad0839f25527e464dc81c9d1cc43df129579
|
4
|
+
data.tar.gz: 38e877adc4fd67d2fa5b82577a2095868c8298e234e89db5ba02fe6c9cd71692
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 697117c0212ea9efb47293c5419e0429a8b9665d08d870fe3195f81b4c9147a7a7a208be2621d5ae969e16fa181139d4356301e2f51950fa05122296603edd5a
|
7
|
+
data.tar.gz: 57c0849d3268c50c962ca4fbc0a15b85ee4934015cd04707c41d672187e93eb673bfaaa3891d7116f7a47a5f8f76fe53c9cfe64c65e9950e06d5b32bbd655d1c
|
@@ -76,7 +76,7 @@ module PhcdevworksScripts
|
|
76
76
|
|
77
77
|
# Whitelist
|
78
78
|
def script_extension_params
|
79
|
-
params.require(:script_extension).permit(:
|
79
|
+
params.require(:script_extension).permit(:extension_name, :extension_description, :extension)
|
80
80
|
end
|
81
81
|
|
82
82
|
end
|
@@ -71,7 +71,7 @@ module PhcdevworksScripts
|
|
71
71
|
|
72
72
|
# Whitelist
|
73
73
|
def script_url_params
|
74
|
-
params.require(:script_url).permit(:
|
74
|
+
params.require(:script_url).permit(:cdn_url, :cdn_url_release, :cdn_url_cdn_update, :version_id, :extension_id)
|
75
75
|
end
|
76
76
|
|
77
77
|
end
|
@@ -12,20 +12,20 @@ module PhcdevworksScripts
|
|
12
12
|
has_many :urls, class_name: 'PhcdevworksScripts::Script::Url'
|
13
13
|
|
14
14
|
# Form Fields Validation
|
15
|
-
validates :
|
15
|
+
validates :extension_name,
|
16
16
|
presence: true
|
17
17
|
|
18
|
-
validates :
|
18
|
+
validates :extension_description,
|
19
19
|
presence: true
|
20
20
|
|
21
|
-
validates :
|
21
|
+
validates :extension,
|
22
22
|
presence: true
|
23
23
|
|
24
24
|
# Clean URL Define
|
25
25
|
friendly_id :phcdev_script_extension_nice_urls, use: [:slugged, :finders]
|
26
26
|
|
27
27
|
def phcdev_script_extension_nice_urls
|
28
|
-
[:
|
28
|
+
[:extension]
|
29
29
|
end
|
30
30
|
|
31
31
|
end
|
@@ -10,14 +10,14 @@ module PhcdevworksScripts
|
|
10
10
|
belongs_to :version, class_name: 'PhcdevworksScripts::Script::Version', optional: true
|
11
11
|
|
12
12
|
# Form Fields Validation
|
13
|
-
validates :
|
13
|
+
validates :cdn_url,
|
14
14
|
presence: true,
|
15
15
|
format: { with: URI::regexp(%w(http https)), message: "Please follow this URL format http or https://www.**********.com" }
|
16
16
|
|
17
|
-
validates :
|
17
|
+
validates :cdn_url_release,
|
18
18
|
presence: true
|
19
19
|
|
20
|
-
validates :
|
20
|
+
validates :cdn_url_cdn_update,
|
21
21
|
presence: true
|
22
22
|
|
23
23
|
end
|
@@ -12,14 +12,14 @@ module PhcdevworksScripts
|
|
12
12
|
has_many :urls, class_name: 'PhcdevworksScripts::Script::Url'
|
13
13
|
|
14
14
|
# Form Fields Validation
|
15
|
-
validates :
|
15
|
+
validates :version_number,
|
16
16
|
presence: true
|
17
17
|
|
18
18
|
# Clean URL Define
|
19
19
|
friendly_id :phcdev_script_version_nice_urls, use: [:slugged, :finders]
|
20
20
|
|
21
21
|
def phcdev_script_version_nice_urls
|
22
|
-
[:
|
22
|
+
[:version_number]
|
23
23
|
end
|
24
24
|
|
25
25
|
end
|
@@ -8,7 +8,7 @@ module PhcdevworksScripts
|
|
8
8
|
belongs_to :snippet, class_name: 'PhcdevworksScripts::Script::Snippet'
|
9
9
|
|
10
10
|
# Form Fields Validation
|
11
|
-
validates :
|
11
|
+
validates :snippet_url,
|
12
12
|
presence: true,
|
13
13
|
format: { :with => phc_domain_regx, message: "Please follow this URL format http or https://www.**********.com" }
|
14
14
|
|
@@ -7,18 +7,18 @@
|
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
9
|
<div class="form-group field_with_errors">
|
10
|
-
<%= form.label :
|
11
|
-
<%= form.text_field :
|
10
|
+
<%= form.label :extension_name, "Extension Name" %>
|
11
|
+
<%= form.text_field :extension_name, placeholder: "Extension Name", class: "form-control" %>
|
12
12
|
</div>
|
13
13
|
|
14
14
|
<div class="form-group field_with_errors">
|
15
|
-
<%= form.label :
|
16
|
-
<%= form.text_area :
|
15
|
+
<%= form.label :extension_description, "Extension Description" %>
|
16
|
+
<%= form.text_area :extension_description, placeholder: "Extension Description", class: "form-control" %>
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<div class="form-group field_with_errors">
|
20
|
-
<%= form.label :
|
21
|
-
<%= form.text_field :
|
20
|
+
<%= form.label :extension, "Script Extension" %>
|
21
|
+
<%= form.text_field :extension, placeholder: "Script Extension (.js/.css)", class: "form-control" %>
|
22
22
|
</div>
|
23
23
|
<!-- Form Input Fields -->
|
24
24
|
|
@@ -45,8 +45,8 @@
|
|
45
45
|
<tbody>
|
46
46
|
<% @script_extensions.each do |script_extension| %>
|
47
47
|
<tr>
|
48
|
-
<td><%= link_to script_extension.
|
49
|
-
<td><%= link_to script_extension.
|
48
|
+
<td><%= link_to script_extension.extension_name, script_extension %></td>
|
49
|
+
<td><%= link_to script_extension.extension, script_extension %></td>
|
50
50
|
</tr>
|
51
51
|
<% end %>
|
52
52
|
</tbody>
|
@@ -7,28 +7,28 @@
|
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
9
|
<div class="form-group field_with_errors">
|
10
|
-
<%= form.label :
|
11
|
-
<%= form.text_field :
|
10
|
+
<%= form.label :cdn_url, "Script URL" %>
|
11
|
+
<%= form.text_field :cdn_url, placeholder: "Script URL", class: "form-control" %>
|
12
12
|
</div>
|
13
13
|
|
14
14
|
<div class="form-group field_with_errors">
|
15
|
-
<%= form.label :
|
16
|
-
<%= form.date_select :
|
15
|
+
<%= form.label :cdn_url_release, "Initial Release" %>
|
16
|
+
<%= form.date_select :cdn_url_release, class: "form-control" %>
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<div class="form-group field_with_errors">
|
20
|
-
<%= form.label :
|
21
|
-
<%= form.date_select :
|
20
|
+
<%= form.label :cdn_url_cdn_update, "Latest Release" %>
|
21
|
+
<%= form.date_select :cdn_url_cdn_update, class: "form-control" %>
|
22
22
|
</div>
|
23
23
|
|
24
24
|
<div class="form-group field_with_errorss">
|
25
25
|
<label>Script Version</label>
|
26
|
-
<%= collection_select(:
|
26
|
+
<%= collection_select(:url, :version_id, PhcdevworksScripts::Script::Version.order("version_number"), :id, :version_number, {}, {class: "form-control"}) %>
|
27
27
|
</div>
|
28
28
|
|
29
29
|
<div class="form-group field_with_errorss">
|
30
30
|
<label>Script Extensions</label>
|
31
|
-
<%= collection_select(:
|
31
|
+
<%= collection_select(:url, :extension_id, PhcdevworksScripts::Script::Extension.order("extension_name"), :id, :extension, {}, {class: "form-control"}) %>
|
32
32
|
</div>
|
33
33
|
<!-- Form Input Fields -->
|
34
34
|
|
@@ -47,9 +47,9 @@
|
|
47
47
|
<tbody>
|
48
48
|
<% @script_urls.each do |script_url| %>
|
49
49
|
<tr>
|
50
|
-
<td><%= link_to script_url.
|
51
|
-
<td><%= link_to script_url.
|
52
|
-
<td><%= link_to script_url.
|
50
|
+
<td><%= link_to script_url.cdn_url, script_listing_url_path(script_url.listing, script_url) %></td>
|
51
|
+
<td><%= link_to script_url.cdn_url_release, script_listing_url_path(script_url.listing, script_url) %></td>
|
52
|
+
<td><%= link_to script_url.cdn_url_cdn_update, script_listing_url_path(script_url.listing, script_url) %></td>
|
53
53
|
</tr>
|
54
54
|
<% end %>
|
55
55
|
</tbody>
|
@@ -7,8 +7,8 @@
|
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
9
|
<div class="form-group field_with_errors">
|
10
|
-
<%= form.label :
|
11
|
-
<%= form.text_field :
|
10
|
+
<%= form.label :version_number, "Version Number" %>
|
11
|
+
<%= form.text_field :version_number, placeholder: "Version Number", class: "form-control" %>
|
12
12
|
</div>
|
13
13
|
<!-- Form Input Fields -->
|
14
14
|
|
@@ -2,9 +2,9 @@ class CreatePhcdevworksScriptsScriptExtensions < ActiveRecord::Migration[6.0]
|
|
2
2
|
def change
|
3
3
|
create_table :phcdevworks_scripts_script_extensions do |t|
|
4
4
|
|
5
|
-
t.string :
|
6
|
-
t.string :
|
7
|
-
t.string :
|
5
|
+
t.string :extension_name
|
6
|
+
t.string :extension_description
|
7
|
+
t.string :extension
|
8
8
|
|
9
9
|
t.string :slug
|
10
10
|
t.string :user_id
|
@@ -2,9 +2,9 @@ class CreatePhcdevworksScriptsScriptUrls < ActiveRecord::Migration[6.0]
|
|
2
2
|
def change
|
3
3
|
create_table :phcdevworks_scripts_script_urls do |t|
|
4
4
|
|
5
|
-
t.string :
|
6
|
-
t.date :
|
7
|
-
t.date :
|
5
|
+
t.string :cdn_url
|
6
|
+
t.date :cdn_url_release
|
7
|
+
t.date :cdn_url_cdn_update
|
8
8
|
|
9
9
|
t.references :listing
|
10
10
|
t.references :extension
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcdevworks_scripts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PHCDevworks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -267,7 +267,6 @@ files:
|
|
267
267
|
- app/assets/stylesheets/phcdevworks_scripts/script/versions.scss
|
268
268
|
- app/assets/stylesheets/phcdevworks_scripts/snippet/posts.scss
|
269
269
|
- app/assets/stylesheets/phcdevworks_scripts/snippet/urls.scss
|
270
|
-
- app/assets/stylesheets/scaffolds.scss
|
271
270
|
- app/controllers/phcdevworks_scripts/application_controller.rb
|
272
271
|
- app/controllers/phcdevworks_scripts/script/authors_controller.rb
|
273
272
|
- app/controllers/phcdevworks_scripts/script/extensions_controller.rb
|
@@ -1,65 +0,0 @@
|
|
1
|
-
body {
|
2
|
-
background-color: #fff;
|
3
|
-
color: #333;
|
4
|
-
margin: 33px; }
|
5
|
-
|
6
|
-
body, p, ol, ul, td {
|
7
|
-
font-family: verdana, arial, helvetica, sans-serif;
|
8
|
-
font-size: 13px;
|
9
|
-
line-height: 18px; }
|
10
|
-
|
11
|
-
pre {
|
12
|
-
background-color: #eee;
|
13
|
-
padding: 10px;
|
14
|
-
font-size: 11px; }
|
15
|
-
|
16
|
-
a {
|
17
|
-
color: #000; }
|
18
|
-
|
19
|
-
a:visited {
|
20
|
-
color: #666; }
|
21
|
-
|
22
|
-
a:hover {
|
23
|
-
color: #fff;
|
24
|
-
background-color: #000; }
|
25
|
-
|
26
|
-
th {
|
27
|
-
padding-bottom: 5px; }
|
28
|
-
|
29
|
-
td {
|
30
|
-
padding: 0 5px 7px; }
|
31
|
-
|
32
|
-
div.field,
|
33
|
-
div.actions {
|
34
|
-
margin-bottom: 10px; }
|
35
|
-
|
36
|
-
#notice {
|
37
|
-
color: green; }
|
38
|
-
|
39
|
-
.field_with_errors {
|
40
|
-
padding: 2px;
|
41
|
-
background-color: red;
|
42
|
-
display: table; }
|
43
|
-
|
44
|
-
#error_explanation {
|
45
|
-
width: 450px;
|
46
|
-
border: 2px solid red;
|
47
|
-
padding: 7px 7px 0;
|
48
|
-
margin-bottom: 20px;
|
49
|
-
background-color: #f0f0f0; }
|
50
|
-
|
51
|
-
#error_explanation h2 {
|
52
|
-
text-align: left;
|
53
|
-
font-weight: bold;
|
54
|
-
padding: 5px 5px 5px 15px;
|
55
|
-
font-size: 12px;
|
56
|
-
margin: -7px -7px 0;
|
57
|
-
background-color: #c00;
|
58
|
-
color: #fff; }
|
59
|
-
|
60
|
-
#error_explanation ul li {
|
61
|
-
font-size: 12px;
|
62
|
-
list-style: square; }
|
63
|
-
|
64
|
-
label {
|
65
|
-
display: block; }
|