fortune-finder 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,31 @@
1
+ # Contributing to Fortune Finder
2
+
3
+ ## Creating aliases / subsidiaries
4
+
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 = 228
11
+ ```
12
+
13
+ That file ensures that `ebayinc.com` will be recognized as a Fortune 500 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`:
14
+
15
+ ```
16
+ cd lib/data/2012
17
+ ln -s ebayinc.com.toml ebay.com.toml
18
+ git add ebay.com.toml
19
+ git commit -m "Add alias for ebay.com"
20
+ git push origin master
21
+ ```
22
+
23
+ ## General Guidelines
24
+
25
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
26
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
27
+ * Fork the project.
28
+ * Start a feature/bugfix branch.
29
+ * Commit and push until you are happy with your contribution.
30
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
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
@@ -1,38 +1,79 @@
1
- fortune-finder
2
- ==============
1
+ The Fortune 500 is an annual list compiled and published by Fortune magazine that ranks the top 500 U.S. corporations as ranked by their gross revenue after various adjustments are made. Use this gem to look up Fortune 500 companies based on a domain name or email address and generare reports / say things like...
3
2
 
4
- The Fortune 500 is an annual list compiled and published by Fortune magazine that ranks the top 500 U.S. closely held and public corporations as ranked by their gross revenue after adjustments made by Fortune to exclude the impact of excise taxes companies incur. The list includes publicly and privately held companies for which revenues are publicly available. Use this gem to ook up Fortune 500 companies based on a domain name or email address.
3
+ > :bar_chart: Over **25%** of the **Fortune 500** are using our product
4
+
5
+ > :chart_with_upwards_trend: We have customers in **all** of the **Fortune 100** companies
5
6
 
6
7
  # Installation
7
8
 
8
- `gem install fortune-finder`
9
+ This is a Ruby gem, so you'll need a little Ruby-fu to get it working.
10
+
11
+ ```
12
+ gem install fortune-finder
13
+ ```
14
+
15
+ Or add this to your `Gemfile`:
16
+
17
+ ```
18
+ gem 'fortune-finder', '~> 0.1.1'
19
+ ```
9
20
 
10
21
  # Usage
11
22
 
12
23
  ```ruby
13
24
 
14
- Fortune::lookup 'exxonmobil.com'
15
- # => {:rank => 1, :name => 'Exxon Mobil'}
25
+ record = FortuneFinder::lookup 'exxonmobil.com'
26
+ # => <FortuneFinder::Record:0x007fca82a46060>
16
27
 
17
- Fortune::lookup 'www.weir.co.uk'
18
- # => {:rank => 1749, :name => 'Weir Group'}
28
+ record.name
29
+ # => "Exxon Mobil"
19
30
 
20
- Fortune::lookup 'william.gates@microsoft.com'
21
- # => {:rank => 42, :name => 'Microsoft'}
31
+ record.rank
32
+ # => 1
22
33
 
23
- Fortune::lookup 'https://developer.apple.com/devcenter/ios/checklist/'
24
- # => {:rank => 22, :name => 'Microsoft'}
34
+ record.alias
35
+ # => false
36
+ ```
37
+
38
+ It'll work with email addresses, subdomains and more e.g.
39
+
40
+ ```ruby
41
+ FortuneFinder::lookup('www.oracle.co.uk').rank
42
+ # => 82
25
43
 
26
- Fortune::lookup 'UltraInfoMegaTechCorp.com'
27
- # => nil
44
+ FortuneFinder::lookup('william.gates@microsoft.com').rank
45
+ # 37
28
46
 
29
- Fortune::lookup 'POTATO!'
30
- # => nil
47
+ FortuneFinder::lookup('https://developer.apple.com/devcenter/ios/checklist/').rank
48
+ # => 17
49
+ ```
50
+
51
+ It'll also work with aliases or subsidiaries, but I'll need *your* help (see [contribution guidelines](/CONTRIBUTING.md) if you're interested).
52
+
53
+ ```ruby
54
+ FortuneFinder::lookup('ebayinc.com').rank
55
+ # => 228
56
+ FortuneFinder::lookup('ebayinc.com').alias
57
+ # => false
58
+
59
+ FortuneFinder::lookup('ebay.com').rank
60
+ # => 228
61
+ FortuneFinder::lookup('ebay.com').alias
62
+ # => true
63
+
64
+ FortuneFinder::lookup('paypal.com').rank
65
+ # => 228
66
+ FortuneFinder::lookup('paypal.com').alias
67
+ # => true
68
+ FortuneFinder::lookup('paypal.com').name
69
+ # => eBay
70
+ FortuneFinder::lookup('paypal.com').domain
71
+ # => ebayinc.com
31
72
  ```
32
73
 
33
74
  # Limitations
34
75
 
35
- * There may be cases when the company you're lookup up is a subsidiary of a Fortune 500 company that has a different domain name.
76
+ * There may be cases where the company you're looking up up is a subsidiary of a Fortune 500 company that has a different domain name e.g. eBay is a Fortune 500 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 help identify those relationships. Please read the [contribution guidelines](/CONTRIBUTING.md) if you'd like to help.
36
77
 
37
78
  **Data source(s):**
38
79
  * http://money.cnn.com/magazines/fortune/fortune500/2012/full_list/
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fortune-finder"
8
- s.version = "0.1.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-06"
12
+ s.date = "2013-03-07"
13
13
  s.description = "Look up Fortune 500 companies based on a domain name or email address"
14
14
  s.email = "lee@leereilly.net"
15
15
  s.extra_rdoc_files = [
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
17
17
  "README.md"
18
18
  ]
19
19
  s.files = [
20
+ "CONTRIBUTING.md",
20
21
  "Gemfile",
21
22
  "Gemfile.lock",
22
23
  "LICENSE.txt",
@@ -222,6 +223,7 @@ Gem::Specification.new do |s|
222
223
  "lib/data/2012/fisglobal.com.toml",
223
224
  "lib/data/2012/fluor.com.toml",
224
225
  "lib/data/2012/fmctechnologies.com.toml",
226
+ "lib/data/2012/fmr.com.toml",
225
227
  "lib/data/2012/fnf.com.toml",
226
228
  "lib/data/2012/footlocker-inc.com.toml",
227
229
  "lib/data/2012/ford.com.toml",
@@ -503,6 +505,7 @@ Gem::Specification.new do |s|
503
505
  "lib/data/2012/viacom.com.toml",
504
506
  "lib/data/2012/visteon.com.toml",
505
507
  "lib/data/2012/walgreens.com.toml",
508
+ "lib/data/2012/walmart.com.toml",
506
509
  "lib/data/2012/walmartstores.com.toml",
507
510
  "lib/data/2012/wellcare.com.toml",
508
511
  "lib/data/2012/wellpoint.com.toml",
@@ -0,0 +1,3 @@
1
+ name = "Fidelity National Financial"
2
+ domain = "fnf.com"
3
+ rank = 472
@@ -0,0 +1,3 @@
1
+ name = "Wal-Mart Stores"
2
+ domain = "walmartstores.com"
3
+ rank = 2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fortune-finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.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-06 00:00:00.000000000 Z
12
+ date: 2013-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: public_suffix
@@ -115,6 +115,7 @@ extra_rdoc_files:
115
115
  - LICENSE.txt
116
116
  - README.md
117
117
  files:
118
+ - CONTRIBUTING.md
118
119
  - Gemfile
119
120
  - Gemfile.lock
120
121
  - LICENSE.txt
@@ -320,6 +321,7 @@ files:
320
321
  - lib/data/2012/fisglobal.com.toml
321
322
  - lib/data/2012/fluor.com.toml
322
323
  - lib/data/2012/fmctechnologies.com.toml
324
+ - lib/data/2012/fmr.com.toml
323
325
  - lib/data/2012/fnf.com.toml
324
326
  - lib/data/2012/footlocker-inc.com.toml
325
327
  - lib/data/2012/ford.com.toml
@@ -601,6 +603,7 @@ files:
601
603
  - lib/data/2012/viacom.com.toml
602
604
  - lib/data/2012/visteon.com.toml
603
605
  - lib/data/2012/walgreens.com.toml
606
+ - lib/data/2012/walmart.com.toml
604
607
  - lib/data/2012/walmartstores.com.toml
605
608
  - lib/data/2012/wellcare.com.toml
606
609
  - lib/data/2012/wellpoint.com.toml
@@ -646,7 +649,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
646
649
  version: '0'
647
650
  segments:
648
651
  - 0
649
- hash: 1564631666298058868
652
+ hash: -1183525379541759917
650
653
  required_rubygems_version: !ruby/object:Gem::Requirement
651
654
  none: false
652
655
  requirements: