ishapi 0.1.8.316 → 3.0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +21 -12
- data/Rakefile +4 -22
- data/app/assets/config/ishapi_manifest.js +0 -1
- data/app/assets/stylesheets/ishapi/{application.scss → application.css} +2 -32
- data/app/controllers/ishapi/application_controller.rb +2 -139
- data/app/helpers/ishapi/application_helper.rb +0 -5
- data/app/mailers/ishapi/application_mailer.rb +4 -11
- data/app/models/ishapi/application_record.rb +5 -0
- data/app/views/layouts/ishapi/application.html.erb +15 -0
- data/config/routes.rb +0 -101
- data/lib/ishapi/engine.rb +0 -6
- data/lib/ishapi/version.rb +1 -1
- data/lib/ishapi.rb +2 -4
- metadata +13 -272
- data/app/assets/javascripts/ishapi/application.js +0 -14
- data/app/assets/stylesheets/ishapi/galleries.scss +0 -46
- data/app/assets/stylesheets/ishapi/locations.scss +0 -8
- data/app/assets/stylesheets/scaffold.css +0 -80
- data/app/controllers/ishapi/email_contexts_controller.rb +0 -28
- data/app/controllers/ishapi/email_conversations_controller.rb +0 -45
- data/app/controllers/ishapi/email_messages_controller.rb +0 -54
- data/app/controllers/ishapi/email_unsubscribes_controller.rb +0 -35
- data/app/controllers/ishapi/galleries_controller.rb +0 -56
- data/app/controllers/ishapi/gameui_controller.rb +0 -64
- data/app/controllers/ishapi/invoices_controller.rb +0 -22
- data/app/controllers/ishapi/lead_actions_controller.rb +0 -23
- data/app/controllers/ishapi/leads_controller.rb +0 -18
- data/app/controllers/ishapi/leadsets_controller.rb +0 -30
- data/app/controllers/ishapi/locations_controller.rb +0 -54
- data/app/controllers/ishapi/maps_controller.rb +0 -45
- data/app/controllers/ishapi/my/galleries_controller.rb +0 -11
- data/app/controllers/ishapi/my/reports_controller.rb +0 -11
- data/app/controllers/ishapi/my/videos_controller.rb +0 -10
- data/app/controllers/ishapi/newsitems_controller.rb +0 -35
- data/app/controllers/ishapi/obfuscated_redirects_controller.rb +0 -27
- data/app/controllers/ishapi/option_price_items_controller.rb +0 -44
- data/app/controllers/ishapi/order_items_controller.rb +0 -53
- data/app/controllers/ishapi/orders_controller.rb +0 -32
- data/app/controllers/ishapi/payments_controller.rb +0 -108
- data/app/controllers/ishapi/photos_controller.rb +0 -13
- data/app/controllers/ishapi/products_controller.rb +0 -16
- data/app/controllers/ishapi/stock_watches_controller.rb +0 -13
- data/app/controllers/ishapi/user_profiles_controller.rb +0 -27
- data/app/controllers/ishapi/users/registrations_controller.rb +0 -37
- data/app/controllers/ishapi/users/sessions_controller.rb +0 -36
- data/app/controllers/ishapi/users_controller.rb +0 -43
- data/app/controllers/ishapi/videos_controller.rb +0 -17
- data/app/jobs/ishapi/email_message_intake_job.rb +0 -178
- data/app/jobs/ishapi/email_message_intake_job.rb-todo +0 -6
- data/app/mailers/ishapi/confirmations_mailer.rb +0 -14
- data/app/models/ishapi/ability.rb +0 -130
- data/app/views/ishapi/addresses/_show.jbuilder +0 -12
- data/app/views/ishapi/application/_meta.jbuilder +0 -10
- data/app/views/ishapi/application/_metaline.haml +0 -12
- data/app/views/ishapi/application/_pagination.jbuilder +0 -11
- data/app/views/ishapi/application_mailer/forwarder_notify.html.erb +0 -16
- data/app/views/ishapi/email_contexts/summary.csv.erb +0 -4
- data/app/views/ishapi/email_messages/show.haml +0 -10
- data/app/views/ishapi/email_unsubscribes/create.haml +0 -5
- data/app/views/ishapi/galleries/_index.jbuilder +0 -11
- data/app/views/ishapi/galleries/_show.jbuilder +0 -24
- data/app/views/ishapi/galleries/index.jbuilder +0 -15
- data/app/views/ishapi/galleries/show.html.haml +0 -20
- data/app/views/ishapi/galleries/show.json.jbuilder +0 -12
- data/app/views/ishapi/galleries/show_premium_locked.jbuilder +0 -21
- data/app/views/ishapi/galleries/show_premium_unlocked.jbuilder +0 -17
- data/app/views/ishapi/locations/show.haml +0 -14
- data/app/views/ishapi/mailer/confirmation_instructions.html.erb +0 -6
- data/app/views/ishapi/mailer/email_changed.html.erb +0 -7
- data/app/views/ishapi/mailer/password_change.html.erb +0 -3
- data/app/views/ishapi/mailer/reset_password_instructions.html.erb +0 -8
- data/app/views/ishapi/mailer/unlock_instructions.html.erb +0 -7
- data/app/views/ishapi/maps/_show.jbuilder +0 -63
- data/app/views/ishapi/maps/_show_lite.jbuilder-trash +0 -16
- data/app/views/ishapi/maps/index.jbuilder +0 -12
- data/app/views/ishapi/maps/show.jbuilder +0 -6
- data/app/views/ishapi/maps/show_restricted.jbuilder +0 -44
- data/app/views/ishapi/markers/_card.haml +0 -28
- data/app/views/ishapi/markers/_index.jbuilder +0 -38
- data/app/views/ishapi/my/videos/index.jbuilder +0 -9
- data/app/views/ishapi/newsitems/_index.haml +0 -22
- data/app/views/ishapi/newsitems/_index.jbuilder +0 -86
- data/app/views/ishapi/newsitems/_show.haml +0 -10
- data/app/views/ishapi/newsitems/_show.haml-trash +0 -5
- data/app/views/ishapi/newsitems/index.jbuilder +0 -5
- data/app/views/ishapi/obfuscated_redirects/show.haml +0 -4
- data/app/views/ishapi/option_price_items/index.jbuilder +0 -17
- data/app/views/ishapi/option_price_items/view.jbuilder +0 -19
- data/app/views/ishapi/orders/_item.jbuilder +0 -8
- data/app/views/ishapi/orders/_show.jbuilder +0 -11
- data/app/views/ishapi/photos/_index.jbuilder +0 -19
- data/app/views/ishapi/photos/_show.jbuilder +0 -12
- data/app/views/ishapi/photos/show.jbuilder +0 -6
- data/app/views/ishapi/products/show.jbuilder +0 -16
- data/app/views/ishapi/reports/_index.jbuilder +0 -24
- data/app/views/ishapi/reports/index.jbuilder +0 -6
- data/app/views/ishapi/reports/show.haml +0 -15
- data/app/views/ishapi/reports/show.jbuilder +0 -51
- data/app/views/ishapi/stock_watches/index.jbuilder +0 -11
- data/app/views/ishapi/user_profiles/_account.jbuilder +0 -18
- data/app/views/ishapi/user_profiles/_index.jbuilder +0 -9
- data/app/views/ishapi/user_profiles/account.jbuilder +0 -2
- data/app/views/ishapi/user_profiles/login.jbuilder +0 -5
- data/app/views/ishapi/user_profiles/show.jbuilder +0 -9
- data/app/views/ishapi/user_profiles/show.jbuilder-bk +0 -24
- data/app/views/ishapi/videos/_index.jbuilder +0 -11
- data/app/views/ishapi/videos/_show.haml +0 -22
- data/app/views/ishapi/videos/_show.jbuilder +0 -37
- data/app/views/ishapi/videos/index.jbuilder +0 -3
- data/app/views/layouts/ishapi/application.html.haml +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1535fe35431c4f071576f8e9b731d37a599a1ed10e17bcd4119ff89241821b77
|
4
|
+
data.tar.gz: fecb73e8e0d1cd6ecd519312e6b7e6c93c3718735b821fcdb52998eba2ef8520
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2b7f867040fd6191f283ab00afb388f15850b35148995cc60081e527db8e9317b63223d801ee5e9fa7b5d44e3cfa5685dadc212e47aac9827308d738ec10664
|
7
|
+
data.tar.gz: 3dc2ddd33d98e63c12cfb91a1cb6b88ef97414b497a01512578c1b362542b906336a569f0ff6a38aeb45c9c30a85a56efc66bd10ab489ae124f817914717ed6d
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,19 +1,28 @@
|
|
1
|
+
# Ishapi
|
2
|
+
Short description and motivation.
|
1
3
|
|
2
|
-
|
4
|
+
## Usage
|
5
|
+
How to use my plugin.
|
3
6
|
|
4
|
-
|
7
|
+
## Installation
|
8
|
+
Add this line to your application's Gemfile:
|
5
9
|
|
6
|
-
|
7
|
-
|
8
|
-
|
10
|
+
```ruby
|
11
|
+
gem 'ishapi'
|
12
|
+
```
|
9
13
|
|
10
|
-
|
14
|
+
And then execute:
|
15
|
+
```bash
|
16
|
+
$ bundle
|
17
|
+
```
|
11
18
|
|
12
|
-
|
13
|
-
|
19
|
+
Or install it yourself as:
|
20
|
+
```bash
|
21
|
+
$ gem install ishapi
|
22
|
+
```
|
14
23
|
|
15
|
-
|
16
|
-
|
17
|
-
bundle
|
18
|
-
gem build ishapi.gemspec
|
24
|
+
## Contributing
|
25
|
+
Contribution directions go here.
|
19
26
|
|
27
|
+
## License
|
28
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
CHANGED
@@ -1,27 +1,10 @@
|
|
1
|
-
|
2
|
-
require 'bundler/setup'
|
3
|
-
rescue LoadError
|
4
|
-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
-
end
|
6
|
-
|
7
|
-
require 'rdoc/task'
|
8
|
-
|
9
|
-
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
-
rdoc.rdoc_dir = 'rdoc'
|
11
|
-
rdoc.title = 'Ishapi'
|
12
|
-
rdoc.options << '--line-numbers'
|
13
|
-
rdoc.rdoc_files.include('README.md')
|
14
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
-
end
|
16
|
-
|
17
|
-
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
18
|
-
load 'rails/tasks/engine.rake'
|
1
|
+
require "bundler/setup"
|
19
2
|
|
20
|
-
load
|
3
|
+
load "rails/tasks/statistics.rake"
|
21
4
|
|
22
|
-
require
|
5
|
+
require "bundler/gem_tasks"
|
23
6
|
|
24
|
-
require
|
7
|
+
require "rake/testtask"
|
25
8
|
|
26
9
|
Rake::TestTask.new(:test) do |t|
|
27
10
|
t.libs << 'test'
|
@@ -29,5 +12,4 @@ Rake::TestTask.new(:test) do |t|
|
|
29
12
|
t.verbose = false
|
30
13
|
end
|
31
14
|
|
32
|
-
|
33
15
|
task default: :test
|
@@ -10,36 +10,6 @@
|
|
10
10
|
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
11
|
* It is generally better to create a new file per style scope.
|
12
12
|
*
|
13
|
+
*= require_tree .
|
13
14
|
*= require_self
|
14
|
-
|
15
|
-
*= require ./locations.scss
|
16
|
-
**/
|
17
|
-
|
18
|
-
|
19
|
-
.my-row { /* necessarily no-wrap */
|
20
|
-
display: flex;
|
21
|
-
flex-wrap: no-wrap;
|
22
|
-
|
23
|
-
> * {
|
24
|
-
margin-right: 10px;
|
25
|
-
}
|
26
|
-
}
|
27
|
-
|
28
|
-
.newsitems--index {
|
29
|
-
.items {
|
30
|
-
> * {
|
31
|
-
margin-bottom: .5em;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
}
|
35
|
-
|
36
|
-
.newsitems--show {
|
37
|
-
|
38
|
-
display: flex;
|
39
|
-
flex-direction: column;
|
40
|
-
align-items: center;
|
41
|
-
|
42
|
-
margin-top: 80px;
|
43
|
-
height: 100%;
|
44
|
-
}
|
45
|
-
|
15
|
+
*/
|
@@ -1,141 +1,4 @@
|
|
1
|
-
|
2
|
-
class
|
3
|
-
|
4
|
-
def exception
|
5
|
-
throw "this exception: #{Time.now}"
|
1
|
+
module Ishapi
|
2
|
+
class ApplicationController < ActionController::Base
|
6
3
|
end
|
7
|
-
|
8
|
-
def home
|
9
|
-
render json: { status: :ok }, status: :ok
|
10
|
-
end
|
11
|
-
|
12
|
-
## POST /api/users/long_term_token , a FB login flow
|
13
|
-
## 2023-03-29 _vp_ This should not work, needs to be rewritten.
|
14
|
-
def long_term_token
|
15
|
-
accessToken = request.headers[:accessToken]
|
16
|
-
accessToken ||= params[:accessToken]
|
17
|
-
|
18
|
-
params['domain'] = 'tgm.piousbox.com'
|
19
|
-
|
20
|
-
response = ::HTTParty.get "https://graph.facebook.com/v5.0/oauth/access_token?grant_type=fb_exchange_token&" +
|
21
|
-
"client_id=#{::FB[params['domain']][:app]}&client_secret=#{::FB[params['domain']][:secret]}&" +
|
22
|
-
"fb_exchange_token=#{accessToken}"
|
23
|
-
j = JSON.parse response.body
|
24
|
-
@long_term_token = j['access_token']
|
25
|
-
@graph = Koala::Facebook::API.new( accessToken )
|
26
|
-
@me = @graph.get_object( 'me', :fields => 'email' )
|
27
|
-
@current_user = User.where( :email => @me['email'] ).first
|
28
|
-
@current_profile = Ish::UserProfile.find_by( email: @current_user.email )
|
29
|
-
|
30
|
-
# send the jwt to client
|
31
|
-
@jwt_token = encode(user_profile_id: @current_user.profile.id.to_s)
|
32
|
-
|
33
|
-
render json: {
|
34
|
-
email: @current_user.email,
|
35
|
-
jwt_token: @jwt_token,
|
36
|
-
long_term_token: @long_term_token,
|
37
|
-
n_unlocks: @current_profile.n_unlocks,
|
38
|
-
}
|
39
|
-
end
|
40
|
-
|
41
|
-
## @TODO: implement completely! _vp_ 2022-08-24
|
42
|
-
def vote
|
43
|
-
|
44
|
-
votee = params[:votee_class_name].constantize.find(params[:votee_id])
|
45
|
-
|
46
|
-
authorize! :open_permission, Ishapi # @TODO: make this more rigid
|
47
|
-
|
48
|
-
out = votee.vote(voter_id: params[:voter_id], value: params[:value].to_sym)
|
49
|
-
|
50
|
-
if out
|
51
|
-
render json: {
|
52
|
-
status: 'ok',
|
53
|
-
}
|
54
|
-
else
|
55
|
-
render json: {
|
56
|
-
status: 'not_ok',
|
57
|
-
message: votee.errors.full_messages.join(', '),
|
58
|
-
}
|
59
|
-
end
|
60
|
-
|
61
|
-
end
|
62
|
-
|
63
|
-
##
|
64
|
-
## private
|
65
|
-
##
|
66
|
-
private
|
67
|
-
|
68
|
-
## This returns an empty profile if not logged in
|
69
|
-
def check_profile
|
70
|
-
begin
|
71
|
-
decoded = decode(params[:jwt_token])
|
72
|
-
@current_profile = Ish::UserProfile.find decoded['user_profile_id']
|
73
|
-
rescue JWT::ExpiredSignature, JWT::DecodeError => e
|
74
|
-
flash[:notice] = 'You are not logged in, or you have been logged out.'
|
75
|
-
@current_profile = Ish::UserProfile.new
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
## If not logged in, errors out
|
80
|
-
def check_profile!
|
81
|
-
begin
|
82
|
-
decoded = decode(params[:jwt_token])
|
83
|
-
@current_profile = Ish::UserProfile.find decoded['user_profile_id']
|
84
|
-
rescue JWT::ExpiredSignature, JWT::DecodeError => e
|
85
|
-
flash[:notice] = 'You are not logged in, or you have been logged out.'
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
# jwt
|
90
|
-
def check_jwt
|
91
|
-
begin
|
92
|
-
decoded = decode(params[:jwt_token])
|
93
|
-
puts! decoded, 'decoded'
|
94
|
-
@current_profile = Ish::UserProfile.find decoded['user_profile_id']
|
95
|
-
rescue JWT::ExpiredSignature
|
96
|
-
Rails.logger.info("JWT::ExpiredSignature")
|
97
|
-
rescue JWT::DecodeError
|
98
|
-
Rails.logger.info("JWT::DecodeError")
|
99
|
-
end
|
100
|
-
current_ability
|
101
|
-
end
|
102
|
-
|
103
|
-
# jwt
|
104
|
-
def decode(token)
|
105
|
-
decoded = JWT.decode(token, Rails.application.secrets.secret_key_base.to_s)[0]
|
106
|
-
HashWithIndifferentAccess.new decoded
|
107
|
-
end
|
108
|
-
|
109
|
-
# jwt
|
110
|
-
def encode(payload, exp = 48.hours.from_now) # @TODO: definitely change, right now I expire once in 2 days.
|
111
|
-
payload[:exp] = exp.to_i
|
112
|
-
JWT.encode(payload, Rails.application.secrets.secret_key_base.to_s)
|
113
|
-
end
|
114
|
-
|
115
|
-
def current_ability
|
116
|
-
@current_ability ||= Ishapi::Ability.new( @current_profile )
|
117
|
-
end
|
118
|
-
|
119
|
-
def flash_alert what
|
120
|
-
flash[:alert] ||= []
|
121
|
-
if String == what.class
|
122
|
-
str = what
|
123
|
-
else
|
124
|
-
str = "Cannot create/update #{what.class.name}: #{what.errors.full_messages.join(', ')} ."
|
125
|
-
end
|
126
|
-
flash[:alert] << str
|
127
|
-
end
|
128
|
-
|
129
|
-
def flash_notice what
|
130
|
-
flash[:notice] ||= []
|
131
|
-
if String == what.class
|
132
|
-
str = what
|
133
|
-
else
|
134
|
-
str = "Created/updated #{what.class.name} ."
|
135
|
-
end
|
136
|
-
flash[:notice] << str
|
137
|
-
end
|
138
|
-
|
139
|
-
|
140
4
|
end
|
141
|
-
|
@@ -1,13 +1,6 @@
|
|
1
|
-
|
2
|
-
class
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
def forwarder_notify msg_id
|
7
|
-
@msg = ::Office::EmailMessage.find msg_id
|
8
|
-
mail( to: 'poxlovi@gmail.com',
|
9
|
-
subject: "POX::#{@msg.subject}" )
|
1
|
+
module Ishapi
|
2
|
+
class ApplicationMailer < ActionMailer::Base
|
3
|
+
default from: 'from@example.com'
|
4
|
+
layout 'mailer'
|
10
5
|
end
|
11
|
-
|
12
6
|
end
|
13
|
-
|
data/config/routes.rb
CHANGED
@@ -1,103 +1,2 @@
|
|
1
|
-
|
2
1
|
Ishapi::Engine.routes.draw do
|
3
|
-
|
4
|
-
root to: 'application#home'
|
5
|
-
post 'home', to: 'application#home'
|
6
|
-
|
7
|
-
## E
|
8
|
-
|
9
|
-
post 'email_messages', to: 'email_messages#receive'
|
10
|
-
get 'email_messages/:id', to: 'email_messages#show', as: :email_message
|
11
|
-
|
12
|
-
get 'email_contexts/summary', to: 'email_contexts#summary'
|
13
|
-
|
14
|
-
delete 'email_conversations', to: 'email_conversations#delete'
|
15
|
-
post 'email_conversations/addtag', to: 'email_conversations#addtag'
|
16
|
-
post 'email_conversations/addtag/:emailtag', to: 'email_conversations#addtag'
|
17
|
-
post 'email_conversations/rmtag', to: 'email_conversations#rmtag'
|
18
|
-
post 'email_conversations/rmtag/:emailtag', to: 'email_conversations#rmtag'
|
19
|
-
|
20
|
-
get 'email_unsubscribes', to: 'email_unsubscribes#create'
|
21
|
-
|
22
|
-
## G
|
23
|
-
|
24
|
-
get 'galleries', :to => 'galleries#index'
|
25
|
-
post 'galleries', :to => 'galleries#index'
|
26
|
-
get 'galleries/view/:slug', :to => 'galleries#show'
|
27
|
-
post 'galleries/view/:slug', :to => 'galleries#show'
|
28
|
-
|
29
|
-
# H
|
30
|
-
# I
|
31
|
-
post 'invoices/search', :to => 'invoices#search'
|
32
|
-
|
33
|
-
# L
|
34
|
-
get 'leads', to: 'leads#index'
|
35
|
-
get 'leadsets', to: 'leadsets#index'
|
36
|
-
delete 'leadsets', to: 'leadsets#destroy'
|
37
|
-
|
38
|
-
get 'lead_actions', to: 'lead_actions#create', as: :lead_actions
|
39
|
-
get 'locations/show/:slug', to: 'locations#show'
|
40
|
-
resources :locations
|
41
|
-
|
42
|
-
## M
|
43
|
-
|
44
|
-
get 'maps', to: 'maps#index'
|
45
|
-
get 'maps/view/:slug', to: 'maps#show'
|
46
|
-
get 'markers/view/:slug', to: 'maps#show_marker'
|
47
|
-
match "/my/account", to: "users#account", via: [ :get, :post ]
|
48
|
-
namespace :my do
|
49
|
-
get 'galleries', to: 'galleries#index'
|
50
|
-
get 'newsitems', to: 'newsitems#index'
|
51
|
-
get 'videos', to: 'videos#index'
|
52
|
-
post 'videos', to: 'videos#index'
|
53
|
-
end
|
54
|
-
|
55
|
-
# N
|
56
|
-
delete 'newsitems/:id', to: 'newsitems#destroy'
|
57
|
-
|
58
|
-
## O
|
59
|
-
|
60
|
-
get '/obf/:id', to: 'obfuscated_redirects#show', as: :obf
|
61
|
-
|
62
|
-
# resources :option_price_items
|
63
|
-
get 'option_price_items/view-by/symbol/:symbol', to: 'option_price_items#view_by_symbol', :constraints => { :symbol => /[^\/]+/ } ## the symbol is detailed eg 'GME_011924P30'
|
64
|
-
get 'option_price_items/index1', to: 'option_price_items#index', defaults: { kind: 'kind-1' }
|
65
|
-
get 'option_price_items/view/:symbol/from/:begin_at/to/:end_at', to: 'option_price_items#view'
|
66
|
-
|
67
|
-
|
68
|
-
## P
|
69
|
-
|
70
|
-
post 'do_purchase', to: 'gameui#do_purchase' # @TODO: rename to just purchase, or destroy endpoint
|
71
|
-
post 'payments', :to => 'payments#create'
|
72
|
-
post 'payments/unlock', to: 'payments#unlock' # do_purchase
|
73
|
-
post 'payments/stripe_confirm', to: 'payments#stripe_confirm' # @TODO: test-drive herehere
|
74
|
-
|
75
|
-
get 'photos/view/:id', to: 'photos#show'
|
76
|
-
get 'profiles/view/:username', :to => 'user_profiles#show'
|
77
|
-
|
78
|
-
get 'products/:id', to: 'products#show'
|
79
|
-
|
80
|
-
## S
|
81
|
-
|
82
|
-
post 'stars/buy', to: 'gameui#buy_stars'
|
83
|
-
|
84
|
-
|
85
|
-
get 'test', to: 'application#test'
|
86
|
-
get 'exception', to: 'application#exception'
|
87
|
-
|
88
|
-
post 'users/fb_sign_in', to: 'users#fb_sign_in'
|
89
|
-
get 'users/me', to: 'users#account', as: :users_dashboard
|
90
|
-
post 'users/profile', to: 'users#show' ## @TODO: change, this makes no sense
|
91
|
-
post 'users/profile/update', to: 'user_profiles#update'
|
92
|
-
get 'users/profile', to: 'users#show' # @TODO: only for testing! accessToken must be hidden
|
93
|
-
match 'users/long_term_token', to: 'application#long_term_token', via: [ :get, :post ]
|
94
|
-
devise_scope :user do
|
95
|
-
post 'users/register', to: 'users/registrations#create'
|
96
|
-
post 'users/login', to: 'users/sessions#create'
|
97
|
-
end
|
98
|
-
|
99
|
-
post 'v1/vote/:votee_class_name/:votee_id/:voter_id/:value', to: 'application#vote'
|
100
|
-
|
101
|
-
resources :videos
|
102
|
-
|
103
2
|
end
|
data/lib/ishapi/engine.rb
CHANGED
@@ -1,11 +1,5 @@
|
|
1
|
-
|
2
|
-
require 'rubygems'
|
3
|
-
require 'rack/throttle'
|
4
|
-
require 'jbuilder' # _vp_ 2022-10-07 - otherwise host app cant find templates
|
5
|
-
|
6
1
|
module Ishapi
|
7
2
|
class Engine < ::Rails::Engine
|
8
3
|
isolate_namespace Ishapi
|
9
|
-
# config.middleware.use Rack::Throttle::Interval, :min => 1.0, :max => 10
|
10
4
|
end
|
11
5
|
end
|
data/lib/ishapi/version.rb
CHANGED