abn_search 0.0.1 → 0.0.2
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/README.rdoc +4 -4
- data/abn_search.gemspec +2 -2
- data/lib/abn_search.rb +3 -3
- metadata +6 -9
- data/pkg/abn_search-0.0.1.gem +0 -0
data/README.rdoc
CHANGED
@@ -7,14 +7,14 @@ http://www.abr.business.gov.au/Register.aspx
|
|
7
7
|
|
8
8
|
Simply add the following line to your Gemfile and run bundle install.
|
9
9
|
|
10
|
-
gem '
|
10
|
+
gem 'abn_search'
|
11
11
|
|
12
12
|
= Usage
|
13
13
|
|
14
|
-
require '
|
14
|
+
require 'abn_search'
|
15
15
|
|
16
|
-
abn =
|
17
|
-
=> #<
|
16
|
+
abn = ABNSearch.new("34355893198", "YOUR_GUID_HERE")
|
17
|
+
=> #<ABNSearch:0x0000010109bc38 @errors=[], @abn="34355893198", @WSDL_URL="http://abr.business.gov.au/ABRXMLSearch/AbrXmlSearch.asmx/ABRSearchByABN?", @ABN_LOOKUP_GUID="ac60a98a-fe5e-4a4a-bfcc-bcf30a51e1a9", @name="sony", @entity_type="IND Individual/Sole Trader">
|
18
18
|
|
19
19
|
puts abn.name
|
20
20
|
=> "sony"
|
data/abn_search.gemspec
CHANGED
@@ -3,10 +3,10 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "abn_search"
|
6
|
-
s.version = '0.0.
|
6
|
+
s.version = '0.0.2'
|
7
7
|
s.authors = ["James Martin"]
|
8
8
|
s.email = ["james@visualconnect.net"]
|
9
|
-
s.homepage = "https://github.com/jamsi"
|
9
|
+
s.homepage = "https://github.com/jamsi/abn_search"
|
10
10
|
s.summary = "ABNSearch library for Australian businesses."
|
11
11
|
s.description = "A simple ABN search library for validating and obtaining ABN details from the Australian Business Register."
|
12
12
|
s.rubyforge_project = "abn_search"
|
data/lib/abn_search.rb
CHANGED
@@ -4,7 +4,7 @@ require 'open-uri'
|
|
4
4
|
class ABNSearch
|
5
5
|
|
6
6
|
module Version
|
7
|
-
VERSION = "0.0.
|
7
|
+
VERSION = "0.0.2"
|
8
8
|
end
|
9
9
|
|
10
10
|
attr_accessor :name, :abn, :entity_type, :errors, :guid
|
@@ -12,7 +12,7 @@ class ABNSearch
|
|
12
12
|
def initialize(abn=nil, guid=nil)
|
13
13
|
self.errors = []
|
14
14
|
self.abn = abn unless abn.nil?
|
15
|
-
self.guid =
|
15
|
+
self.guid = guid unless guid.nil?
|
16
16
|
self.search
|
17
17
|
end
|
18
18
|
|
@@ -31,7 +31,7 @@ class ABNSearch
|
|
31
31
|
trading_name = doc.xpath(base_path + '/maintradingname/organisationname')
|
32
32
|
main_name = doc.xpath(base_path + '/mainname/organisationname')
|
33
33
|
expires = doc.xpath(base_path + '/entitystatus/entitystatuscode')
|
34
|
-
|
34
|
+
|
35
35
|
# Did we find a valid ABN?
|
36
36
|
if abn[0].nil?
|
37
37
|
self.errors << "Invalid ABN number."
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abn_search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
13
|
-
default_executable:
|
12
|
+
date: 2011-10-13 00:00:00.000000000Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: nokogiri
|
17
|
-
requirement: &
|
16
|
+
requirement: &2153391800 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
18
|
requirements:
|
20
19
|
- - ! '>='
|
@@ -22,7 +21,7 @@ dependencies:
|
|
22
21
|
version: '0'
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
24
|
+
version_requirements: *2153391800
|
26
25
|
description: A simple ABN search library for validating and obtaining ABN details
|
27
26
|
from the Australian Business Register.
|
28
27
|
email:
|
@@ -37,9 +36,7 @@ files:
|
|
37
36
|
- Rakefile
|
38
37
|
- abn_search.gemspec
|
39
38
|
- lib/abn_search.rb
|
40
|
-
|
41
|
-
has_rdoc: true
|
42
|
-
homepage: https://github.com/jamsi
|
39
|
+
homepage: https://github.com/jamsi/abn_search
|
43
40
|
licenses: []
|
44
41
|
post_install_message:
|
45
42
|
rdoc_options: []
|
@@ -59,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
56
|
version: '0'
|
60
57
|
requirements: []
|
61
58
|
rubyforge_project: abn_search
|
62
|
-
rubygems_version: 1.
|
59
|
+
rubygems_version: 1.8.11
|
63
60
|
signing_key:
|
64
61
|
specification_version: 3
|
65
62
|
summary: ABNSearch library for Australian businesses.
|
data/pkg/abn_search-0.0.1.gem
DELETED
Binary file
|