open-ship 0.1.2 → 0.1.3

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/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ v0.1.3. fixed bug in the sscc check digit
1
2
  v0.1.2. added classes for sorting shipments
2
3
  v0.1.1. changed base filenames for less painful requires
3
4
  v0.1. first version
@@ -46,7 +46,11 @@ module OpenShip
46
46
  sequence[11], sequence[13], sequence[15]]
47
47
  number2 = array2.inject(:+)
48
48
  number3 = number1 + number2
49
- check_digit = (10 - (number3 % 10)).to_s
49
+ check_digit = (10 - (number3 % 10))
50
+ if check_digit == 10
51
+ check_digit = 0
52
+ end
53
+ check_digit.to_s
50
54
  end
51
55
 
52
56
  def self.generate_sscc_id(serial_reference)
data/open-ship.gemspec CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{open-ship}
5
- s.version = "0.1.2"
5
+ s.version = "0.1.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Nathan Smith"]
9
9
  s.cert_chain = ["/Users/nsmith/.ssh/gem-public_cert.pem"]
10
- s.date = %q{2011-05-26}
10
+ s.date = %q{2011-05-27}
11
11
  s.description = %q{A library to make the hard parts of commercial shipping a little easier.}
12
12
  s.email = %q{nathansmith22@gmail.com}
13
13
  s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README", "lib/open-ship.rb", "lib/open-ship/gga4r.rb", "lib/open-ship/gga4r/array_helper.rb", "lib/open-ship/gga4r/gga4r_main.rb", "lib/open-ship/gga4r/version.rb", "lib/open-ship/label.rb", "lib/open-ship/label/carton_label.rb", "lib/open-ship/label/text_label.rb", "lib/open-ship/sortr.rb", "lib/open-ship/sscc.rb"]
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nathan Smith
@@ -35,7 +35,7 @@ cert_chain:
35
35
  aCwdDbQuC7JfdDETk+jeNA==
36
36
  -----END CERTIFICATE-----
37
37
 
38
- date: 2011-05-26 00:00:00 -04:00
38
+ date: 2011-05-27 00:00:00 -04:00
39
39
  default_executable:
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file