ishapi 0.1.8.316 → 3.0.0.0

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.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +21 -12
  4. data/Rakefile +4 -22
  5. data/app/assets/config/ishapi_manifest.js +0 -1
  6. data/app/assets/stylesheets/ishapi/{application.scss → application.css} +2 -32
  7. data/app/controllers/ishapi/application_controller.rb +2 -139
  8. data/app/helpers/ishapi/application_helper.rb +0 -5
  9. data/app/mailers/ishapi/application_mailer.rb +4 -11
  10. data/app/models/ishapi/application_record.rb +5 -0
  11. data/app/views/layouts/ishapi/application.html.erb +15 -0
  12. data/config/routes.rb +0 -101
  13. data/lib/ishapi/engine.rb +0 -6
  14. data/lib/ishapi/version.rb +1 -1
  15. data/lib/ishapi.rb +2 -4
  16. metadata +13 -272
  17. data/app/assets/javascripts/ishapi/application.js +0 -14
  18. data/app/assets/stylesheets/ishapi/galleries.scss +0 -46
  19. data/app/assets/stylesheets/ishapi/locations.scss +0 -8
  20. data/app/assets/stylesheets/scaffold.css +0 -80
  21. data/app/controllers/ishapi/email_contexts_controller.rb +0 -28
  22. data/app/controllers/ishapi/email_conversations_controller.rb +0 -45
  23. data/app/controllers/ishapi/email_messages_controller.rb +0 -54
  24. data/app/controllers/ishapi/email_unsubscribes_controller.rb +0 -35
  25. data/app/controllers/ishapi/galleries_controller.rb +0 -56
  26. data/app/controllers/ishapi/gameui_controller.rb +0 -64
  27. data/app/controllers/ishapi/invoices_controller.rb +0 -22
  28. data/app/controllers/ishapi/lead_actions_controller.rb +0 -23
  29. data/app/controllers/ishapi/leads_controller.rb +0 -18
  30. data/app/controllers/ishapi/leadsets_controller.rb +0 -30
  31. data/app/controllers/ishapi/locations_controller.rb +0 -54
  32. data/app/controllers/ishapi/maps_controller.rb +0 -45
  33. data/app/controllers/ishapi/my/galleries_controller.rb +0 -11
  34. data/app/controllers/ishapi/my/reports_controller.rb +0 -11
  35. data/app/controllers/ishapi/my/videos_controller.rb +0 -10
  36. data/app/controllers/ishapi/newsitems_controller.rb +0 -35
  37. data/app/controllers/ishapi/obfuscated_redirects_controller.rb +0 -27
  38. data/app/controllers/ishapi/option_price_items_controller.rb +0 -44
  39. data/app/controllers/ishapi/order_items_controller.rb +0 -53
  40. data/app/controllers/ishapi/orders_controller.rb +0 -32
  41. data/app/controllers/ishapi/payments_controller.rb +0 -108
  42. data/app/controllers/ishapi/photos_controller.rb +0 -13
  43. data/app/controllers/ishapi/products_controller.rb +0 -16
  44. data/app/controllers/ishapi/stock_watches_controller.rb +0 -13
  45. data/app/controllers/ishapi/user_profiles_controller.rb +0 -27
  46. data/app/controllers/ishapi/users/registrations_controller.rb +0 -37
  47. data/app/controllers/ishapi/users/sessions_controller.rb +0 -36
  48. data/app/controllers/ishapi/users_controller.rb +0 -43
  49. data/app/controllers/ishapi/videos_controller.rb +0 -17
  50. data/app/jobs/ishapi/email_message_intake_job.rb +0 -178
  51. data/app/jobs/ishapi/email_message_intake_job.rb-todo +0 -6
  52. data/app/mailers/ishapi/confirmations_mailer.rb +0 -14
  53. data/app/models/ishapi/ability.rb +0 -130
  54. data/app/views/ishapi/addresses/_show.jbuilder +0 -12
  55. data/app/views/ishapi/application/_meta.jbuilder +0 -10
  56. data/app/views/ishapi/application/_metaline.haml +0 -12
  57. data/app/views/ishapi/application/_pagination.jbuilder +0 -11
  58. data/app/views/ishapi/application_mailer/forwarder_notify.html.erb +0 -16
  59. data/app/views/ishapi/email_contexts/summary.csv.erb +0 -4
  60. data/app/views/ishapi/email_messages/show.haml +0 -10
  61. data/app/views/ishapi/email_unsubscribes/create.haml +0 -5
  62. data/app/views/ishapi/galleries/_index.jbuilder +0 -11
  63. data/app/views/ishapi/galleries/_show.jbuilder +0 -24
  64. data/app/views/ishapi/galleries/index.jbuilder +0 -15
  65. data/app/views/ishapi/galleries/show.html.haml +0 -20
  66. data/app/views/ishapi/galleries/show.json.jbuilder +0 -12
  67. data/app/views/ishapi/galleries/show_premium_locked.jbuilder +0 -21
  68. data/app/views/ishapi/galleries/show_premium_unlocked.jbuilder +0 -17
  69. data/app/views/ishapi/locations/show.haml +0 -14
  70. data/app/views/ishapi/mailer/confirmation_instructions.html.erb +0 -6
  71. data/app/views/ishapi/mailer/email_changed.html.erb +0 -7
  72. data/app/views/ishapi/mailer/password_change.html.erb +0 -3
  73. data/app/views/ishapi/mailer/reset_password_instructions.html.erb +0 -8
  74. data/app/views/ishapi/mailer/unlock_instructions.html.erb +0 -7
  75. data/app/views/ishapi/maps/_show.jbuilder +0 -63
  76. data/app/views/ishapi/maps/_show_lite.jbuilder-trash +0 -16
  77. data/app/views/ishapi/maps/index.jbuilder +0 -12
  78. data/app/views/ishapi/maps/show.jbuilder +0 -6
  79. data/app/views/ishapi/maps/show_restricted.jbuilder +0 -44
  80. data/app/views/ishapi/markers/_card.haml +0 -28
  81. data/app/views/ishapi/markers/_index.jbuilder +0 -38
  82. data/app/views/ishapi/my/videos/index.jbuilder +0 -9
  83. data/app/views/ishapi/newsitems/_index.haml +0 -22
  84. data/app/views/ishapi/newsitems/_index.jbuilder +0 -86
  85. data/app/views/ishapi/newsitems/_show.haml +0 -10
  86. data/app/views/ishapi/newsitems/_show.haml-trash +0 -5
  87. data/app/views/ishapi/newsitems/index.jbuilder +0 -5
  88. data/app/views/ishapi/obfuscated_redirects/show.haml +0 -4
  89. data/app/views/ishapi/option_price_items/index.jbuilder +0 -17
  90. data/app/views/ishapi/option_price_items/view.jbuilder +0 -19
  91. data/app/views/ishapi/orders/_item.jbuilder +0 -8
  92. data/app/views/ishapi/orders/_show.jbuilder +0 -11
  93. data/app/views/ishapi/photos/_index.jbuilder +0 -19
  94. data/app/views/ishapi/photos/_show.jbuilder +0 -12
  95. data/app/views/ishapi/photos/show.jbuilder +0 -6
  96. data/app/views/ishapi/products/show.jbuilder +0 -16
  97. data/app/views/ishapi/reports/_index.jbuilder +0 -24
  98. data/app/views/ishapi/reports/index.jbuilder +0 -6
  99. data/app/views/ishapi/reports/show.haml +0 -15
  100. data/app/views/ishapi/reports/show.jbuilder +0 -51
  101. data/app/views/ishapi/stock_watches/index.jbuilder +0 -11
  102. data/app/views/ishapi/user_profiles/_account.jbuilder +0 -18
  103. data/app/views/ishapi/user_profiles/_index.jbuilder +0 -9
  104. data/app/views/ishapi/user_profiles/account.jbuilder +0 -2
  105. data/app/views/ishapi/user_profiles/login.jbuilder +0 -5
  106. data/app/views/ishapi/user_profiles/show.jbuilder +0 -9
  107. data/app/views/ishapi/user_profiles/show.jbuilder-bk +0 -24
  108. data/app/views/ishapi/videos/_index.jbuilder +0 -11
  109. data/app/views/ishapi/videos/_show.haml +0 -22
  110. data/app/views/ishapi/videos/_show.jbuilder +0 -37
  111. data/app/views/ishapi/videos/index.jbuilder +0 -3
  112. 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: 3d9b1a8e3ba7db529949e1b38fa06aa90ec2ed227320a237732b4af822f26df0
4
- data.tar.gz: 0d4433a24dc82a47449964555cb035ef77fe23a4b9c91d8bdf222dec1950e1c9
3
+ metadata.gz: 1535fe35431c4f071576f8e9b731d37a599a1ed10e17bcd4119ff89241821b77
4
+ data.tar.gz: fecb73e8e0d1cd6ecd519312e6b7e6c93c3718735b821fcdb52998eba2ef8520
5
5
  SHA512:
6
- metadata.gz: 0f451b51f64bc2e88f6cb13ca9a928fb90043dcd02226646c40b38b01f75e9583ab03b2d57f8aba382e97e60741814d8870e17d0cad437604cf1746e1d77b66c
7
- data.tar.gz: 6c23f932f0969aaf6d4e2b3299d67d3e574fee9143e26c21b4964e7a25020e1b7c58ce22665c929abe239600d15fc844ad37e0a7f0fa743d84be622a11ff1c02
6
+ metadata.gz: f2b7f867040fd6191f283ab00afb388f15850b35148995cc60081e527db8e9317b63223d801ee5e9fa7b5d44e3cfa5685dadc212e47aac9827308d738ec10664
7
+ data.tar.gz: 3dc2ddd33d98e63c12cfb91a1cb6b88ef97414b497a01512578c1b362542b906336a569f0ff6a38aeb45c9c30a85a56efc66bd10ab489ae124f817914717ed6d
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2017 piousbox
1
+ Copyright 2023 mac_a2141
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,19 +1,28 @@
1
+ # Ishapi
2
+ Short description and motivation.
1
3
 
2
- # Develop
4
+ ## Usage
5
+ How to use my plugin.
3
6
 
4
- -=----- 20201228
7
+ ## Installation
8
+ Add this line to your application's Gemfile:
5
9
 
6
- Expects params[:jwtToken]
7
- no... expects params[:accessToken]
8
- somehow expects params[:jwt_token] ?
10
+ ```ruby
11
+ gem 'ishapi'
12
+ ```
9
13
 
10
- # Test
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
11
18
 
12
- cd test/dummy
13
- be rspec spec
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install ishapi
22
+ ```
14
23
 
15
- # Install
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
- begin
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 'rails/tasks/statistics.rake'
3
+ load "rails/tasks/statistics.rake"
21
4
 
22
- require 'bundler/gem_tasks'
5
+ require "bundler/gem_tasks"
23
6
 
24
- require 'rake/testtask'
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
@@ -1,2 +1 @@
1
- //= link_directory ../javascripts/ishapi .js
2
1
  //= link_directory ../stylesheets/ishapi .css
@@ -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
- *= require ./galleries.scss
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 ::Ishapi::ApplicationController < ActionController::Base
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,9 +1,4 @@
1
1
  module Ishapi
2
2
  module ApplicationHelper
3
-
4
- def image_missing
5
- 'https://d15g8hc4183yn4.cloudfront.net/wp-content/uploads/2022/02/25232018/100x100_crossout.png'
6
- end
7
-
8
3
  end
9
4
  end
@@ -1,13 +1,6 @@
1
-
2
- class Ishapi::ApplicationMailer < ActionMailer::Base
3
- default from: 'no-reply@wasya.co'
4
- layout 'mailer'
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
-
@@ -0,0 +1,5 @@
1
+ module Ishapi
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Ishapi</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
7
+
8
+ <%= stylesheet_link_tag "ishapi/application", media: "all" %>
9
+ </head>
10
+ <body>
11
+
12
+ <%= yield %>
13
+
14
+ </body>
15
+ </html>
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
@@ -1,3 +1,3 @@
1
1
  module Ishapi
2
- VERSION = File.read("VERSION")
2
+ VERSION = File.read 'VERSION'
3
3
  end
data/lib/ishapi.rb CHANGED
@@ -1,8 +1,6 @@
1
-
2
- require 'cancancan'
1
+ require "ishapi/version"
3
2
  require "ishapi/engine"
4
- require 'kaminari/actionview'
5
- require 'kaminari/mongoid'
6
3
 
7
4
  module Ishapi
5
+ # Your code goes here...
8
6
  end