forbes-finder 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CONTRIBUTING.md +10 -2
- data/README.md +42 -12
- data/VERSION +1 -1
- data/forbes-finder.gemspec +3 -2
- data/lib/data/2012/walmartstores.com.toml +3 -0
- metadata +4 -3
data/CONTRIBUTING.md
CHANGED
@@ -2,7 +2,15 @@
|
|
2
2
|
|
3
3
|
## Creating aliases / subsidiaries
|
4
4
|
|
5
|
-
|
5
|
+
In this example, there's a file called `ebayinc.com.toml` with the following contents:
|
6
|
+
|
7
|
+
```toml
|
8
|
+
name = "eBay"
|
9
|
+
domain = "ebayinc.com"
|
10
|
+
rank = 322
|
11
|
+
```
|
12
|
+
|
13
|
+
That file ensures that `ebayinc.com` will be recognized as a Forbes 2000 company. To ensure that `paypal.com` and `ebay.com` are both recognized, we'll need to add two additional files `ebay.com.toml` and `paypal.com.toml` that are symlinks to `ebayinc.com.toml`:
|
6
14
|
|
7
15
|
```
|
8
16
|
cd lib/data/2012
|
@@ -20,4 +28,4 @@ git push origin master
|
|
20
28
|
* Start a feature/bugfix branch.
|
21
29
|
* Commit and push until you are happy with your contribution.
|
22
30
|
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
23
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
31
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
data/README.md
CHANGED
@@ -2,7 +2,18 @@ The Forbes Global 2000 is an annual ranking of the top 2000 public companies in
|
|
2
2
|
|
3
3
|
# Installation
|
4
4
|
|
5
|
-
|
5
|
+
This is a Ruby gem, so you'll need a little Ruby-fu to get it working.
|
6
|
+
|
7
|
+
```
|
8
|
+
gem install forbes-finder
|
9
|
+
```
|
10
|
+
|
11
|
+
Or add this to your `Gemfile`:
|
12
|
+
|
13
|
+
```
|
14
|
+
gem 'forbes-finder', '~> 0.1.1'
|
15
|
+
```
|
16
|
+
|
6
17
|
|
7
18
|
# Usage
|
8
19
|
|
@@ -20,25 +31,44 @@ record.rank
|
|
20
31
|
It'll handle email addresses and URLs with all sorts of subdomains, parameters, etc.
|
21
32
|
|
22
33
|
```ruby
|
23
|
-
|
24
|
-
# =>
|
34
|
+
ForbesFinder::lookup('https://developer.apple.com/devcenter/ios/checklist/').rank
|
35
|
+
# => 22
|
25
36
|
|
26
|
-
|
27
|
-
# =>
|
37
|
+
ForbesFinder::lookup('www.chevron.com').rank
|
38
|
+
# => 12
|
28
39
|
|
29
|
-
|
30
|
-
#
|
40
|
+
ForbesFinder::lookup('william.gates@microsoft.com').rank
|
41
|
+
# 42
|
31
42
|
|
32
|
-
|
33
|
-
|
43
|
+
```
|
44
|
+
|
45
|
+
It'll also work with aliases or subsidiaries, but I'll need *your* help (see [contribution guidelines](/CONTRIBUTING.md) if you're interested).
|
34
46
|
|
35
|
-
|
36
|
-
|
47
|
+
```ruby
|
48
|
+
ForbesFinder::lookup('ebayinc.com').rank
|
49
|
+
# => 322
|
50
|
+
ForbesFinder::lookup('ebayinc.com').alias
|
51
|
+
# => false
|
52
|
+
|
53
|
+
ForbesFinder::lookup('ebay.com').rank
|
54
|
+
# => 322
|
55
|
+
ForbesFinder::lookup('ebay.com').alias
|
56
|
+
# => 322
|
57
|
+
|
58
|
+
ForbesFinder::lookup('paypal.com').rank
|
59
|
+
# => 322
|
60
|
+
ForbesFinder::lookup('paypal.com').alias
|
61
|
+
# => true
|
62
|
+
ForbesFinder::lookup('paypal.com').name
|
63
|
+
# => eBay
|
64
|
+
ForbesFinder::lookup('paypal.com').domain
|
65
|
+
# => ebayinc.com
|
37
66
|
```
|
38
67
|
|
39
68
|
# Limitations
|
40
69
|
|
41
|
-
* There may be cases when the company you're lookup up is a subsidiary of a Forbes 2000 company that has a different domain name.
|
70
|
+
* There may be cases when the company you're lookup up is a subsidiary of a Forbes 2000 company that has a different domain name e.g. eBay is a Forbes 2000 company identified primarily with `ebayinc.com`, but has many associated domains / subsidiaries like `ebay.com` and `paypal.com`. Using the power of Git, GitHub and TOML you can identify those relationships - please read the [contribution guidelines](/CONTRIBUTING.md) if you'd like to help.
|
71
|
+
|
42
72
|
|
43
73
|
**Data source(s):**
|
44
74
|
* http://www.forbes.com/global2000/list/
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/forbes-finder.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "forbes-finder"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Lee Reilly"]
|
12
|
-
s.date = "2013-03-
|
12
|
+
s.date = "2013-03-07"
|
13
13
|
s.description = "Look up Forbes 2000 companies based on a domain name or email address"
|
14
14
|
s.email = "lee@leereilly.net"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -1838,6 +1838,7 @@ Gem::Specification.new do |s|
|
|
1838
1838
|
"lib/data/2012/wacker.com.toml",
|
1839
1839
|
"lib/data/2012/walgreens.com.toml",
|
1840
1840
|
"lib/data/2012/walmart.com.toml",
|
1841
|
+
"lib/data/2012/walmartstores.com.toml",
|
1841
1842
|
"lib/data/2012/want-want.com.toml",
|
1842
1843
|
"lib/data/2012/wartsila.com.toml",
|
1843
1844
|
"lib/data/2012/waters.com.toml",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forbes-finder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: public_suffix
|
@@ -1920,6 +1920,7 @@ files:
|
|
1920
1920
|
- lib/data/2012/wacker.com.toml
|
1921
1921
|
- lib/data/2012/walgreens.com.toml
|
1922
1922
|
- lib/data/2012/walmart.com.toml
|
1923
|
+
- lib/data/2012/walmartstores.com.toml
|
1923
1924
|
- lib/data/2012/want-want.com.toml
|
1924
1925
|
- lib/data/2012/wartsila.com.toml
|
1925
1926
|
- lib/data/2012/waters.com.toml
|
@@ -2026,7 +2027,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2026
2027
|
version: '0'
|
2027
2028
|
segments:
|
2028
2029
|
- 0
|
2029
|
-
hash:
|
2030
|
+
hash: 2526135352681628838
|
2030
2031
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2031
2032
|
none: false
|
2032
2033
|
requirements:
|