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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2c2b4bb55caf3b307a892d3f7ad37756586b84ed02bcec127012694798a2697
4
- data.tar.gz: 5f2046039f1cd9e31001f86c95868eccadc76915bbc3b97c42064bbb9946dd95
3
+ metadata.gz: 3f1c4678d3d274426be9a10d46ecad0839f25527e464dc81c9d1cc43df129579
4
+ data.tar.gz: 38e877adc4fd67d2fa5b82577a2095868c8298e234e89db5ba02fe6c9cd71692
5
5
  SHA512:
6
- metadata.gz: e5b622304ef489c7a06236de06c80210a6a73cf796e501a8a2a5a6a35a502df4ab2a4dddeb701b59bf937182ccce12c2860babdcbfeacac8e4df6dd2b08927b5
7
- data.tar.gz: f7a1611e85e9a52574f8e28502dea99b6267efd84c5b475c75ead18578fad673b5a7d5e51143dd54ce79c52cede32e087459db67d14327683523d8185a816410
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(:script_extension_name, :script_extension_description, :script_extension)
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(:script_cdn_url, :script_cdn_url_release, :script_cdn_url_cdn_update, :version_id, :extension_id)
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
@@ -76,7 +76,7 @@ module PhcdevworksScripts
76
76
 
77
77
  # Whitelist
78
78
  def script_version_params
79
- params.require(:script_version).permit(:script_version_number)
79
+ params.require(:script_version).permit(:version_number)
80
80
  end
81
81
 
82
82
  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 :script_extension_name,
15
+ validates :extension_name,
16
16
  presence: true
17
17
 
18
- validates :script_extension_description,
18
+ validates :extension_description,
19
19
  presence: true
20
20
 
21
- validates :script_extension,
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
- [:script_extension]
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 :script_cdn_url,
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 :script_cdn_url_release,
17
+ validates :cdn_url_release,
18
18
  presence: true
19
19
 
20
- validates :script_cdn_url_cdn_update,
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 :script_version_number,
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
- [:script_version_number]
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 :script_url,
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 :script_extension_name, "Extension Name" %>
11
- <%= form.text_field :script_extension_name, placeholder: "Extension Name", class: "form-control" %>
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 :script_extension_description, "Extension Description" %>
16
- <%= form.text_area :script_extension_description, placeholder: "Extension Description", class: "form-control" %>
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 :script_extension, "Script Extension" %>
21
- <%= form.text_field :script_extension, placeholder: "Script Extension (.js/.css)", class: "form-control" %>
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.script_extension_name, script_extension %></td>
49
- <td><%= link_to script_extension.script_extension, script_extension %></td>
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 :script_cdn_url, "Script URL" %>
11
- <%= form.text_field :script_cdn_url, placeholder: "Script URL", class: "form-control" %>
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 :script_cdn_url_release, "Initial Release" %>
16
- <%= form.date_select :script_cdn_url_release, class: "form-control" %>
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 :script_cdn_url_cdn_update, "Latest Release" %>
21
- <%= form.date_select :script_cdn_url_cdn_update, class: "form-control" %>
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(:script_url, :version_id, PhcdevworksScripts::Script::Version.order("script_version_number"), :id, :script_version_number, {}, {class: "form-control"}) %>
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(:script_url, :extension_id, PhcdevworksScripts::Script::Extension.order("script_extension_name"), :id, :script_extension, {}, {class: "form-control"}) %>
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.script_cdn_url, script_listing_url_path(script_url.listing, script_url) %></td>
51
- <td><%= link_to script_url.script_cdn_url_release, script_listing_url_path(script_url.listing, script_url) %></td>
52
- <td><%= link_to script_url.script_cdn_url_cdn_update, script_listing_url_path(script_url.listing, script_url) %></td>
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 :script_version_number, "Version Number" %>
11
- <%= form.text_field :script_version_number, placeholder: "Version Number", class: "form-control" %>
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
 
@@ -45,7 +45,7 @@
45
45
  <tbody>
46
46
  <% @script_versions.each do |script_version| %>
47
47
  <tr>
48
- <td><%= link_to script_version.script_version_number, script_version %></td>
48
+ <td><%= link_to script_version.version_number, script_version %></td>
49
49
  </tr>
50
50
  <% end %>
51
51
  </tbody>
@@ -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 :script_extension_name
6
- t.string :script_extension_description
7
- t.string :script_extension
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 :script_cdn_url
6
- t.date :script_cdn_url_release
7
- t.date :script_cdn_url_cdn_update
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
@@ -2,7 +2,7 @@ class CreatePhcdevworksScriptsScriptVersions < ActiveRecord::Migration[6.0]
2
2
  def change
3
3
  create_table :phcdevworks_scripts_script_versions do |t|
4
4
 
5
- t.string :script_version_number
5
+ t.string :version_number
6
6
 
7
7
  t.string :slug
8
8
  t.string :user_id
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksScripts
2
- VERSION = '2.3.1'
2
+ VERSION = "3.0.0"
3
3
  end
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: 2.3.1
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-15 00:00:00.000000000 Z
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; }