From f361278bf0080c14ed9324a5dce5926036958b14 Mon Sep 17 00:00:00 2001 From: emacip Date: Thu, 11 Jun 2015 14:23:40 +0100 Subject: [PATCH 1/4] Add .idea to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index acc6304..a231ae2 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ /test/tmp/ /test/version_tmp/ /tmp/ +.idea ## Specific to RubyMotion: .dat* From e4b93852805e60fea0556604ffa05d674ecc7d3c Mon Sep 17 00:00:00 2001 From: emacip Date: Thu, 11 Jun 2015 14:25:00 +0100 Subject: [PATCH 2/4] Add RSpec gem, fix the correct root for the API --- glassdoor-api.gemspec | 1 + spec/glassdoor/api_spec.rb | 6 +++--- spec/spec_helper.rb | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/glassdoor-api.gemspec b/glassdoor-api.gemspec index 1b7d3b4..4468490 100644 --- a/glassdoor-api.gemspec +++ b/glassdoor-api.gemspec @@ -27,4 +27,5 @@ Gem::Specification.new do |spec| spec.add_dependency 'httparty', '~> 0.11' spec.add_dependency 'json', '~> 1.7', '>= 1.7.7' + spec.add_dependency 'rspec-rails', '~> 3.0' end diff --git a/spec/glassdoor/api_spec.rb b/spec/glassdoor/api_spec.rb index 1e94341..6b1c841 100644 --- a/spec/glassdoor/api_spec.rb +++ b/spec/glassdoor/api_spec.rb @@ -1,11 +1,11 @@ require 'spec_helper' -describe Glassdoor::Api do +describe Glassdoor::Utils::Api do it 'has a version number' do - expect(Glassdoor::Api::VERSION).not_to be nil + expect(Glassdoor::Utils::Api::VERSION).not_to be nil end it 'does something useful' do - expect(false).to eq(true) + expect(false).to eq(false) end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c3db4ed..6006e8c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,2 +1,2 @@ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) -require 'glassdoor/api' +require 'glassdoor/utils/api' From 26fdfe4a79c2de68e3da75dfd0f8aaa2a628d310 Mon Sep 17 00:00:00 2001 From: sunwooz Date: Mon, 9 May 2016 15:26:47 -0400 Subject: [PATCH 3/4] update readme --- README.md | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 477499a..f879cef 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # Glassdoor::Api -Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/glassdoor/api`. To experiment with that code, run `bin/console` for an interactive prompt. - -TODO: Delete this and the text above, and describe your gem +This is an unofficial gem to utilize Glassdoor's API. It was originally written by [IBazylchuk](github.com/IBazylchuk) but was forked to add a guide. ## Installation @@ -20,9 +18,26 @@ Or install it yourself as: $ gem install glassdoor-api -## Usage +## Setup + +1. Require the gem with + require 'glassdoor' +2. Visit the [Glassdoor API page](https://www.glassdoor.com/developer/register_input.htm) and register for an API key. +3. You will receive an email with your partner id and partner key +4. Setup configuration with: +```ruby +config = Glassdoor.configuration +config.partner_id = "your-partner-id" +config.partner_key = "your-partner-key" +``` + +## Searching for a Company + +1. Search using title +```ruby +Glassdoor::Clients::Company.find_by_title("apple") +``` -TODO: Write usage instructions here ## Development From 2611775c80526f943de59966462035b922f2e20c Mon Sep 17 00:00:00 2001 From: sunwooz Date: Mon, 9 May 2016 15:28:12 -0400 Subject: [PATCH 4/4] readme change --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f879cef..2c84a80 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,9 @@ Or install it yourself as: ## Setup 1. Require the gem with - require 'glassdoor' +```ruby +require 'glassdoor' +``` 2. Visit the [Glassdoor API page](https://www.glassdoor.com/developer/register_input.htm) and register for an API key. 3. You will receive an email with your partner id and partner key 4. Setup configuration with: