ishapi 0.1.8.215 → 0.1.8.216

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 908d42fcfe99cabb27c82e7c99144efe71ff92ce74b96bfcf85162b2dd14141c
4
- data.tar.gz: cea7d86798ed13c2835396d141bfc6e796bb45f4ce42508fc9c46ed3a5523ab7
3
+ metadata.gz: 7b4e60c93d07bd13c28c340d6b51321777dcac330990a03c82bb99d688a739a5
4
+ data.tar.gz: 8373154c3f3585cfb9f67ed53d0333f17ae6f2334ebe7942eb3de677ca8e9776
5
5
  SHA512:
6
- metadata.gz: a5e3a23fcba44eea22651cdb19e4458bb3e62df19b402ecd64749f9d47ae0c2da185f97a9e47bda05e385c98cadbe51d7e8cca5ea9f225b3862aa4b4d741d26c
7
- data.tar.gz: eb0658150810d1ec02dbe487161fffb4992cb0d67734987b1992f24f7097a88e53cea1010b1de6988b5b6db5d39df9b1577c07eab2ef494f39f4b84e79abcf2d
6
+ metadata.gz: ec07c25202e7d248111642c1761d0e1a7f89fcb376edf8ffec62f0816748773a6e2e82ccc0d60df5c367da3bc422abcb4a6c257073f4a861eb72026388e9128b
7
+ data.tar.gz: baa34823abceb222b632f5295322aacedc61d0a72cd46f03aa4eec64fdcd19f8a0215444ccdfd503ead825d4d90e9a8fe35232b7633ac6cf6a993a76a85bad15
@@ -1,5 +1,9 @@
1
1
 
2
- class Ishapi::ApplicationController < ActionController::Base
2
+ class ::Ishapi::ApplicationController < ActionController::Base
3
+
4
+ def exception
5
+ throw "this exception: #{Time.now}"
6
+ end
3
7
 
4
8
  def home
5
9
  render json: { status: :ok }, status: :ok
@@ -1,37 +1,35 @@
1
1
 
2
2
  require_dependency "ishapi/application_controller"
3
3
 
4
- module Ishapi
5
- class EmailMessagesController < ApplicationController
4
+ class ::Ishapi::EmailMessagesController < ::Ishapi::ApplicationController
6
5
 
7
- before_action :check_jwt, only: [ :show ]
6
+ before_action :check_jwt, only: [ :show ]
8
7
 
9
- def show
10
- msg = Office::EmailMessage.find( params[:id] )
11
- authorize! :email_messages_show, ::Ishapi
12
- render json: {
13
- item: msg,
14
- }
15
- end
16
-
17
- ## From lambda, ses
18
- def receive
19
- if params[:secret] != AWS_SES_LAMBDA_SECRET
20
- render status: 400, json: { status: 400 }
21
- return
22
- end
8
+ def show
9
+ msg = Office::EmailMessage.find( params[:id] )
10
+ authorize! :show, msg
11
+ render json: {
12
+ item: msg,
13
+ }
14
+ end
23
15
 
24
- msg = Office::EmailMessageStub.new({
25
- object_path: params[:object_path],
26
- object_key: params[:object_key],
27
- })
28
- if msg.save
29
- ::Ishapi::EmailMessageIntakeJob.perform_later( msg.id.to_s )
30
- render status: :ok, json: { status: :ok }
31
- else
32
- render status: 400, json: { status: 400 }
33
- end
16
+ ## From lambda, ses
17
+ def receive
18
+ if params[:secret] != AWS_SES_LAMBDA_SECRET
19
+ render status: 400, json: { status: 400 }
20
+ return
34
21
  end
35
22
 
23
+ msg = Office::EmailMessageStub.new({
24
+ object_path: params[:object_path],
25
+ object_key: params[:object_key],
26
+ })
27
+ if msg.save
28
+ ::Ishapi::EmailMessageIntakeJob.perform_later( msg.id.to_s )
29
+ render status: :ok, json: { status: :ok }
30
+ else
31
+ render status: 400, json: { status: 400 }
32
+ end
36
33
  end
34
+
37
35
  end
@@ -7,7 +7,7 @@ class Ishapi::Ability
7
7
  #
8
8
  # signed in user_profile
9
9
  #
10
- if !user_profile.blank?
10
+ if user_profile.present?
11
11
 
12
12
  can [ :my_index ], Gallery
13
13
  can [ :show ], Gallery do |gallery|
@@ -29,13 +29,15 @@ class Ishapi::Ability
29
29
 
30
30
  can [ :buy_stars ], ::Ish::UserProfile
31
31
 
32
- #
33
- # superuser
34
- #
32
+ ##
33
+ ## superuser
34
+ ##
35
35
  if %w| victor@wasya.co victor@piousbox.com piousbox@gmail.com |.include?( user_profile.email )
36
+ puts! user_profile, 'ze profile'
37
+
36
38
  can [ :email_conversations_delete ], ::Ishapi
37
39
 
38
- can [ :email_messages_show ], ::Ishapi
40
+ can [ :show ], ::Office::EmailMessage
39
41
  end
40
42
 
41
43
  end
data/config/routes.rb CHANGED
@@ -4,6 +4,7 @@ Ishapi::Engine.routes.draw do
4
4
  root :to => 'application#home'
5
5
  post 'home', :to => 'application#home'
6
6
 
7
+
7
8
  resources :addresses
8
9
 
9
10
  get 'galleries', :to => 'galleries#index'
@@ -54,7 +55,8 @@ Ishapi::Engine.routes.draw do
54
55
  get 'option_price_items/view/:symbol/from/:begin_at/to/:end_at', to: 'option_price_items#view'
55
56
 
56
57
 
57
- get 'test', to: 'application#test'
58
+ get 'test', to: 'application#test'
59
+ get 'exception', to: 'application#exception'
58
60
 
59
61
  post 'users/fb_sign_in', to: 'users#fb_sign_in'
60
62
  get 'users/me', to: 'users#account'
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.215
4
+ version: 0.1.8.216
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-10 00:00:00.000000000 Z
11
+ date: 2023-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails