ishapi 0.1.8.195 → 0.1.8.197
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 527c892e79b84388f635928bcf9eefb72959c232ee129216a3b3ccb936ed35c7
|
4
|
+
data.tar.gz: 1eee6091ff1b77fd5884fdaabfc9aaf52730cc68e01534a221dbff5664564478
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e27cf506e4651e53ca865ce628a7fe2d0794033a556d0d0816bd68947e7e10fd45087e4e02d62afdaf62c1450a2fd1a1913c5eecca3f31a7de610e083447d54
|
7
|
+
data.tar.gz: 0b42d0ad1c9302c1516ad60df5871f862378f16191f56bb4a863401a7ed3226dbe361db42ff468a91a0dd4a0de716954629cd44aa663b44a4b72c17c75f2380c
|
@@ -51,7 +51,7 @@ module Ishapi
|
|
51
51
|
##
|
52
52
|
def create2
|
53
53
|
authorize! :create, ::Ish::Payment
|
54
|
-
|
54
|
+
@current_profile.update_attributes({ is_purchasing: true })
|
55
55
|
|
56
56
|
begin
|
57
57
|
amount_cents = params[:amount_cents].to_i # @TODO: change
|
@@ -65,9 +65,9 @@ module Ishapi
|
|
65
65
|
|
66
66
|
payment = Ish::Payment.create!(
|
67
67
|
client_secret: intent.client_secret,
|
68
|
-
email:
|
68
|
+
email: @current_profile.email,
|
69
69
|
payment_intent_id: intent.id,
|
70
|
-
profile_id:
|
70
|
+
profile_id: @current_profile.id,
|
71
71
|
)
|
72
72
|
|
73
73
|
render json: { client_secret: intent.client_secret }
|
@@ -110,18 +110,18 @@ module Ishapi
|
|
110
110
|
authorize! :unlock, ::Ish::Payment
|
111
111
|
item = Object::const_get(params['kind']).find params['id']
|
112
112
|
|
113
|
-
existing = Purchase.where( user_profile: @
|
113
|
+
existing = Purchase.where( user_profile: @current_profile, item: item ).first
|
114
114
|
if existing
|
115
115
|
render status: 200, json: { status: :ok, message: 'already purchased' }
|
116
116
|
return
|
117
117
|
end
|
118
118
|
|
119
|
-
@
|
119
|
+
@current_profile.inc( n_unlocks: -item.premium_tier )
|
120
120
|
|
121
|
-
purchase = ::Gameui::PremiumPurchase.create!( item: item, user_profile: @
|
121
|
+
purchase = ::Gameui::PremiumPurchase.create!( item: item, user_profile: @current_profile, )
|
122
122
|
|
123
|
-
@profile = @
|
124
|
-
render 'ishapi/
|
123
|
+
@profile = @current_profile
|
124
|
+
render 'ishapi/user_profiles/account'
|
125
125
|
end
|
126
126
|
|
127
127
|
end
|
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.197
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-18 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: 6.
|
19
|
+
version: 6.1.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: 6.
|
26
|
+
version: 6.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mongoid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -341,7 +341,7 @@ homepage: http://wasya.co
|
|
341
341
|
licenses:
|
342
342
|
- MIT
|
343
343
|
metadata: {}
|
344
|
-
post_install_message:
|
344
|
+
post_install_message:
|
345
345
|
rdoc_options: []
|
346
346
|
require_paths:
|
347
347
|
- lib
|
@@ -357,7 +357,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
357
357
|
version: '0'
|
358
358
|
requirements: []
|
359
359
|
rubygems_version: 3.1.6
|
360
|
-
signing_key:
|
360
|
+
signing_key:
|
361
361
|
specification_version: 4
|
362
362
|
summary: Summary of Ishapi.
|
363
363
|
test_files: []
|