ishapi 0.1.8.30 → 0.1.8.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd4a4f329b2944f40387c440d8a92224fb0ebe14
4
- data.tar.gz: ba51981062bbc8f329aeee1aaf0fc025e4894b17
3
+ metadata.gz: 15e670a22953d1483ab9811e733fc5f532ca2cab
4
+ data.tar.gz: 576f70058f9b109d8be1e7758fe93e6559424901
5
5
  SHA512:
6
- metadata.gz: d9a5478e4300dce2c9d84bdb2f961eb59e4641909fa10d941eae2601a4768573b2a054adc69f16683c40439cc33b0f63e728a1400c17946449a3cd8b3f0dcc88
7
- data.tar.gz: 99d445113f47b2529ea18dd529d4d39c1e80e0b6afd6847c0158c7f4743cf98dc4470a7b03ab55d51ad670a44d0af315879bde6c31e13975a1e5317e79e1a223
6
+ metadata.gz: 5288189ada48a7ce8953c82094f178be3302be59d064856f257ad0dcb6246966693532c1fc987abfc13514dd6a0c3e22d82ce5d9c7160abfaf94666c6f479b07
7
+ data.tar.gz: e74ccd8b95853c37e6f462fc8b4b503a3b6057cd6a459bf8939e19433a040f887778874e5cc6d80cb76d21745e69ec4b9523c91d8a37e062d97f58f04bd959df
@@ -0,0 +1,15 @@
1
+ require_dependency "ishapi/application_controller"
2
+
3
+ module Ishapi
4
+ class NewsitemsController < ApplicationController
5
+
6
+ def index
7
+ if params[:domain]
8
+ resource = Site.find_by( :domain => params[:domain], :lang => :en )
9
+ end
10
+ authorize! :show, resource
11
+ @newsitems = resource.newsitems.page( params[:newsitems_page] ).per( resource.newsitems_per_page )
12
+ end
13
+
14
+ end
15
+ end
@@ -0,0 +1,10 @@
1
+ require_dependency "ishapi/application_controller"
2
+
3
+ module Ishapi
4
+ class CitiesController < ApplicationController
5
+
6
+ def index
7
+ end
8
+
9
+ end
10
+ end
@@ -6,6 +6,8 @@
6
6
  json.n_newsitems newsitems.count
7
7
  json.newsitems do
8
8
  json.array! newsitems do |item|
9
+ json.created_at item.created_at
10
+
9
11
  if item.gallery
10
12
  json.item_type 'gallery' #@TODO: should be a constant
11
13
  json.name item.gallery.name
@@ -0,0 +1,6 @@
1
+
2
+ #
3
+ #
4
+ #
5
+
6
+ json.partial! 'index', :newsitems => @newsitems
data/config/routes.rb CHANGED
@@ -21,7 +21,8 @@ Ishapi::Engine.routes.draw do
21
21
  get 'reports', :to => 'reports#index'
22
22
  get 'reports/view/:name_seo', :to => 'reports#show'
23
23
 
24
- get 'sites/view/:domain', :to => 'sites#show', :constraints => { :domain => /[^\/]+/ }
24
+ get 'sites/view/:domain', :to => 'sites#show', :constraints => { :domain => /[^\/]+/ }
25
+ get 'sites/view/:domain/newsitems/:newsitems_page', :to => 'newsitems#index', :constraints => { :domain => /[^\/]+/ }
25
26
 
26
27
  post 'users/fb_sign_in', :to => 'users#fb_sign_in'
27
28
  post 'users/profile', :to => 'users#show'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ishapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.30
4
+ version: 0.1.8.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-19 00:00:00.000000000 Z
11
+ date: 2017-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -136,6 +136,8 @@ files:
136
136
  - app/controllers/ishapi/my/my_controller.rb~
137
137
  - app/controllers/ishapi/my/reports_controller.rb
138
138
  - app/controllers/ishapi/my/reports_controller.rb~
139
+ - app/controllers/ishapi/newsitems_controller.rb
140
+ - app/controllers/ishapi/newsitems_controller.rb~
139
141
  - app/controllers/ishapi/reports_controller.rb
140
142
  - app/controllers/ishapi/reports_controller.rb~
141
143
  - app/controllers/ishapi/sites_controller.rb
@@ -175,6 +177,7 @@ files:
175
177
  - app/views/ishapi/my/reports/index.jbuilder~
176
178
  - app/views/ishapi/newsitems/_index.jbuilder
177
179
  - app/views/ishapi/newsitems/_index.jbuilder~
180
+ - app/views/ishapi/newsitems/index.jbuilder
178
181
  - app/views/ishapi/photos/_index.jbuilder
179
182
  - app/views/ishapi/photos/_index.jbuilder~
180
183
  - app/views/ishapi/photos/_show.jbuilder