ishapi 0.1.8.169 → 0.1.8.171
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 -1
- data/app/controllers/ishapi/cities_controller.rb +2 -2
- data/app/controllers/ishapi/payments_controller.rb +2 -0
- data/app/controllers/ishapi/{unrestricted_controller.rb → unrestricted_controller.rb-trash} +0 -0
- data/app/controllers/ishapi/users_controller.rb +1 -9
- data/app/helpers/ishapi/application_helper.rb +5 -0
- data/app/models/ishapi/ability.rb +0 -2
- data/app/views/ishapi/maps/show.jbuilder +2 -2
- data/app/views/ishapi/markers/_index.jbuilder +4 -2
- data/app/views/ishapi/newsitems/_index.jbuilder +0 -2
- data/app/views/ishapi/users/_account.jbuilder +1 -2
- data/app/views/ishapi/users/login.jbuilder +2 -2
- metadata +3 -4
- data/app/helpers/ishapi/articles_helper.rb +0 -4
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 1061557c4a428d72d380f5eaa54ece94dfb5c6c5493707d23297007af653b929
         | 
| 4 | 
            +
              data.tar.gz: 310cf825c56d201501a57e592ef31a0ae8b282811c1d43d6cb91399f80d4deb2
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 238eaa5df713a592f8f88456771188a357b0ae4d1d5c463ad390e339573b3ce04749ac3c16779588b5be4374ff7798ee5a44155d932d1281f954ca6ab70f0f1f
         | 
| 7 | 
            +
              data.tar.gz: d9208f4b3fb2075bcb418badad07d7466818eed030381b13aba91474dc24db48d87fc8819ecf934b9ae9e7c296a289cec02b57b133753c51589548f076a3938e
         | 
| @@ -42,7 +42,7 @@ class Ishapi::ApplicationController < ActionController::Base | |
| 42 42 | 
             
                rescue JWT::ExpiredSignature, JWT::DecodeError => e
         | 
| 43 43 | 
             
                  # flash[:notice] = 'You are not logged in, or you have been logged out.'
         | 
| 44 44 | 
             
                  # puts! 'You are not logged in, or you have been logged out.'
         | 
| 45 | 
            -
                  @current_user = User.new
         | 
| 45 | 
            +
                  @current_user = User.new({ profile: Ish::UserProfile.new })
         | 
| 46 46 | 
             
                end
         | 
| 47 47 | 
             
              end
         | 
| 48 48 |  | 
| @@ -1,10 +1,10 @@ | |
| 1 1 | 
             
            require_dependency "ishapi/application_controller"
         | 
| 2 2 |  | 
| 3 3 | 
             
            module Ishapi
         | 
| 4 | 
            -
              class CitiesController <  | 
| 4 | 
            +
              class CitiesController < Ishapi::ApplicationController
         | 
| 5 5 | 
             
                protect_from_forgery :prepend => true, :with => :exception
         | 
| 6 6 | 
             
                layout :false
         | 
| 7 | 
            -
             | 
| 7 | 
            +
             | 
| 8 8 | 
             
                check_authorization
         | 
| 9 9 | 
             
                skip_before_action :verify_authenticity_token
         | 
| 10 10 | 
             
                before_action :set_current_ability
         | 
| 
            File without changes
         | 
| @@ -25,6 +25,7 @@ module Ishapi | |
| 25 25 |  | 
| 26 26 | 
             
                def login
         | 
| 27 27 | 
             
                  @current_user = User.where( email: params[:email] ).first
         | 
| 28 | 
            +
             | 
| 28 29 | 
             
                  if !@current_user
         | 
| 29 30 | 
             
                    render json: { status: :not_ok }, status: 401
         | 
| 30 31 | 
             
                    return
         | 
| @@ -35,15 +36,6 @@ module Ishapi | |
| 35 36 | 
             
                    # send the jwt to client
         | 
| 36 37 | 
             
                    @jwt_token = encode(user_id: @current_user.id.to_s)
         | 
| 37 38 | 
             
                    @profile = @current_user.profile
         | 
| 38 | 
            -
             | 
| 39 | 
            -
            =begin
         | 
| 40 | 
            -
                    render json: {
         | 
| 41 | 
            -
                      email: @current_user.email,
         | 
| 42 | 
            -
                      jwt_token: @jwt_token,
         | 
| 43 | 
            -
                      n_unlocks: @current_user.profile.n_unlocks,
         | 
| 44 | 
            -
                    }
         | 
| 45 | 
            -
            =end
         | 
| 46 | 
            -
             | 
| 47 39 | 
             
                  end
         | 
| 48 40 | 
             
                end
         | 
| 49 41 |  | 
| @@ -15,7 +15,7 @@ json.cache! this_key do | |
| 15 15 | 
             
                json.description @map.description
         | 
| 16 16 | 
             
                json.w           @map.w
         | 
| 17 17 | 
             
                json.h           @map.h
         | 
| 18 | 
            -
                json.img_path    @map.image.image.url(:original)
         | 
| 18 | 
            +
                json.img_path    @map.image ? @map.image.image.url(:original) : image_missing
         | 
| 19 19 | 
             
                json.updated_at  @map.updated_at
         | 
| 20 20 | 
             
                json.rated       @map.rated
         | 
| 21 21 |  | 
| @@ -32,7 +32,7 @@ json.cache! this_key do | |
| 32 32 | 
             
                  json.partial! 'ishapi/markers/index', markers: @markers
         | 
| 33 33 | 
             
                else
         | 
| 34 34 | 
             
                  ## I removed json parsing from here! _vp_ 2021-10-14
         | 
| 35 | 
            -
                  ## I added json parsing here | 
| 35 | 
            +
                  ## I added json parsing here, and is seems right. _vp_ 2021-10-19
         | 
| 36 36 | 
             
                  json.config JSON.parse @map.config
         | 
| 37 37 | 
             
                  json.labels JSON.parse @map.labels
         | 
| 38 38 | 
             
                  json.partial! 'ishapi/markers/index', markers: @markers
         | 
| @@ -12,9 +12,11 @@ json.markers do | |
| 12 12 | 
             
                json.h    marker.h
         | 
| 13 13 | 
             
                json.centerOffsetX  marker.centerOffsetX
         | 
| 14 14 | 
             
                json.centerOffsetY  marker.centerOffsetY
         | 
| 15 | 
            -
                json.img_path       marker.image.image.url(:original)
         | 
| 16 | 
            -
                json.title_img_path marker.title_image.image.url(:thumb)
         | 
| 15 | 
            +
                json.img_path       marker.image ? marker.image.image.url(:original) : image_missing
         | 
| 16 | 
            +
                json.title_img_path marker.title_image ? marker.title_image.image.url(:thumb) : image_missing
         | 
| 17 17 | 
             
                json.item_type      marker.item_type
         | 
| 18 18 | 
             
                json.url            marker.url
         | 
| 19 | 
            +
                json.premium_tier   marker.destination.premium_tier
         | 
| 20 | 
            +
                json.id             marker.destination.id.to_s
         | 
| 19 21 | 
             
              end
         | 
| 20 22 | 
             
            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. | 
| 4 | 
            +
              version: 0.1.8.171
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - piousbox
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2022-02- | 
| 11 | 
            +
            date: 2022-02-27 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         | 
| @@ -273,13 +273,12 @@ files: | |
| 273 273 | 
             
            - app/controllers/ishapi/sites_controller.rb
         | 
| 274 274 | 
             
            - app/controllers/ishapi/stock_watches_controller.rb
         | 
| 275 275 | 
             
            - app/controllers/ishapi/tags_controller.rb
         | 
| 276 | 
            -
            - app/controllers/ishapi/unrestricted_controller.rb
         | 
| 276 | 
            +
            - app/controllers/ishapi/unrestricted_controller.rb-trash
         | 
| 277 277 | 
             
            - app/controllers/ishapi/user_profiles_controller.rb
         | 
| 278 278 | 
             
            - app/controllers/ishapi/users_controller.rb
         | 
| 279 279 | 
             
            - app/controllers/ishapi/venues_controller.rb
         | 
| 280 280 | 
             
            - app/controllers/ishapi/videos_controller.rb
         | 
| 281 281 | 
             
            - app/helpers/ishapi/application_helper.rb
         | 
| 282 | 
            -
            - app/helpers/ishapi/articles_helper.rb
         | 
| 283 282 | 
             
            - app/jobs/ishapi/application_job.rb
         | 
| 284 283 | 
             
            - app/mailers/ishapi/application_mailer.rb
         | 
| 285 284 | 
             
            - app/models/ishapi/ability.rb
         |