You don't need this source code unless you want to modify the gem. If you just want to use the Lobbyist Ruby bindings, you should run:
gem install lobbyist
If you want to build the gem from source:
gem build lobbyist.gemspec
TODO: Get Documentation URL.
Please see ### API DOCUMENTATION URL ### for up-to-date documentation.
If you need to check for the presence of an object returned from Lobbyist you will need to check for the presence of an actual attribute. For example:
company = Lobbyist::V2::Company.find(10000)
company.present? # This will always be true because 'company' is a valid Lobbyist object.
# This is probably what you want. It checks that data was actually returned from the API.
company.company_id.present?
- Ruby 1.9.0 or above.
- faraday, multi-json, activesupport
If you would like to run the tests simply run rspec
in the root of the project.
Open coverage/index.html
to see a code coverage report generated from the test run.
For projects that include Lobbyist as a gem, currently only the Members project, follow these steps to update the lobbyist-ruby gem.
- Clone the lobbyist-ruby project separately.
- Create a branch to make your changes on.
- Make any required changes. (Add classes, methods, attributes, etc.)
- If you added a new class be sure to update
lib/lobbyist.rb
with arequire
statement for the new class. - Bump the
lib/lobbyist/version.rb
patch number. This is required for bundler to detect the update. - Add a note to the CHANGELOG about your changes.
- Commit those changes directly to the lobbyist-ruby branch you created.
- Create a pull request on Github.
Using the changes in the host project.
- Go to the host project.
- Create a branch for your changes.
- Run
bundle update lobbyist-ruby
to force bundler to update the lobbyist gem. - Make any other required changes.
- Commit your changes along with the Gemfile.lock to your branch.
- Create a pull request on Github.
Now lobbyist-ruby needs to be updated on the gem host we use with Semaphore, Gemfury.
- Make a gemfury directory somewhere in your local drive.
- Clone the lobbyist-ruby project into the gemfury directory.
- Build the gemspec,
gem build lobbyist.gemspec
. - Upload the gem to Gemfury,
curl -F package=@lobbyist-ruby-0.#.##.gem https://push.fury.io/P7qkxZzYFkrcJPGnWV43/customerlobby
. Be sure to replace the version and patch numbers.