ishapi 0.1.8.154 → 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/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 +1 -1
- data/app/views/ishapi/features/_index.jbuilder +1 -1
- data/app/views/ishapi/galleries/_show.jbuilder +1 -1
- data/app/views/ishapi/galleries/index.jbuilder +1 -1
- data/app/views/ishapi/maps/show.jbuilder +10 -0
- data/app/views/ishapi/newsitems/_index.jbuilder +24 -15
- 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 +1 -1
- data/app/views/ishapi/venues/show.jbuilder +1 -1
- data/config/routes.rb +2 -2
- metadata +2 -2
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
|
|
@@ -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
|
@@ -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
|
@@ -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,6 +2,8 @@
|
|
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|
|
@@ -9,6 +11,8 @@ json.newsitems do
|
|
9
11
|
json.created_at item.created_at
|
10
12
|
json.updated_at item.updated_at
|
11
13
|
|
14
|
+
json.description item.description
|
15
|
+
|
12
16
|
if item.gallery
|
13
17
|
json.id item.gallery_id.to_s
|
14
18
|
json.item_type item.gallery.class.name
|
@@ -30,24 +34,29 @@ json.newsitems do
|
|
30
34
|
end
|
31
35
|
|
32
36
|
if item.report
|
33
|
-
|
34
|
-
|
35
|
-
json.name item.report.name
|
36
|
-
json.reportname item.report.name_seo
|
37
|
-
json.subhead item.report.subhead
|
38
|
-
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
|
39
39
|
|
40
|
-
|
41
|
-
json.
|
42
|
-
json.
|
43
|
-
|
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
|
44
52
|
|
45
|
-
|
53
|
+
json.partial! 'ishapi/application/meta', :item => item.report
|
46
54
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
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
|
51
60
|
end
|
52
61
|
end
|
53
62
|
|
@@ -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 )
|
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-10-
|
11
|
+
date: 2021-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|