ski_binding_calculator 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,5 @@
1
+ #weight [kg]
2
+ #height [cm]
1
3
  - !ruby/object:SkiBinding::Code
2
4
  weight: !ruby/range 10..13
3
5
  height: !ruby/range 1..148
@@ -36,8 +38,8 @@
36
38
  height: !ruby/range 179..194
37
39
  - !ruby/object:SkiBinding::Code
38
40
  weight: !ruby/range
39
- begin: 1
41
+ begin: 95
40
42
  end: .inf
41
43
  height: !ruby/range
42
- begin: 1
44
+ begin: 195
43
45
  end: .inf
@@ -1,485 +1,488 @@
1
+ # shoe_size_range [mm]
2
+ # twist [Nm]
3
+ # forward_lean [Nm]
1
4
  -
2
5
  - !ruby/object:SkiBinding::Setting
3
- range: !ruby/range 1..250
6
+ shoe_size_range: !ruby/range 1..250
4
7
  z_value: 0.75
5
- turning_moment: &turning_moment 8
6
- forward_pressure: &forward_pressure 29
8
+ twist: &turning_moment 8
9
+ forward_lean: &forward_lean 29
7
10
  - !ruby/object:SkiBinding::Setting
8
- range: !ruby/range 251..270
11
+ shoe_size_range: !ruby/range 251..270
9
12
  z_value: 0.75
10
- turning_moment: *turning_moment
11
- forward_pressure: *forward_pressure
13
+ twist: *turning_moment
14
+ forward_lean: *forward_lean
12
15
  - !ruby/object:SkiBinding::Setting
13
- range: ~
16
+ shoe_size_range: ~
14
17
  z_value: ~
15
- turning_moment: ~
16
- forward_pressure: ~
18
+ twist: ~
19
+ forward_lean: ~
17
20
  - !ruby/object:SkiBinding::Setting
18
- range: ~
21
+ shoe_size_range: ~
19
22
  z_value: ~
20
- turning_moment: ~
21
- forward_pressure: ~
23
+ twist: ~
24
+ forward_lean: ~
22
25
  - !ruby/object:SkiBinding::Setting
23
- range: ~
26
+ shoe_size_range: ~
24
27
  z_value: ~
25
- turning_moment: ~
26
- forward_pressure: ~
28
+ twist: ~
29
+ forward_lean: ~
27
30
  - !ruby/object:SkiBinding::Setting
28
- range: ~
31
+ shoe_size_range: ~
29
32
  z_value: ~
30
- turning_moment: ~
31
- forward_pressure: ~
33
+ twist: ~
34
+ forward_lean: ~
32
35
  -
33
36
  - !ruby/object:SkiBinding::Setting
34
- range: !ruby/range 1..250
37
+ shoe_size_range: !ruby/range 1..250
35
38
  z_value: 1
36
- turning_moment: &turning_moment 11
37
- forward_pressure: &forward_pressure 40
39
+ twist: &turning_moment 11
40
+ forward_lean: &forward_lean 40
38
41
  - !ruby/object:SkiBinding::Setting
39
- range: !ruby/range 251..270
42
+ shoe_size_range: !ruby/range 251..270
40
43
  z_value: 1
41
- turning_moment: *turning_moment
42
- forward_pressure: *forward_pressure
44
+ twist: *turning_moment
45
+ forward_lean: *forward_lean
43
46
  - !ruby/object:SkiBinding::Setting
44
- range: !ruby/range 271..290
47
+ shoe_size_range: !ruby/range 271..290
45
48
  z_value: 0.75
46
- turning_moment: *turning_moment
47
- forward_pressure: *forward_pressure
49
+ twist: *turning_moment
50
+ forward_lean: *forward_lean
48
51
  - !ruby/object:SkiBinding::Setting
49
- range: ~
52
+ shoe_size_range: ~
50
53
  z_value: ~
51
- turning_moment: ~
52
- forward_pressure: ~
54
+ twist: ~
55
+ forward_lean: ~
53
56
  - !ruby/object:SkiBinding::Setting
54
- range: ~
57
+ shoe_size_range: ~
55
58
  z_value: ~
56
- turning_moment: ~
57
- forward_pressure: ~
59
+ twist: ~
60
+ forward_lean: ~
58
61
  - !ruby/object:SkiBinding::Setting
59
- range: ~
62
+ shoe_size_range: ~
60
63
  z_value: ~
61
- turning_moment: ~
62
- forward_pressure: ~
64
+ twist: ~
65
+ forward_lean: ~
63
66
  -
64
67
  - !ruby/object:SkiBinding::Setting
65
- range: !ruby/range 1..250
68
+ shoe_size_range: !ruby/range 1..250
66
69
  z_value: 1.5
67
- turning_moment: &turning_moment 14
68
- forward_pressure: &forward_pressure 52
70
+ twist: &turning_moment 14
71
+ forward_lean: &forward_lean 52
69
72
  - !ruby/object:SkiBinding::Setting
70
- range: !ruby/range 251..270
73
+ shoe_size_range: !ruby/range 251..270
71
74
  z_value: 1.25
72
- turning_moment: *turning_moment
73
- forward_pressure: *forward_pressure
75
+ twist: *turning_moment
76
+ forward_lean: *forward_lean
74
77
  - !ruby/object:SkiBinding::Setting
75
- range: !ruby/range 271..290
78
+ shoe_size_range: !ruby/range 271..290
76
79
  z_value: 1
77
- turning_moment: *turning_moment
78
- forward_pressure: *forward_pressure
80
+ twist: *turning_moment
81
+ forward_lean: *forward_lean
79
82
  - !ruby/object:SkiBinding::Setting
80
- range: ~
83
+ shoe_size_range: ~
81
84
  z_value: ~
82
- turning_moment: ~
83
- forward_pressure: ~
85
+ twist: ~
86
+ forward_lean: ~
84
87
  - !ruby/object:SkiBinding::Setting
85
- range: ~
88
+ shoe_size_range: ~
86
89
  z_value: ~
87
- turning_moment: ~
88
- forward_pressure: ~
90
+ twist: ~
91
+ forward_lean: ~
89
92
  - !ruby/object:SkiBinding::Setting
90
- range: ~
93
+ shoe_size_range: ~
91
94
  z_value: ~
92
- turning_moment: ~
93
- forward_pressure: ~
95
+ twist: ~
96
+ forward_lean: ~
94
97
  -
95
98
  - !ruby/object:SkiBinding::Setting
96
- range: !ruby/range 1..250
99
+ shoe_size_range: !ruby/range 1..250
97
100
  z_value: 1.75
98
- turning_moment: &turning_moment 17
99
- forward_pressure: &forward_pressure 64
101
+ twist: &turning_moment 17
102
+ forward_lean: &forward_lean 64
100
103
  - !ruby/object:SkiBinding::Setting
101
- range: !ruby/range 251..270
104
+ shoe_size_range: !ruby/range 251..270
102
105
  z_value: 1.5
103
- turning_moment: *turning_moment
104
- forward_pressure: *forward_pressure
106
+ twist: *turning_moment
107
+ forward_lean: *forward_lean
105
108
  - !ruby/object:SkiBinding::Setting
106
- range: !ruby/range 271..290
109
+ shoe_size_range: !ruby/range 271..290
107
110
  z_value: 1.5
108
- turning_moment: *turning_moment
109
- forward_pressure: *forward_pressure
111
+ twist: *turning_moment
112
+ forward_lean: *forward_lean
110
113
  - !ruby/object:SkiBinding::Setting
111
- range: !ruby/range 291..310
114
+ shoe_size_range: !ruby/range 291..310
112
115
  z_value: 1.25
113
- turning_moment: *turning_moment
114
- forward_pressure: *forward_pressure
116
+ twist: *turning_moment
117
+ forward_lean: *forward_lean
115
118
  - !ruby/object:SkiBinding::Setting
116
- range: ~
119
+ shoe_size_range: ~
117
120
  z_value: ~
118
- turning_moment: ~
119
- forward_pressure: ~
121
+ twist: ~
122
+ forward_lean: ~
120
123
  - !ruby/object:SkiBinding::Setting
121
- range: ~
124
+ shoe_size_range: ~
122
125
  z_value: ~
123
- turning_moment: ~
124
- forward_pressure: ~
126
+ twist: ~
127
+ forward_lean: ~
125
128
  -
126
129
  - !ruby/object:SkiBinding::Setting
127
- range: !ruby/range 1..250
130
+ shoe_size_range: !ruby/range 1..250
128
131
  z_value: 2.25
129
- turning_moment: &turning_moment 20
130
- forward_pressure: &forward_pressure 75
132
+ twist: &turning_moment 20
133
+ forward_lean: &forward_lean 75
131
134
  - !ruby/object:SkiBinding::Setting
132
- range: !ruby/range 251..270
135
+ shoe_size_range: !ruby/range 251..270
133
136
  z_value: 2
134
- turning_moment: *turning_moment
135
- forward_pressure: *forward_pressure
137
+ twist: *turning_moment
138
+ forward_lean: *forward_lean
136
139
  - !ruby/object:SkiBinding::Setting
137
- range: !ruby/range 271..290
140
+ shoe_size_range: !ruby/range 271..290
138
141
  z_value: 1.75
139
- turning_moment: *turning_moment
140
- forward_pressure: *forward_pressure
142
+ twist: *turning_moment
143
+ forward_lean: *forward_lean
141
144
  - !ruby/object:SkiBinding::Setting
142
- range: !ruby/range 291..310
145
+ shoe_size_range: !ruby/range 291..310
143
146
  z_value: 1.5
144
- turning_moment: *turning_moment
145
- forward_pressure: *forward_pressure
147
+ twist: *turning_moment
148
+ forward_lean: *forward_lean
146
149
  - !ruby/object:SkiBinding::Setting
147
- range: !ruby/range 311..330
150
+ shoe_size_range: !ruby/range 311..330
148
151
  z_value: 1.5
149
- turning_moment: *turning_moment
150
- forward_pressure: *forward_pressure
152
+ twist: *turning_moment
153
+ forward_lean: *forward_lean
151
154
  - !ruby/object:SkiBinding::Setting
152
- range: ~
155
+ shoe_size_range: ~
153
156
  z_value: ~
154
- turning_moment: ~
155
- forward_pressure: ~
157
+ twist: ~
158
+ forward_lean: ~
156
159
  -
157
160
  - !ruby/object:SkiBinding::Setting
158
- range: !ruby/range 1..250
161
+ shoe_size_range: !ruby/range 1..250
159
162
  z_value: 2.75
160
- turning_moment: &turning_moment 23
161
- forward_pressure: &forward_pressure 87
163
+ twist: &turning_moment 23
164
+ forward_lean: &forward_lean 87
162
165
  - !ruby/object:SkiBinding::Setting
163
- range: !ruby/range 251..270
166
+ shoe_size_range: !ruby/range 251..270
164
167
  z_value: 2.5
165
- turning_moment: *turning_moment
166
- forward_pressure: *forward_pressure
168
+ twist: *turning_moment
169
+ forward_lean: *forward_lean
167
170
  - !ruby/object:SkiBinding::Setting
168
- range: !ruby/range 271..290
171
+ shoe_size_range: !ruby/range 271..290
169
172
  z_value: 2.25
170
- turning_moment: *turning_moment
171
- forward_pressure: *forward_pressure
173
+ twist: *turning_moment
174
+ forward_lean: *forward_lean
172
175
  - !ruby/object:SkiBinding::Setting
173
- range: !ruby/range 291..310
176
+ shoe_size_range: !ruby/range 291..310
174
177
  z_value: 2
175
- turning_moment: *turning_moment
176
- forward_pressure: *forward_pressure
178
+ twist: *turning_moment
179
+ forward_lean: *forward_lean
177
180
  - !ruby/object:SkiBinding::Setting
178
- range: !ruby/range 311..330
181
+ shoe_size_range: !ruby/range 311..330
179
182
  z_value: 1.75
180
- turning_moment: *turning_moment
181
- forward_pressure: *forward_pressure
183
+ twist: *turning_moment
184
+ forward_lean: *forward_lean
182
185
  - !ruby/object:SkiBinding::Setting
183
- range: !ruby/range
186
+ shoe_size_range: !ruby/range
184
187
  begin: 331
185
188
  end: .inf
186
189
  z_value: 1.75
187
- turning_moment: *turning_moment
188
- forward_pressure: *forward_pressure
190
+ twist: *turning_moment
191
+ forward_lean: *forward_lean
189
192
  -
190
193
  - !ruby/object:SkiBinding::Setting
191
- range: !ruby/range 1..250
194
+ shoe_size_range: !ruby/range 1..250
192
195
  z_value: 3.5
193
- turning_moment: &turning_moment 27
194
- forward_pressure: &forward_pressure 102
196
+ twist: &turning_moment 27
197
+ forward_lean: &forward_lean 102
195
198
  - !ruby/object:SkiBinding::Setting
196
- range: !ruby/range 251..270
199
+ shoe_size_range: !ruby/range 251..270
197
200
  z_value: 3
198
- turning_moment: *turning_moment
199
- forward_pressure: *forward_pressure
201
+ twist: *turning_moment
202
+ forward_lean: *forward_lean
200
203
  - !ruby/object:SkiBinding::Setting
201
- range: !ruby/range 271..290
204
+ shoe_size_range: !ruby/range 271..290
202
205
  z_value: 2.75
203
- turning_moment: *turning_moment
204
- forward_pressure: *forward_pressure
206
+ twist: *turning_moment
207
+ forward_lean: *forward_lean
205
208
  - !ruby/object:SkiBinding::Setting
206
- range: !ruby/range 291..310
209
+ shoe_size_range: !ruby/range 291..310
207
210
  z_value: 2.5
208
- turning_moment: *turning_moment
209
- forward_pressure: *forward_pressure
211
+ twist: *turning_moment
212
+ forward_lean: *forward_lean
210
213
  - !ruby/object:SkiBinding::Setting
211
- range: !ruby/range 311..330
214
+ shoe_size_range: !ruby/range 311..330
212
215
  z_value: 2.25
213
- turning_moment: *turning_moment
214
- forward_pressure: *forward_pressure
216
+ twist: *turning_moment
217
+ forward_lean: *forward_lean
215
218
  - !ruby/object:SkiBinding::Setting
216
- range: !ruby/range
219
+ shoe_size_range: !ruby/range
217
220
  begin: 331
218
221
  end: .inf
219
222
  z_value: 2
220
- turning_moment: *turning_moment
221
- forward_pressure: *forward_pressure
223
+ twist: *turning_moment
224
+ forward_lean: *forward_lean
222
225
  -
223
226
  - !ruby/object:SkiBinding::Setting
224
- range: !ruby/range 1..250
227
+ shoe_size_range: !ruby/range 1..250
225
228
  z_value: 3.5
226
- turning_moment: &turning_moment 31
227
- forward_pressure: &forward_pressure 120
229
+ twist: &turning_moment 31
230
+ forward_lean: &forward_lean 120
228
231
  - !ruby/object:SkiBinding::Setting
229
- range: !ruby/range 251..270
232
+ shoe_size_range: !ruby/range 251..270
230
233
  z_value: 3.5
231
- turning_moment: *turning_moment
232
- forward_pressure: *forward_pressure
234
+ twist: *turning_moment
235
+ forward_lean: *forward_lean
233
236
  - !ruby/object:SkiBinding::Setting
234
- range: !ruby/range 271..290
237
+ shoe_size_range: !ruby/range 271..290
235
238
  z_value: 3
236
- turning_moment: *turning_moment
237
- forward_pressure: *forward_pressure
239
+ twist: *turning_moment
240
+ forward_lean: *forward_lean
238
241
  - !ruby/object:SkiBinding::Setting
239
- range: !ruby/range 291..310
242
+ shoe_size_range: !ruby/range 291..310
240
243
  z_value: 3
241
- turning_moment: *turning_moment
242
- forward_pressure: *forward_pressure
244
+ twist: *turning_moment
245
+ forward_lean: *forward_lean
243
246
  - !ruby/object:SkiBinding::Setting
244
- range: !ruby/range 311..330
247
+ shoe_size_range: !ruby/range 311..330
245
248
  z_value: 2.75
246
- turning_moment: *turning_moment
247
- forward_pressure: *forward_pressure
249
+ twist: *turning_moment
250
+ forward_lean: *forward_lean
248
251
  - !ruby/object:SkiBinding::Setting
249
- range: !ruby/range
252
+ shoe_size_range: !ruby/range
250
253
  begin: 331
251
254
  end: .inf
252
255
  z_value: 2.5
253
- turning_moment: *turning_moment
254
- forward_pressure: *forward_pressure
256
+ twist: *turning_moment
257
+ forward_lean: *forward_lean
255
258
  -
256
259
  - !ruby/object:SkiBinding::Setting
257
- range: !ruby/range 1..250
260
+ shoe_size_range: !ruby/range 1..250
258
261
  z_value: 3.5
259
- turning_moment: &turning_moment 37
260
- forward_pressure: &forward_pressure 141
262
+ twist: &turning_moment 37
263
+ forward_lean: &forward_lean 141
261
264
  - !ruby/object:SkiBinding::Setting
262
- range: !ruby/range 251..270
265
+ shoe_size_range: !ruby/range 251..270
263
266
  z_value: 4.5
264
- turning_moment: *turning_moment
265
- forward_pressure: *forward_pressure
267
+ twist: *turning_moment
268
+ forward_lean: *forward_lean
266
269
  - !ruby/object:SkiBinding::Setting
267
- range: !ruby/range 271..290
270
+ shoe_size_range: !ruby/range 271..290
268
271
  z_value: 4
269
- turning_moment: *turning_moment
270
- forward_pressure: *forward_pressure
272
+ twist: *turning_moment
273
+ forward_lean: *forward_lean
271
274
  - !ruby/object:SkiBinding::Setting
272
- range: !ruby/range 291..310
275
+ shoe_size_range: !ruby/range 291..310
273
276
  z_value: 3.5
274
- turning_moment: *turning_moment
275
- forward_pressure: *forward_pressure
277
+ twist: *turning_moment
278
+ forward_lean: *forward_lean
276
279
  - !ruby/object:SkiBinding::Setting
277
- range: !ruby/range 311..330
280
+ shoe_size_range: !ruby/range 311..330
278
281
  z_value: 3.5
279
- turning_moment: *turning_moment
280
- forward_pressure: *forward_pressure
282
+ twist: *turning_moment
283
+ forward_lean: *forward_lean
281
284
  - !ruby/object:SkiBinding::Setting
282
- range: !ruby/range
285
+ shoe_size_range: !ruby/range
283
286
  begin: 331
284
287
  end: .inf
285
288
  z_value: 3
286
- turning_moment: *turning_moment
287
- forward_pressure: *forward_pressure
289
+ twist: *turning_moment
290
+ forward_lean: *forward_lean
288
291
  -
289
292
  - !ruby/object:SkiBinding::Setting
290
- range: !ruby/range 1..250
293
+ shoe_size_range: !ruby/range 1..250
291
294
  z_value: 3.5
292
- turning_moment: &turning_moment 43
293
- forward_pressure: &forward_pressure 165
295
+ twist: &turning_moment 43
296
+ forward_lean: &forward_lean 165
294
297
  - !ruby/object:SkiBinding::Setting
295
- range: !ruby/range 251..270
298
+ shoe_size_range: !ruby/range 251..270
296
299
  z_value: 5.5
297
- turning_moment: *turning_moment
298
- forward_pressure: *forward_pressure
300
+ twist: *turning_moment
301
+ forward_lean: *forward_lean
299
302
  - !ruby/object:SkiBinding::Setting
300
- range: !ruby/range 271..290
303
+ shoe_size_range: !ruby/range 271..290
301
304
  z_value: 5
302
- turning_moment: *turning_moment
303
- forward_pressure: *forward_pressure
305
+ twist: *turning_moment
306
+ forward_lean: *forward_lean
304
307
  - !ruby/object:SkiBinding::Setting
305
- range: !ruby/range 291..310
308
+ shoe_size_range: !ruby/range 291..310
306
309
  z_value: 4.5
307
- turning_moment: *turning_moment
308
- forward_pressure: *forward_pressure
310
+ twist: *turning_moment
311
+ forward_lean: *forward_lean
309
312
  - !ruby/object:SkiBinding::Setting
310
- range: !ruby/range 311..330
313
+ shoe_size_range: !ruby/range 311..330
311
314
  z_value: 4
312
- turning_moment: *turning_moment
313
- forward_pressure: *forward_pressure
315
+ twist: *turning_moment
316
+ forward_lean: *forward_lean
314
317
  - !ruby/object:SkiBinding::Setting
315
- range: !ruby/range
318
+ shoe_size_range: !ruby/range
316
319
  begin: 331
317
320
  end: .inf
318
321
  z_value: 3.5
319
- turning_moment: *turning_moment
320
- forward_pressure: *forward_pressure
322
+ twist: *turning_moment
323
+ forward_lean: *forward_lean
321
324
  -
322
325
  - !ruby/object:SkiBinding::Setting
323
- range: !ruby/range 1..250
326
+ shoe_size_range: !ruby/range 1..250
324
327
  z_value: 3.5
325
- turning_moment: &turning_moment 50
326
- forward_pressure: &forward_pressure 194
328
+ twist: &turning_moment 50
329
+ forward_lean: &forward_lean 194
327
330
  - !ruby/object:SkiBinding::Setting
328
- range: !ruby/range 251..270
331
+ shoe_size_range: !ruby/range 251..270
329
332
  z_value: 6.5
330
- turning_moment: *turning_moment
331
- forward_pressure: *forward_pressure
333
+ twist: *turning_moment
334
+ forward_lean: *forward_lean
332
335
  - !ruby/object:SkiBinding::Setting
333
- range: !ruby/range 271..290
336
+ shoe_size_range: !ruby/range 271..290
334
337
  z_value: 6
335
- turning_moment: *turning_moment
336
- forward_pressure: *forward_pressure
338
+ twist: *turning_moment
339
+ forward_lean: *forward_lean
337
340
  - !ruby/object:SkiBinding::Setting
338
- range: !ruby/range 291..310
341
+ shoe_size_range: !ruby/range 291..310
339
342
  z_value: 5.5
340
- turning_moment: *turning_moment
341
- forward_pressure: *forward_pressure
343
+ twist: *turning_moment
344
+ forward_lean: *forward_lean
342
345
  - !ruby/object:SkiBinding::Setting
343
- range: !ruby/range 311..330
346
+ shoe_size_range: !ruby/range 311..330
344
347
  z_value: 5
345
- turning_moment: *turning_moment
346
- forward_pressure: *forward_pressure
348
+ twist: *turning_moment
349
+ forward_lean: *forward_lean
347
350
  - !ruby/object:SkiBinding::Setting
348
- range: !ruby/range
351
+ shoe_size_range: !ruby/range
349
352
  begin: 331
350
353
  end: .inf
351
354
  z_value: 4.5
352
- turning_moment: *turning_moment
353
- forward_pressure: *forward_pressure
355
+ twist: *turning_moment
356
+ forward_lean: *forward_lean
354
357
  -
355
358
  - !ruby/object:SkiBinding::Setting
356
- range: !ruby/range 1..250
359
+ shoe_size_range: !ruby/range 1..250
357
360
  z_value: 3.5
358
- turning_moment: &turning_moment 58
359
- forward_pressure: &forward_pressure 229
361
+ twist: &turning_moment 58
362
+ forward_lean: &forward_lean 229
360
363
  - !ruby/object:SkiBinding::Setting
361
- range: !ruby/range 251..270
364
+ shoe_size_range: !ruby/range 251..270
362
365
  z_value: 7.5
363
- turning_moment: *turning_moment
364
- forward_pressure: *forward_pressure
366
+ twist: *turning_moment
367
+ forward_lean: *forward_lean
365
368
  - !ruby/object:SkiBinding::Setting
366
- range: !ruby/range 271..290
369
+ shoe_size_range: !ruby/range 271..290
367
370
  z_value: 7
368
- turning_moment: *turning_moment
369
- forward_pressure: *forward_pressure
371
+ twist: *turning_moment
372
+ forward_lean: *forward_lean
370
373
  - !ruby/object:SkiBinding::Setting
371
- range: !ruby/range 291..310
374
+ shoe_size_range: !ruby/range 291..310
372
375
  z_value: 6.5
373
- turning_moment: *turning_moment
374
- forward_pressure: *forward_pressure
376
+ twist: *turning_moment
377
+ forward_lean: *forward_lean
375
378
  - !ruby/object:SkiBinding::Setting
376
- range: !ruby/range 311..330
379
+ shoe_size_range: !ruby/range 311..330
377
380
  z_value: 6
378
- turning_moment: *turning_moment
379
- forward_pressure: *forward_pressure
381
+ twist: *turning_moment
382
+ forward_lean: *forward_lean
380
383
  - !ruby/object:SkiBinding::Setting
381
- range: !ruby/range
384
+ shoe_size_range: !ruby/range
382
385
  begin: 331
383
386
  end: .inf
384
387
  z_value: 5.5
385
- turning_moment: *turning_moment
386
- forward_pressure: *forward_pressure
388
+ twist: *turning_moment
389
+ forward_lean: *forward_lean
387
390
  -
388
391
  - !ruby/object:SkiBinding::Setting
389
- range: !ruby/range 1..250
392
+ shoe_size_range: !ruby/range 1..250
390
393
  z_value: 3.5
391
- turning_moment: &turning_moment 67
392
- forward_pressure: &forward_pressure 271
394
+ twist: &turning_moment 67
395
+ forward_lean: &forward_lean 271
393
396
  - !ruby/object:SkiBinding::Setting
394
- range: !ruby/range 251..270
397
+ shoe_size_range: !ruby/range 251..270
395
398
  z_value: 7.5
396
- turning_moment: *turning_moment
397
- forward_pressure: *forward_pressure
399
+ twist: *turning_moment
400
+ forward_lean: *forward_lean
398
401
  - !ruby/object:SkiBinding::Setting
399
- range: !ruby/range 271..290
402
+ shoe_size_range: !ruby/range 271..290
400
403
  z_value: 8.5
401
- turning_moment: *turning_moment
402
- forward_pressure: *forward_pressure
404
+ twist: *turning_moment
405
+ forward_lean: *forward_lean
403
406
  - !ruby/object:SkiBinding::Setting
404
- range: !ruby/range 291..310
407
+ shoe_size_range: !ruby/range 291..310
405
408
  z_value: 8
406
- turning_moment: *turning_moment
407
- forward_pressure: *forward_pressure
409
+ twist: *turning_moment
410
+ forward_lean: *forward_lean
408
411
  - !ruby/object:SkiBinding::Setting
409
- range: !ruby/range 311..330
412
+ shoe_size_range: !ruby/range 311..330
410
413
  z_value: 7
411
- turning_moment: *turning_moment
412
- forward_pressure: *forward_pressure
414
+ twist: *turning_moment
415
+ forward_lean: *forward_lean
413
416
  - !ruby/object:SkiBinding::Setting
414
- range: !ruby/range
417
+ shoe_size_range: !ruby/range
415
418
  begin: 331
416
419
  end: .inf
417
420
  z_value: 6.5
418
- turning_moment: *turning_moment
419
- forward_pressure: *forward_pressure
421
+ twist: *turning_moment
422
+ forward_lean: *forward_lean
420
423
  -
421
424
  - !ruby/object:SkiBinding::Setting
422
- range: !ruby/range 1..250
425
+ shoe_size_range: !ruby/range 1..250
423
426
  z_value: 3.5
424
- turning_moment: &turning_moment 78
425
- forward_pressure: &forward_pressure 320
427
+ twist: &turning_moment 78
428
+ forward_lean: &forward_lean 320
426
429
  - !ruby/object:SkiBinding::Setting
427
- range: !ruby/range 251..270
430
+ shoe_size_range: !ruby/range 251..270
428
431
  z_value: 7.5
429
- turning_moment: *turning_moment
430
- forward_pressure: *forward_pressure
432
+ twist: *turning_moment
433
+ forward_lean: *forward_lean
431
434
  - !ruby/object:SkiBinding::Setting
432
- range: !ruby/range 271..290
435
+ shoe_size_range: !ruby/range 271..290
433
436
  z_value: 10
434
- turning_moment: *turning_moment
435
- forward_pressure: *forward_pressure
437
+ twist: *turning_moment
438
+ forward_lean: *forward_lean
436
439
  - !ruby/object:SkiBinding::Setting
437
- range: !ruby/range 291..310
440
+ shoe_size_range: !ruby/range 291..310
438
441
  z_value: 9.5
439
- turning_moment: *turning_moment
440
- forward_pressure: *forward_pressure
442
+ twist: *turning_moment
443
+ forward_lean: *forward_lean
441
444
  - !ruby/object:SkiBinding::Setting
442
- range: !ruby/range 311..330
445
+ shoe_size_range: !ruby/range 311..330
443
446
  z_value: 8.5
444
- turning_moment: *turning_moment
445
- forward_pressure: *forward_pressure
447
+ twist: *turning_moment
448
+ forward_lean: *forward_lean
446
449
  - !ruby/object:SkiBinding::Setting
447
- range: !ruby/range
450
+ shoe_size_range: !ruby/range
448
451
  begin: 331
449
452
  end: .inf
450
453
  z_value: 8
451
- turning_moment: *turning_moment
452
- forward_pressure: *forward_pressure
454
+ twist: *turning_moment
455
+ forward_lean: *forward_lean
453
456
  -
454
457
  - !ruby/object:SkiBinding::Setting
455
- range: !ruby/range 1..250
458
+ shoe_size_range: !ruby/range 1..250
456
459
  z_value: 3.5
457
- turning_moment: &turning_moment 91
458
- forward_pressure: &forward_pressure 380
460
+ twist: &turning_moment 91
461
+ forward_lean: &forward_lean 380
459
462
  - !ruby/object:SkiBinding::Setting
460
- range: !ruby/range 251..270
463
+ shoe_size_range: !ruby/range 251..270
461
464
  z_value: 7.5
462
- turning_moment: *turning_moment
463
- forward_pressure: *forward_pressure
465
+ twist: *turning_moment
466
+ forward_lean: *forward_lean
464
467
  - !ruby/object:SkiBinding::Setting
465
- range: !ruby/range 271..290
468
+ shoe_size_range: !ruby/range 271..290
466
469
  z_value: 11.5
467
- turning_moment: *turning_moment
468
- forward_pressure: *forward_pressure
470
+ twist: *turning_moment
471
+ forward_lean: *forward_lean
469
472
  - !ruby/object:SkiBinding::Setting
470
- range: !ruby/range 291..310
473
+ shoe_size_range: !ruby/range 291..310
471
474
  z_value: 11
472
- turning_moment: *turning_moment
473
- forward_pressure: *forward_pressure
475
+ twist: *turning_moment
476
+ forward_lean: *forward_lean
474
477
  - !ruby/object:SkiBinding::Setting
475
- range: !ruby/range 311..330
478
+ shoe_size_range: !ruby/range 311..330
476
479
  z_value: 10
477
- turning_moment: *turning_moment
478
- forward_pressure: *forward_pressure
480
+ twist: *turning_moment
481
+ forward_lean: *forward_lean
479
482
  - !ruby/object:SkiBinding::Setting
480
- range: !ruby/range
483
+ shoe_size_range: !ruby/range
481
484
  begin: 331
482
485
  end: .inf
483
486
  z_value: 9.5
484
- turning_moment: *turning_moment
485
- forward_pressure: *forward_pressure
487
+ twist: *turning_moment
488
+ forward_lean: *forward_lean
@@ -1,4 +1,4 @@
1
- require 'calculator/config_loader'
1
+ require 'ski_binding_calculator/config_loader'
2
2
 
3
3
  class SkiBinding::Calculator
4
4
  extend SkiBinding::ConfigLoader
@@ -29,9 +29,11 @@ class SkiBinding::Calculator
29
29
  def self.binding_setting(code, person)
30
30
  settings = self.load_binding_settings(code)
31
31
  settings.each do |s|
32
- return {"z_value" => s.z_value,
33
- "turning_moment" => s.turning_moment,
34
- "forward_pressure" => s.forward_pressure} if s.range.include?(person.shoe_size)
32
+ if s.shoe_size_range.include?(person.shoe_size)
33
+ return {"z_value" => s.z_value,
34
+ "twist" => s.twist,
35
+ "forward_lean" => s.forward_lean}
36
+ end
35
37
  end
36
38
  end
37
39
  end
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ class SkiBinding::Setting
2
+ attr_reader :shoe_size_range , :z_value, :twist, :forward_lean
3
+ end
@@ -1,6 +1,6 @@
1
- require 'ski_binding'
2
- require 'calculator/calculator'
3
- require 'calculator/config_loader'
4
- require 'calculator/code'
5
- require 'calculator/setting'
6
- require 'person'
1
+ require 'ski_binding_calculator/ski_binding'
2
+ require 'ski_binding_calculator/calculator'
3
+ require 'ski_binding_calculator/config_loader'
4
+ require 'ski_binding_calculator/code'
5
+ require 'ski_binding_calculator/setting'
6
+ require 'ski_binding_calculator/person'
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'ski_binding_calculator'
4
- s.version = '0.5.1'
5
- s.date = '2013-08-04'
4
+ s.version = '0.5.2'
5
+ s.date = '2013-08-05'
6
6
  s.summary = "Ski Binding Calculator"
7
- s.description = "calculate the z-value, forward pressure and turing
7
+ s.description = "calculate the z-value, forward pressure and turning
8
8
  moment according to ISO 11088."
9
9
  s.authors = ["Jonas Ruef, Felix Langenegger"]
10
10
  s.email = 'support@fadendaten.ch'
@@ -8,30 +8,16 @@ describe SkiBinding::Calculator do
8
8
  @person = SkiBinding::Person.new(hash)
9
9
  end
10
10
 
11
- describe "new" do
11
+ describe "#new" do
12
12
  it "returns a BindingCalculator class" do
13
13
  SkiBinding::Calculator.new.class.should == SkiBinding::Calculator
14
14
  end
15
15
  end
16
16
 
17
- describe "config loader" do
18
- it "responds to binding_settings" do
19
- SkiBinding::Calculator.should respond_to :setting
20
- end
21
-
22
- it "responds to binding_codes" do
23
- SkiBinding::Calculator.should respond_to :binding_code
24
- end
25
-
26
- it "responds to binding_settings" do
27
- SkiBinding::Calculator.should respond_to :binding_setting
28
- end
29
- end
30
-
31
17
  describe "#setting" do
32
18
  it "returns a valid setting" do
33
19
  SkiBinding::Calculator.setting(@person).should ==
34
- {"z_value"=>6, "turning_moment"=>58, "forward_pressure"=>229}
20
+ {"z_value"=>6, "twist"=>58, "forward_lean"=>229}
35
21
  end
36
22
  end
37
23
 
@@ -40,17 +26,30 @@ describe SkiBinding::Calculator do
40
26
  SkiBinding::Calculator.binding_code(@person).should == 11
41
27
  end
42
28
 
43
- it "returns code one less than before if age >= 50" do
44
- hash = {:type => "Type2", :weight => 70,
45
- :height => 170, :shoe_size => 315, :age => 50}
46
- @person = SkiBinding::Person.new(hash)
47
- SkiBinding::Calculator.binding_code(@person).should == 10
48
- hash[:age] = 51
49
- @person = SkiBinding::Person.new(hash)
50
- SkiBinding::Calculator.binding_code(@person).should == 10
29
+ context "returns code one less if age >= 50" do
30
+ before :each do
31
+ @code = SkiBinding::Calculator.binding_code(@person)
32
+ end
33
+
34
+ it "age is 50" do
35
+ hash = {:type => "Type2", :weight => 70,
36
+ :height => 170, :shoe_size => 315, :age => 50}
37
+ person = SkiBinding::Person.new(hash)
38
+ lambda { @code = SkiBinding::Calculator.binding_code(person) }
39
+ .should change{@code}.by(-1)
40
+ end
41
+
42
+ it "age is 51" do
43
+ hash = {:type => "Type2", :weight => 70,
44
+ :height => 170, :shoe_size => 315, :age => 51}
45
+ person = SkiBinding::Person.new(hash)
46
+ lambda { @code = SkiBinding::Calculator.binding_code(person) }
47
+ .should change{@code}.by(-1)
48
+ end
51
49
  end
52
50
 
53
- it "returns code unchanged if weight less than 13kg" do
51
+ it "returns unchanged code if weight less than 13kg" do
52
+ # because we set "Type2" the code would be changed by 1
54
53
  hash = {:type => "Type2", :weight => 12,
55
54
  :height => 147, :shoe_size => 249, :age => 30}
56
55
  @person = SkiBinding::Person.new(hash)
@@ -61,7 +60,7 @@ describe SkiBinding::Calculator do
61
60
  describe "#binding_setting" do
62
61
  it "returns a valid setting" do
63
62
  SkiBinding::Calculator.binding_setting(11, @person).should ==
64
- {"z_value"=>6, "turning_moment"=>58, "forward_pressure"=>229}
63
+ {"z_value"=>6, "twist"=>58, "forward_lean"=>229}
65
64
  end
66
65
  end
67
66
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe SkiBinding::Code do
4
- describe "new" do
4
+ describe "#new" do
5
5
  it "should return a Code class" do
6
6
  SkiBinding::Code.new.class.should == SkiBinding::Code
7
7
  end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe "ConfigLoader" do
4
4
 
5
5
  before(:all) do
6
- @range = 0..14 #cause 14 codes
6
+ @range = 0..14 #cause 15 codes
7
7
  @dummy_class = DummyClass.new
8
8
  @dummy_class.extend(SkiBinding::ConfigLoader)
9
9
  end
@@ -2,10 +2,14 @@ require 'spec_helper'
2
2
 
3
3
  describe SkiBinding::Person do
4
4
  before :all do
5
- @hash = {:type => "Type2", :weight => 70, :height => 170, :shoe_size => 315, :age => 30}
5
+ @hash = {:type => "Type2",
6
+ :weight => 70,
7
+ :height => 170,
8
+ :shoe_size => 315,
9
+ :age => 30}
6
10
  end
7
11
 
8
- describe "new" do
12
+ describe "#new" do
9
13
  it "should return a Person class" do
10
14
  SkiBinding::Person.new(@hash).class.should == SkiBinding::Person
11
15
  end
@@ -41,7 +45,14 @@ describe SkiBinding::Person do
41
45
  @person.type.should == 1
42
46
  end
43
47
 
44
- it "sets type \"unknown\" to nil"
48
+ it "sets type \"unknown\" to nil" do
49
+ hash = {:type => "unknown",
50
+ :weight => 70,
51
+ :height => 170,
52
+ :shoe_size => 315,
53
+ :age => 30}
54
+ SkiBinding::Person.new(hash).type.should == nil
55
+ end
45
56
  end
46
57
  end
47
58
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe SkiBinding::Setting do
4
- describe "new" do
4
+ describe "#new" do
5
5
  it "should return a Setting class" do
6
6
  SkiBinding::Setting.new.class.should == SkiBinding::Setting
7
7
  end
@@ -12,20 +12,20 @@ describe SkiBinding::Setting do
12
12
  @setting = SkiBinding::Setting.new
13
13
  end
14
14
 
15
- it "has attribute range" do
16
- @setting.should respond_to :range
15
+ it "has attribute shoe_size_range" do
16
+ @setting.should respond_to :shoe_size_range
17
17
  end
18
18
 
19
19
  it "has attribute z_value" do
20
20
  @setting.should respond_to :z_value
21
21
  end
22
22
 
23
- it "has attribute turning_moment" do
24
- @setting.should respond_to :turning_moment
23
+ it "has attribute twist" do
24
+ @setting.should respond_to :twist
25
25
  end
26
26
 
27
- it "has attribute forward_pressure" do
28
- @setting.should respond_to :forward_pressure
27
+ it "has attribute forward_lean" do
28
+ @setting.should respond_to :forward_lean
29
29
  end
30
30
  end
31
31
  end
data/spec/spec_helper.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  require 'rubygems'
2
2
  require 'spork'
3
+ require 'simplecov'
3
4
 
4
5
  Spork.prefork do
5
6
  require 'rspec'
6
- require 'simplecov'
7
7
  SimpleCov.start
8
8
 
9
9
  unless defined?(SPEC_ROOT)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ski_binding_calculator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-04 00:00:00.000000000 Z
12
+ date: 2013-08-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -59,7 +59,7 @@ dependencies:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.7.1
62
- description: ! "calculate the z-value, forward pressure and turing\n moment
62
+ description: ! "calculate the z-value, forward pressure and turning\n moment
63
63
  according to ISO 11088."
64
64
  email: support@fadendaten.ch
65
65
  executables: []
@@ -68,18 +68,18 @@ extra_rdoc_files: []
68
68
  files:
69
69
  - config/binding_codes.yml
70
70
  - config/binding_settings.yml
71
- - lib/calculator/calculator.rb
72
- - lib/calculator/code.rb
73
- - lib/calculator/config_loader.rb
74
- - lib/calculator/setting.rb
75
- - lib/person.rb
76
- - lib/ski_binding.rb
71
+ - lib/ski_binding_calculator/calculator.rb
72
+ - lib/ski_binding_calculator/code.rb
73
+ - lib/ski_binding_calculator/config_loader.rb
74
+ - lib/ski_binding_calculator/person.rb
75
+ - lib/ski_binding_calculator/setting.rb
76
+ - lib/ski_binding_calculator/ski_binding.rb
77
77
  - lib/ski_binding_calculator.rb
78
- - spec/calculator_spec.rb
79
- - spec/code_spec.rb
80
- - spec/config_loader_spec.rb
81
- - spec/person_spec.rb
82
- - spec/setting_spec.rb
78
+ - spec/lib/calculator_spec.rb
79
+ - spec/lib/code_spec.rb
80
+ - spec/lib/config_loader_spec.rb
81
+ - spec/lib/person_spec.rb
82
+ - spec/lib/setting_spec.rb
83
83
  - spec/spec_helper.rb
84
84
  - Rakefile
85
85
  - ski_binding_calculator.gemspec
@@ -1,3 +0,0 @@
1
- class SkiBinding::Setting
2
- attr_reader :range , :z_value, :turning_moment, :forward_pressure
3
- end