restforce-db 2.6.0 → 2.7.0
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/README.md +4 -0
- data/lib/restforce/db.rb +20 -3
- data/lib/restforce/db/version.rb +1 -1
- data/test/support/utilities.rb +3 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c25a609455a6ec5468ec04c57c012cd8db246165
|
4
|
+
data.tar.gz: 5ecc15d30bd49ebb8926e5e4aa11665311776b0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 447d000eae9fa2c955a8dc1cead5458e5b40fcc7a40bac9bf43f920a02f174b5b085b38ed289c486feeee33af74ae4574f44665fee5d68dfe34b95da16cd96e6
|
7
|
+
data.tar.gz: a69d6366987c9515962fcb2f465dd4c121744651eb5cf01291d2b7c1e7ad853c417ccc4006ad9aa5ea1f0fa00da95a15e958f18888ca94ea3bb974662e94367f
|
data/README.md
CHANGED
@@ -280,6 +280,10 @@ restaurant.force_sync!
|
|
280
280
|
|
281
281
|
You'll need to ensure that Restforce::DB is properly configured for your application (an initializer is recommended).
|
282
282
|
|
283
|
+
#### Testing
|
284
|
+
|
285
|
+
If you're testing your integration, and using something like VCR to record your specs, you may run into some spec order dependency issues due to Restforce::DB's global request caching. To prevent these dependencies in your spec suite, you can clear all cached data by invoking `Restforce::DB.reset` somewhere in your spec setup or teardown.
|
286
|
+
|
283
287
|
## System Caveats
|
284
288
|
|
285
289
|
- **API Usage.**
|
data/lib/restforce/db.rb
CHANGED
@@ -113,14 +113,31 @@ module Restforce
|
|
113
113
|
configuration
|
114
114
|
end
|
115
115
|
|
116
|
+
# Public: Clear all globally cached values for Restforce::DB.
|
117
|
+
#
|
118
|
+
# NOTE: This is an "idempotent" reset; following invocation, all functions
|
119
|
+
# should still work as before, but globally cached values will be
|
120
|
+
# repopulated.
|
121
|
+
#
|
122
|
+
# Returns nothing.
|
123
|
+
def self.reset
|
124
|
+
FieldProcessor.reset
|
125
|
+
@user_id = nil
|
126
|
+
@client = nil
|
127
|
+
end
|
128
|
+
|
116
129
|
# Public: Eliminate all customizations to the current Restforce::DB
|
117
130
|
# configuration and client.
|
118
131
|
#
|
132
|
+
# NOTE: This is a hard reset; following invocation, Restforce::DB will need
|
133
|
+
# to be reconfigured in order for functionality to be restored.
|
134
|
+
#
|
119
135
|
# Returns nothing.
|
120
|
-
def self.reset
|
136
|
+
def self.reset!
|
137
|
+
reset
|
138
|
+
|
121
139
|
@configuration = nil
|
122
|
-
@
|
123
|
-
@user_id = nil
|
140
|
+
@last_run = nil
|
124
141
|
end
|
125
142
|
|
126
143
|
end
|
data/lib/restforce/db/version.rb
CHANGED
data/test/support/utilities.rb
CHANGED
@@ -5,13 +5,11 @@ def configure!
|
|
5
5
|
end
|
6
6
|
|
7
7
|
after do
|
8
|
-
Restforce::DB::FieldProcessor.reset
|
9
|
-
Restforce::DB::Registry.clean!
|
10
|
-
Restforce::DB.last_run = nil
|
11
|
-
Restforce::DB.logger = nil
|
12
|
-
|
13
8
|
DatabaseCleaner.clean
|
14
9
|
Salesforce.clean!
|
10
|
+
|
11
|
+
Restforce::DB::Registry.clean!
|
12
|
+
Restforce::DB.reset!
|
15
13
|
end
|
16
14
|
end
|
17
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restforce-db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Horner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|