databasedotcom_console 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +6 -0
- data/bin/dbdc +7 -6
- data/lib/databasedotcom_console/version.rb +1 -1
- data/lib/databasedotcom_console.rb +19 -5
- metadata +1 -1
data/README.md
CHANGED
@@ -1 +1,7 @@
|
|
1
|
+
Databasedotcom Console creates an executable called 'dbdc' that wips up an interactive ruby console that is connected to your Salesforce instance.
|
1
2
|
|
3
|
+
If you're tired of using Excel formulas, CSV files or other arduous tools to work with Salesforce data, this is the gem for you.
|
4
|
+
|
5
|
+
The console is Just Plain Ruby(TM) so you can use any ruby methods you want to process your salesforce data. You can of course require other ruby libraries as well.
|
6
|
+
|
7
|
+
For more information about the API available for querying and editing your data, check out https://github.com/heroku/databasedotcom
|
data/bin/dbdc
CHANGED
@@ -5,12 +5,13 @@ require 'irb'
|
|
5
5
|
|
6
6
|
ohnoes = false
|
7
7
|
begin
|
8
|
-
@dbdc = Databasedotcom::Client.new(
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
@dbdc.authenticate( :username => ARGV[1], :password => ARGV[2] )
|
8
|
+
# @dbdc = Databasedotcom::Client.new(
|
9
|
+
# :client_id => '3MVG9QDx8IX8nP5RUXIFbi3L4rSVruiBU4O_ozvkJiU0aGZDBxfsF6XDhngJf6Ha2fDNniyDxpt0Gb9Pp.2Tk',
|
10
|
+
# :client_secret => '7712607496533706277',
|
11
|
+
# :host => ARGV[0]
|
12
|
+
# )
|
13
|
+
# @dbdc.authenticate( :username => ARGV[1], :password => ARGV[2] )
|
14
|
+
@dbdc = DatabasedotcomConsole.new_client(ARGV[0], ARGV[1], ARGV[2])
|
14
15
|
rescue Exception => e
|
15
16
|
ohnoes = true
|
16
17
|
puts "ERROR: #{e.message}"
|
@@ -2,9 +2,23 @@ require "databasedotcom_console/version"
|
|
2
2
|
require "databasedotcom"
|
3
3
|
|
4
4
|
module DatabasedotcomConsole
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
clients = []
|
6
|
+
|
7
|
+
## Return a list of all clients
|
8
|
+
def self.clients
|
9
|
+
clients
|
10
|
+
end
|
11
|
+
|
12
|
+
## Create a new client for use with multiple orgs
|
13
|
+
def self.new_client(host, username, password)
|
14
|
+
client = Databasedotcom::Client.new(
|
15
|
+
:client_id => '3MVG9QDx8IX8nP5RUXIFbi3L4rSVruiBU4O_ozvkJiU0aGZDBxfsF6XDhngJf6Ha2fDNniyDxpt0Gb9Pp.2Tk',
|
16
|
+
:client_secret => '7712607496533706277',
|
17
|
+
:host => host
|
18
|
+
)
|
19
|
+
client.authenticate(:username => username, :password => password)
|
20
|
+
#clients << client
|
21
|
+
client
|
22
|
+
end
|
23
|
+
|
10
24
|
end
|