rack-in-app-purchase 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile.lock +12 -14
- data/lib/rack/in-app-purchase.rb +6 -8
- data/rack-in-app-purchase.gemspec +1 -2
- metadata +44 -35
- data/rack-in-app-purchase-0.0.1.gem +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2e1d58e9b3320639f35b74e05ed46b65e26d1077
|
4
|
+
data.tar.gz: a4a92dcf91ec412890e0781b667c9b5214e28856
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ad3a45a96a2015cc7075e72d46502c23ac6c9ee18aa6f75d1d923403ca5df3f9c8b8bfaa3aaaac0ac939e0677c8435971e3c8dfe8cf9a0c228354f399d776c86
|
7
|
+
data.tar.gz: 5d91be81da2c646f7f2c78285d99b75e16c78dce969d401b4fb37807f4e0fe7bf30024ffb33449a344c5d83bc9ec362ed48755b6d64664c47bf9fd775d7442f5
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rack-in-app-purchase (0.1.
|
4
|
+
rack-in-app-purchase (0.1.1)
|
5
5
|
rack (~> 1.4)
|
6
6
|
sequel (~> 3.37)
|
7
7
|
sinatra (~> 1.3)
|
@@ -10,28 +10,26 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
commander (4.1.
|
13
|
+
commander (4.1.4)
|
14
14
|
highline (~> 1.6.11)
|
15
|
-
|
16
|
-
|
17
|
-
json (1.7.7)
|
15
|
+
highline (1.6.19)
|
16
|
+
json (1.8.0)
|
18
17
|
rack (1.5.2)
|
19
18
|
rack-protection (1.5.0)
|
20
19
|
rack
|
21
20
|
rake (0.9.6)
|
22
21
|
rspec (0.6.4)
|
23
|
-
sequel (3.
|
24
|
-
sinatra (1.4.
|
25
|
-
rack (~> 1.
|
22
|
+
sequel (3.48.0)
|
23
|
+
sinatra (1.4.3)
|
24
|
+
rack (~> 1.4)
|
26
25
|
rack-protection (~> 1.4)
|
27
26
|
tilt (~> 1.3, >= 1.3.4)
|
28
27
|
terminal-table (1.4.5)
|
29
|
-
tilt (1.
|
30
|
-
venice (0.0
|
31
|
-
commander (~> 4.1
|
32
|
-
|
33
|
-
|
34
|
-
terminal-table (~> 1.4.5)
|
28
|
+
tilt (1.4.1)
|
29
|
+
venice (0.2.0)
|
30
|
+
commander (~> 4.1)
|
31
|
+
json
|
32
|
+
terminal-table (~> 1.4)
|
35
33
|
|
36
34
|
PLATFORMS
|
37
35
|
ruby
|
data/lib/rack/in-app-purchase.rb
CHANGED
@@ -11,19 +11,17 @@ require 'venice'
|
|
11
11
|
|
12
12
|
module Rack
|
13
13
|
class InAppPurchase < Sinatra::Base
|
14
|
-
VERSION = '0.1.0'
|
15
|
-
|
16
14
|
use Rack::PostBodyContentTypeParser
|
17
15
|
helpers Sinatra::Param
|
18
16
|
|
19
|
-
|
20
|
-
|
21
|
-
autoload :Product, ::File.join(::File.dirname(__FILE__), 'in-app-purchase/models/product')
|
22
|
-
autoload :Receipt, ::File.join(::File.dirname(__FILE__), 'in-app-purchase/models/receipt')
|
17
|
+
autoload :Product, 'rack/in-app-purchase/models/product'
|
18
|
+
autoload :Receipt, 'rack/in-app-purchase/models/receipt'
|
23
19
|
|
24
20
|
disable :raise_errors, :show_exceptions
|
25
21
|
|
26
22
|
configure do
|
23
|
+
Sequel.extension :core_extensions, :migration
|
24
|
+
|
27
25
|
if ENV['DATABASE_URL']
|
28
26
|
DB = Sequel.connect(ENV['DATABASE_URL'])
|
29
27
|
Sequel::Migrator.run(DB, ::File.join(::File.dirname(__FILE__), "in-app-purchase/migrations"), table: 'in_app_purchase_schema_info')
|
@@ -55,9 +53,9 @@ module Rack
|
|
55
53
|
receipt: receipt.to_h,
|
56
54
|
content: content
|
57
55
|
}.select{|k,v| v}.to_json
|
58
|
-
rescue Venice::
|
56
|
+
rescue Venice::Receipt::VerificationError => error
|
59
57
|
{
|
60
|
-
status:
|
58
|
+
status: error.message
|
61
59
|
}.to_json
|
62
60
|
rescue
|
63
61
|
halt 500
|
@@ -1,13 +1,12 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "rack/in-app-purchase"
|
4
3
|
|
5
4
|
Gem::Specification.new do |s|
|
6
5
|
s.name = "rack-in-app-purchase"
|
7
6
|
s.authors = ["Mattt Thompson"]
|
8
7
|
s.email = "m@mattt.me"
|
9
8
|
s.homepage = "http://mattt.me"
|
10
|
-
s.version =
|
9
|
+
s.version = '0.1.1'
|
11
10
|
s.platform = Gem::Platform::RUBY
|
12
11
|
s.summary = "Rack::InAppPurchase"
|
13
12
|
s.description = "Rack middleware for in-app purchase receipt verification and product listing."
|
metadata
CHANGED
@@ -1,82 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-in-app-purchase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Mattt Thompson
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-08-13 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rspec
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0.6'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.6'
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: rake
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - ~>
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '0.9'
|
33
34
|
type: :development
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.9'
|
36
41
|
- !ruby/object:Gem::Dependency
|
37
42
|
name: rack
|
38
|
-
requirement:
|
39
|
-
none: false
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
40
44
|
requirements:
|
41
45
|
- - ~>
|
42
46
|
- !ruby/object:Gem::Version
|
43
47
|
version: '1.4'
|
44
48
|
type: :runtime
|
45
49
|
prerelease: false
|
46
|
-
version_requirements:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.4'
|
47
55
|
- !ruby/object:Gem::Dependency
|
48
56
|
name: sinatra
|
49
|
-
requirement:
|
50
|
-
none: false
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
51
58
|
requirements:
|
52
59
|
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: '1.3'
|
55
62
|
type: :runtime
|
56
63
|
prerelease: false
|
57
|
-
version_requirements:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.3'
|
58
69
|
- !ruby/object:Gem::Dependency
|
59
70
|
name: sequel
|
60
|
-
requirement:
|
61
|
-
none: false
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
62
72
|
requirements:
|
63
73
|
- - ~>
|
64
74
|
- !ruby/object:Gem::Version
|
65
75
|
version: '3.37'
|
66
76
|
type: :runtime
|
67
77
|
prerelease: false
|
68
|
-
version_requirements:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.37'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: venice
|
71
|
-
requirement:
|
72
|
-
none: false
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
73
86
|
requirements:
|
74
|
-
- -
|
87
|
+
- - '>='
|
75
88
|
- !ruby/object:Gem::Version
|
76
89
|
version: '0'
|
77
90
|
type: :runtime
|
78
91
|
prerelease: false
|
79
|
-
version_requirements:
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
80
97
|
description: Rack middleware for in-app purchase receipt verification and product
|
81
98
|
listing.
|
82
99
|
email: m@mattt.me
|
@@ -92,38 +109,30 @@ files:
|
|
92
109
|
- ./lib/rack/in-app-purchase/models/receipt.rb
|
93
110
|
- ./lib/rack/in-app-purchase.rb
|
94
111
|
- ./LICENSE
|
95
|
-
- ./rack-in-app-purchase-0.0.1.gem
|
96
112
|
- ./rack-in-app-purchase.gemspec
|
97
113
|
- ./Rakefile
|
98
114
|
- ./README.md
|
99
115
|
homepage: http://mattt.me
|
100
116
|
licenses: []
|
117
|
+
metadata: {}
|
101
118
|
post_install_message:
|
102
119
|
rdoc_options: []
|
103
120
|
require_paths:
|
104
121
|
- lib
|
105
122
|
required_ruby_version: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
123
|
requirements:
|
108
|
-
- -
|
124
|
+
- - '>='
|
109
125
|
- !ruby/object:Gem::Version
|
110
126
|
version: '0'
|
111
|
-
segments:
|
112
|
-
- 0
|
113
|
-
hash: -3839802527710962917
|
114
127
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
|
-
none: false
|
116
128
|
requirements:
|
117
|
-
- -
|
129
|
+
- - '>='
|
118
130
|
- !ruby/object:Gem::Version
|
119
131
|
version: '0'
|
120
|
-
segments:
|
121
|
-
- 0
|
122
|
-
hash: -3839802527710962917
|
123
132
|
requirements: []
|
124
133
|
rubyforge_project:
|
125
|
-
rubygems_version:
|
134
|
+
rubygems_version: 2.0.3
|
126
135
|
signing_key:
|
127
|
-
specification_version:
|
136
|
+
specification_version: 4
|
128
137
|
summary: Rack::InAppPurchase
|
129
138
|
test_files: []
|
Binary file
|