rails-salesforce-connect 0.0.7 → 0.0.8
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.
- checksums.yaml +4 -4
- data/lib/connect/api_adapter.rb +7 -6
- data/lib/tasks/diff_salesforce.rake +4 -2
- data/rails-salesforce-connect.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a43fc7672202430439da64a3615c2a6fe7d5100ed1c6fc1130f1132e67acb992
|
4
|
+
data.tar.gz: 19cd967a6aaa5ea3d6e632e5588efe266f531d36171e6eeb63368f660a39f210
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f18f8bb0fc5f37d18a63bdde95049d1b6b590a59669c598bbce2ce753b46fbb2016c30748381849e93adf70a7bc2b72f8bbe2a9483ce3e1a343005e0e5ea2c77
|
7
|
+
data.tar.gz: 406a100c997a8dd148ac930ed090edcb033c47a552e781259fa866b43be915642f0778d4c8c81b7052471a638bf73625c17af8a8860a3dd5f147cc55884faca2
|
data/lib/connect/api_adapter.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
require 'restforce'
|
2
3
|
|
3
4
|
module Connect
|
4
5
|
class ApiAdapter
|
@@ -11,12 +12,12 @@ module Connect
|
|
11
12
|
def client(env=ENV)
|
12
13
|
@client ||= Restforce.new(
|
13
14
|
api_version: env.fetch('API_VERSION', "41.0"),
|
14
|
-
host: env
|
15
|
-
client_id: env
|
16
|
-
client_secret: env
|
17
|
-
username: env
|
18
|
-
password: env
|
19
|
-
security_token: env
|
15
|
+
host: env.fetch("SALESFORCE_REST_API_HOST"),
|
16
|
+
client_id: env.fetch("SALESFORCE_REST_API_CLIENT_ID"),
|
17
|
+
client_secret: env.fetch("SALESFORCE_REST_API_CLIENT_SECRET"),
|
18
|
+
username: env.fetch("SALESFORCE_REST_API_USERNAME"),
|
19
|
+
password: env.fetch("SALESFORCE_REST_API_PASSWORD"),
|
20
|
+
security_token: env.fetch("SALESFORCE_REST_API_SECURITY_TOKEN"),
|
20
21
|
)
|
21
22
|
end
|
22
23
|
end
|
@@ -11,13 +11,15 @@ namespace :salesforce do
|
|
11
11
|
env = ENV
|
12
12
|
outfile = 'salesforce-schema.json'
|
13
13
|
|
14
|
-
if args[:app_name].
|
14
|
+
if args[:app_name] && args[:app_name].length > 0
|
15
15
|
env = Dotenv::Parser.call(`heroku config --app #{args[:app_name]} --shell`)
|
16
16
|
raise "Error fetching heroku config for #{args[:app_name]}" unless $?.success?
|
17
17
|
outfile = "salesforce-schema-#{args[:app_name]}.json"
|
18
18
|
end
|
19
|
+
outfile = ENV.fetch("SCHEMA_FILE", outfile)
|
19
20
|
|
20
|
-
|
21
|
+
require 'connect/api_adapter'
|
22
|
+
description = Connect::ApiAdapter.describe(env).group_by {|e| e["name"] }
|
21
23
|
description.each do |k, v|
|
22
24
|
raise "Expected name to be unique" unless v.one?
|
23
25
|
description[k] = v.first
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# gem 'activerecord'
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'rails-salesforce-connect'
|
4
|
-
s.version = '0.0.
|
4
|
+
s.version = '0.0.8'
|
5
5
|
s.licenses = ['MIT']
|
6
6
|
s.summary = "Tools for using heroku connect with rails"
|
7
7
|
s.description = "Base class for salesforce migrations, activerecord types; deduplication rules aware, and rake tasks to sync schema"
|