ishapi 0.1.8.150 → 0.1.8.155
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 +4 -4
 - data/app/controllers/ishapi/application_controller.rb +1 -2
 - data/app/controllers/ishapi/maps_controller.rb +2 -12
 - data/app/controllers/ishapi/my/reports_controller.rb +5 -8
 - data/app/controllers/ishapi/my/videos_controller.rb +5 -9
 - data/app/controllers/ishapi/reports_controller.rb +1 -1
 - data/app/controllers/ishapi/tags_controller.rb +2 -2
 - data/app/controllers/ishapi/venues_controller.rb +1 -1
 - data/app/controllers/ishapi/videos_controller.rb +1 -1
 - data/app/views/ishapi/application/_meta.jbuilder +2 -2
 - data/app/views/ishapi/features/_index.jbuilder +1 -1
 - data/app/views/ishapi/galleries/_show.jbuilder +5 -2
 - data/app/views/ishapi/galleries/index.jbuilder +1 -1
 - data/app/views/ishapi/galleries/show_premium_locked.jbuilder +5 -1
 - data/app/views/ishapi/maps/show.jbuilder +10 -0
 - data/app/views/ishapi/newsitems/_index.jbuilder +35 -22
 - data/app/views/ishapi/photos/_index.jbuilder +1 -1
 - data/app/views/ishapi/reports/_index.jbuilder +1 -1
 - data/app/views/ishapi/reports/show.jbuilder +1 -1
 - data/app/views/ishapi/tags/_index.jbuilder +1 -1
 - data/app/views/ishapi/tags/index.jbuilder +1 -1
 - data/app/views/ishapi/tags/show.jbuilder +2 -1
 - data/app/views/ishapi/venues/_index.jbuilder +4 -2
 - data/app/views/ishapi/venues/show.jbuilder +1 -1
 - data/app/views/ishapi/videos/_show.jbuilder +2 -3
 - data/config/routes.rb +2 -2
 - metadata +2 -3
 - data/app/views/ishapi/measurements/_show.jbuilder +0 -14
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 2b273dbf478b4af579ef9471c57c58394351daf23243a8ccc5ae51105962cbe2
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 8f909caebcdbdd20602e2245ee9306897e6dd467be8b68cb9de4a7472bdf964d
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: f9eb5d1a81fd3488f2fcf0ecd3fe746ff0857cab76fa71da05bc8c3d6401f6fcce9c7f46f872d1d0aaf575517aeaf1c049c2ffc8f318aa74cb8094d972a4f87f
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 1aa269a44ee60f9bde3b145c0d85291d7f0a341eff7351db79c2675b355849fd3964d491a3b2bb8455aef21904545e73d31b973eff370b50b0d4f892fee29865
         
     | 
| 
         @@ -35,7 +35,6 @@ module Ishapi 
     | 
|
| 
       35 
35 
     | 
    
         
             
                    decoded = decode(params[:jwt_token])
         
     | 
| 
       36 
36 
     | 
    
         
             
                    @current_user = User.find decoded['user_id']
         
     | 
| 
       37 
37 
     | 
    
         
             
                  rescue JWT::ExpiredSignature, JWT::DecodeError => e
         
     | 
| 
       38 
     | 
    
         
            -
                    puts! e, 'ee1'
         
     | 
| 
       39 
38 
     | 
    
         
             
                    flash[:notice] = 'You arent logged in, or you have been logged out.'
         
     | 
| 
       40 
39 
     | 
    
         
             
                    # @current_user = User.new
         
     | 
| 
       41 
40 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -61,7 +60,7 @@ module Ishapi 
     | 
|
| 
       61 
60 
     | 
    
         
             
                end
         
     | 
| 
       62 
61 
     | 
    
         | 
| 
       63 
62 
     | 
    
         
             
                # jwt
         
     | 
| 
       64 
     | 
    
         
            -
                def encode(payload, exp =  
     | 
| 
      
 63 
     | 
    
         
            +
                def encode(payload, exp = 48.hours.from_now) # @TODO: definitely change, right now I expire once in 2 days.
         
     | 
| 
       65 
64 
     | 
    
         
             
                  payload[:exp] = exp.to_i
         
     | 
| 
       66 
65 
     | 
    
         
             
                  JWT.encode(payload, Rails.application.secrets.secret_key_base.to_s)
         
     | 
| 
       67 
66 
     | 
    
         
             
                end
         
     | 
| 
         @@ -1,16 +1,8 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            require_dependency "ishapi/application_controller"
         
     | 
| 
       2 
2 
     | 
    
         
             
            module Ishapi
         
     | 
| 
       3 
3 
     | 
    
         
             
              class MapsController < ApplicationController
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
4 
     | 
    
         
             
                before_action :check_profile, only: [ :show ]
         
     | 
| 
       6 
5 
     | 
    
         | 
| 
       7 
     | 
    
         
            -
            =begin
         
     | 
| 
       8 
     | 
    
         
            -
                def index
         
     | 
| 
       9 
     | 
    
         
            -
                  authorize! :index, ::Gameui::Map
         
     | 
| 
       10 
     | 
    
         
            -
                  @maps = ::Gameui::Map.all
         
     | 
| 
       11 
     | 
    
         
            -
                end
         
     | 
| 
       12 
     | 
    
         
            -
            =end
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
6 
     | 
    
         
             
                def show
         
     | 
| 
       15 
7 
     | 
    
         
             
                  @map = ::Gameui::Map.find_by slug: params[:slug]
         
     | 
| 
       16 
8 
     | 
    
         
             
                  @markers = @map.markers.where( is_active: true )
         
     | 
| 
         @@ -23,16 +15,14 @@ module Ishapi 
     | 
|
| 
       23 
15 
     | 
    
         
             
                    @markers = @markers.order_by( ordering: :asc )
         
     | 
| 
       24 
16 
     | 
    
         
             
                  end
         
     | 
| 
       25 
17 
     | 
    
         | 
| 
       26 
     | 
    
         
            -
                   
     | 
| 
      
 18 
     | 
    
         
            +
                  ## @TODO: figure this out eventually
         
     | 
| 
       27 
19 
     | 
    
         
             
                  if city = City.where( cityname: @map.slug ).first
         
     | 
| 
       28 
     | 
    
         
            -
                    @newsitems = city.newsitems
         
     | 
| 
      
 20 
     | 
    
         
            +
                    # @newsitems = city.newsitems
         
     | 
| 
       29 
21 
     | 
    
         
             
                    @galleries = city.galleries
         
     | 
| 
       30 
22 
     | 
    
         
             
                    @reports = city.reports
         
     | 
| 
       31 
23 
     | 
    
         
             
                    @videos = city.videos
         
     | 
| 
       32 
24 
     | 
    
         
             
                  end
         
     | 
| 
       33 
25 
     | 
    
         | 
| 
       34 
     | 
    
         
            -
                  puts! @map, 'prod map'
         
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
26 
     | 
    
         
             
                  authorize! :show, @map
         
     | 
| 
       37 
27 
     | 
    
         
             
                end
         
     | 
| 
       38 
28 
     | 
    
         | 
| 
         @@ -1,14 +1,11 @@ 
     | 
|
| 
       1 
1 
     | 
    
         | 
| 
       2 
     | 
    
         
            -
            module Ishapi
         
     | 
| 
       3 
     | 
    
         
            -
              module My
         
     | 
| 
       4 
     | 
    
         
            -
                class ReportsController < Ishapi::My::MyController
         
     | 
| 
       5 
2 
     | 
    
         | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
                    authorize! :my_index, Report
         
     | 
| 
       8 
     | 
    
         
            -
                    @reports = @profile.reports
         
     | 
| 
       9 
     | 
    
         
            -
                  end
         
     | 
| 
      
 3 
     | 
    
         
            +
            class Ishapi::My::ReportsController < Ishapi::ApplicationController
         
     | 
| 
       10 
4 
     | 
    
         | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
      
 5 
     | 
    
         
            +
              def index
         
     | 
| 
      
 6 
     | 
    
         
            +
                authorize! :my_index, Report
         
     | 
| 
      
 7 
     | 
    
         
            +
                @reports = @profile.reports
         
     | 
| 
       12 
8 
     | 
    
         
             
              end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
       13 
10 
     | 
    
         
             
            end
         
     | 
| 
       14 
11 
     | 
    
         | 
| 
         @@ -1,14 +1,10 @@ 
     | 
|
| 
       1 
1 
     | 
    
         | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              module My
         
     | 
| 
       4 
     | 
    
         
            -
                class VideosController < Ishapi::My::MyController
         
     | 
| 
      
 2 
     | 
    
         
            +
            class Ishapi::My::VideosController < Ishapi::ApplicationController
         
     | 
| 
       5 
3 
     | 
    
         | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
                  end
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
                end
         
     | 
| 
      
 4 
     | 
    
         
            +
              def index
         
     | 
| 
      
 5 
     | 
    
         
            +
                authorize! :my_index, Video
         
     | 
| 
      
 6 
     | 
    
         
            +
                @videos = @current_user.profile.videos.unscoped.where( is_trash: false ).order_by( created_at: :desc ).limit(20)
         
     | 
| 
       12 
7 
     | 
    
         
             
              end
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
       13 
9 
     | 
    
         
             
            end
         
     | 
| 
       14 
10 
     | 
    
         | 
| 
         @@ -13,9 +13,9 @@ module Ishapi 
     | 
|
| 
       13 
13 
     | 
    
         | 
| 
       14 
14 
     | 
    
         
             
                def show
         
     | 
| 
       15 
15 
     | 
    
         
             
                  begin
         
     | 
| 
       16 
     | 
    
         
            -
                    @tag = Tag.find_by( : 
     | 
| 
      
 16 
     | 
    
         
            +
                    @tag = Tag.find_by( slug: params[:slug] )
         
     | 
| 
       17 
17 
     | 
    
         
             
                  rescue Mongoid::Errors::DocumentNotFound
         
     | 
| 
       18 
     | 
    
         
            -
                    @tag = Tag.find params[: 
     | 
| 
      
 18 
     | 
    
         
            +
                    @tag = Tag.find params[:slug]
         
     | 
| 
       19 
19 
     | 
    
         
             
                  end
         
     | 
| 
       20 
20 
     | 
    
         
             
                  authorize! :show, @tag
         
     | 
| 
       21 
21 
     | 
    
         
             
                end
         
     | 
| 
         @@ -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     
     | 
| 
      
 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
         
     | 
| 
         @@ -18,4 +21,4 @@ if gallery.is_premium 
     | 
|
| 
       18 
21 
     | 
    
         
             
              json.partial!    'ishapi/photos/index',     :photos => [ gallery.photos[0] ]
         
     | 
| 
       19 
22 
     | 
    
         
             
            else
         
     | 
| 
       20 
23 
     | 
    
         
             
              json.partial!    'ishapi/photos/index',     :photos => gallery.photos
         
     | 
| 
       21 
     | 
    
         
            -
            end
         
     | 
| 
      
 24 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -11,7 +11,7 @@ json.array! @galleries do |gallery| 
     | 
|
| 
       11 
11 
     | 
    
         
             
              json.subhead     gallery.subhead
         
     | 
| 
       12 
12 
     | 
    
         
             
              json.username    gallery.user_profile.name
         
     | 
| 
       13 
13 
     | 
    
         
             
              json.cityname    gallery.city.name    if gallery.city
         
     | 
| 
       14 
     | 
    
         
            -
              json.tag_names   gallery.tags.map &: 
     | 
| 
      
 14 
     | 
    
         
            +
              json.tag_names   gallery.tags.map &:slug
         
     | 
| 
       15 
15 
     | 
    
         
             
              json.venuename   gallery.venue.name   if gallery.venue
         
     | 
| 
       16 
16 
     | 
    
         
             
              json.partial! 'ishapi/photos/index', :photos => gallery.photos
         
     | 
| 
       17 
17 
     | 
    
         
             
            end
         
     | 
| 
         @@ -5,7 +5,10 @@ 
     | 
|
| 
       5 
5 
     | 
    
         
             
            this_key = [ @gallery, params.permit! ]
         
     | 
| 
       6 
6 
     | 
    
         
             
            json.cache! this_key do
         
     | 
| 
       7 
7 
     | 
    
         
             
              json.gallery do
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
      
 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 
     | 
    
         | 
| 
         @@ -26,8 +26,18 @@ json.cache! this_key do 
     | 
|
| 
       26 
26 
     | 
    
         
             
                  end
         
     | 
| 
       27 
27 
     | 
    
         
             
                end
         
     | 
| 
       28 
28 
     | 
    
         | 
| 
      
 29 
     | 
    
         
            +
                ## I removed json parsing from here! _vp_ 2021-10-14
         
     | 
| 
      
 30 
     | 
    
         
            +
                if @map.parent_slug.present?
         
     | 
| 
      
 31 
     | 
    
         
            +
                  json.config @map.parent.config
         
     | 
| 
      
 32 
     | 
    
         
            +
                  json.labels @map.parent.labels
         
     | 
| 
      
 33 
     | 
    
         
            +
                else
         
     | 
| 
      
 34 
     | 
    
         
            +
                  json.config @map.config
         
     | 
| 
      
 35 
     | 
    
         
            +
                  json.labels @map.labels
         
     | 
| 
      
 36 
     | 
    
         
            +
                end
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
       29 
38 
     | 
    
         
             
                json.partial! 'ishapi/markers/index', map: @map
         
     | 
| 
       30 
39 
     | 
    
         | 
| 
      
 40 
     | 
    
         
            +
                puts! @newsitems, 'these first'
         
     | 
| 
       31 
41 
     | 
    
         
             
                if @newsitems
         
     | 
| 
       32 
42 
     | 
    
         
             
                  json.partial! 'ishapi/newsitems/index', :newsitems => @newsitems
         
     | 
| 
       33 
43 
     | 
    
         
             
                end
         
     | 
| 
         @@ -2,20 +2,23 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            # ishapi / newsitems / _index
         
     | 
| 
       3 
3 
     | 
    
         
             
            #
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
      
 5 
     | 
    
         
            +
            puts! newsitems, 'newsitems idx'
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
       5 
7 
     | 
    
         
             
            json.n_newsitems newsitems.count
         
     | 
| 
       6 
8 
     | 
    
         
             
            json.newsitems do
         
     | 
| 
       7 
9 
     | 
    
         
             
              json.array! newsitems do |item|
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
                json.id          item.id.to_s
         
     | 
| 
       10 
10 
     | 
    
         
             
                json.name        item.name
         
     | 
| 
       11 
11 
     | 
    
         
             
                json.created_at  item.created_at
         
     | 
| 
       12 
12 
     | 
    
         
             
                json.updated_at  item.updated_at
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
      
 14 
     | 
    
         
            +
                json.description item.description
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
       14 
16 
     | 
    
         
             
                if item.gallery
         
     | 
| 
       15 
     | 
    
         
            -
                  json. 
     | 
| 
      
 17 
     | 
    
         
            +
                  json.id           item.gallery_id.to_s
         
     | 
| 
      
 18 
     | 
    
         
            +
                  json.item_type    item.gallery.class.name
         
     | 
| 
       16 
19 
     | 
    
         
             
                  json.name         item.gallery.name
         
     | 
| 
       17 
20 
     | 
    
         
             
                  json.galleryname  item.gallery.galleryname
         
     | 
| 
       18 
     | 
    
         
            -
                  json.username     item.username || item.gallery.username || ' 
     | 
| 
      
 21 
     | 
    
         
            +
                  json.username     item.username || item.gallery.username || 'donor-default'
         
     | 
| 
       19 
22 
     | 
    
         
             
                  json.n_photos     item.gallery.photos.length
         
     | 
| 
       20 
23 
     | 
    
         
             
                  json.slug         item.gallery.galleryname
         
     | 
| 
       21 
24 
     | 
    
         
             
                  json.subhead      item.gallery.subhead
         
     | 
| 
         @@ -26,38 +29,48 @@ json.newsitems do 
     | 
|
| 
       26 
29 
     | 
    
         
             
                    json.is_purchased current_user&.profile&.has_premium_purchase( item.gallery )
         
     | 
| 
       27 
30 
     | 
    
         
             
                    json.partial!    'ishapi/photos/index',     :photos => [ item.gallery.photos[0] ]
         
     | 
| 
       28 
31 
     | 
    
         
             
                  else
         
     | 
| 
       29 
     | 
    
         
            -
                    json.partial!    'ishapi/photos/index',     :photos => item.gallery.photos
         
     | 
| 
      
 32 
     | 
    
         
            +
                    json.partial!    'ishapi/photos/index',     :photos => item.gallery.photos[0...3]
         
     | 
| 
       30 
33 
     | 
    
         
             
                  end
         
     | 
| 
       31 
34 
     | 
    
         
             
                end
         
     | 
| 
       32 
35 
     | 
    
         | 
| 
       33 
36 
     | 
    
         
             
                if item.report
         
     | 
| 
       34 
     | 
    
         
            -
                   
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
                  json.reportname item.report.name_seo
         
     | 
| 
       37 
     | 
    
         
            -
                  json.subhead    item.report.subhead
         
     | 
| 
       38 
     | 
    
         
            -
                  json.report_id  item.report_id.to_s
         
     | 
| 
       39 
     | 
    
         
            -
                  json.username   item.report.user_profile.name if item.report.user_profile
         
     | 
| 
      
 37 
     | 
    
         
            +
                  if item.report.item_type == 'longscroll' # this allows you to have a wall of scrollable text instead of clickable items
         
     | 
| 
      
 38 
     | 
    
         
            +
                    json.description item.report.descr
         
     | 
| 
       40 
39 
     | 
    
         | 
| 
       41 
     | 
    
         
            -
                   
     | 
| 
       42 
     | 
    
         
            -
                    json. 
     | 
| 
       43 
     | 
    
         
            -
                    json. 
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
      
 40 
     | 
    
         
            +
                  else
         
     | 
| 
      
 41 
     | 
    
         
            +
                    json.id         item.report_id.to_s
         
     | 
| 
      
 42 
     | 
    
         
            +
                    json.item_type  item.report.class.name
         
     | 
| 
      
 43 
     | 
    
         
            +
                    json.name       item.report.name
         
     | 
| 
      
 44 
     | 
    
         
            +
                    json.reportname item.report.slug
         
     | 
| 
      
 45 
     | 
    
         
            +
                    json.subhead    item.report.subhead
         
     | 
| 
      
 46 
     | 
    
         
            +
                    json.username   item.report.user_profile.name if item.report.user_profile
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
                    if item.report.photo
         
     | 
| 
      
 49 
     | 
    
         
            +
                      json.photo_s169_url item.report.photo.photo.url( :s169 )
         
     | 
| 
      
 50 
     | 
    
         
            +
                      json.photo_thumb2_url item.report.photo.photo.url( :thumb2 )
         
     | 
| 
      
 51 
     | 
    
         
            +
                    end
         
     | 
| 
       45 
52 
     | 
    
         | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
      
 53 
     | 
    
         
            +
                    json.partial! 'ishapi/application/meta', :item => item.report
         
     | 
| 
       47 
54 
     | 
    
         | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
      
 55 
     | 
    
         
            +
                    if item.report.is_premium
         
     | 
| 
      
 56 
     | 
    
         
            +
                      json.premium_tier item.report.premium_tier
         
     | 
| 
      
 57 
     | 
    
         
            +
                      json.is_premium   item.report.premium_tier > 0
         
     | 
| 
      
 58 
     | 
    
         
            +
                      json.is_purchased current_user&.profile&.has_premium_purchase( item.report )
         
     | 
| 
      
 59 
     | 
    
         
            +
                    end
         
     | 
| 
       52 
60 
     | 
    
         
             
                  end
         
     | 
| 
       53 
61 
     | 
    
         
             
                end
         
     | 
| 
       54 
62 
     | 
    
         | 
| 
       55 
63 
     | 
    
         
             
                if item.video_id
         
     | 
| 
       56 
     | 
    
         
            -
                  json. 
     | 
| 
      
 64 
     | 
    
         
            +
                  json.id item.video_id.to_s
         
     | 
| 
      
 65 
     | 
    
         
            +
                  # @TODO: why this relation is so weird here?!
         
     | 
| 
      
 66 
     | 
    
         
            +
                  video = Video.unscoped.find( item.video_id )
         
     | 
| 
      
 67 
     | 
    
         
            +
                  json.item_type video.class.name
         
     | 
| 
      
 68 
     | 
    
         
            +
                  json.partial! 'ishapi/videos/show', :video => video
         
     | 
| 
       57 
69 
     | 
    
         
             
                end
         
     | 
| 
       58 
70 
     | 
    
         | 
| 
       59 
71 
     | 
    
         
             
                if item.photo
         
     | 
| 
       60 
     | 
    
         
            -
                  json. 
     | 
| 
      
 72 
     | 
    
         
            +
                  json.id item.photo.id.to_s
         
     | 
| 
      
 73 
     | 
    
         
            +
                  json.item_type item.photo.class.name
         
     | 
| 
       61 
74 
     | 
    
         
             
                  json.partial! 'ishapi/photos/index', :photos => [ item.photo ]
         
     | 
| 
       62 
75 
     | 
    
         
             
                end
         
     | 
| 
       63 
76 
     | 
    
         | 
| 
         @@ -9,7 +9,7 @@ json.cache! key do 
     | 
|
| 
       9 
9 
     | 
    
         
             
              json.report do
         
     | 
| 
       10 
10 
     | 
    
         
             
                json.id          @report.id.to_s
         
     | 
| 
       11 
11 
     | 
    
         
             
                json.name        @report.name
         
     | 
| 
       12 
     | 
    
         
            -
                json.reportname  @report. 
     | 
| 
      
 12 
     | 
    
         
            +
                json.reportname  @report.slug
         
     | 
| 
       13 
13 
     | 
    
         
             
                if @report.photo
         
     | 
| 
       14 
14 
     | 
    
         
             
                  json.photo_url   @report.photo.photo.url( :small ) 
         
     | 
| 
       15 
15 
     | 
    
         
             
                  json.thumb_url   @report.photo.photo.url( :thumb )
         
     | 
| 
         @@ -5,8 +5,9 @@ 
     | 
|
| 
       5 
5 
     | 
    
         
             
            #
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            json.name @tag.name
         
     | 
| 
       8 
     | 
    
         
            -
            json.slug @tag. 
     | 
| 
      
 8 
     | 
    
         
            +
            json.slug @tag.slug
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
      
 10 
     | 
    
         
            +
            json.partial! 'ishapi/features/index',  :features  => @tag.features, :resource => @tag
         
     | 
| 
       10 
11 
     | 
    
         
             
            json.partial! 'ishapi/newsitems/index', :newsitems => @tag.newsitems.page( params[:newsitems_page] ).per( params[:newsitems_per] || 25 )
         
     | 
| 
       11 
12 
     | 
    
         
             
            json.partial! 'ishapi/reports/index',   :reports   => @tag.reports.page( params[:reports_page]     ).per( params[:reports_per] || 25 )
         
     | 
| 
       12 
13 
     | 
    
         
             
            json.partial! 'ishapi/galleries/index', :galleries => @tag.galleries.page( params[:galleries_page] ).per( params[:galleries_per] || 25 )
         
     | 
| 
         @@ -7,13 +7,15 @@ json.n_venues venues.count 
     | 
|
| 
       7 
7 
     | 
    
         
             
            json.venues do
         
     | 
| 
       8 
8 
     | 
    
         
             
              json.array! venues do |venue|
         
     | 
| 
       9 
9 
     | 
    
         
             
                json.id          venue.id.to_s
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                json.address     venue.address if venue.address.present?
         
     | 
| 
       10 
12 
     | 
    
         
             
                json.name        venue.name
         
     | 
| 
       11 
     | 
    
         
            -
                json. 
     | 
| 
      
 13 
     | 
    
         
            +
                json.slug    venue.slug
         
     | 
| 
       12 
14 
     | 
    
         
             
                json.subhead     venue.subhead
         
     | 
| 
       13 
15 
     | 
    
         
             
                json.description venue.descr
         
     | 
| 
       14 
16 
     | 
    
         
             
                json.x           venue.x
         
     | 
| 
       15 
17 
     | 
    
         
             
                json.y           venue.y
         
     | 
| 
       16 
     | 
    
         
            -
                json.photo       venue.profile_photo.photo.url( :thumb )  
     | 
| 
      
 18 
     | 
    
         
            +
                json.photo       venue.profile_photo ? venue.profile_photo.photo.url( :thumb ) : image_url('missing.png')
         
     | 
| 
       17 
19 
     | 
    
         
             
                json.partial! 'ishapi/tags/index', :tags => venue.tags
         
     | 
| 
       18 
20 
     | 
    
         
             
              end
         
     | 
| 
       19 
21 
     | 
    
         
             
            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
         
     | 
    
        data/config/routes.rb
    CHANGED
    
    | 
         @@ -47,7 +47,7 @@ Ishapi::Engine.routes.draw do 
     | 
|
| 
       47 
47 
     | 
    
         
             
              get 'profiles/view/:username', :to => 'user_profiles#show'
         
     | 
| 
       48 
48 
     | 
    
         | 
| 
       49 
49 
     | 
    
         
             
              get 'reports', :to => 'reports#index'
         
     | 
| 
       50 
     | 
    
         
            -
              get 'reports/view/: 
     | 
| 
      
 50 
     | 
    
         
            +
              get 'reports/view/:slug', :to => 'reports#show'
         
     | 
| 
       51 
51 
     | 
    
         | 
| 
       52 
52 
     | 
    
         
             
              get 'sites/view/:domain',                            :to => 'sites#show',      :constraints => { :domain => /[^\/]+/ }
         
     | 
| 
       53 
53 
     | 
    
         
             
              post 'sites/view/:domain',                           :to => 'sites#show',      :constraints => { :domain => /[^\/]+/ }
         
     | 
| 
         @@ -58,7 +58,7 @@ Ishapi::Engine.routes.draw do 
     | 
|
| 
       58 
58 
     | 
    
         | 
| 
       59 
59 
     | 
    
         
             
              post 'stars/buy', to: 'gameui#buy_stars'
         
     | 
| 
       60 
60 
     | 
    
         | 
| 
       61 
     | 
    
         
            -
              get 'tags/view/: 
     | 
| 
      
 61 
     | 
    
         
            +
              get 'tags/view/:slug', :to => 'tags#show'
         
     | 
| 
       62 
62 
     | 
    
         
             
              get 'test', to: 'application#test'
         
     | 
| 
       63 
63 
     | 
    
         | 
| 
       64 
64 
     | 
    
         
             
              post  'users/fb_sign_in',     :to => 'users#fb_sign_in'
         
     | 
    
        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. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.8.155
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - piousbox
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2021- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2021-10-17 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
         
     |