netsuite_rails 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MTMwYmZiZTdlNGI4MGE2MDI3OTYzOTNlNzY1MTM5OWYzYWNiMjc2Mw==
5
- data.tar.gz: !binary |-
6
- ZDk1NjdhY2E2NTlhMzE0NjdlZTNkMjAyM2FmOWI2YTY1MmJhODRmNQ==
2
+ SHA1:
3
+ metadata.gz: 02de40385dbc5f58b5ff3e4f5a30d5d861e6d6e8
4
+ data.tar.gz: 6f7428c068be19459b754c577b6cbecff2e7ac25
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZjI1OTgzYTMyNmIxMDY3MzRhZGE4Y2FkYWEwMTBmMGZmNGMwNjBlZWNjY2Rm
10
- YmM0YWZlN2M0MDlhZTE5N2FlNmI2MmEzODY3ZGM5MjZmM2NhNDZiMGUyZTlh
11
- MjMwMmVjZjU1NzM1ZDhkMmNhMGRkOGYyMDY1M2RlZGI1YmY3OTk=
12
- data.tar.gz: !binary |-
13
- ZjQyNjVmMTZmY2E2YTQwNzZkY2IzMTE0MmIxNTIwZjJlY2E0YTk0Njc4NDE4
14
- MzYwZmJlNDE4YTRiZjQwZTdmMzNhZjE1OTAyZGVlYmU2MjAyZWEzNDRmODAz
15
- MzY0MDQ1MzczMDRkMzQyMWU5MTMwZjE1MGJhNjkzZmMyODkwMzU=
6
+ metadata.gz: 9ed7e6ee9237efe96e3a4930085773b0cd0b689844eb9ab3dfe0ec23bb2bed3c42023a28feaf7305cb79052f8388f4069acf3c9ce7cdf68f6945b1b648b02dfb
7
+ data.tar.gz: 35ab8e616e0f090aff659ea5564b918b00720da78de6404534f5b3dd5dc82d634d79ccedf5387544d3edade71a9c874d230a4c709ec86e646de5ef3920e89a86
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.1.6
data/Gemfile CHANGED
@@ -1,21 +1,15 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
- # TODO would like to support easy NetSuite VCR recording in the future
5
4
  group :test do
6
- # gem 'vcr'
7
- # gem 'rspec', '~> 2.14'
8
- # gem 'rack-test'
9
- # gem 'webmock'
10
-
11
5
  gem 'simplecov', :require => false
12
6
 
13
7
  gem 'faker'
14
- gem 'shoulda-matchers'
8
+ gem 'shoulda-matchers', '~> 2.8.0'
15
9
  gem 'rails', '3.2.16'
16
10
  gem 'sqlite3', :platform => :ruby
17
11
 
18
- gem 'rspec-rails', '~> 3.1'
12
+ gem 'rspec-rails', '~> 3.4.2'
19
13
  gem 'pry-nav'
20
14
 
21
15
  gem 'rerun'
@@ -1,7 +1,7 @@
1
1
  require 'netsuite'
2
2
 
3
3
  require 'netsuite_rails/configuration'
4
- require 'netsuite_rails/poll_timestamp'
4
+ require 'netsuite_rails/poll_timestamp' if defined?(::ActiveRecord)
5
5
  require 'netsuite_rails/transformations'
6
6
  require 'netsuite_rails/url_helper'
7
7
 
@@ -22,7 +22,7 @@ require 'netsuite_rails/list_sync/poll_manager'
22
22
  module NetSuiteRails
23
23
 
24
24
  def self.rails4?
25
- Rails::VERSION::MAJOR >= 4
25
+ ::Rails::VERSION::MAJOR >= 4
26
26
  end
27
27
 
28
28
  def self.configure_from_env(&block)
@@ -36,7 +36,7 @@ module NetSuiteRails
36
36
  netsuite_pull_disabled true
37
37
  netsuite_push_disabled true
38
38
  end
39
-
39
+
40
40
  polling_page_size if ENV['NETSUITE_POLLING_PAGE_SIZE'].present?
41
41
  end
42
42
 
@@ -43,7 +43,7 @@ module NetSuiteRails
43
43
  last_poll_date = last_class_poll.value
44
44
  last_poll_date = DateTime.parse(last_poll_date) unless last_poll_date.is_a?(DateTime)
45
45
 
46
- if DateTime.now.to_i - last_poll_date.to_i > sync_frequency
46
+ if poll_execution_time.to_i - last_poll_date.to_i > sync_frequency
47
47
  Rails.logger.info "NetSuite: #{klass} is due to be synced, last checked #{last_poll_date}"
48
48
  klass.netsuite_poll({ last_poll: last_poll_date }.merge(opts))
49
49
  else
@@ -71,7 +71,7 @@ module NetSuiteRails
71
71
  NetSuiteRails::RecordSync::PollManager.update_local_records(klass, opts)
72
72
  end
73
73
  end
74
-
74
+
75
75
  end
76
76
 
77
77
  end
@@ -10,7 +10,7 @@ module NetSuiteRails
10
10
  def attach(klass)
11
11
  # don't attach to non-AR backed models
12
12
  # it is the user's responsibility to trigger `Model#netsuite_push` when ActiveRecord isn't used
13
- return unless klass.ancestors.include?(ActiveRecord::Base)
13
+ return if !defined?(::ActiveRecord) || !klass.ancestors.include?(::ActiveRecord::Base)
14
14
 
15
15
  if klass.include?(SubListSync)
16
16
  klass.after_save { SyncTrigger.sublist_trigger(self) }
@@ -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.3.2"
7
+ s.version = "0.3.3"
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,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netsuite_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bianco
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-15 00:00:00.000000000 Z
11
+ date: 2016-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: netsuite
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>'
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.5.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>'
24
+ - - ">"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.5.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 3.2.16
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 3.2.16
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.6'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.6'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '3.1'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.1'
83
83
  description:
@@ -87,7 +87,8 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - .gitignore
90
+ - ".gitignore"
91
+ - ".ruby-version"
91
92
  - Gemfile
92
93
  - LICENSE.txt
93
94
  - README.md
@@ -141,17 +142,17 @@ require_paths:
141
142
  - lib
142
143
  required_ruby_version: !ruby/object:Gem::Requirement
143
144
  requirements:
144
- - - ! '>='
145
+ - - ">="
145
146
  - !ruby/object:Gem::Version
146
147
  version: '0'
147
148
  required_rubygems_version: !ruby/object:Gem::Requirement
148
149
  requirements:
149
- - - ! '>='
150
+ - - ">="
150
151
  - !ruby/object:Gem::Version
151
152
  version: '0'
152
153
  requirements: []
153
154
  rubyforge_project:
154
- rubygems_version: 2.4.6
155
+ rubygems_version: 2.2.3
155
156
  signing_key:
156
157
  specification_version: 4
157
158
  summary: Write Rails applications that integrate with NetSuite