ishapi 0.1.8.281 → 0.1.8.283

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19db699cb43c11bc493a6c009574a43fa7a20ca64d87b6315c62c4824fe2907a
4
- data.tar.gz: 7dd89ba5e5a4aeeabb8e7c38331df6c9c90114117a4be08e80a57f33630df527
3
+ metadata.gz: 8357d4a8928dc240bafa4f3d8b4afe79d2da6795ecf6eb1fba73f0f2ddd994e0
4
+ data.tar.gz: eec178fca47c33c6a894b6e2cb23e9b4b3cfeb27b4bb1ea4427619ef7462c9bb
5
5
  SHA512:
6
- metadata.gz: eb94d8840c83747781eb43d0e79f58162fffa6bc2f5aa5b8adddb615cf1f4b1ea16fe3d36f230eefcfe677abc243888b71370bf88f7d1e2ba6e8ab210e75f65b
7
- data.tar.gz: 5715fd3a1326280fe929f63f2fe9e517dd60e88c923ddf4d341337d9e7cca2b31ccf965ce410ea7bfe497d2405e54c0ed38c6f4e6087ab47974c56bce1bdc163
6
+ metadata.gz: d5970e4c295e327ed2a982e73228ae1cca0e7954f638e476e3913d78d819d267bd45aa8c7c6b7b2bba4484ab301ae698d53d69372772b288bebf900c8e62d9de
7
+ data.tar.gz: 1ecd89eda77ee86b8be3a54d7901a46675b0f2495f817344f76063483ac500bbd8dd1119ffc97ec249ae36f5deec65a1e3aba5a3de9290e9495e6e5eb8d6f0ca
@@ -0,0 +1,16 @@
1
+ require_dependency "ishapi/application_controller"
2
+
3
+ class Ishapi::ProductsController < Ishapi::ApplicationController
4
+
5
+ # before_action :soft_check_long_term_token, only: [ :show ]
6
+ before_action :check_jwt
7
+
8
+ def show
9
+ @product = Wco::Product.find params[:id]
10
+
11
+ puts! @product.prices.to_a, 'to_a'
12
+
13
+ authorize! :show, @product
14
+ end
15
+
16
+ end
@@ -4,6 +4,13 @@ class Ishapi::Ability
4
4
 
5
5
  def initialize user_profile
6
6
 
7
+ ##
8
+ ## super user
9
+ ##
10
+ if %w| piousbox@gmail.com |.include?( user_profile.email )
11
+ can [ :manage ], :all
12
+ end
13
+
7
14
  #
8
15
  # signed in user_profile
9
16
  #
@@ -0,0 +1,3 @@
1
+
2
+ json.summary do
3
+ json.a 'b'
@@ -1,9 +1,16 @@
1
1
 
2
2
  params.permit!
3
3
  json.cache! [ params, @product ] do
4
- json.cost @product.cost
5
- json.title @product.title
6
- json.description @product.description
7
- json.kind @product.kind
4
+
5
+ json.id @product.id.to_s
6
+ json.name @product.name
7
+
8
+ json.prices do
9
+ json.array! @product.prices do |price|
10
+ json.id price.id.to_s
11
+ json.name price.name
12
+ end
13
+ end
14
+
8
15
  end
9
16
 
data/config/routes.rb CHANGED
@@ -45,6 +45,16 @@ Ishapi::Engine.routes.draw do
45
45
  # N
46
46
  delete 'newsitems/:id', to: 'newsitems#destroy'
47
47
 
48
+ ## O
49
+
50
+ # resources :option_price_items
51
+ get 'option_price_items/view-by/symbol/:symbol', to: 'option_price_items#view_by_symbol', :constraints => { :symbol => /[^\/]+/ } ## the symbol is detailed eg 'GME_011924P30'
52
+ get 'option_price_items/index1', to: 'option_price_items#index', defaults: { kind: 'kind-1' }
53
+ get 'option_price_items/view/:symbol/from/:begin_at/to/:end_at', to: 'option_price_items#view'
54
+
55
+
56
+ ## P
57
+
48
58
  post 'do_purchase', to: 'gameui#do_purchase' # @TODO: rename to just purchase, or destroy endpoint
49
59
  post 'payments', :to => 'payments#create'
50
60
  post 'payments/unlock', to: 'payments#unlock' # do_purchase
@@ -53,13 +63,11 @@ Ishapi::Engine.routes.draw do
53
63
  get 'photos/view/:id', to: 'photos#show'
54
64
  get 'profiles/view/:username', :to => 'user_profiles#show'
55
65
 
56
- post 'stars/buy', to: 'gameui#buy_stars'
66
+ get 'products/:id', to: 'products#show'
57
67
 
68
+ ## S
58
69
 
59
- # resources :option_price_items
60
- get 'option_price_items/view-by/symbol/:symbol', to: 'option_price_items#view_by_symbol', :constraints => { :symbol => /[^\/]+/ } ## the symbol is detailed eg 'GME_011924P30'
61
- get 'option_price_items/index1', to: 'option_price_items#index', defaults: { kind: 'kind-1' }
62
- get 'option_price_items/view/:symbol/from/:begin_at/to/:end_at', to: 'option_price_items#view'
70
+ post 'stars/buy', to: 'gameui#buy_stars'
63
71
 
64
72
 
65
73
  get 'test', to: 'application#test'
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.281
4
+ version: 0.1.8.283
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-06 00:00:00.000000000 Z
11
+ date: 2023-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -228,6 +228,7 @@ files:
228
228
  - app/controllers/ishapi/orders_controller.rb
229
229
  - app/controllers/ishapi/payments_controller.rb
230
230
  - app/controllers/ishapi/photos_controller.rb
231
+ - app/controllers/ishapi/products_controller.rb
231
232
  - app/controllers/ishapi/stock_watches_controller.rb
232
233
  - app/controllers/ishapi/user_profiles_controller.rb
233
234
  - app/controllers/ishapi/users/registrations_controller.rb
@@ -246,6 +247,7 @@ files:
246
247
  - app/views/ishapi/application/_pagination.jbuilder
247
248
  - app/views/ishapi/application_mailer/forwarder_notify.html.erb
248
249
  - app/views/ishapi/email_contexts/summary.csv.erb
250
+ - app/views/ishapi/email_contexts/summary.jbuilder
249
251
  - app/views/ishapi/email_messages/show.haml
250
252
  - app/views/ishapi/galleries/_index.jbuilder
251
253
  - app/views/ishapi/galleries/_show.jbuilder