rails-salesforce-connect 0.0.5 → 0.0.6
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/bin/salesforce-connect +21 -0
- data/lib/tasks/diff_salesforce.rake +10 -3
- data/rails-salesforce-connect.gemspec +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d830c6114bdb26f557e696abe9b86be52fa8e5f82044d5a40eedf605bdc9d15
|
4
|
+
data.tar.gz: 98b0381731ee464e75a557d0fd62f7face50417fba321c14696d75bc956176ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bb7c5f58c719aab9ec64f2c50e8b273e977fc13d4e1e12dedf0be0c9224024da2a997294b58f2fb31703c3d7765c3be577832aafaee1767288b75b1fd4cdb8a
|
7
|
+
data.tar.gz: 5f46305c842eaaf1b7b8c0ef26a2a30752aabc9d3b2a97cf4610804bdc7209475f6d4c27a5e5227d77e423523ee82484a182e65565d32edc1fe76375244fb05e
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Example:
|
4
|
+
#
|
5
|
+
# salesforce-connect rake some-task
|
6
|
+
#
|
7
|
+
# Adapted from StackOverflow solution by N David Brown
|
8
|
+
|
9
|
+
gem_dir = File.expand_path("..", File.dirname(__FILE__))
|
10
|
+
$LOAD_PATH.unshift gem_dir # Look in gem directory for resources first.
|
11
|
+
exec_type = ARGV[0]
|
12
|
+
if exec_type == 'rake' then
|
13
|
+
require 'rake'
|
14
|
+
require 'pp'
|
15
|
+
|
16
|
+
path = File.dirname File.dirname(__FILE__)
|
17
|
+
load "#{path}/lib/tasks/diff_schema.rake"
|
18
|
+
load "#{path}/lib/tasks/diff_salesforce.rake"
|
19
|
+
|
20
|
+
Rake.application.invoke_task(ARGV[1])
|
21
|
+
end
|
@@ -1,9 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
require 'json'
|
3
|
+
require 'bundler'
|
4
|
+
require 'hashdiff'
|
5
|
+
Bundler.require
|
2
6
|
namespace :salesforce do
|
3
7
|
|
4
8
|
namespace :schema do
|
5
9
|
desc "Save the salesforce schema for the given app"
|
6
|
-
task :dump, [:app_name]
|
10
|
+
task :dump, [:app_name] do |_t, args|
|
7
11
|
env = ENV
|
8
12
|
outfile = 'salesforce-schema.json'
|
9
13
|
|
@@ -26,7 +30,7 @@ namespace :salesforce do
|
|
26
30
|
end
|
27
31
|
|
28
32
|
desc "Diff two schema files against one another"
|
29
|
-
task :diff, [:old, :new]
|
33
|
+
task :diff, [:old, :new] do |_t, args|
|
30
34
|
old_h = JSON.parse(File.read(args[:old]))
|
31
35
|
new_h = JSON.parse(File.read(args[:new]))
|
32
36
|
|
@@ -42,7 +46,10 @@ namespace :salesforce do
|
|
42
46
|
diff = true
|
43
47
|
end
|
44
48
|
|
45
|
-
|
49
|
+
removed.each {|k| old_h.delete(k)}
|
50
|
+
added.each {|k| new_h.delete(k)}
|
51
|
+
|
52
|
+
HashDiff.diff(old_h, new_h).each do |sym, key, old, new_val|
|
46
53
|
diff = true
|
47
54
|
case sym
|
48
55
|
when "~"
|
@@ -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.6'
|
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"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-salesforce-connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Heath
|
@@ -106,6 +106,7 @@ files:
|
|
106
106
|
- Gemfile
|
107
107
|
- Rakefile
|
108
108
|
- Readme.md
|
109
|
+
- bin/salesforce-connect
|
109
110
|
- lib/connect/api_adapter.rb
|
110
111
|
- lib/connect/migration.rb
|
111
112
|
- lib/connect/railtie.rb
|