Fakecrm
TODO: Write a gem description
Installation
Add this line to your application's Gemfile:
gem 'fakecrm', :git => [email protected]:infopark/fakecrm.git
And then execute:
$ bundle
Usage
You can run this gem as standalone server with:
$ fakecrm
For help on running this command execute:
$ fakecrm --help
Another approach is to embed fakecrm directly into your application. The following describes steps neccessary for a rails application.
Assuming you added fakecrm to your application's Gemfile, you need to create an initializer, for example under config/initializers/fakecrm.rb
:
# place your Fakecrm configuration here
Fakecrm::Configuration.silent = true
Infopark::Crm.configure do |configuration|
configuration.url = "http://localhost:#{Fakecrm::Configuration.port}/crm"
configuration.login = "root"
configuration.api_key = "deadbeef"
end
require 'fakecrm/embedded'
Fakecrm. if Rails.env.development? || Rails.env.test?
For available configuration options see the output of the command:
$ fakecrm --help
Notes
Handling attachements is unsupported at the moment.
Testing
To prepare test environment execute (you must only do it once):
$ git submodule init
$ git submodule update
Execute to update test environment:
$ git submodule update
Execute this line to run all tests:
$ rake
Open coverage/index.html
after running the suite to see a detailed report of code coverage.
You can also run only selected test using:
$ TEST=test/crm_connector/account_search_custom_field_test.rb rake
Some bugs only become apparent after the suite has been run two consecutive times. To handle this case execute:
$ rake TWICE=1
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request