Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

oldfartdeveloper/activerecord-activesalesforce-adapter

 
 

Repository files navigation

== ATTENTION!

This repo is archived.

== Welcome to Active Salesforce

  ActiveSalesforce is an extension to the Rails Framework that allows for the dynamic creation and management of 
  ActiveRecord objects through the use of Salesforce meta-data and uses a Salesforce.com organization as the backing store.

== Status

  This version is "tuned" towards Rails 2.2.2.  Other Rails releases haven't yet been tested.  The gem also depends upon builder; I'm using version 2.1.2.

  All unit tests pass except the following errors:

    test_batch_insert (wrong number of arguments (2 for 0))
    test_find_addresses (INVALID_TYPE: sObject type 'Address__c' is not supported)
    test_master_detail(INVALID_TYPE: sObject type 'Department__c' is not supported)

  I'm currently working towards debugging these anomalies but wanted to put the present fixes "up there".

== Getting started

Note: these are "edge" instructions for building and installing this version:

1. git clone git://github.com/oldfartdeveloper/activerecord-activesalesforce-adapter.git
2. cd into the new directory created by the git command above.
3. gem build activerecord-activesalesforce-adapter.gemspec.
4. gem install activerecord-activesalesforce-adapter-2.2.2.gem
5. if you have not already done so, generate your initial rails app using "rails <myappname goes here>" 
6. edit database.yml:

		adapter: activesalesforce
  		url: https://login.salesforce.com/services/Soap/u/16.0
  		username: <salesforce user name goes here>
  		password: <salesforce password goes here>
  		
  		NOTE: Since this isn't (completely) working software, I presume this is your "test" account.  DON'T use this on your production account.

7. If you are (also) debugging using the unit tests provided by the package, then update the following file similarly to the above:

		test/unit/config.yml
  		
8. proceed using standard Rails development techniques!  	

== Advanced Features

(oldfartdeveloper note: I haven't specifically tested these.)

  1. Session ID based Authentication: Add the following to /app/controllers/application.rb to enable SID auth for all controllers
  
  		class ApplicationController < ActionController::Base
  			before_filter ActiveSalesforce::SessionIDAuthenticationFilter
		end
		
  2. Boxcar'ing of updates, inserts, and deletes. Use <YourModel>.transaction() to demark boxcar boundaries.

== Description of contents

lib
  Application specific libraries. Basically, any kind of custom code that doesn't
  belong under controllers, models, or helpers. This directory is in the load path.
  
script
  Helper scripts for automation and generation.

test
  Unit and functional tests along with fixtures.

About

An ActiveRecord adapter for the Salesforce.com API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%