sf_migrate 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDZkOTg4YzI5MTJmMTIwNjkxYTAxMjE1N2QyOTc5NmY5YzQyMGE4NQ==
4
+ OTNkZTM5OWVjMDdkODA0MzNjMGE2OGU4ZmZjOWNhN2ZlNzMwZDQ5NQ==
5
5
  data.tar.gz: !binary |-
6
- YzZkNmE1ZjUyZWJiNDE1MTc1ZmM0NmI3YTNkNDZiYmEzZmM1MmViMg==
6
+ NTNkNWZhNDYyNzc5ODc2NTFjZThlMWU1ZTBmZjY0MTVhNjIzOGM4NA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- M2Q2NzZmMTU4ODBhZDA0MDJmMDMwZjY2NTRkZTA1NDhiN2Y2ZWY2YzEwY2Y0
10
- MTQwOGEzY2ViMzgzYmVlMWY4MjZmZmM3ZTg4YTFiZjMzZjE4MWQzMGRmYTNk
11
- YzhlMzVhMTZlN2IyZmNlY2YwZTAxMmMxNmRiODI5MGRmM2ViMWI=
9
+ NWMyZWNlMjA0NzMyMDc5ZWNiNmZhM2VhOTkzMjhlOWZjYTgwMGUwOGE0MTlj
10
+ ODAxMzhmMTA5NGEyMjhjZDU4ZWZmNTA1NGZlZWFmMGVmYmZlNjE4NTc3MDA4
11
+ YjQ0N2QyZGJmYzdlYmQwN2IzNzM4ZTBmZTczYTM3NjJjOTViMGQ=
12
12
  data.tar.gz: !binary |-
13
- OWIyYzMwNWZlYjY5OTk4Nzc5N2VlYWJjNmY2ZjE5OGU2ZmUyMWE3NzQ5OWNh
14
- OTc3NTU2YmJlNDZlODlkMmE2MmNkOGMwNmY2ZDFhYmM1YTRkNTU2ODJmZmFk
15
- Yzc0YWE0NWY0NGM4NTQ4OTg4YWMzZjY3MWI3MDAzY2M3OWI3OTM=
13
+ YTEyMmEwYjIzZGEwOGQ0MzQ4NjdhYmE5YmFiNTJhNGVhYjg4NGU3OWFjZmVh
14
+ MjQ4YTFiN2E3ODhmZTE3ZTE4MzQzYjliMjA5YzU3NDg0YWZhN2I2YTRmYWU0
15
+ YWUwNGQyYWFlMWNjNDFiMzBlNDNkYWRhOTdjODBiMDA1YTRlZGI=
data/lib/export.rb CHANGED
@@ -6,11 +6,10 @@ module SalesforceMigration
6
6
  #
7
7
  # @param [Hash] options hash representing passed command line options
8
8
  def initialize(options)
9
- credentials = YAML.load_file(options[:config_file])
10
- consumer_key = credentials['salesforce_consumer_key']
11
- consumer_secret = credentials['salesforce_consumer_secret']
12
- username = credentials['salesforce_username']
13
- password = credentials['salesforce_password']
9
+ consumer_key = $credentials['salesforce_consumer_key']
10
+ consumer_secret = $credentials['salesforce_consumer_secret']
11
+ username = $credentials['salesforce_username']
12
+ password = $credentials['salesforce_password']
14
13
  @csv_dir = options[:csv_dir]
15
14
  @action = options[:action]
16
15
  @last_modified_date = options[:last_modified_date]
data/lib/import.rb CHANGED
@@ -15,12 +15,7 @@ module SalesforceMigration
15
15
  #
16
16
  # @param [Hash] options hash representing passed command line options
17
17
  def initialize(options)
18
- credentials = YAML.load_file(options[:config_file])
19
- url = credentials['sugar_url']
20
- username = credentials['sugar_username']
21
- password = credentials['sugar_password']
22
18
  @csv_dir = options[:csv_dir]
23
- SugarCRM.connect(url, username, password)
24
19
  @action = options[:action]
25
20
  @isos, @agents, @merchants, @bank_accounts, @agent_users, @iso_users, @emails = [], [], [], [], [], [], []
26
21
  @payment_to_merchants, @emails_to_merchants, @acquirers, @contracts, @users = [], [], [], [], []
data/lib/mailer.rb CHANGED
@@ -13,8 +13,6 @@ module SalesforceMigration
13
13
  :authentication => nil,
14
14
  :enable_starttls_auto => true}
15
15
 
16
- SugarCRM.connect(@@config['sugar_url'], @@config['sugar_username'], @@config['sugar_password'])
17
-
18
16
  @logger = SalesforceMigration::Runner::create_logger
19
17
  @logger.info("Starting the mailer")
20
18
  start
data/lib/sf_migrate.rb CHANGED
@@ -54,6 +54,8 @@ module SalesforceMigration
54
54
  end
55
55
  optparse.parse!
56
56
  begin
57
+ $credentials = YAML.load_file(options[:config_file])
58
+ SugarCRM.connect($credentials['sugar_url'], $credentials['sugar_username'], $credentials['sugar_password'])
57
59
  SalesforceMigration::Export.new(options) if options[:action]
58
60
  SalesforceMigration::Import.new(options) if options[:action]
59
61
  SalesforceMigration::Mailer.new(options) if options[:send_mail]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sf_migrate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Petkov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-11 00:00:00.000000000 Z
12
+ date: 2014-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sugarcrm_emp