ishapi 0.1.8.168 → 0.1.8.172
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 +18 -1
- data/app/controllers/ishapi/cities_controller.rb +2 -2
- data/app/controllers/ishapi/maps_controller.rb +3 -10
- data/app/controllers/ishapi/payments_controller.rb +20 -11
- data/app/controllers/ishapi/stock_watches_controller.rb +13 -0
- data/app/controllers/ishapi/users_controller.rb +17 -11
- data/app/helpers/ishapi/application_helper.rb +5 -0
- data/app/models/ishapi/ability.rb +4 -0
- data/app/views/ishapi/maps/show.jbuilder +2 -2
- data/app/views/ishapi/markers/_index.jbuilder +15 -2
- data/app/views/ishapi/newsitems/_index.jbuilder +2 -3
- data/app/views/ishapi/reports/show.jbuilder +6 -4
- data/app/views/ishapi/stock_watches/index.jbuilder +11 -0
- data/app/views/ishapi/users/_account.jbuilder +7 -8
- data/app/views/ishapi/users/account.jbuilder +1 -1
- data/app/views/ishapi/users/login.jbuilder +2 -2
- data/app/views/ishapi/videos/_show.jbuilder +1 -0
- data/config/routes.rb +17 -20
- metadata +6 -6
- data/app/controllers/ishapi/unrestricted_controller.rb +0 -25
- 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: 7b51cdb462ddeb86fe0fd4e10c6b3b7e9dfea2fffef44b773f2d1748a1a3b8d8
|
4
|
+
data.tar.gz: 1f5c3705a6b9eb7828dee1296113d222058d9015665d4f183429e72714beb3e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a43ea617b94979fada76da3479dea3e62efce08e61484e2e17c32687de0f83c0a9df5e9fdc7ec79beba43e5453ff61f91405c654477815b99b793a8443e85035
|
7
|
+
data.tar.gz: de56a014a64631b435557e85dbdca01fc979d52ca66230e84a5f806c95dde9c938067ca29e2d304b5251759298580a190a8031d970798a42654510ee9adc5a68
|
@@ -1,6 +1,10 @@
|
|
1
1
|
|
2
2
|
class Ishapi::ApplicationController < ActionController::Base
|
3
3
|
|
4
|
+
def home
|
5
|
+
render json: { status: :ok }, status: :ok
|
6
|
+
end
|
7
|
+
|
4
8
|
## POST /api/users/long_term_token , a FB login flow
|
5
9
|
def long_term_token
|
6
10
|
accessToken = request.headers[:accessToken]
|
@@ -30,12 +34,25 @@ class Ishapi::ApplicationController < ActionController::Base
|
|
30
34
|
|
31
35
|
private
|
32
36
|
|
37
|
+
## This returns an empty user if not logged in!
|
33
38
|
def check_profile
|
34
39
|
begin
|
35
40
|
decoded = decode(params[:jwt_token])
|
36
41
|
@current_user = User.find decoded['user_id']
|
37
42
|
rescue JWT::ExpiredSignature, JWT::DecodeError => e
|
38
|
-
flash[:notice] = 'You are not logged in, or you have been logged out.'
|
43
|
+
# flash[:notice] = 'You are not logged in, or you have been logged out.'
|
44
|
+
# puts! 'You are not logged in, or you have been logged out.'
|
45
|
+
@current_user = User.new({ profile: Ish::UserProfile.new })
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
## This errors out if not logged in!
|
50
|
+
def check_profile_hard
|
51
|
+
begin
|
52
|
+
decoded = decode(params[:jwt_token])
|
53
|
+
@current_user = User.find decoded['user_id']
|
54
|
+
rescue JWT::ExpiredSignature, JWT::DecodeError => e
|
55
|
+
# flash[:notice] = 'You are not logged in, or you have been logged out.'
|
39
56
|
# puts! 'You are not logged in, or you have been logged out.'
|
40
57
|
end
|
41
58
|
end
|
@@ -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
|
@@ -5,20 +5,13 @@ class Ishapi::MapsController < Ishapi::ApplicationController
|
|
5
5
|
before_action :check_profile, only: [ :show ]
|
6
6
|
|
7
7
|
def show
|
8
|
-
@location = ::Gameui::Map.
|
8
|
+
@location = ::Gameui::Map.find_by slug: params[:slug]
|
9
9
|
@map = @location.map || @location
|
10
|
+
|
10
11
|
authorize! :show, @map
|
11
12
|
@newsitems = @location.newsitems
|
12
13
|
|
13
|
-
|
14
|
-
## @TODO: absolutely change this!
|
15
|
-
##
|
16
|
-
|
17
|
-
@markers = @map.markers.where( is_active: true )
|
18
|
-
if @current_user
|
19
|
-
a = @current_user.profile.shared_markers.unscoped.where( is_active: true, map_id: @map.id ).to_a
|
20
|
-
@markers = @markers + a
|
21
|
-
end
|
14
|
+
@markers = @map.markers.permitted_to(current_user.profile)
|
22
15
|
|
23
16
|
# case @map.ordering_type
|
24
17
|
# when ::Gameui::Map::ORDERING_TYPE_ALPHABETIC
|
@@ -4,6 +4,8 @@ module Ishapi
|
|
4
4
|
|
5
5
|
before_action :check_profile, only: %i| create2 unlock |
|
6
6
|
|
7
|
+
# alphabetized : )
|
8
|
+
|
7
9
|
##
|
8
10
|
## this is for invoices on wasya.co, isn't it?
|
9
11
|
## 20200712
|
@@ -41,14 +43,16 @@ module Ishapi
|
|
41
43
|
end
|
42
44
|
end
|
43
45
|
|
44
|
-
## This is for guyd _vp_
|
46
|
+
## This is for guyd _vp_ 2020-07-21
|
47
|
+
## It's been a while! _vp_ 2022-03-01
|
45
48
|
def create2
|
46
49
|
authorize! :create, ::Ish::Payment
|
50
|
+
current_user.profile.update_attributes({ is_purchasing: true })
|
47
51
|
|
48
52
|
begin
|
49
53
|
amount_cents = 503 # @TODO: change
|
50
54
|
|
51
|
-
::Stripe.api_key = STRIPE_SK
|
55
|
+
::Stripe.api_key = ::STRIPE_SK
|
52
56
|
intent = Stripe::PaymentIntent.create({
|
53
57
|
amount: amount_cents,
|
54
58
|
currency: 'usd',
|
@@ -57,18 +61,20 @@ module Ishapi
|
|
57
61
|
|
58
62
|
payment = Ish::Payment.create!(
|
59
63
|
client_secret: intent.client_secret,
|
60
|
-
email:
|
64
|
+
email: current_user.email,
|
61
65
|
payment_intent_id: intent.id,
|
62
|
-
profile_id:
|
66
|
+
profile_id: current_user.profile.id )
|
63
67
|
|
64
68
|
render json: { client_secret: intent.client_secret }
|
65
69
|
rescue Mongoid::Errors::DocumentNotFound => e
|
66
|
-
puts! e, '
|
70
|
+
puts! e, '#create2 Mongoid::Errors::DocumentNotFound'
|
67
71
|
render :status => 404, :json => e
|
68
72
|
end
|
69
73
|
end
|
70
74
|
|
75
|
+
##
|
71
76
|
## webhook
|
77
|
+
##
|
72
78
|
def stripe_confirm
|
73
79
|
authorize! :open_permission, ::Ishapi
|
74
80
|
payload = request.body.read
|
@@ -76,7 +82,7 @@ module Ishapi
|
|
76
82
|
begin
|
77
83
|
event = Stripe::Event.construct_from(JSON.parse(payload, symbolize_names: true))
|
78
84
|
rescue StandardError => e
|
79
|
-
puts! e, '
|
85
|
+
puts! e, 'could not #stripe_confirm'
|
80
86
|
render status: 400, json: { status: :not_ok }
|
81
87
|
return
|
82
88
|
end
|
@@ -85,8 +91,11 @@ module Ishapi
|
|
85
91
|
|
86
92
|
payment = Ish::Payment.where( payment_intent_id: payment_intent.id ).first
|
87
93
|
if payment && payment_intent['status'] == 'succeeded'
|
94
|
+
|
88
95
|
payment.update_attributes( status: :confirmed )
|
89
|
-
|
96
|
+
n_unlocks = payment.profile.n_unlocks + 5
|
97
|
+
|
98
|
+
payment.profile.update_attributes!( n_unlocks: n_unlocks, is_purchasing: false ) # @TODO: it's not always 5? adjust
|
90
99
|
end
|
91
100
|
|
92
101
|
render status: 200, json: { status: :ok }
|
@@ -96,18 +105,18 @@ module Ishapi
|
|
96
105
|
authorize! :unlock, ::Ish::Payment
|
97
106
|
item = Object::const_get(params['kind']).find params['id']
|
98
107
|
|
99
|
-
puts! params, 'unlocking...'
|
100
|
-
|
101
108
|
existing = Purchase.where( user_profile: @current_user.profile, item: item ).first
|
102
109
|
if existing
|
103
110
|
render status: 200, json: { status: :ok, message: 'already purchased' }
|
104
111
|
return
|
105
112
|
end
|
106
113
|
|
107
|
-
@current_user.profile.
|
114
|
+
@current_user.profile.inc( n_unlocks: -item.premium_tier )
|
115
|
+
|
108
116
|
purchase = ::Gameui::PremiumPurchase.create!( item: item, user_profile: @current_user.profile, )
|
109
117
|
|
110
|
-
|
118
|
+
@profile = @current_user.profile
|
119
|
+
render 'ishapi/users/account'
|
111
120
|
end
|
112
121
|
|
113
122
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require_dependency "ishapi/application_controller"
|
2
|
+
module Ishapi
|
3
|
+
class StockWatchesController < ApplicationController
|
4
|
+
|
5
|
+
before_action :check_jwt
|
6
|
+
|
7
|
+
def index
|
8
|
+
authorize! :index, IronWarbler::StockWatch
|
9
|
+
@stock_watches = IronWarbler::StockWatch.active # @TODO: restrict by-profile, no?
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
@@ -3,9 +3,9 @@ require_dependency "ishapi/application_controller"
|
|
3
3
|
module Ishapi
|
4
4
|
class UsersController < ApplicationController
|
5
5
|
|
6
|
-
skip_authorization_check only: %i| fb_sign_in login |
|
6
|
+
skip_authorization_check only: %i| create fb_sign_in login |
|
7
7
|
|
8
|
-
before_action :
|
8
|
+
before_action :check_profile_hard, only: %i| account |
|
9
9
|
|
10
10
|
def account
|
11
11
|
@profile = current_user&.profile
|
@@ -17,6 +17,20 @@ module Ishapi
|
|
17
17
|
}, status: 401
|
18
18
|
end
|
19
19
|
|
20
|
+
def create
|
21
|
+
@profile = Profile.new( email: params[:email] )
|
22
|
+
@user = User.new( email: params[:email], password: params[:password], profile: @profile )
|
23
|
+
|
24
|
+
if @profile.save && @user.save
|
25
|
+
@jwt_token = encode(user_id: @user.id.to_s)
|
26
|
+
render 'login'
|
27
|
+
else
|
28
|
+
render json: {
|
29
|
+
messages: [],
|
30
|
+
}, status: 401
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
20
34
|
def fb_sign_in
|
21
35
|
authorize! :fb_sign_in, Ishapi
|
22
36
|
# render :json => { :status => :ok }
|
@@ -25,6 +39,7 @@ module Ishapi
|
|
25
39
|
|
26
40
|
def login
|
27
41
|
@current_user = User.where( email: params[:email] ).first
|
42
|
+
|
28
43
|
if !@current_user
|
29
44
|
render json: { status: :not_ok }, status: 401
|
30
45
|
return
|
@@ -35,15 +50,6 @@ module Ishapi
|
|
35
50
|
# send the jwt to client
|
36
51
|
@jwt_token = encode(user_id: @current_user.id.to_s)
|
37
52
|
@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
53
|
end
|
48
54
|
end
|
49
55
|
|
@@ -16,7 +16,11 @@ class Ishapi::Ability
|
|
16
16
|
can [ :show ], Gallery do |gallery|
|
17
17
|
gallery.user_profile == user.profile
|
18
18
|
end
|
19
|
+
|
19
20
|
can [ :do_purchase ], ::Gameui
|
21
|
+
can [ :show ], ::Gameui::Map do |map|
|
22
|
+
map.creator_profile == user.profile
|
23
|
+
end
|
20
24
|
|
21
25
|
can [ :create, :unlock ], ::Ish::Payment
|
22
26
|
|
@@ -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,22 @@ 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
|
+
|
20
|
+
## @TODO: this is copy-pasted and should be abstracted.
|
21
|
+
destination = marker.destination
|
22
|
+
json.premium_tier destination.premium_tier
|
23
|
+
json.id destination.id.to_s
|
24
|
+
if destination.is_premium
|
25
|
+
json.premium_tier destination.premium_tier
|
26
|
+
json.is_premium destination.premium_tier > 0
|
27
|
+
if current_user && current_user.profile
|
28
|
+
json.is_purchased current_user.profile.has_premium_purchase( destination )
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
19
32
|
end
|
20
33
|
end
|
@@ -2,8 +2,6 @@
|
|
2
2
|
# ishapi / newsitems / _index
|
3
3
|
#
|
4
4
|
|
5
|
-
puts! newsitems, 'newsitems idx'
|
6
|
-
|
7
5
|
json.n_newsitems newsitems.count
|
8
6
|
json.newsitems do
|
9
7
|
json.array! newsitems do |item|
|
@@ -41,7 +39,8 @@ json.newsitems do
|
|
41
39
|
json.id item.report_id.to_s
|
42
40
|
json.item_type item.report.class.name
|
43
41
|
json.name item.report.name
|
44
|
-
json.reportname item.report.slug
|
42
|
+
json.reportname item.report.slug # @TODO: @deprecated, remove
|
43
|
+
json.slug item.report.slug
|
45
44
|
json.subhead item.report.subhead
|
46
45
|
json.username item.report.user_profile.name if item.report.user_profile
|
47
46
|
|
@@ -8,10 +8,12 @@ key = [ @report, params ]
|
|
8
8
|
json.cache! key do
|
9
9
|
json.report do
|
10
10
|
json.id @report.id.to_s
|
11
|
+
json.item_type @report.class.name
|
11
12
|
json.name @report.name
|
12
|
-
json.reportname @report.slug
|
13
|
+
json.reportname @report.slug # @TODO: @deprecated, remove
|
14
|
+
json.slug @report.slug
|
13
15
|
if @report.photo
|
14
|
-
json.photo_url @report.photo.photo.url( :small )
|
16
|
+
json.photo_url @report.photo.photo.url( :small )
|
15
17
|
json.thumb_url @report.photo.photo.url( :thumb )
|
16
18
|
end
|
17
19
|
|
@@ -22,7 +24,7 @@ json.cache! key do
|
|
22
24
|
json.cityname @report.city.cityname if @report.city
|
23
25
|
json.subhead @report.subhead
|
24
26
|
json.description @report.descr
|
25
|
-
|
27
|
+
|
26
28
|
if @report.photo
|
27
29
|
json.photo do
|
28
30
|
json.thumb_url @report.photo.photo.url :thumb
|
@@ -42,5 +44,5 @@ json.cache! key do
|
|
42
44
|
json.large_url @report.photo.photo.url :large
|
43
45
|
end
|
44
46
|
end
|
45
|
-
|
47
|
+
|
46
48
|
end
|
@@ -1,16 +1,15 @@
|
|
1
1
|
|
2
|
-
|
2
|
+
json.id @profile.id.to_s
|
3
3
|
json.name @profile.name
|
4
|
-
json.username @profile.username
|
5
4
|
json.email @profile.email
|
6
5
|
json.profile_photo_url @profile.profile_photo.photo.url( :thumb ) if @profile.profile_photo
|
7
6
|
|
8
|
-
json.n_reports
|
9
|
-
json.n_galleries
|
10
|
-
json.n_videos
|
11
|
-
json.n_stars
|
12
|
-
json.n_unlocks
|
13
|
-
|
7
|
+
json.n_reports @profile.reports.count
|
8
|
+
json.n_galleries @profile.galleries.count
|
9
|
+
json.n_videos @profile.videos.count
|
10
|
+
json.n_stars @profile.n_stars # @TODO: which one is deprecated?
|
11
|
+
json.n_unlocks @profile.n_unlocks # @TODO: which one is deprecated?
|
12
|
+
json.is_purchasing @profile.is_purchasing
|
14
13
|
if @profile.current_city
|
15
14
|
json.current_city @profile.current_city
|
16
15
|
end
|
@@ -1,2 +1,2 @@
|
|
1
1
|
|
2
|
-
json.partial! 'account'
|
2
|
+
json.partial! 'ishapi/users/account'
|
data/config/routes.rb
CHANGED
@@ -8,13 +8,6 @@ Ishapi::Engine.routes.draw do
|
|
8
8
|
get 'cities/view/:cityname', :to => 'cities#show'
|
9
9
|
get 'cities/features', :to => 'cities#features'
|
10
10
|
|
11
|
-
post 'co_tailors/orders', :to => 'orders#create'
|
12
|
-
post 'co_tailors/order_items', :to => 'order_items#create'
|
13
|
-
post 'co_tailors/measurements', :to => 'measurements#update'
|
14
|
-
get 'co_tailors/products/by-kind/:kind', :to => 'products#show'
|
15
|
-
namespace :co_tailors do
|
16
|
-
end
|
17
|
-
|
18
11
|
get 'events/view/:eventname', :to => 'events#show'
|
19
12
|
|
20
13
|
get 'galleries', :to => 'galleries#index'
|
@@ -27,8 +20,7 @@ Ishapi::Engine.routes.draw do
|
|
27
20
|
get 'maps', to: 'maps#index'
|
28
21
|
get 'maps/view/:slug', to: 'maps#show'
|
29
22
|
get 'markers/view/:slug', to: 'maps#show_marker'
|
30
|
-
|
31
|
-
post "/my/account", to: "users#account"
|
23
|
+
match "/my/account", to: "users#account", via: [ :get, :post ]
|
32
24
|
namespace :my do
|
33
25
|
get 'galleries', to: 'galleries#index'
|
34
26
|
get 'newsitems', to: 'newsitems#index'
|
@@ -49,24 +41,29 @@ Ishapi::Engine.routes.draw do
|
|
49
41
|
get 'reports', :to => 'reports#index'
|
50
42
|
get 'reports/view/:slug', :to => 'reports#show'
|
51
43
|
|
52
|
-
get
|
53
|
-
post 'sites/view/:domain',
|
54
|
-
get
|
55
|
-
get
|
56
|
-
get
|
57
|
-
get
|
44
|
+
get 'sites/view/:domain', :to => 'sites#show', :constraints => { :domain => /[^\/]+/ }
|
45
|
+
post 'sites/view/:domain', :to => 'sites#show', :constraints => { :domain => /[^\/]+/ }
|
46
|
+
get 'sites/view/:domain/newsitems/:newsitems_page', :to => 'newsitems#index', :constraints => { :domain => /[^\/]+/ }
|
47
|
+
get 'sites/view/:domain/reports', :to => 'reports#index', :constraints => { :domain => /[^\/]+/ }
|
48
|
+
get 'sites/view/:domain/reports/page/:reports_page', :to => 'reports#index', :constraints => { :domain => /[^\/]+/ }
|
49
|
+
get 'sites/view/:domain/tags', :to => 'tags#index', :constraints => { :domain => /[^\/]+/ }
|
58
50
|
|
59
51
|
post 'stars/buy', to: 'gameui#buy_stars'
|
60
52
|
|
53
|
+
## 2022-02-12 moved to iron_warbler gem _vp_
|
54
|
+
# resources "stock_watches"
|
55
|
+
|
61
56
|
get 'tags/view/:slug', :to => 'tags#show'
|
62
57
|
get 'test', to: 'application#test'
|
63
58
|
|
64
|
-
post 'users/fb_sign_in',
|
65
|
-
|
66
|
-
post 'users/profile
|
67
|
-
|
59
|
+
post 'users/fb_sign_in', to: 'users#fb_sign_in'
|
60
|
+
get 'users/me', to: 'users#account'
|
61
|
+
post 'users/profile', to: 'users#show'
|
62
|
+
post 'users/profile/update', to: 'users#update'
|
63
|
+
get 'users/profile', to: 'users#show' # @TODO: only for testing! accessToken must be hidden
|
68
64
|
match 'users/long_term_token', to: 'application#long_term_token', via: [ :get, :post ]
|
69
|
-
post 'users/login',
|
65
|
+
post 'users/login', to: 'users#login'
|
66
|
+
post 'users', to: 'users#create'
|
70
67
|
|
71
68
|
get 'venues', :to => 'venues#index'
|
72
69
|
get 'venues/view/:venuename', :to => 'venues#show'
|
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.172
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 6.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 6.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mongoid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -271,14 +271,13 @@ files:
|
|
271
271
|
- app/controllers/ishapi/products_controller.rb
|
272
272
|
- app/controllers/ishapi/reports_controller.rb
|
273
273
|
- app/controllers/ishapi/sites_controller.rb
|
274
|
+
- app/controllers/ishapi/stock_watches_controller.rb
|
274
275
|
- app/controllers/ishapi/tags_controller.rb
|
275
|
-
- app/controllers/ishapi/unrestricted_controller.rb
|
276
276
|
- app/controllers/ishapi/user_profiles_controller.rb
|
277
277
|
- app/controllers/ishapi/users_controller.rb
|
278
278
|
- app/controllers/ishapi/venues_controller.rb
|
279
279
|
- app/controllers/ishapi/videos_controller.rb
|
280
280
|
- app/helpers/ishapi/application_helper.rb
|
281
|
-
- app/helpers/ishapi/articles_helper.rb
|
282
281
|
- app/jobs/ishapi/application_job.rb
|
283
282
|
- app/mailers/ishapi/application_mailer.rb
|
284
283
|
- app/models/ishapi/ability.rb
|
@@ -318,6 +317,7 @@ files:
|
|
318
317
|
- app/views/ishapi/reports/index.jbuilder
|
319
318
|
- app/views/ishapi/reports/show.jbuilder
|
320
319
|
- app/views/ishapi/sites/show.jbuilder
|
320
|
+
- app/views/ishapi/stock_watches/index.jbuilder
|
321
321
|
- app/views/ishapi/tags/_index.jbuilder
|
322
322
|
- app/views/ishapi/tags/_widget.jbuilder
|
323
323
|
- app/views/ishapi/tags/index.jbuilder
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module Ishapi
|
2
|
-
class UnrestrictedController < ActionController::Base
|
3
|
-
protect_from_forgery :prepend => true, :with => :exception
|
4
|
-
layout :false
|
5
|
-
|
6
|
-
before_action :set_current_ability
|
7
|
-
|
8
|
-
check_authorization
|
9
|
-
skip_before_action :verify_authenticity_token
|
10
|
-
|
11
|
-
|
12
|
-
private
|
13
|
-
|
14
|
-
|
15
|
-
def set_current_ability
|
16
|
-
@current_ability ||= ::Ishapi::Ability.new( User.new )
|
17
|
-
end
|
18
|
-
|
19
|
-
def puts! a, b=''
|
20
|
-
puts "+++ +++ #{b}"
|
21
|
-
puts a.inspect
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|