trackerific 0.3.3 → 0.3.4
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/Gemfile +1 -0
- data/Gemfile.lock +4 -0
- data/README.rdoc +2 -2
- data/VERSION +1 -1
- data/lib/trackerific/event.rb +1 -1
- data/lib/trackerific/services/fedex.rb +2 -2
- data/lib/trackerific/services/ups.rb +2 -2
- data/lib/trackerific/services/usps.rb +2 -2
- data/spec/spec_helper.rb +3 -0
- data/trackerific.gemspec +1 -1
- metadata +3 -3
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -97,6 +97,9 @@ GEM
|
|
97
97
|
ruby-debug-base19 (>= 0.11.19)
|
98
98
|
ruby_core_source (0.1.5)
|
99
99
|
archive-tar-minitar (>= 0.5.2)
|
100
|
+
simplecov (0.4.2)
|
101
|
+
simplecov-html (~> 0.4.4)
|
102
|
+
simplecov-html (0.4.5)
|
100
103
|
thor (0.14.6)
|
101
104
|
treetop (1.4.9)
|
102
105
|
polyglot (>= 0.3.1)
|
@@ -118,4 +121,5 @@ DEPENDENCIES
|
|
118
121
|
rspec-rails (>= 2.6.1)
|
119
122
|
rspec_multi_matchers (>= 1.1.0)
|
120
123
|
ruby-debug19 (>= 0.11.6)
|
124
|
+
simplecov (>= 0.4.0)
|
121
125
|
yardstick (>= 0.4.0)
|
data/README.rdoc
CHANGED
@@ -58,7 +58,7 @@ will be able to track the given package id.
|
|
58
58
|
tracking_service "EJ958083578US" # => Trackerific::USPS
|
59
59
|
tracking_service "unknown package id" # => nil
|
60
60
|
|
61
|
-
=== Exception handling
|
61
|
+
=== Exception handling
|
62
62
|
|
63
63
|
Exception handling is esssential for tracking packages. If, for example,
|
64
64
|
you enter the wrong number, or the tracking provider has yet to have added the
|
@@ -72,7 +72,7 @@ example on how to handle Trackerific::Errors:
|
|
72
72
|
end
|
73
73
|
|
74
74
|
== Contributing to trackerific
|
75
|
-
|
75
|
+
|
76
76
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
77
77
|
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
78
78
|
* Fork the project
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.4
|
data/lib/trackerific/event.rb
CHANGED
@@ -2,7 +2,7 @@ module Trackerific
|
|
2
2
|
# Provides details for a tracking event
|
3
3
|
class Event
|
4
4
|
# Provides a new instance of Event
|
5
|
-
# @param [
|
5
|
+
# @param [DateTime] date the date / time of the event
|
6
6
|
# @param [String] description the event's description
|
7
7
|
# @param [String] location where the event took place
|
8
8
|
# @api private
|
@@ -45,8 +45,8 @@ module Trackerific
|
|
45
45
|
)
|
46
46
|
end
|
47
47
|
|
48
|
-
#
|
49
|
-
# @return [Regexp] the regular expression
|
48
|
+
# An Array of Regexp that matches valid FedEx package IDs
|
49
|
+
# @return [Array, Regexp] the regular expression
|
50
50
|
# @api private
|
51
51
|
def self.package_id_matchers
|
52
52
|
[ /^[0-9]{15}$/ ]
|
@@ -37,8 +37,8 @@ module Trackerific
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
#
|
41
|
-
# @return [Regexp] the regular expression
|
40
|
+
# An Array of Regexp that matches valid UPS package IDs.
|
41
|
+
# @return [Array, Regexp] the regular expression
|
42
42
|
# @api private
|
43
43
|
def self.package_id_matchers
|
44
44
|
[ /^.Z/, /^[HK].{10}$/ ]
|
@@ -56,8 +56,8 @@ module Trackerific
|
|
56
56
|
)
|
57
57
|
end
|
58
58
|
|
59
|
-
#
|
60
|
-
# @return [Regexp] the regular expression
|
59
|
+
# An Array of Regexp that matches valid USPS package IDs.
|
60
|
+
# @return [Array, Regexp] the regular expression
|
61
61
|
# @api private
|
62
62
|
def self.package_id_matchers
|
63
63
|
[ /^E\D{1}\d{9}\D{2}$|^9\d{15,21}$/ ]
|
data/spec/spec_helper.rb
CHANGED
data/trackerific.gemspec
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 4
|
9
|
+
version: 0.3.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Travis Haynes
|
@@ -231,7 +231,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
231
231
|
requirements:
|
232
232
|
- - ">="
|
233
233
|
- !ruby/object:Gem::Version
|
234
|
-
hash: -
|
234
|
+
hash: -609317391
|
235
235
|
segments:
|
236
236
|
- 0
|
237
237
|
version: "0"
|