activeforce 1.10.2 → 1.10.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5252a0e6a043efa303c54d10293a4a7e5f227d0a
4
- data.tar.gz: 96ff3c4f51375b7db97d64a7acb1eee06fd93de2
2
+ SHA256:
3
+ metadata.gz: 75977b0eca3d59fee4d77ea35022c5957dfc35248e1b31768506f3663a8d400b
4
+ data.tar.gz: ff1d99dfd949d04785139a9d405d066ffdbc6f167295afb9251b677fd025550d
5
5
  SHA512:
6
- metadata.gz: 749893be4c67aa8a36c6089bc678d1d949aa47568dea2befa383fa952d64fc2128647bf4daddf26947d69b1cf9baf72747fc9576eb49223248421fdcf99ae47a
7
- data.tar.gz: 6ccd735668e25a3e9d259acb505c555ebab5387c3c72c6a2a07117b9357a952d8f66f4454469e53d03eba9210b81e91305e866b63b9d460d512314901493e3dc
6
+ metadata.gz: f67f2c5b85437ce61b5345c93e7320c88f8cf3e5142d2b85653f61b6bf4fee1d36ecbddae25bcf2b8f23b42334d878b3b184a5a20d39dfab6a11dc2a91aa32ba
7
+ data.tar.gz: a7827997fe0650e894e48bd0919c21da629c5dfd15ad3098ef06e215aadfc5c779bab2e2faacbf270c44f37685a5791705f7e30ec94f7a6c9ca9ba2416827979
data/.travis.yml CHANGED
@@ -15,3 +15,4 @@ gemfile:
15
15
  - gemfiles/4.1.gemfile
16
16
  - gemfiles/4.2.gemfile
17
17
  - gemfiles/5.0.gemfile
18
+ - gemfiles/5.2.gemfile
data/Appraisals CHANGED
@@ -13,3 +13,7 @@ end
13
13
  appraise "5.0" do
14
14
  gem "rails", "~> 5.0.0"
15
15
  end
16
+
17
+ appraise "5.2" do
18
+ gem "rails", "~> 5.2.0"
19
+ end
data/Rakefile CHANGED
@@ -20,6 +20,7 @@ Rake::TestTask.new(:test) do |test|
20
20
  test.libs << 'lib' << 'test'
21
21
  test.pattern = 'test/**/*_test.rb'
22
22
  test.verbose = true
23
+ test.warning = false
23
24
  end
24
25
 
25
26
  task :default => :test
data/activeforce.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.rubygems_version = "2.0.3"
22
22
  s.summary = "A Simple gem to interact with the Salesforce REST API"
23
23
 
24
- s.add_dependency(%q<rails>, [">= 4.0", "< 5.1"])
24
+ s.add_dependency(%q<rails>, [">= 4.0", "< 6"])
25
25
  s.add_dependency(%q<savon>, ["~> 1.0"])
26
26
  s.add_dependency(%q<blockenspiel>, [">= 0"])
27
27
  s.add_dependency(%q<rest-client>, [">= 0", '< 2.0'])
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "mocha", "0.14.0", require: false
7
+ gem "rails", "~> 5.2.0"
8
+
9
+ gemspec path: "../"
@@ -1,3 +1,3 @@
1
1
  module Activeforce
2
- VERSION = '1.10.2'.freeze
2
+ VERSION = '1.10.3'.freeze
3
3
  end
@@ -10,7 +10,7 @@ class Salesforce::AuthenticationTest < ActiveSupport::TestCase
10
10
  Salesforce::Config.instance.session_id "existingsessionid"
11
11
  assert_equal "existingsessionid", Salesforce::Authentication.session_id
12
12
  end
13
-
13
+
14
14
  def test_session_id__doesnotexist
15
15
  Salesforce.configure do
16
16
  username "username"
@@ -19,20 +19,20 @@ class Salesforce::AuthenticationTest < ActiveSupport::TestCase
19
19
  Salesforce::Authentication.expects(:generate_new_session_id).returns("new_session_id")
20
20
  assert_equal "new_session_id", Salesforce::Authentication.session_id
21
21
  end
22
-
22
+
23
23
  def test_session_id__credentials_missing
24
24
  Salesforce::Authentication.expects(:generate_new_session_id).never
25
25
  assert_raises Salesforce::InvalidCredentials do
26
26
  Salesforce::Authentication.session_id
27
27
  end
28
28
  end
29
-
29
+
30
30
  def test_logout
31
31
  Salesforce::Config.instance.session_id = "session_id"
32
32
  Salesforce::Authentication.logout
33
- assert_equal nil, Salesforce::Config.session_id
33
+ assert_nil Salesforce::Config.session_id
34
34
  end
35
-
35
+
36
36
  def test_generate_new_session_id__calls_connection_login
37
37
  result = {
38
38
  :session_id => "session_id",
@@ -83,5 +83,5 @@ class Salesforce::AuthenticationTest < ActiveSupport::TestCase
83
83
  assert_equal "my.salesforce.com", Salesforce::Config.server_domain
84
84
  assert_equal "user_id", Salesforce::Config.user_id
85
85
  end
86
-
86
+
87
87
  end
@@ -24,7 +24,7 @@ class Salesforce::ColumnTest < ActiveSupport::TestCase
24
24
  assert_equal :string, col.type
25
25
  assert_equal false, col.editable?
26
26
  end
27
-
27
+
28
28
  def test_initializer__editable
29
29
  col = Salesforce::Column.new("name" => "Name__c", "type" => "string", "updateable" => true, "createable" => false)
30
30
  assert_equal "name", col.name
@@ -39,35 +39,35 @@ class Salesforce::ColumnTest < ActiveSupport::TestCase
39
39
  assert col.createable?
40
40
  assert_equal false, col.updateable?
41
41
  end
42
-
42
+
43
43
  def test_to_soql_value
44
- assert_equal "'string'", Salesforce::Column.to_soql_value('string')
45
- assert_equal "TRUE", Salesforce::Column.to_soql_value(true)
46
- assert_equal "FALSE", Salesforce::Column.to_soql_value(false)
47
- assert_equal "NULL", Salesforce::Column.to_soql_value(nil)
48
- assert_equal "2012-01-02", Salesforce::Column.to_soql_value(Date.parse('2012-01-02'))
49
- assert_equal "2012-01-02T18:40:00-08:00", Salesforce::Column.to_soql_value(Time.zone.parse('2012-01-02 06:40PM'))
50
- assert_equal "1", Salesforce::Column.to_soql_value(1)
51
- assert_equal "1.0", Salesforce::Column.to_soql_value(1.0)
52
- assert_equal "1.04", Salesforce::Column.to_soql_value(BigDecimal.new("1.04"))
53
- assert_equal "'col'", Salesforce::Column.to_soql_value(:col)
44
+ assert_equal "'string'", Salesforce::Column.to_soql_value('string')
45
+ assert_equal "TRUE", Salesforce::Column.to_soql_value(true)
46
+ assert_equal "FALSE", Salesforce::Column.to_soql_value(false)
47
+ assert_equal "NULL", Salesforce::Column.to_soql_value(nil)
48
+ assert_equal "2012-01-02", Salesforce::Column.to_soql_value(Date.parse('2012-01-02'))
49
+ assert_equal "2012-01-02T18:40:00-08:00", Salesforce::Column.to_soql_value(Time.zone.parse('2012-01-02 06:40PM'))
50
+ assert_equal "1", Salesforce::Column.to_soql_value(1)
51
+ assert_equal "1.0", Salesforce::Column.to_soql_value(1.0)
52
+ assert_equal "1.04", Salesforce::Column.to_soql_value(BigDecimal.new("1.04"))
53
+ assert_equal "'col'", Salesforce::Column.to_soql_value(:col)
54
54
  assert_equal "('string1','string2','string3')", Salesforce::Column.to_soql_value(['string1','string2','string3'])
55
55
  assert_equal "('string1',1,2012-01-02)", Salesforce::Column.to_soql_value(['string1',1,Date.parse("2012-01-02")])
56
56
  end
57
-
57
+
58
58
  def test_to_csv_value
59
- assert_equal "string", Salesforce::Column.to_csv_value('string')
60
- assert_equal "TRUE", Salesforce::Column.to_csv_value(true)
61
- assert_equal "FALSE", Salesforce::Column.to_csv_value(false)
62
- assert_equal '#N/A', Salesforce::Column.to_csv_value(nil)
63
- assert_equal "2012-01-02", Salesforce::Column.to_csv_value(Date.parse('2012-01-02'))
64
- assert_equal "2012-01-02T18:40:00-08:00", Salesforce::Column.to_csv_value(Time.zone.parse('2012-01-02 06:40PM'))
65
- assert_equal "1", Salesforce::Column.to_csv_value(1)
66
- assert_equal "1.0", Salesforce::Column.to_csv_value(1.0)
67
- assert_equal "1.04", Salesforce::Column.to_csv_value(BigDecimal.new("1.04"))
68
- assert_equal "col", Salesforce::Column.to_csv_value(:col)
59
+ assert_equal "string", Salesforce::Column.to_csv_value('string')
60
+ assert_equal "TRUE", Salesforce::Column.to_csv_value(true)
61
+ assert_equal "FALSE", Salesforce::Column.to_csv_value(false)
62
+ assert_equal '#N/A', Salesforce::Column.to_csv_value(nil)
63
+ assert_equal "2012-01-02", Salesforce::Column.to_csv_value(Date.parse('2012-01-02'))
64
+ assert_equal "2012-01-02T18:40:00-08:00", Salesforce::Column.to_csv_value(Time.zone.parse('2012-01-02 06:40PM'))
65
+ assert_equal "1", Salesforce::Column.to_csv_value(1)
66
+ assert_equal "1.0", Salesforce::Column.to_csv_value(1.0)
67
+ assert_equal "1.04", Salesforce::Column.to_csv_value(BigDecimal.new("1.04"))
68
+ assert_equal "col", Salesforce::Column.to_csv_value(:col)
69
69
  end
70
-
70
+
71
71
  def test_typecast
72
72
  assert_equal "123456789012345", Salesforce::Column.typecast(:id, "123456789012345")
73
73
  assert_equal "123456789012345", Salesforce::Column.typecast(:id, "123456789012345123")
@@ -75,12 +75,12 @@ class Salesforce::ColumnTest < ActiveSupport::TestCase
75
75
  assert_equal "123456789012345", Salesforce::Column.typecast(:reference, "123456789012345123")
76
76
  assert_equal Date.parse("2011-08-31"), Salesforce::Column.typecast(:date, "2011-08-31")
77
77
  assert_equal Date.parse("2011-08-31"), Salesforce::Column.typecast(:date, Date.parse("2011-08-31"))
78
- assert_equal nil, Salesforce::Column.typecast(:date, nil)
79
- assert_equal nil, Salesforce::Column.typecast(:date, 'nil')
78
+ assert_nil Salesforce::Column.typecast(:date, nil)
79
+ assert_nil Salesforce::Column.typecast(:date, 'nil')
80
80
 
81
81
  assert_equal Time.zone.parse('2012-01-02 06:40PM'), Salesforce::Column.typecast(:datetime, "2012-01-02 18:40:00 -08:00")
82
82
  assert_equal Time.zone.parse('2012-01-02 06:40PM'), Salesforce::Column.typecast(:datetime, Time.zone.parse('2012-01-02 06:40PM'))
83
- assert_equal nil, Salesforce::Column.typecast(:datetime, nil)
83
+ assert_nil Salesforce::Column.typecast(:datetime, nil)
84
84
  assert_equal Time.now.to_s, Salesforce::Column.typecast(:datetime, 'nil').to_s
85
85
 
86
86
  assert_equal BigDecimal("2012"), Salesforce::Column.typecast(:double, "2012")
@@ -89,22 +89,22 @@ class Salesforce::ColumnTest < ActiveSupport::TestCase
89
89
  assert_equal BigDecimal("1.2"), Salesforce::Column.typecast(:double, 1.2)
90
90
  assert_equal 0, Salesforce::Column.typecast(:double, nil)
91
91
  assert_equal 0, Salesforce::Column.typecast(:double, 'nil')
92
-
92
+
93
93
  assert_equal true, Salesforce::Column.typecast(:boolean, true)
94
94
  assert_equal false, Salesforce::Column.typecast(:boolean, false)
95
95
  end
96
-
96
+
97
97
  def test_typecast__date_max
98
- assert_equal nil, Salesforce::Column.typecast(:date, "9999-12-31")
98
+ assert_nil Salesforce::Column.typecast(:date, "9999-12-31")
99
99
  assert_equal Date.parse("4000-12-30"), Salesforce::Column.typecast(:date, "4000-12-30")
100
- assert_equal nil, Salesforce::Column.typecast(:datetime, "9999-12-31")
101
- assert_equal nil, Salesforce::Column.typecast(:datetime, "4000-12-30")
100
+ assert_nil Salesforce::Column.typecast(:datetime, "9999-12-31")
101
+ assert_nil Salesforce::Column.typecast(:datetime, "4000-12-30")
102
102
  end
103
103
 
104
104
  def test_typecast__date_min
105
- assert_equal nil, Salesforce::Column.typecast(:date, "1699-13-31")
106
- assert_equal nil, Salesforce::Column.typecast(:datetime, "1700-01-01")
107
- assert_equal nil, Salesforce::Column.typecast(:datetime, "1699-12-31")
105
+ assert_nil Salesforce::Column.typecast(:date, "1699-13-31")
106
+ assert_nil Salesforce::Column.typecast(:datetime, "1700-01-01")
107
+ assert_nil Salesforce::Column.typecast(:datetime, "1699-12-31")
108
108
  assert_equal Date.parse("01/01/1920").to_time, Salesforce::Column.typecast(:datetime, "1920-01-01")
109
109
  end
110
110
 
@@ -115,12 +115,12 @@ class Salesforce::ColumnTest < ActiveSupport::TestCase
115
115
  assert_equal "123456789012345", Salesforce::Column.typecast(:reference, "123456789012345")
116
116
  assert_equal "123456789012345123", Salesforce::Column.typecast(:reference, "123456789012345123")
117
117
  end
118
-
118
+
119
119
  def test_equals
120
120
  col1 = Salesforce::Column.new("name" => "Name", "type" => "string", "updateable" => true)
121
121
  col2 = Salesforce::Column.new("name" => "Name", "type" => "string", "updateable" => false)
122
122
  col3 = Salesforce::Column.new("name" => "Name__c", "type" => "string", "updateable" => true)
123
-
123
+
124
124
  assert col1 == col2
125
125
  assert col2 != col3
126
126
  assert col1 != col3
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeforce
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.2
4
+ version: 1.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tushar Ranka
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: '4.0'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '5.1'
23
+ version: '6'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: '4.0'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '5.1'
33
+ version: '6'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: savon
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -163,6 +163,7 @@ files:
163
163
  - gemfiles/4.1.gemfile
164
164
  - gemfiles/4.2.gemfile
165
165
  - gemfiles/5.0.gemfile
166
+ - gemfiles/5.2.gemfile
166
167
  - lib/activeforce.rb
167
168
  - lib/activeforce/version.rb
168
169
  - lib/ruby_187_range_extension.rb
@@ -218,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
219
  version: '0'
219
220
  requirements: []
220
221
  rubyforge_project:
221
- rubygems_version: 2.6.14
222
+ rubygems_version: 2.7.7
222
223
  signing_key:
223
224
  specification_version: 4
224
225
  summary: A Simple gem to interact with the Salesforce REST API