phcscriptcdn 0.1.5 → 0.2.5
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/scriptcdn/scripts_controller.rb +0 -1
- data/app/controllers/phcscriptcdn/scriptcdn/scripturls_controller.rb +0 -1
- data/app/controllers/phcscriptcdn/scriptcdn/scriptversions_controller.rb +0 -1
- data/lib/generators/phcscriptcdn/views_generator.rb +59 -0
- data/lib/phcscriptcdn/version.rb +1 -1
- metadata +38 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e49df6b70133f6d69ac7e0761f4634108232265
|
4
|
+
data.tar.gz: 751319a198920480261d0f980e08b242030ef854
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5aa93109f2de1e8549750672f1ebffb256fb12ada2626e7be17507a19e1882ae6c8d47dc64a441070346b5f5c689619f52d190245f647470682856d2cd06d449
|
7
|
+
data.tar.gz: 21c128d9bf894caacdf8f9f827d0f4c1701b21ab41701fc766ee49c714381495f390f070534c98dd5eb4e2dfd41db742cf74cf476fb4cbd08724f2b79c974f48
|
@@ -3,7 +3,6 @@ require_dependency "phcscriptcdn/application_controller"
|
|
3
3
|
module Phcscriptcdn
|
4
4
|
class Scriptcdn::ScripturlsController < ApplicationController
|
5
5
|
# Filters and Security
|
6
|
-
layout "layouts/scriptcdn/scriptcdn_all"
|
7
6
|
before_action :set_scriptcdn_scripturl, only: [:show, :edit, :update, :destroy]
|
8
7
|
|
9
8
|
# Index for Scriptcdn_script URLs
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'rails/generators/base'
|
2
|
+
|
3
|
+
module phcscriptcdn
|
4
|
+
|
5
|
+
module Generators
|
6
|
+
|
7
|
+
module ViewPathTemplates
|
8
|
+
extend ActiveSupport::Concern
|
9
|
+
|
10
|
+
included do
|
11
|
+
class_option :views, aliases: "-v", type: :array, desc: "Select specific view directories to generate (layouts, phcscriptcdn)"
|
12
|
+
|
13
|
+
public_task :copy_views
|
14
|
+
end
|
15
|
+
|
16
|
+
# module ClassMethods
|
17
|
+
# def hide!
|
18
|
+
# Rails::Generators.hide_namespace self.namespace
|
19
|
+
# end
|
20
|
+
# end
|
21
|
+
|
22
|
+
def copy_views
|
23
|
+
if options[:views]
|
24
|
+
options[:views].each do |directory|
|
25
|
+
view_directory directory.to_sym
|
26
|
+
end
|
27
|
+
else
|
28
|
+
view_directory :layouts
|
29
|
+
view_directory :phcscriptcdn
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
protected
|
34
|
+
|
35
|
+
def view_directory(name, _target_path = nil)
|
36
|
+
directory name.to_s, _target_path || "#{target_path}/#{name}" do |content|
|
37
|
+
content
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def target_path
|
42
|
+
@target_path ||= "app/views"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
class SharedViewsGenerator < Rails::Generators::Base
|
47
|
+
include ViewPathTemplates
|
48
|
+
source_root File.expand_path("../../../../app/views", __FILE__)
|
49
|
+
desc "Copies phcscriptcdn views to your application."
|
50
|
+
hide!
|
51
|
+
end
|
52
|
+
|
53
|
+
class ViewsGenerator < Rails::Generators::Base
|
54
|
+
desc "Copies phcscriptcdn views to your application."
|
55
|
+
invoke SharedViewsGenerator
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
data/lib/phcscriptcdn/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcscriptcdn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BradPotts
|
@@ -151,6 +151,9 @@ dependencies:
|
|
151
151
|
requirement: !ruby/object:Gem::Requirement
|
152
152
|
requirements:
|
153
153
|
- - "~>"
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '4.4'
|
156
|
+
- - ">="
|
154
157
|
- !ruby/object:Gem::Version
|
155
158
|
version: 4.4.1
|
156
159
|
type: :development
|
@@ -158,6 +161,9 @@ dependencies:
|
|
158
161
|
version_requirements: !ruby/object:Gem::Requirement
|
159
162
|
requirements:
|
160
163
|
- - "~>"
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '4.4'
|
166
|
+
- - ">="
|
161
167
|
- !ruby/object:Gem::Version
|
162
168
|
version: 4.4.1
|
163
169
|
- !ruby/object:Gem::Dependency
|
@@ -188,7 +194,36 @@ dependencies:
|
|
188
194
|
- - "~>"
|
189
195
|
- !ruby/object:Gem::Version
|
190
196
|
version: '2.6'
|
191
|
-
|
197
|
+
- !ruby/object:Gem::Dependency
|
198
|
+
name: faker
|
199
|
+
requirement: !ruby/object:Gem::Requirement
|
200
|
+
requirements:
|
201
|
+
- - "~>"
|
202
|
+
- !ruby/object:Gem::Version
|
203
|
+
version: '1.6'
|
204
|
+
type: :development
|
205
|
+
prerelease: false
|
206
|
+
version_requirements: !ruby/object:Gem::Requirement
|
207
|
+
requirements:
|
208
|
+
- - "~>"
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
version: '1.6'
|
211
|
+
- !ruby/object:Gem::Dependency
|
212
|
+
name: selenium-webdriver
|
213
|
+
requirement: !ruby/object:Gem::Requirement
|
214
|
+
requirements:
|
215
|
+
- - "~>"
|
216
|
+
- !ruby/object:Gem::Version
|
217
|
+
version: '2.52'
|
218
|
+
type: :development
|
219
|
+
prerelease: false
|
220
|
+
version_requirements: !ruby/object:Gem::Requirement
|
221
|
+
requirements:
|
222
|
+
- - "~>"
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
version: '2.52'
|
225
|
+
description: PHCNetworks uses a similar engine to list their scripts on their own
|
226
|
+
cdn.
|
192
227
|
email:
|
193
228
|
- bradley.j.potts@gmail.com
|
194
229
|
executables: []
|
@@ -237,6 +272,7 @@ files:
|
|
237
272
|
- db/migrate/20160222025658_create_phcscriptcdn_scriptcdn_scripts.rb
|
238
273
|
- db/migrate/20160222030223_create_phcscriptcdn_scriptcdn_scriptversions.rb
|
239
274
|
- db/migrate/20160222030446_create_phcscriptcdn_scriptcdn_scripturls.rb
|
275
|
+
- lib/generators/phcscriptcdn/views_generator.rb
|
240
276
|
- lib/phcscriptcdn.rb
|
241
277
|
- lib/phcscriptcdn/engine.rb
|
242
278
|
- lib/phcscriptcdn/version.rb
|