netsuite_rails 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,14 @@
1
+ # opinionated configuration
2
+
3
+ NetSuite.configure do
4
+ reset!
5
+
6
+ email ENV['NETSUITE_EMAIL']
7
+ password ENV['NETSUITE_PASSWORD']
8
+ account ENV['NETSUITE_ACCOUNT']
9
+ role ENV['NETSUITE_ROLE']
10
+ api_version ENV['NETSUITE_API']
11
+ sandbox (ENV['NETSUITE_PRODUCTION'].blank? || ENV['NETSUITE_PRODUCTION'] != 'true')
12
+
13
+ read_timeout 100000
14
+ end
@@ -27,6 +27,10 @@ module NetSuiteRails
27
27
  rake_tasks do
28
28
  load 'netsuite_rails/tasks/netsuite.rb'
29
29
  end
30
+
31
+ config.before_configuration do
32
+ require 'netsuite_rails/netsuite_configure'
33
+ end
30
34
  end
31
35
 
32
36
  end
@@ -1,4 +1,5 @@
1
1
  require 'netsuite'
2
+ require 'savon/mock/spec_helper'
2
3
 
3
4
  module NetSuiteRails::TestHelpers
4
5
 
@@ -81,4 +82,5 @@ end
81
82
 
82
83
  RSpec.configure do |config|
83
84
  config.include NetSuiteRails::TestHelpers, type: :feature
85
+ config.include Savon::SpecHelper
84
86
  end
@@ -27,7 +27,9 @@ namespace :netsuite do
27
27
  task :fresh_sync => :environment do
28
28
  NetSuiteRails::PollTimestamp.delete_all
29
29
 
30
- ENV['SKIP_EXISTING'] = "true"
30
+ if ENV['SKIP_EXISTING'].blank?
31
+ ENV['SKIP_EXISTING'] = "true"
32
+ end
31
33
 
32
34
  Rake::Task["netsuite:sync"].invoke
33
35
  end
@@ -37,7 +39,7 @@ namespace :netsuite do
37
39
  # need to eager load to ensure that all classes are loaded into the poll manager
38
40
  Rails.application.eager_load!
39
41
 
40
- NetSuiteRails::PollTrigger.sync(self.generate_options)
42
+ NetSuiteRails::PollTrigger.sync(generate_options)
41
43
  end
42
44
 
43
45
  desc "sync all local netsuite records"
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "netsuite_rails"
7
- s.version = "0.2.0"
7
+ s.version = "0.2.1"
8
8
  s.authors = ["Michael Bianco"]
9
9
  s.email = ["mike@cliffsidemedia.com"]
10
10
  s.summary = %q{Write Rails applications that integrate with NetSuite}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netsuite_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-30 00:00:00.000000000 Z
12
+ date: 2015-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: netsuite
@@ -110,6 +110,7 @@ files:
110
110
  - lib/netsuite_rails/configuration.rb
111
111
  - lib/netsuite_rails/list_sync.rb
112
112
  - lib/netsuite_rails/list_sync/poll_manager.rb
113
+ - lib/netsuite_rails/netsuite_configure.rb
113
114
  - lib/netsuite_rails/netsuite_rails.rb
114
115
  - lib/netsuite_rails/poll_timestamp.rb
115
116
  - lib/netsuite_rails/poll_trigger.rb