plu 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 40157518d99038db677010d17f3e738939d843ad
4
- data.tar.gz: 8853ba70c2fb5493c08c697c60fb7a96b27f9d22
2
+ SHA256:
3
+ metadata.gz: 5ebb5e1cd19eac381d10559e8cc3eb6c677e72b9dbeecd813eaeaa72321c0a3b
4
+ data.tar.gz: f3b708193fdb2c3141773d56119a6f3b962800df765c4e595b56dde55e0f1f7e
5
5
  SHA512:
6
- metadata.gz: f5a6a91b74024615c1410a9b3140eade28b8d5f0664bb59beacf54e001b6afa3728cf031d9d2f203129236fb771637e89defe05e53d8692ff6054faa594d99dc
7
- data.tar.gz: 16a5c593c52a45217066a2604bb2ddf3e0733ac8d3c1728fb8f390eb1efd0ccc9a26de48ab603ad8b1f4467718481fcbe03b15b724bd4fa2b2b909f79c9d8390
6
+ metadata.gz: aab4745787c570015bb83bfa6f4678836725ddda29b981d6cd827a60c0539cb25745dd9c70fb43c4238e1d4b568e92b5dd130d149804f1ebb78acb45788572fd
7
+ data.tar.gz: 9be68fed85be0ea19878fe7299c5b242a3c47111b1a8861bece4f9db7e2128d27db6a070aa83f87785465533abcbfec3c8f3c6b9e3bf93f9c3f18d37d1476c91
@@ -0,0 +1,3 @@
1
+ ## 0.1.0
2
+
3
+ - Added latest PLU codes
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Andrew Kane
1
+ Copyright (c) 2013-2019 Andrew Kane
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # PLU
2
2
 
3
- [Price look-up codes](http://en.wikipedia.org/wiki/Price_look-up_code) made easy
3
+ [Price look-up codes](https://en.wikipedia.org/wiki/Price_look-up_code) made easy
4
4
 
5
5
  :watermelon: 4032
6
6
  :banana: 4011
@@ -61,14 +61,14 @@ And run:
61
61
  bundle
62
62
  ```
63
63
 
64
- ## TODO
65
-
66
- - clean up data
67
-
68
64
  ## Resources
69
65
 
70
66
  - [IFPS 2012 Users Guide](http://www.plucodes.com/docs/Users_Guide_July_2012_FINAL.pdf)
71
67
 
68
+ ## History
69
+
70
+ View the [changelog](https://github.com/ankane/plu/blob/master/CHANGELOG.md)
71
+
72
72
  ## Contributing
73
73
 
74
74
  Everyone is encouraged to help improve this project. Here are a few ways you can help:
data/lib/plu.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require "csv"
2
2
 
3
3
  class PLU
4
-
5
4
  def initialize(number)
6
5
  @number = number.to_s
7
6
  end
@@ -46,5 +45,4 @@ class PLU
46
45
  def modifier
47
46
  @number[-5]
48
47
  end
49
-
50
48
  end
@@ -1,3 +1,3 @@
1
1
  class PLU
2
- VERSION = "0.0.3"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -37,7 +37,7 @@ PLU Code,Name
37
37
  3035,"Large White Flesh, Tree Ripened, Ready-to-eat Nectarine"
38
38
  3036,Small Midknight Oranges
39
39
  3037,Queen Pineapple
40
- 3038,Granadilla/Grenadilla Passion fruit
40
+ 3038,Granadilla Passion fruit
41
41
  3039,Physalis/cape gooseberry/ground cherry
42
42
  3040,Red (skin color) Pitahaya
43
43
  3041,Rambutan
@@ -156,9 +156,9 @@ PLU Code,Name
156
156
  3154,Large Delta Seedless Oranges
157
157
  3155,Medium Midknight Oranges
158
158
  3156,Large Midknight Oranges
159
- 3157,X-Lrg White Grapefruit
160
- 3158,X-Lrg White Grapefruit
161
- 3159,X-Lrg White Grapefruit
159
+ 3157,Extra Large White Grapefruit
160
+ 3158,Extra Large White Grapefruit
161
+ 3159,Extra Large White Grapefruit
162
162
  3160,Synonymous with Chinese Broccoli Gai lan
163
163
  3161,Baby Gai (gui) choy (chinese or indian mustard)
164
164
  3162,Synonymous with Water Spinach Ong choy
@@ -351,7 +351,7 @@ PLU Code,Name
351
351
  3349,Michaelmas Red Apples
352
352
  3350,Small Reine des Reinettes/King of the Pippins Apples
353
353
  3351,Large Reine des Reinettes/King of the Pippins Apples
354
- 3352,"Reinettes and ""Heritage"" varieties Apples"
354
+ 3352,Reinettes and Heritage varieties Apples
355
355
  3353,St Edmunds Pippin Apples
356
356
  3354,Ripe/Ready-to-Eat Avocados
357
357
  3355,Strawberries Berries
@@ -365,7 +365,7 @@ PLU Code,Name
365
365
  3363,Bowen & Kensington Pride Mango
366
366
  3364,R2E2 (ArtwoEetwo) Mango
367
367
  3365,Ripe/Ready-to-Eat Mango
368
- 3366,MadroÑa
368
+ 3366,Madroña
369
369
  3367,Glasshouse - Netted varieties Melon
370
370
  3368,Ogen Melon
371
371
  3369,Nectavigne (Red Flesh) Nectarine
@@ -419,6 +419,7 @@ PLU Code,Name
419
419
  3417,New Zealand Spinach Spinach
420
420
  3418,Zucchini/Courgette Squash
421
421
  3419,Borage
422
+ 3420,Belle du Jumet Pears
422
423
  3421,Mini Seedless Watermelon
423
424
  3422,InterSpecific Apricots
424
425
  3423,Heirloom Tomatoes
@@ -439,6 +440,78 @@ PLU Code,Name
439
440
  3438,Ambrosia Apples
440
441
  3439,White Flesh Flat Nectarine
441
442
  3440,Large Pomegranate
443
+ 3441,Butterkin Squash
444
+ 3442,New York 1 Apples
445
+ 3443,New York 2 Apples
446
+ 3444,Green Dragon Apples
447
+ 3445,DS 3 Apples
448
+ 3446,Kale sprouts
449
+ 3447,DS 22 Apples
450
+ 3448,Tip Top Cherries
451
+ 3449,Sugrathirteen Grapes
452
+ 3450,Sugranineteen Grapes
453
+ 3451,Sugrathirtyfour Grapes
454
+ 3452,Sugrathirtyfive Grapes
455
+ 3453,Galangal root
456
+ 3454,Green Jackfruit
457
+ 3455,Yellow Jackfruit
458
+ 3456,Winter Melon
459
+ 3457,President Plums
460
+ 3458,Cherry Tomatoes
461
+ 3459,Shiny Red Persimmon
462
+ 3460,Red Jonaprince Apples
463
+ 3461,Lady Williams Apples
464
+ 3462,Garlic/Chinese Chives
465
+ 3463,Amaranth/callaloo/een choy
466
+ 3464,B-74 Mango
467
+ 3465,Stripy Bell Peppers (capsicums)
468
+ 3466,Cape Rose Pears
469
+ 3467,Regal 13-82 Apples
470
+ 3468,Small Honeycrisp Apples
471
+ 3469,Sugrasixteen Grapes
472
+ 3470,Watermelon Melon
473
+ 3471,Baby Cactus leaves (nopales/cactus pads)
474
+ 3472,Sacred pepper
475
+ 3473,Epazote
476
+ 3474,Saffron Sweet potato/yam/kumara
477
+ 3475,Peppermint Mint
478
+ 3476,Orange tree leaf
479
+ 3477,Papalo
480
+ 3478,Quelites
481
+ 3479,Chipilin leaf
482
+ 3480,Pumpkin vine
483
+ 3481,Xpelon
484
+ 3482,Rabbit herb
485
+ 3483,Purple herb
486
+ 3484,DALINETTE Apples
487
+ 3485,HAROVIN SUNDOWN PEAR Pears
488
+ 3486,CN121 Apples
489
+ 3487,MN 55 Apples
490
+ 3488,Extra Large Red Mango
491
+ 3489,Cepuna Pears
492
+ 3490,MAIA 1 Apples
493
+ 3491,ARRA FIFTEEN Grapes
494
+ 3492,ARRA TWENTYNINE Grapes
495
+ 3493,Tearless Sweet Onions
496
+ 3494,3-7 LBS Watermelon - Yellow Mini Seedless Melon
497
+ 3495,Celina Pears
498
+ 3496,IFG Core Red Seedless Grapes
499
+ 3497,IFG Core Black Seedless Grapes
500
+ 3498,IFG Core Green Seedless Grapes
501
+ 3499,IFG Novelty Red Seedless Grapes
502
+ 3500,IFG Novelty Black Seedless Grapes
503
+ 3501,IFG Novelty Green Seedless Grapes
504
+ 3502,ARRA TWENTYSEVEN Grapes
505
+ 3503,ARRA TWENTYEIGHT Grapes
506
+ 3504,ARRA THIRTY Grapes
507
+ 3505,ARRA THIRTYTWO Grapes
508
+ 3506,Sweet Scarlet Grapes
509
+ 3507,WA 38 Apples
510
+ 3508,Thomcord Grapes
511
+ 3509,GEM Avocados
512
+ 3510,Small Ambrosia Apples
513
+ 3511,WA 2 Apples
514
+ 3512,Round Tomatoes
442
515
  3600,Antares Apples
443
516
  3601,Huaguan Apples
444
517
  3602,Belgica Apples
@@ -691,7 +764,7 @@ PLU Code,Name
691
764
  4230,Dominique Bananas
692
765
  4231,Green Bananas
693
766
  4232,Leaves Bananas
694
- 4233,Manzano/Apple Bananas
767
+ 4233,Apple/Manzano Bananas
695
768
  4234,Nino Bananas
696
769
  4235,Plantain/Macho Bananas
697
770
  4236,Red Bananas
@@ -747,7 +820,7 @@ PLU Code,Name
747
820
  4286,Sm Deep Red Grapefruit
748
821
  4287,Large Deep Red Grapefruit
749
822
  4288,Large Deep Red Grapefruit
750
- 4289,Lrg Deep Red Grapefruit
823
+ 4289,Large Deep Red Grapefruit
751
824
  4290,Small White Grapefruit
752
825
  4291,Small White Grapefruit
753
826
  4292,Small White Grapefruit
@@ -789,7 +862,7 @@ PLU Code,Name
789
862
  4328,Limequats
790
863
  4329,Small Honeydew/White Honeydew Melon
791
864
  4330,Mayan Melon
792
- 4331,Mickey Lee / Sugar Baby Watermelon
865
+ 4331,Mickey Lee/Sugar Baby Watermelon
793
866
  4332,Muskmelon Melon
794
867
  4333,Pepino Melon
795
868
  4334,Persian Melon
@@ -847,7 +920,6 @@ PLU Code,Name
847
920
  4386,Small Temple Oranges
848
921
  4387,Large Temple Oranges
849
922
  4388,Large Valencia Oranges
850
- 4388,Large Valencia Oranges
851
923
  4389,Retailer Assigned Oranges
852
924
  4390,Retailer Assigned Oranges
853
925
  4391,Retailer Assigned Oranges
@@ -950,12 +1022,12 @@ PLU Code,Name
950
1022
  4488,Retailer Assigned Other fruits
951
1023
  4489,Retailer Assigned Other fruits
952
1024
  4490,Retailer Assigned Other fruits
953
- 4491,X-Lrg Ruby/Red/Pink Grapefruit
954
- 4492,X-Lrg Ruby/Red/Pink Grapefruit
955
- 4493,X-Lrg Ruby/Red/Pink Grapefruit
956
- 4494,X-Lrg Deep Red Grapefruit
957
- 4495,X-Lrg Deep Red Grapefruit
958
- 4496,X-Lrg Deep Red Grapefruit
1025
+ 4491,Extra Large Ruby/Red/Pink Grapefruit
1026
+ 4492,Extra Large Ruby/Red/Pink Grapefruit
1027
+ 4493,Extra Large Ruby/Red/Pink Grapefruit
1028
+ 4494,Extra Large Deep Red Grapefruit
1029
+ 4495,Extra Large Deep Red Grapefruit
1030
+ 4496,Extra Large Deep Red Grapefruit
959
1031
  4497,Sugraone/Autumn Seedless Grapes
960
1032
  4498,White/Green Seedless Grapes
961
1033
  4499,Crimson/Majestic Grapes
@@ -1228,7 +1300,7 @@ PLU Code,Name
1228
1300
  4767,Golden Nugget Squash
1229
1301
  4768,Hubbard Squash
1230
1302
  4769,Kabocha Squash
1231
- 4770,Extra Large Hass Avocados
1303
+ 4770,Hass Avocados
1232
1304
  4771,Medium Green Avocados
1233
1305
  4772,Chili Peppers (capsicums)
1234
1306
  4773,Patty Pan/Summer Squash
@@ -1407,7 +1479,7 @@ PLU Code,Name
1407
1479
  4947,Retailer Assigned Other nuts
1408
1480
  4948,Retailer Assigned Other nuts
1409
1481
  4949,Retailer Assigned Other nuts
1410
- 4950,Retailer Assigned Pears
1482
+ 4950,Retailer Assigned Other nuts
1411
1483
  4951,Retailer Assigned Other nuts
1412
1484
  4952,Retailer Assigned Other nuts
1413
1485
  4953,Retailer Assigned Other nuts
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-31 00:00:00.000000000 Z
11
+ date: 2019-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: '0'
20
20
  type: :development
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: '1.3'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,24 +52,18 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: Price look-up codes made easy
56
- email:
57
- - andrew@chartkick.com
55
+ description:
56
+ email: andrew@chartkick.com
58
57
  executables: []
59
58
  extensions: []
60
59
  extra_rdoc_files: []
61
60
  files:
62
- - ".gitignore"
63
- - Gemfile
61
+ - CHANGELOG.md
64
62
  - LICENSE.txt
65
63
  - README.md
66
- - Rakefile
67
64
  - lib/plu.rb
68
65
  - lib/plu/version.rb
69
- - plu.gemspec
70
66
  - plu_codes.csv
71
- - test/plu_test.rb
72
- - test/test_helper.rb
73
67
  homepage: https://github.com/ankane/plu
74
68
  licenses:
75
69
  - MIT
@@ -82,18 +76,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
82
76
  requirements:
83
77
  - - ">="
84
78
  - !ruby/object:Gem::Version
85
- version: '0'
79
+ version: '2.4'
86
80
  required_rubygems_version: !ruby/object:Gem::Requirement
87
81
  requirements:
88
82
  - - ">="
89
83
  - !ruby/object:Gem::Version
90
84
  version: '0'
91
85
  requirements: []
92
- rubyforge_project:
93
- rubygems_version: 2.2.0
86
+ rubygems_version: 3.0.3
94
87
  signing_key:
95
88
  specification_version: 4
96
89
  summary: Price look-up codes made easy
97
- test_files:
98
- - test/plu_test.rb
99
- - test/test_helper.rb
90
+ test_files: []
data/.gitignore DELETED
@@ -1,17 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in plu.gemspec
4
- gemspec
data/Rakefile DELETED
@@ -1,9 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- task :default => :test
5
- Rake::TestTask.new do |t|
6
- t.libs << "test"
7
- t.pattern = "test/**/*_test.rb"
8
- end
9
-
@@ -1,24 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'plu/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "plu"
8
- spec.version = PLU::VERSION
9
- spec.authors = ["Andrew Kane"]
10
- spec.email = ["andrew@chartkick.com"]
11
- spec.description = %q{Price look-up codes made easy}
12
- spec.summary = %q{Price look-up codes made easy}
13
- spec.homepage = "https://github.com/ankane/plu"
14
- spec.license = "MIT"
15
-
16
- spec.files = `git ls-files`.split($/)
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_development_dependency "bundler", "~> 1.3"
22
- spec.add_development_dependency "rake"
23
- spec.add_development_dependency "minitest"
24
- end
@@ -1,48 +0,0 @@
1
- require_relative "test_helper"
2
-
3
- class TestPLU < Minitest::Test
4
-
5
- def test_plu
6
- plu = PLU.new(4011)
7
- assert plu.valid?
8
- assert !plu.organic?
9
- assert !plu.gm?
10
- assert !plu.retailer_assigned?
11
- end
12
-
13
- def test_organic
14
- assert PLU.new(94011).organic?
15
- end
16
-
17
- def test_gm
18
- assert PLU.new(84011).gm?
19
- end
20
-
21
- def test_invalid
22
- assert !PLU.new(2000).valid?
23
- assert !PLU.new(5000).valid?
24
- assert !PLU.new(400).valid?
25
- assert !PLU.new(40111).valid?
26
- end
27
-
28
- def test_invalid_modifier
29
- assert !PLU.new(74011).valid?
30
- end
31
-
32
- def test_name
33
- assert_equal "Bananas", PLU.new(94011).name
34
- end
35
-
36
- def test_no_name
37
- assert_nil PLU.new(4000).name
38
- end
39
-
40
- def test_all
41
- assert_kind_of Hash, PLU.all
42
- end
43
-
44
- def test_retailer_assigned
45
- assert PLU.new(3170).retailer_assigned?
46
- end
47
-
48
- end
@@ -1,4 +0,0 @@
1
- require "bundler/setup"
2
- Bundler.require(:default)
3
- require "minitest/autorun"
4
- require "minitest/pride"