app_store_pricing_matrix 1.1.0 → 1.2.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.
- data/Gemfile.lock +8 -8
- data/README.md +57 -0
- data/VERSION +1 -1
- data/app_store_pricing_matrix.gemspec +12 -10
- data/lib/app_store_pricing_matrix.rb +2 -1
- data/lib/prices/cny +86 -0
- data/lib/prices/cny_pro +86 -0
- metadata +50 -55
- data/README.rdoc +0 -44
data/Gemfile.lock
CHANGED
@@ -7,15 +7,15 @@ GEM
|
|
7
7
|
bundler (~> 1.0)
|
8
8
|
git (>= 1.2.5)
|
9
9
|
rake
|
10
|
-
rake (0.9.2)
|
11
|
-
rspec (2.
|
12
|
-
rspec-core (~> 2.
|
13
|
-
rspec-expectations (~> 2.
|
14
|
-
rspec-mocks (~> 2.
|
15
|
-
rspec-core (2.
|
16
|
-
rspec-expectations (2.
|
10
|
+
rake (0.9.2.2)
|
11
|
+
rspec (2.7.0)
|
12
|
+
rspec-core (~> 2.7.0)
|
13
|
+
rspec-expectations (~> 2.7.0)
|
14
|
+
rspec-mocks (~> 2.7.0)
|
15
|
+
rspec-core (2.7.1)
|
16
|
+
rspec-expectations (2.7.0)
|
17
17
|
diff-lcs (~> 1.1.2)
|
18
|
-
rspec-mocks (2.
|
18
|
+
rspec-mocks (2.7.0)
|
19
19
|
|
20
20
|
PLATFORMS
|
21
21
|
ruby
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
App Store Pricing Matrix
|
2
|
+
========================
|
3
|
+
|
4
|
+
A simple module that holds currencies and prices from the Apple's iOS App Store.
|
5
|
+
|
6
|
+
Install
|
7
|
+
-------
|
8
|
+
|
9
|
+
gem install app_store_pricing_matrix
|
10
|
+
|
11
|
+
Usage
|
12
|
+
-----
|
13
|
+
|
14
|
+
Suppose you find a device locale by `NSLocale` on an iOS device.
|
15
|
+
|
16
|
+
```objc
|
17
|
+
NSString* currency = [[NSLocale currentLocale] objectForKey:NSLocaleCurrencyCode];
|
18
|
+
```
|
19
|
+
|
20
|
+
That will give you the currency string like `USD` or `EUR`, and this library expects them as a key.
|
21
|
+
|
22
|
+
Some constants, useful for validation:
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
AppStorePricingMatrix::CUSTOMER_CURRENCIES
|
26
|
+
#=> ["USD", "CAD", "MXN", "AUD", "NZD", "JPY", "EUR", "DKK", "SEK", "CHF", "NOK", "GBP", "CNY"]
|
27
|
+
|
28
|
+
AppStorePricingMatrix::DEVELOPER_CURRENCIES
|
29
|
+
#=> ["USD", "CAD", "MXN", "AUD", "NZD", "JPY", "EUR", "CHF", "NOK", "GBP", "CNY"]
|
30
|
+
```
|
31
|
+
|
32
|
+
To retrieve a customer price, query with the currency and the tier number:
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
AppStorePricingMatrix::CUSTOMER_PRICES['USD'][1]
|
36
|
+
#=> "0.99"
|
37
|
+
|
38
|
+
AppStorePricingMatrix::CUSTOMER_PRICES['JPY'][1]
|
39
|
+
#=> "85"
|
40
|
+
```
|
41
|
+
|
42
|
+
For developer proceeds:
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
AppStorePricingMatrix::DEVELOPER_PROCEEDS['GBP'][30]
|
46
|
+
=> "12.78"
|
47
|
+
```
|
48
|
+
|
49
|
+
To retrieve a developer currency from a given customer currency:
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
AppStorePricingMatrix::REVERSE_CURRENCY_MAP['SEK']
|
53
|
+
#=> "EUR"
|
54
|
+
|
55
|
+
AppStorePricingMatrix::REVERSE_CURRENCY_MAP['DKK']
|
56
|
+
#=> "EUR"
|
57
|
+
```
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
@@ -4,17 +4,17 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "1.
|
7
|
+
s.name = "app_store_pricing_matrix"
|
8
|
+
s.version = "1.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kenn Ejima", "Elliot Bowes"]
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
12
|
+
s.date = "2011-11-22"
|
13
|
+
s.description = "A simple module that holds currencies and prices from the Apple's iOS App Store."
|
14
|
+
s.email = "kenn.ejima@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
|
-
"README.
|
17
|
+
"README.md"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
"Gemfile",
|
23
23
|
"Gemfile.lock",
|
24
24
|
"LICENSE.txt",
|
25
|
-
"README.
|
25
|
+
"README.md",
|
26
26
|
"Rakefile",
|
27
27
|
"VERSION",
|
28
28
|
"app_store_pricing_matrix.gemspec",
|
@@ -33,6 +33,8 @@ Gem::Specification.new do |s|
|
|
33
33
|
"lib/prices/cad_pro",
|
34
34
|
"lib/prices/chf",
|
35
35
|
"lib/prices/chf_pro",
|
36
|
+
"lib/prices/cny",
|
37
|
+
"lib/prices/cny_pro",
|
36
38
|
"lib/prices/dkk",
|
37
39
|
"lib/prices/eur",
|
38
40
|
"lib/prices/eur_pro",
|
@@ -52,11 +54,11 @@ Gem::Specification.new do |s|
|
|
52
54
|
"spec/app_store_pricing_matrix_spec.rb",
|
53
55
|
"spec/spec_helper.rb"
|
54
56
|
]
|
55
|
-
s.homepage =
|
57
|
+
s.homepage = "http://github.com/kenn/app_store_pricing_matrix"
|
56
58
|
s.licenses = ["MIT"]
|
57
59
|
s.require_paths = ["lib"]
|
58
|
-
s.rubygems_version =
|
59
|
-
s.summary =
|
60
|
+
s.rubygems_version = "1.8.11"
|
61
|
+
s.summary = "Constants for App Store Pricing Matrix"
|
60
62
|
|
61
63
|
if s.respond_to? :specification_version then
|
62
64
|
s.specification_version = 3
|
@@ -9,7 +9,8 @@ module AppStorePricingMatrix
|
|
9
9
|
:eur => [ :eur, :dkk, :sek ].freeze,
|
10
10
|
:chf => [ :chf ].freeze,
|
11
11
|
:nok => [ :nok ].freeze,
|
12
|
-
:gbp => [ :gbp ].freeze
|
12
|
+
:gbp => [ :gbp ].freeze,
|
13
|
+
:cny => [ :cny ].freeze
|
13
14
|
}.freeze
|
14
15
|
|
15
16
|
EURO_CURRENCIES = [ :bgn , :czk , :eek , :huf , :lvl , :ltl , :mtl , :pln , :ron ].map {|i| i.to_s.upcase }.freeze
|
data/lib/prices/cny
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
0
|
2
|
+
6
|
3
|
+
12
|
4
|
+
18
|
5
|
+
25
|
6
|
+
30
|
7
|
+
40
|
8
|
+
45
|
9
|
+
50
|
10
|
+
60
|
11
|
+
68
|
12
|
+
73
|
13
|
+
78
|
14
|
+
88
|
15
|
+
93
|
16
|
+
98
|
17
|
+
108
|
18
|
+
113
|
19
|
+
118
|
20
|
+
123
|
21
|
+
128
|
22
|
+
138
|
23
|
+
148
|
24
|
+
153
|
25
|
+
158
|
26
|
+
163
|
27
|
+
168
|
28
|
+
178
|
29
|
+
188
|
30
|
+
193
|
31
|
+
198
|
32
|
+
208
|
33
|
+
218
|
34
|
+
223
|
35
|
+
228
|
36
|
+
233
|
37
|
+
238
|
38
|
+
243
|
39
|
+
248
|
40
|
+
253
|
41
|
+
258
|
42
|
+
263
|
43
|
+
268
|
44
|
+
273
|
45
|
+
278
|
46
|
+
283
|
47
|
+
288
|
48
|
+
298
|
49
|
+
308
|
50
|
+
318
|
51
|
+
328
|
52
|
+
348
|
53
|
+
388
|
54
|
+
418
|
55
|
+
448
|
56
|
+
488
|
57
|
+
518
|
58
|
+
548
|
59
|
+
588
|
60
|
+
618
|
61
|
+
648
|
62
|
+
698
|
63
|
+
798
|
64
|
+
848
|
65
|
+
898
|
66
|
+
998
|
67
|
+
1048
|
68
|
+
1098
|
69
|
+
1198
|
70
|
+
1248
|
71
|
+
1298
|
72
|
+
1398
|
73
|
+
1448
|
74
|
+
1498
|
75
|
+
1598
|
76
|
+
1648
|
77
|
+
1998
|
78
|
+
2298
|
79
|
+
2598
|
80
|
+
2998
|
81
|
+
3298
|
82
|
+
3998
|
83
|
+
4498
|
84
|
+
4998
|
85
|
+
5898
|
86
|
+
6498
|
data/lib/prices/cny_pro
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
0.00
|
2
|
+
4.20
|
3
|
+
8.40
|
4
|
+
12.60
|
5
|
+
17.50
|
6
|
+
21.00
|
7
|
+
28.00
|
8
|
+
31.50
|
9
|
+
35.00
|
10
|
+
42.00
|
11
|
+
47.60
|
12
|
+
51.10
|
13
|
+
54.60
|
14
|
+
61.60
|
15
|
+
65.10
|
16
|
+
68.60
|
17
|
+
75.60
|
18
|
+
79.10
|
19
|
+
82.60
|
20
|
+
86.10
|
21
|
+
89.60
|
22
|
+
96.60
|
23
|
+
103.60
|
24
|
+
107.10
|
25
|
+
110.60
|
26
|
+
114.10
|
27
|
+
117.60
|
28
|
+
124.60
|
29
|
+
131.60
|
30
|
+
138.60
|
31
|
+
138.60
|
32
|
+
145.60
|
33
|
+
152.60
|
34
|
+
156.10
|
35
|
+
159.60
|
36
|
+
163.10
|
37
|
+
166.60
|
38
|
+
170.10
|
39
|
+
173.60
|
40
|
+
177.10
|
41
|
+
180.60
|
42
|
+
184.10
|
43
|
+
187.60
|
44
|
+
191.10
|
45
|
+
194.60
|
46
|
+
198.10
|
47
|
+
201.60
|
48
|
+
208.60
|
49
|
+
215.60
|
50
|
+
222.60
|
51
|
+
229.60
|
52
|
+
243.60
|
53
|
+
271.60
|
54
|
+
292.60
|
55
|
+
313.60
|
56
|
+
341.60
|
57
|
+
362.60
|
58
|
+
383.60
|
59
|
+
411.60
|
60
|
+
432.60
|
61
|
+
453.60
|
62
|
+
488.60
|
63
|
+
558.60
|
64
|
+
593.60
|
65
|
+
628.60
|
66
|
+
698.60
|
67
|
+
733.60
|
68
|
+
768.60
|
69
|
+
838.60
|
70
|
+
873.60
|
71
|
+
908.60
|
72
|
+
978.60
|
73
|
+
1013.60
|
74
|
+
1048.60
|
75
|
+
1118.60
|
76
|
+
1153.60
|
77
|
+
1398.60
|
78
|
+
1608.60
|
79
|
+
1818.60
|
80
|
+
2098.60
|
81
|
+
2308.60
|
82
|
+
2798.60
|
83
|
+
3148.60
|
84
|
+
3498.60
|
85
|
+
4128.60
|
86
|
+
4548.60
|
metadata
CHANGED
@@ -1,68 +1,65 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: app_store_pricing_matrix
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.0
|
4
5
|
prerelease:
|
5
|
-
version: 1.1.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Kenn Ejima
|
9
9
|
- Elliot Bowes
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
dependencies:
|
17
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2011-11-22 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
18
16
|
name: rspec
|
19
|
-
requirement: &
|
17
|
+
requirement: &2166540000 !ruby/object:Gem::Requirement
|
20
18
|
none: false
|
21
|
-
requirements:
|
22
|
-
- -
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version:
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
25
23
|
type: :development
|
26
24
|
prerelease: false
|
27
|
-
version_requirements: *
|
28
|
-
- !ruby/object:Gem::Dependency
|
25
|
+
version_requirements: *2166540000
|
26
|
+
- !ruby/object:Gem::Dependency
|
29
27
|
name: bundler
|
30
|
-
requirement: &
|
28
|
+
requirement: &2166539280 !ruby/object:Gem::Requirement
|
31
29
|
none: false
|
32
|
-
requirements:
|
33
|
-
- -
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version:
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
36
34
|
type: :development
|
37
35
|
prerelease: false
|
38
|
-
version_requirements: *
|
39
|
-
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: *2166539280
|
37
|
+
- !ruby/object:Gem::Dependency
|
40
38
|
name: jeweler
|
41
|
-
requirement: &
|
39
|
+
requirement: &2166538280 !ruby/object:Gem::Requirement
|
42
40
|
none: false
|
43
|
-
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version:
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
47
45
|
type: :development
|
48
46
|
prerelease: false
|
49
|
-
version_requirements: *
|
50
|
-
description: A simple module that holds currencies and prices from the Apple's iOS
|
47
|
+
version_requirements: *2166538280
|
48
|
+
description: A simple module that holds currencies and prices from the Apple's iOS
|
49
|
+
App Store.
|
51
50
|
email: kenn.ejima@gmail.com
|
52
51
|
executables: []
|
53
|
-
|
54
52
|
extensions: []
|
55
|
-
|
56
|
-
extra_rdoc_files:
|
53
|
+
extra_rdoc_files:
|
57
54
|
- LICENSE.txt
|
58
|
-
- README.
|
59
|
-
files:
|
55
|
+
- README.md
|
56
|
+
files:
|
60
57
|
- .document
|
61
58
|
- .rspec
|
62
59
|
- Gemfile
|
63
60
|
- Gemfile.lock
|
64
61
|
- LICENSE.txt
|
65
|
-
- README.
|
62
|
+
- README.md
|
66
63
|
- Rakefile
|
67
64
|
- VERSION
|
68
65
|
- app_store_pricing_matrix.gemspec
|
@@ -73,6 +70,8 @@ files:
|
|
73
70
|
- lib/prices/cad_pro
|
74
71
|
- lib/prices/chf
|
75
72
|
- lib/prices/chf_pro
|
73
|
+
- lib/prices/cny
|
74
|
+
- lib/prices/cny_pro
|
76
75
|
- lib/prices/dkk
|
77
76
|
- lib/prices/eur
|
78
77
|
- lib/prices/eur_pro
|
@@ -91,36 +90,32 @@ files:
|
|
91
90
|
- lib/prices/usd_pro
|
92
91
|
- spec/app_store_pricing_matrix_spec.rb
|
93
92
|
- spec/spec_helper.rb
|
94
|
-
has_rdoc: true
|
95
93
|
homepage: http://github.com/kenn/app_store_pricing_matrix
|
96
|
-
licenses:
|
94
|
+
licenses:
|
97
95
|
- MIT
|
98
96
|
post_install_message:
|
99
97
|
rdoc_options: []
|
100
|
-
|
101
|
-
require_paths:
|
98
|
+
require_paths:
|
102
99
|
- lib
|
103
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
104
101
|
none: false
|
105
|
-
requirements:
|
106
|
-
- -
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
|
109
|
-
segments:
|
102
|
+
requirements:
|
103
|
+
- - ! '>='
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
segments:
|
110
107
|
- 0
|
111
|
-
|
112
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
+
hash: 2698050062302243588
|
109
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
110
|
none: false
|
114
|
-
requirements:
|
115
|
-
- -
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version:
|
111
|
+
requirements:
|
112
|
+
- - ! '>='
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0'
|
118
115
|
requirements: []
|
119
|
-
|
120
116
|
rubyforge_project:
|
121
|
-
rubygems_version: 1.
|
117
|
+
rubygems_version: 1.8.11
|
122
118
|
signing_key:
|
123
119
|
specification_version: 3
|
124
120
|
summary: Constants for App Store Pricing Matrix
|
125
121
|
test_files: []
|
126
|
-
|
data/README.rdoc
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
= App Store Pricing Matrix
|
2
|
-
|
3
|
-
A simple module that holds currencies and prices from the Apple's iOS App Store.
|
4
|
-
|
5
|
-
== Install
|
6
|
-
|
7
|
-
gem install app_store_pricing_matrix
|
8
|
-
|
9
|
-
== Usage
|
10
|
-
|
11
|
-
Suppose you find a device locale by NSLocale on an iOS device.
|
12
|
-
|
13
|
-
NSString* currency = [[NSLocale currentLocale] objectForKey:NSLocaleCurrencyCode];
|
14
|
-
|
15
|
-
That will give you the currency string like "USD" or "EUR", and this library expects them as a key.
|
16
|
-
|
17
|
-
Some constants, useful for validation:
|
18
|
-
|
19
|
-
AppStorePricingMatrix::CUSTOMER_CURRENCIES
|
20
|
-
=> ["USD", "CAD", "MXN", "AUD", "NZD", "JPY", "EUR", "DKK", "SEK", "CHF", "NOK", "GBP"]
|
21
|
-
|
22
|
-
AppStorePricingMatrix::DEVELOPER_CURRENCIES
|
23
|
-
=> ["USD", "CAD", "MXN", "AUD", "NZD", "JPY", "EUR", "CHF", "NOK", "GBP"]
|
24
|
-
|
25
|
-
To retrieve a customer price, query with the currency and the tier number:
|
26
|
-
|
27
|
-
AppStorePricingMatrix::CUSTOMER_PRICES['USD'][1]
|
28
|
-
=> "0.99"
|
29
|
-
|
30
|
-
AppStorePricingMatrix::CUSTOMER_PRICES['JPY'][1]
|
31
|
-
=> "85"
|
32
|
-
|
33
|
-
For developer proceeds:
|
34
|
-
|
35
|
-
AppStorePricingMatrix::DEVELOPER_PROCEEDS['GBP'][30]
|
36
|
-
=> "12.78"
|
37
|
-
|
38
|
-
To retrieve a developer currency from a given customer currency:
|
39
|
-
|
40
|
-
AppStorePricingMatrix::REVERSE_CURRENCY_MAP['SEK']
|
41
|
-
=> "EUR"
|
42
|
-
|
43
|
-
AppStorePricingMatrix::REVERSE_CURRENCY_MAP['DKK']
|
44
|
-
=> "EUR"
|