ishapi 0.1.8.151 → 0.1.8.153

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: 48a60ea3b0572e7a03c6367c503ade90a23d0c9c668f7126328cf69fb6edd6f0
4
- data.tar.gz: '059b472d0856d0984b540d92207035c0c7e5593a050ae0693d4e309351427f02'
3
+ metadata.gz: 754fefba120e1ee7f87e94a2b3da3a450e07c86e7bd135055cb2240d7ccb5ef7
4
+ data.tar.gz: ff7748716f5c58c458f6635386a77164c943d30b792f1c854a4d8b6977744e9d
5
5
  SHA512:
6
- metadata.gz: 9730c397b9c7468348771f3f25d26a20d3544ab22930ad58363f7b0b79ee1bc9a61b625e7d6c7f1a92c76e12eee9dc875f7b857fe597c9f839e179a29e982978
7
- data.tar.gz: 53770e986e3fb7f2f84ff09ac672444961d8eeb79dbafc285fc1961017866a4ca6ef85732b805064b5fc70df61a93f5977a30eec1ab51f8e9135503a89190701
6
+ metadata.gz: b44159ee3983c79213b8e2ab0d98c1aaec009268b1d701d276e99475bde50235c233d03a249c03f80158d0507565f06c50aeb9cd4dcb4ac431274d07d0772abe
7
+ data.tar.gz: 92ff67762868d928066fc0fb4d15602f0166da0f7ba74b552c46fd5261bc0a9d26f134768067f1c42ec87872418ff5c983561dc90e975c1e15d5c9db9f3c3f71
@@ -14,7 +14,7 @@ if item.city
14
14
  json.name item.city.name
15
15
  json.slug item.city.cityname
16
16
  end
17
- json.cityname item.city.cityname
17
+ json.cityname item.city.cityname
18
18
  end
19
19
  json.subhead item.subhead
20
20
  json.description item.descr
@@ -1,8 +1,11 @@
1
1
  #
2
2
  # ishapi / galleries / _show
3
3
  #
4
+
5
+ # @TODO: remove this file, this looks like a newsitem
6
+
4
7
  json.id gallery.id.to_s
5
- json.item_type 'gallery'
8
+ json.item_type gallery.class.name
6
9
  json.name gallery.name
7
10
  json.galleryname gallery.galleryname
8
11
  json.description gallery.description
@@ -5,7 +5,10 @@
5
5
  this_key = [ @gallery, params.permit! ]
6
6
  json.cache! this_key do
7
7
  json.gallery do
8
- json.message "This is premium content - please purchase it to view!"
8
+
9
+ json.id @gallery.id.to_s
10
+ json.item_type @gallery.class.name
11
+
9
12
  json.premium_tier @gallery.premium_tier
10
13
  json.is_premium @gallery.is_premium
11
14
  json.is_purchased false
@@ -13,5 +16,6 @@ json.cache! this_key do
13
16
  # json.partial! 'ishapi/galleries/show', gallery: @gallery
14
17
  # json.partial! 'ishapi/photos/index', :photos => [ @gallery.photos[0] ]
15
18
  end
19
+ json.message "This is premium content - please purchase it to view!"
16
20
  end
17
21
 
@@ -5,17 +5,16 @@
5
5
  json.n_newsitems newsitems.count
6
6
  json.newsitems do
7
7
  json.array! newsitems do |item|
8
-
9
- json.id item.id.to_s
10
8
  json.name item.name
11
9
  json.created_at item.created_at
12
10
  json.updated_at item.updated_at
13
11
 
14
12
  if item.gallery
15
- json.item_type 'gallery'
13
+ json.id item.gallery_id.to_s
14
+ json.item_type item.gallery.class.name
16
15
  json.name item.gallery.name
17
16
  json.galleryname item.gallery.galleryname
18
- json.username item.username || item.gallery.username || 'piousbox'
17
+ json.username item.username || item.gallery.username || 'donor-default'
19
18
  json.n_photos item.gallery.photos.length
20
19
  json.slug item.gallery.galleryname
21
20
  json.subhead item.gallery.subhead
@@ -26,16 +25,16 @@ json.newsitems do
26
25
  json.is_purchased current_user&.profile&.has_premium_purchase( item.gallery )
27
26
  json.partial! 'ishapi/photos/index', :photos => [ item.gallery.photos[0] ]
28
27
  else
29
- json.partial! 'ishapi/photos/index', :photos => item.gallery.photos
28
+ json.partial! 'ishapi/photos/index', :photos => item.gallery.photos[0...3]
30
29
  end
31
30
  end
32
31
 
33
32
  if item.report
34
- json.item_type 'report'
33
+ json.id item.report_id.to_s
34
+ json.item_type item.report.class.name
35
35
  json.name item.report.name
36
36
  json.reportname item.report.name_seo
37
37
  json.subhead item.report.subhead
38
- json.report_id item.report_id.to_s
39
38
  json.username item.report.user_profile.name if item.report.user_profile
40
39
 
41
40
  if item.report.photo
@@ -53,11 +52,16 @@ json.newsitems do
53
52
  end
54
53
 
55
54
  if item.video_id
56
- json.partial! 'ishapi/videos/show', :video => Video.unscoped.find( item.video_id )
55
+ json.id item.video_id.to_s
56
+ # @TODO: why this relation is so weird here?!
57
+ video = Video.unscoped.find( item.video_id )
58
+ json.item_type video.class.name
59
+ json.partial! 'ishapi/videos/show', :video => video
57
60
  end
58
61
 
59
62
  if item.photo
60
- json.item_type 'photo'
63
+ json.id item.photo.id.to_s
64
+ json.item_type item.photo.class.name
61
65
  json.partial! 'ishapi/photos/index', :photos => [ item.photo ]
62
66
  end
63
67
 
@@ -8,4 +8,4 @@ json.photos do
8
8
  json.array! photos do |photo|
9
9
  json.partial! 'ishapi/photos/show', :photo => photo
10
10
  end
11
- end
11
+ end
@@ -11,8 +11,7 @@ json.description video.descr
11
11
  json.subhead video.subhead
12
12
  json.x video.x
13
13
  json.y video.y
14
- json.url video.video.url
15
- json.item_type 'video'
14
+ json.url video.video.url
16
15
 
17
16
  if video.city
18
17
  json.cityname video.city.cityname
@@ -40,6 +39,6 @@ if video.is_premium
40
39
  end
41
40
 
42
41
  if video.thumb
43
- json.photo_s169_url video.thumb.url( :s169 )
42
+ json.photo_s169_url video.thumb.url( :s169 )
44
43
  json.photo_thumb2_url video.thumb.url( :thumb2 )
45
44
  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.151
4
+ version: 0.1.8.153
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-24 00:00:00.000000000 Z
11
+ date: 2021-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -251,7 +251,6 @@ files:
251
251
  - app/views/ishapi/maps/index.jbuilder
252
252
  - app/views/ishapi/maps/show.jbuilder
253
253
  - app/views/ishapi/markers/_index.jbuilder
254
- - app/views/ishapi/measurements/_show.jbuilder
255
254
  - app/views/ishapi/my/videos/index.jbuilder
256
255
  - app/views/ishapi/newsitems/_index.jbuilder
257
256
  - app/views/ishapi/newsitems/index.jbuilder
@@ -1,14 +0,0 @@
1
-
2
- # _vp_ 20180309
3
- # MEASUREMENT_PARAMS = [ :neck_around, :chest_around, :waist_around, :sleeve_length, :shoulder_width, :shirt_length, :bicep_around ]
4
- #
5
-
6
- json.measurement do
7
- json.neck_around measurement.neck_around
8
- json.chest_around measurement.chest_around
9
- json.waist_around measurement.waist_around
10
- json.sleeve_length measurement.sleeve_length
11
- json.shoulder_width measurement.shoulder_width
12
- json.shirt_length measurement.shirt_length
13
- json.bicep_around measurement.bicep_around
14
- end