plu 0.0.2 → 0.0.3

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
2
  SHA1:
3
- metadata.gz: 743dbe0cc78192c3648be30769e0651d074003be
4
- data.tar.gz: be21ba7f142396860ec77932c8537b715d5c9801
3
+ metadata.gz: 40157518d99038db677010d17f3e738939d843ad
4
+ data.tar.gz: 8853ba70c2fb5493c08c697c60fb7a96b27f9d22
5
5
  SHA512:
6
- metadata.gz: 40cb2ab7b13d23725ffdefdbf6c1ea88a3d4019df4f10f0ec81eac32cc036c48ca72409c63c8ce20a55567342b8b948f7830cc4f08feff59198d69bc456b8fbd
7
- data.tar.gz: a5eb118611491dc3cb92eb98f908a2ffac263c7b87e268c9797eb437d49ff6564718e8f4ef57894092c2c30529d29be8266ede5ee92c22a1b97428f4a0bf2c28
6
+ metadata.gz: f5a6a91b74024615c1410a9b3140eade28b8d5f0664bb59beacf54e001b6afa3728cf031d9d2f203129236fb771637e89defe05e53d8692ff6054faa594d99dc
7
+ data.tar.gz: 16a5c593c52a45217066a2604bb2ddf3e0733ac8d3c1728fb8f390eb1efd0ccc9a26de48ab603ad8b1f4467718481fcbe03b15b724bd4fa2b2b909f79c9d8390
data/README.md CHANGED
@@ -32,8 +32,8 @@ PLU.new(2000).valid? # false
32
32
 
33
33
  For PLUs with 5 digits, the first digit has a special meaning: 9 specifies organic, and 8 specifies genetically modified.
34
34
 
35
- 4011 - Bananas
36
- 94011 - Organic bananas
35
+ 4011 - Bananas :banana:
36
+ 94011 - Organic bananas :banana:
37
37
  84011 - Genetically modified bananas
38
38
 
39
39
  ```ruby
@@ -41,6 +41,12 @@ PLU.new(94011).organic? # true
41
41
  PLU.new(84011).gm? # true
42
42
  ```
43
43
 
44
+ ### Retailer Assigned
45
+
46
+ ```ruby
47
+ PLU.new(3170).retailer_assigned? # true
48
+ ```
49
+
44
50
  ## Installation
45
51
 
46
52
  Add this line to your Gemfile:
@@ -65,8 +71,10 @@ bundle
65
71
 
66
72
  ## Contributing
67
73
 
68
- 1. Fork it
69
- 2. Create your feature branch (`git checkout -b my-new-feature`)
70
- 3. Commit your changes (`git commit -am 'Add some feature'`)
71
- 4. Push to the branch (`git push origin my-new-feature`)
72
- 5. Create new Pull Request
74
+ Everyone is encouraged to help improve this project. Here are a few ways you can help:
75
+
76
+ - [Report bugs](https://github.com/ankane/plu/issues)
77
+ - Fix bugs and [submit pull requests](https://github.com/ankane/plu/pulls)
78
+ - Write, clarify, or fix documentation
79
+ - Suggest or add new features
80
+ - Help clean up [data](https://github.com/ankane/plu/blob/master/plu_codes.csv)
data/lib/plu.rb CHANGED
@@ -22,6 +22,10 @@ class PLU
22
22
  modifier == "8"
23
23
  end
24
24
 
25
+ def retailer_assigned?
26
+ name.to_s.start_with?("Retailer Assigned")
27
+ end
28
+
25
29
  # TODO more items
26
30
  def self.all
27
31
  @all ||= begin
@@ -1,3 +1,3 @@
1
1
  class PLU
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -280,7 +280,7 @@ PLU Code,Name
280
280
  3278,Plumcot (interspecific plum)
281
281
  3279,Golden Kiwifruit
282
282
  3280,Jumbo Regular Kiwifruit
283
- 3281,Watermelon Melon
283
+ 3281,Orange Seedless Watermelon
284
284
  3282,Plum/Italian/Saladette/Roma on the vine Tomatoes
285
285
  3283,Honeycrisp Apples
286
286
  3284,Extra Large Red Delicious Apples
@@ -307,7 +307,7 @@ PLU Code,Name
307
307
  3305,Black Currants
308
308
  3306,Medium Charentais Melon
309
309
  3307,Extra Large Charentais Melon
310
- 3308,Watermelon Melon
310
+ 3308,Watermelon
311
311
  3309,Lima Oranges
312
312
  3310,Pera Oranges
313
313
  3311,Curuba/Banana Passion fruit
@@ -419,7 +419,7 @@ PLU Code,Name
419
419
  3417,New Zealand Spinach Spinach
420
420
  3418,Zucchini/Courgette Squash
421
421
  3419,Borage
422
- 3421,3-7 LBS Watermelon Melon
422
+ 3421,Mini Seedless Watermelon
423
423
  3422,InterSpecific Apricots
424
424
  3423,Heirloom Tomatoes
425
425
  3424,Purple/Red Carrots
@@ -492,8 +492,8 @@ PLU Code,Name
492
492
  4028,Pint Strawberries Berries
493
493
  4029,Small Pineapple
494
494
  4030,Regular Kiwifruit
495
- 4031,Watermelon Melon
496
- 4032,Watermelon Melon
495
+ 4031,Seeded Watermelon
496
+ 4032,Seedless Watermelon
497
497
  4033,Small Lemons
498
498
  4034,Large Honeydew/White Honeydew Melon
499
499
  4035,Small Yellow Flesh Nectarine
@@ -548,7 +548,7 @@ PLU Code,Name
548
548
  4085,Large Regular Mushrooms
549
549
  4086,Yellow Zucchini/Gold Bar/Yellow Courgette Squash
550
550
  4087,Plum/Italian/Saladette/Roma Tomatoes
551
- 4088,"Bell, Field Grown Peppers (capsicums)"
551
+ 4088,Red Bell Peppers
552
552
  4089,Bunched Red Radish
553
553
  4090,Regular/Bunched Spinach
554
554
  4091,White Sweet potato/yam/kumara
@@ -789,7 +789,7 @@ PLU Code,Name
789
789
  4328,Limequats
790
790
  4329,Small Honeydew/White Honeydew Melon
791
791
  4330,Mayan Melon
792
- 4331,Mickey Lee Watermelon/Sugarbaby Melon
792
+ 4331,Mickey Lee / Sugar Baby Watermelon
793
793
  4332,Muskmelon Melon
794
794
  4333,Pepino Melon
795
795
  4334,Persian Melon
@@ -798,8 +798,8 @@ PLU Code,Name
798
798
  4337,Saticoy Melon
799
799
  4338,Sharlin Melon
800
800
  4339,Spanish/Tendral Melon
801
- 4340,Watermelon Melon
802
- 4341,Watermelon Melon
801
+ 4340,Yellow Seeded Watermelon
802
+ 4341,Yellow Seedless Watermelon
803
803
  4342,Retailer Assigned (includes pre-cut melons) Melon
804
804
  4343,Retailer Assigned (includes pre-cut melons) Melon
805
805
  4344,Retailer Assigned (includes pre-cut melons) Melon
@@ -7,6 +7,7 @@ class TestPLU < Minitest::Test
7
7
  assert plu.valid?
8
8
  assert !plu.organic?
9
9
  assert !plu.gm?
10
+ assert !plu.retailer_assigned?
10
11
  end
11
12
 
12
13
  def test_organic
@@ -40,4 +41,8 @@ class TestPLU < Minitest::Test
40
41
  assert_kind_of Hash, PLU.all
41
42
  end
42
43
 
44
+ def test_retailer_assigned
45
+ assert PLU.new(3170).retailer_assigned?
46
+ end
47
+
43
48
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
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-09-20 00:00:00.000000000 Z
11
+ date: 2013-12-31 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
19
  version: '1.3'
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
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Price look-up codes made easy
@@ -59,7 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - .gitignore
62
+ - ".gitignore"
63
63
  - Gemfile
64
64
  - LICENSE.txt
65
65
  - README.md
@@ -80,17 +80,17 @@ require_paths:
80
80
  - lib
81
81
  required_ruby_version: !ruby/object:Gem::Requirement
82
82
  requirements:
83
- - - '>='
83
+ - - ">="
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - '>='
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  requirements: []
92
92
  rubyforge_project:
93
- rubygems_version: 2.0.0
93
+ rubygems_version: 2.2.0
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: Price look-up codes made easy