phcscriptcdnpro 1.9.10 → 1.9.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/phcscriptcdnpro/api/{cdnlistings.js → mains.js} +0 -0
- data/app/assets/stylesheets/phcscriptcdnpro/api/{cdnlists.scss → mains.scss} +1 -1
- data/app/controllers/phcscriptcdnpro/api/{cdnlists_controller.rb → mains_controller.rb} +8 -1
- data/app/helpers/phcscriptcdnpro/api/{cdnlists_helper.rb → mains_helper.rb} +1 -1
- data/app/views/phcscriptcdnpro/api/mains/index.json.rabl +3 -0
- data/app/views/phcscriptcdnpro/api/{cdnlistings → mains}/show.json.rabl +3 -3
- data/config/routes.rb +2 -4
- data/lib/phcscriptcdnpro/version.rb +1 -1
- metadata +8 -12
- data/app/assets/javascripts/phcscriptcdnpro/api/cdnlists.js +0 -2
- data/app/assets/stylesheets/phcscriptcdnpro/api/cdnlistings.scss +0 -3
- data/app/controllers/phcscriptcdnpro/api/cdnlistings_controller.rb +0 -15
- data/app/helpers/phcscriptcdnpro/api/cdnlistings_helper.rb +0 -4
- data/app/views/phcscriptcdnpro/api/cdnlists/index.json.rabl +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f04a02f52140249956e671844cbaf6af46d5551
|
4
|
+
data.tar.gz: 2e5305b331cc3707f0016a2de4ca52c3dfd753a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baa1c229d2ffa1befeb357c1eddd65560019e4aa89934363730cc2264af0e342cc31bc9f46643508621e9600dc8e61d2979d47f27ac28b4f88ac716099075619
|
7
|
+
data.tar.gz: 69c7992c9518affe8385835151da7f9080d910fdb45fe36b65d9dc3c4d0f8c29d8cc303d44676e8b78b227fdd56848b6be54a180b3ae043c9d0b53ad33d84e55
|
File without changes
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_dependency "phcscriptcdnpro/application_controller"
|
2
2
|
|
3
3
|
module Phcscriptcdnpro
|
4
|
-
class Api::
|
4
|
+
class Api::MainsController < ApplicationController
|
5
5
|
|
6
6
|
# Only Responds to API Requests
|
7
7
|
respond_to :json
|
@@ -9,6 +9,13 @@ module Phcscriptcdnpro
|
|
9
9
|
# Directory Category API
|
10
10
|
def index
|
11
11
|
@scriptcdn_mains = Scriptcdn::Main.all
|
12
|
+
respond_to do |format|
|
13
|
+
format.json { render :json => @scriptcdn_main }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def show
|
18
|
+
@scriptcdn_main = Scriptcdn::Main.find(params[:id])
|
12
19
|
end
|
13
20
|
|
14
21
|
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
object @
|
1
|
+
object @scriptcdn_main
|
2
2
|
attributes :id, :information_id, :version_id
|
3
|
-
child
|
3
|
+
child :informations do
|
4
4
|
attributes :scripttitle, :scriptdescription, :scriptcategory, :scriptwebsite, :scripttwitter, :scriptgithub, :scriptlicence, :scriptinitialrelease, :scriptplatform, :scriptstatus
|
5
|
-
|
5
|
+
end
|
data/config/routes.rb
CHANGED
@@ -19,12 +19,10 @@ Phcscriptcdnpro::Engine.routes.draw do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
# Application API
|
22
|
-
namespace :api do
|
22
|
+
namespace :api, :path => "", :constraints => {:subdomain => "api"} do
|
23
23
|
|
24
24
|
# Routes for API
|
25
|
-
resources :
|
26
|
-
resources :cdnlistings
|
27
|
-
end
|
25
|
+
resources :mains, defaults: {format: 'json'}
|
28
26
|
|
29
27
|
end
|
30
28
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcscriptcdnpro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BradPotts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -427,15 +427,12 @@ files:
|
|
427
427
|
- LICENSE
|
428
428
|
- README.md
|
429
429
|
- Rakefile
|
430
|
-
- app/assets/javascripts/phcscriptcdnpro/api/
|
431
|
-
- app/assets/javascripts/phcscriptcdnpro/api/cdnlists.js
|
430
|
+
- app/assets/javascripts/phcscriptcdnpro/api/mains.js
|
432
431
|
- app/assets/javascripts/phcscriptcdnpro/application.js
|
433
|
-
- app/assets/stylesheets/phcscriptcdnpro/api/
|
434
|
-
- app/assets/stylesheets/phcscriptcdnpro/api/cdnlists.scss
|
432
|
+
- app/assets/stylesheets/phcscriptcdnpro/api/mains.scss
|
435
433
|
- app/assets/stylesheets/phcscriptcdnpro/application.css.scss
|
436
434
|
- app/assets/stylesheets/phcscriptcdnpro/custom.scss
|
437
|
-
- app/controllers/phcscriptcdnpro/api/
|
438
|
-
- app/controllers/phcscriptcdnpro/api/cdnlists_controller.rb
|
435
|
+
- app/controllers/phcscriptcdnpro/api/mains_controller.rb
|
439
436
|
- app/controllers/phcscriptcdnpro/application_controller.rb
|
440
437
|
- app/controllers/phcscriptcdnpro/frontend/cdnpages_controller.rb
|
441
438
|
- app/controllers/phcscriptcdnpro/scriptcdn/authors_controller.rb
|
@@ -443,8 +440,7 @@ files:
|
|
443
440
|
- app/controllers/phcscriptcdnpro/scriptcdn/mains_controller.rb
|
444
441
|
- app/controllers/phcscriptcdnpro/scriptcdn/urls_controller.rb
|
445
442
|
- app/controllers/phcscriptcdnpro/scriptcdn/versions_controller.rb
|
446
|
-
- app/helpers/phcscriptcdnpro/api/
|
447
|
-
- app/helpers/phcscriptcdnpro/api/cdnlists_helper.rb
|
443
|
+
- app/helpers/phcscriptcdnpro/api/mains_helper.rb
|
448
444
|
- app/helpers/phcscriptcdnpro/application_helper.rb
|
449
445
|
- app/models/phcscriptcdnpro/scripcdn.rb
|
450
446
|
- app/models/phcscriptcdnpro/scriptcdn.rb
|
@@ -455,8 +451,8 @@ files:
|
|
455
451
|
- app/models/phcscriptcdnpro/scriptcdn/version.rb
|
456
452
|
- app/views/layouts/phcscriptcdnpro/application.html.erb
|
457
453
|
- app/views/layouts/phcscriptcdnpro/frontend.html.erb
|
458
|
-
- app/views/phcscriptcdnpro/api/
|
459
|
-
- app/views/phcscriptcdnpro/api/
|
454
|
+
- app/views/phcscriptcdnpro/api/mains/index.json.rabl
|
455
|
+
- app/views/phcscriptcdnpro/api/mains/show.json.rabl
|
460
456
|
- app/views/phcscriptcdnpro/frontend/cdnpages/list.html.erb
|
461
457
|
- app/views/phcscriptcdnpro/frontend/cdnpages/listing.html.erb
|
462
458
|
- app/views/phcscriptcdnpro/scriptcdn/authors/_form.html.erb
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require_dependency "phcscriptcdnpro/application_controller"
|
2
|
-
|
3
|
-
module Phcscriptcdnpro
|
4
|
-
class Api::CdnlistingsController < ApplicationController
|
5
|
-
|
6
|
-
# Only Responds to API Requests
|
7
|
-
respond_to :json
|
8
|
-
|
9
|
-
# Directory Category API
|
10
|
-
def show
|
11
|
-
@scriptcdn_mains = Scriptcdn::Main.find(params[:id])
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
@@ -1,5 +0,0 @@
|
|
1
|
-
object @scriptcdn_mains
|
2
|
-
attributes :id, :information_id, :version_id
|
3
|
-
child(:information) {
|
4
|
-
attributes :scripttitle, :scriptdescription, :scriptcategory, :scriptwebsite, :scripttwitter, :scriptgithub, :scriptlicence, :scriptinitialrelease, :scriptplatform, :scriptstatus
|
5
|
-
}
|