ishapi 0.1.8.28 → 0.1.8.29

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: ae89ec7aaf612bc98491fc746edf87b8ca945b64
4
- data.tar.gz: e724ada43ec7481af6f522fce2090b96d75f6f4e
3
+ metadata.gz: ec7fe74393929b6e351f36e7385a4cc353d81741
4
+ data.tar.gz: f3b9ddea39ddf198673226cba2ecbf10bfc2e6af
5
5
  SHA512:
6
- metadata.gz: 20ef5015f02fcd9794d96bd89a78dfdf702be671ded3a24d763a77e9b1846dfc3a451123dccde017e2d67d0505f808a93ad694789c7e08bc774a9853995b5f52
7
- data.tar.gz: baa6110aadbe4a82c187bdb634efa7c70bd36b99dcef8af02ad87733ab9ba66b8c43236b7c66af174e05323f67baa6dfc2e17022c41aec2f7f58b0d923d6513b
6
+ metadata.gz: 78541f0abc0c129ff8bcfdc2e67f00fe5f9bfa1b1edf41f365e72552758a31d4657d02cc80fa69f12fea043e412a632fa76c414fcd3236952bc4757996168bff
7
+ data.tar.gz: c2a310aaa4993c27900c56a5f4fedd54508e9eb1f70895d3601849ae8a392569127e5e1c75de9e2f807dd492ac43b63dadc764b0dde36868081b02efe44702e7
@@ -15,7 +15,8 @@ module Ishapi
15
15
  u = IshModels::UserProfile.find_or_create_by :email => email
16
16
  u.fb_access_token = access_token
17
17
  u.name ||= name
18
- u.user = user
18
+ u.user ||= user
19
+ u.email ||= email
19
20
  u.user ||= User.create( :email => email, :password => (0..8).map { "#{rand(100)}" }.join("#{rand(100)}") )
20
21
 
21
22
  auth = Koala::Facebook::OAuth.new
@@ -15,7 +15,7 @@ json.cache! key do
15
15
  json.y @city.y
16
16
 
17
17
  json.partial! 'ishapi/newsitems/index', :newsitems => @city.newsitems
18
- json.partial! 'ishapi/features/index', :features => @city.features
18
+ json.partial! 'ishapi/features/index', :features => @city.features, :resource => @city
19
19
  json.partial! 'ishapi/galleries/index', :galleries => @city.galleries
20
20
  json.partial! 'ishapi/reports/index', :reports => @city.reports
21
21
  json.partial! 'ishapi/users/index', :users => @city.current_users
@@ -3,9 +3,12 @@
3
3
  # ishapi / features / _index
4
4
  #
5
5
 
6
+ resource ||= site if defined? site
7
+ resource ||= city if defined? city
8
+
6
9
  json.n_features features.count
7
10
  json.features do
8
- json.array! features do |feature|
11
+ json.array! features.limit( resource.n_features ) do |feature|
9
12
 
10
13
  json.name feature.name unless feature.name.blank?
11
14
  json.subhead feature.subhead unless feature.subhead.blank?
@@ -9,7 +9,7 @@ json.cache! key do
9
9
  json.id @report.id.to_s
10
10
  json.name @report.name
11
11
  json.reportname @report.name_seo
12
- json.photo_url @report.photo.photo.url( :small )
12
+ json.photo_url @report.photo.photo.url( :small ) if @report.photo
13
13
  json.thumb_url @report.photo.photo.url( :thumb )
14
14
 
15
15
  # @TODO: move this to meta
@@ -12,7 +12,7 @@ json.cache! key do
12
12
 
13
13
  json.is_ads_enabled @site.is_ads_enabled
14
14
 
15
- json.partial! 'ishapi/features/index', :features => @site.features
15
+ json.partial! 'ishapi/features/index', :features => @site.features, :resource => @site
16
16
  json.partial! 'ishapi/newsitems/index', :newsitems => @newsitems
17
17
  json.partial! 'ishapi/videos/index', :videos => @site.videos
18
18
  end
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.28
4
+ version: 0.1.8.29
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-13 00:00:00.000000000 Z
11
+ date: 2017-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails