jp_ems_fee 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/.travis.yml +10 -5
- data/lib/jp_ems_fee/version.rb +1 -1
- data/lib/jp_ems_fee.rb +5 -6
- metadata +3 -3
- data/ems_base_file.yaml +0 -173
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f547eab803257fa4fc79708f10e4044184edfc3
|
4
|
+
data.tar.gz: 72bdd8e2c7defef49fae331a31df6ff2089e3c1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc568546f1dcfe1f919bbb43a7b97d9af0529045b333ce5789450c34184f09aa3cdef99ecd8a7aa854b1cc6df7c99e089dfe3641cd687f97a23957cb9ba591f3
|
7
|
+
data.tar.gz: 760b558f394d59fff53a26c6e577f79324c1ca21e3a6c22fea9360fe8ccc50985bd60524264bbcaeaa1f296614ef141494ea6e28663edbb4dcc5059ec3a7d040
|
data/.gitmodules
ADDED
data/.travis.yml
CHANGED
data/lib/jp_ems_fee/version.rb
CHANGED
data/lib/jp_ems_fee.rb
CHANGED
@@ -5,11 +5,11 @@ module JpEmsFee
|
|
5
5
|
class << self
|
6
6
|
|
7
7
|
def asia(weight)
|
8
|
-
base(weight, __method__)
|
8
|
+
base(weight, __method__.to_s)
|
9
9
|
end
|
10
10
|
|
11
11
|
def oceania(weight)
|
12
|
-
base(weight, __method__)
|
12
|
+
base(weight, __method__.to_s)
|
13
13
|
end
|
14
14
|
|
15
15
|
def north_america(weight)
|
@@ -25,11 +25,11 @@ module JpEmsFee
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def europa(weight)
|
28
|
-
base(weight, __method__)
|
28
|
+
base(weight, __method__.to_s)
|
29
29
|
end
|
30
30
|
|
31
31
|
def africa(weight)
|
32
|
-
base(weight, __method__)
|
32
|
+
base(weight, __method__.to_s)
|
33
33
|
end
|
34
34
|
|
35
35
|
def south_america(weight)
|
@@ -52,11 +52,10 @@ module JpEmsFee
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def calculate(weight, area_name)
|
55
|
-
yaml = YAML.load_file(File.expand_path('../../
|
55
|
+
yaml = YAML.load_file(File.expand_path('../../jp_ems_fee/price_table.yaml', __FILE__))
|
56
56
|
yaml[area_name].each do |r|
|
57
57
|
if r.first >= weight
|
58
58
|
return r[1]
|
59
|
-
break
|
60
59
|
end
|
61
60
|
end
|
62
61
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jp_ems_fee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nishio Takuya
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -60,6 +60,7 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
|
+
- ".gitmodules"
|
63
64
|
- ".rspec"
|
64
65
|
- ".travis.yml"
|
65
66
|
- Gemfile
|
@@ -68,7 +69,6 @@ files:
|
|
68
69
|
- Rakefile
|
69
70
|
- bin/console
|
70
71
|
- bin/setup
|
71
|
-
- ems_base_file.yaml
|
72
72
|
- jp_ems_fee.gemspec
|
73
73
|
- lib/jp_ems_fee.rb
|
74
74
|
- lib/jp_ems_fee/version.rb
|
data/ems_base_file.yaml
DELETED
@@ -1,173 +0,0 @@
|
|
1
|
-
---
|
2
|
-
:asia:
|
3
|
-
500: 1400
|
4
|
-
600: 1540
|
5
|
-
700: 1680
|
6
|
-
800: 1820
|
7
|
-
900: 1960
|
8
|
-
1000: 2100
|
9
|
-
1250: 2400
|
10
|
-
1500: 2700
|
11
|
-
1750: 3000
|
12
|
-
2000: 3300
|
13
|
-
2500: 3800
|
14
|
-
3000: 4300
|
15
|
-
3500: 4800
|
16
|
-
4000: 5300
|
17
|
-
4500: 5800
|
18
|
-
5000: 6300
|
19
|
-
5500: 6800
|
20
|
-
6000: 7300
|
21
|
-
7000: 8100
|
22
|
-
8000: 8900
|
23
|
-
9000: 9700
|
24
|
-
10000: 10500
|
25
|
-
11000: 11300
|
26
|
-
12000: 12100
|
27
|
-
13000: 12900
|
28
|
-
14000: 13700
|
29
|
-
15000: 14500
|
30
|
-
16000: 15300
|
31
|
-
17000: 16100
|
32
|
-
18000: 16900
|
33
|
-
19000: 17700
|
34
|
-
20000: 18500
|
35
|
-
21000: 19300
|
36
|
-
22000: 20100
|
37
|
-
23000: 20900
|
38
|
-
24000: 21700
|
39
|
-
25000: 22500
|
40
|
-
26000: 23300
|
41
|
-
27000: 24100
|
42
|
-
28000: 24900
|
43
|
-
29000: 25700
|
44
|
-
30000: 26500
|
45
|
-
:oceania:
|
46
|
-
500: 2000
|
47
|
-
600: 2180
|
48
|
-
700: 2360
|
49
|
-
800: 2540
|
50
|
-
900: 2720
|
51
|
-
1000: 2900
|
52
|
-
1250: 3300
|
53
|
-
1500: 3700
|
54
|
-
1750: 4100
|
55
|
-
2000: 4500
|
56
|
-
2500: 5200
|
57
|
-
3000: 5900
|
58
|
-
3500: 6600
|
59
|
-
4000: 7300
|
60
|
-
4500: 8000
|
61
|
-
5000: 8700
|
62
|
-
5500: 9400
|
63
|
-
6000: 10100
|
64
|
-
7000: 11200
|
65
|
-
8000: 12300
|
66
|
-
9000: 13400
|
67
|
-
10000: 14500
|
68
|
-
11000: 15600
|
69
|
-
12000: 16700
|
70
|
-
13000: 17800
|
71
|
-
14000: 18900
|
72
|
-
15000: 20000
|
73
|
-
16000: 21100
|
74
|
-
17000: 22200
|
75
|
-
18000: 23300
|
76
|
-
19000: 24400
|
77
|
-
20000: 25500
|
78
|
-
21000: 26600
|
79
|
-
22000: 27700
|
80
|
-
23000: 28800
|
81
|
-
24000: 29900
|
82
|
-
25000: 31000
|
83
|
-
26000: 32100
|
84
|
-
27000: 33200
|
85
|
-
28000: 34300
|
86
|
-
29000: 35400
|
87
|
-
30000: 36500
|
88
|
-
:europa:
|
89
|
-
500: 2200
|
90
|
-
600: 2400
|
91
|
-
700: 2600
|
92
|
-
800: 2800
|
93
|
-
900: 3000
|
94
|
-
1000: 3200
|
95
|
-
1250: 3650
|
96
|
-
1500: 4100
|
97
|
-
1750: 4550
|
98
|
-
2000: 5000
|
99
|
-
2500: 5800
|
100
|
-
3000: 6600
|
101
|
-
3500: 7400
|
102
|
-
4000: 8200
|
103
|
-
4500: 9000
|
104
|
-
5000: 9800
|
105
|
-
5500: 10600
|
106
|
-
6000: 11400
|
107
|
-
7000: 12700
|
108
|
-
8000: 14000
|
109
|
-
9000: 15300
|
110
|
-
10000: 16600
|
111
|
-
11000: 17900
|
112
|
-
12000: 19200
|
113
|
-
13000: 20500
|
114
|
-
14000: 21800
|
115
|
-
15000: 23100
|
116
|
-
16000: 24400
|
117
|
-
17000: 25700
|
118
|
-
18000: 27000
|
119
|
-
19000: 28300
|
120
|
-
20000: 29600
|
121
|
-
21000: 30900
|
122
|
-
22000: 32200
|
123
|
-
23000: 33500
|
124
|
-
24000: 34800
|
125
|
-
25000: 36100
|
126
|
-
26000: 37400
|
127
|
-
27000: 38700
|
128
|
-
28000: 40000
|
129
|
-
29000: 41300
|
130
|
-
30000: 42600
|
131
|
-
:africa:
|
132
|
-
500: 2400
|
133
|
-
600: 2740
|
134
|
-
700: 3080
|
135
|
-
800: 3420
|
136
|
-
900: 3760
|
137
|
-
1000: 4100
|
138
|
-
1250: 4900
|
139
|
-
1500: 5700
|
140
|
-
1750: 6500
|
141
|
-
2000: 7300
|
142
|
-
2500: 8800
|
143
|
-
3000: 10300
|
144
|
-
3500: 11800
|
145
|
-
4000: 13300
|
146
|
-
4500: 14800
|
147
|
-
5000: 16300
|
148
|
-
5500: 17800
|
149
|
-
6000: 19300
|
150
|
-
7000: 21400
|
151
|
-
8000: 23500
|
152
|
-
9000: 25600
|
153
|
-
10000: 27700
|
154
|
-
11000: 29800
|
155
|
-
12000: 31900
|
156
|
-
13000: 34000
|
157
|
-
14000: 36100
|
158
|
-
15000: 38200
|
159
|
-
16000: 40300
|
160
|
-
17000: 42400
|
161
|
-
18000: 44500
|
162
|
-
19000: 46600
|
163
|
-
20000: 48700
|
164
|
-
21000: 50800
|
165
|
-
22000: 52900
|
166
|
-
23000: 55000
|
167
|
-
24000: 57100
|
168
|
-
25000: 59200
|
169
|
-
26000: 61300
|
170
|
-
27000: 63400
|
171
|
-
28000: 65500
|
172
|
-
29000: 67600
|
173
|
-
30000: 69700
|