restforce_mock 0.2.0 → 0.3.0

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
2
  SHA1:
3
- metadata.gz: 2d412f0080fd1766023ec530773bb30f4aa35a1c
4
- data.tar.gz: 1138b8f99398c7068064d1b2fc25a8053801e597
3
+ metadata.gz: 06ea14355b2b044432f0907fea9f7d1d420c227a
4
+ data.tar.gz: 19cfc9b489c3c0bebac453c369e37d5fe8fd6a64
5
5
  SHA512:
6
- metadata.gz: 138ab5e59bbbeef927fb5a62bc3e6bf029db389c6662e6639b80527a26e0eff1c580b5072d66a84b436280a8a74d749ea850da1d72a0a1a5fc438cec1f1d2fde
7
- data.tar.gz: 5ff2f9083865761fc2bad6f2325764f0dcbcdab577405fa4d99a56dd295e80a07cf2b30dff3cdaf4a942e3552e700b43e2b8e61f7f1b589d38d2ce17d47e8cca
6
+ metadata.gz: 998c8b961fc63decbc4818c0222c741448fe1ebda41143311172ef8130d78d813bd7801e157fb1ee63b48897a473b0b72a7397e8eb7e594088d724dbf4e161fa
7
+ data.tar.gz: 432526d5f7cb41a78a3ccb5e1aa4981e62548ac1d80c4776996a76820215a5e019fdac62ca6d455be765c055d1fd984696ec529865974beb09e628a532ab6c8f
data/README.md CHANGED
@@ -42,6 +42,12 @@ To mimic Salesforce database, add some data to the `RestfoceMock` sandbox
42
42
  RestforceMock::Sandbox.add_object("Contact", "HGUKK674J79HjsH", { Name__c: "John" })
43
43
  ```
44
44
 
45
+ To access the object in the RestforceMock object
46
+
47
+ ```ruby
48
+ RestforceMock::Sandbox.get_object("Contact", "HGUKK674J79HjsH")
49
+ ```
50
+
45
51
  RestforceMock sandbox is **shared across all your tests** (same way as real Salesforce instace would be), hence,
46
52
  after completion of tests make sure to clean up if necessary
47
53
 
@@ -18,6 +18,10 @@ module RestforceMock
18
18
  RestforceMock::Sandbox.add_object(name, id, values)
19
19
  end
20
20
 
21
+ def self.get_object(name, id)
22
+ storage[name][id]
23
+ end
24
+
21
25
  def self.update_object(name, id, attrs)
22
26
  current = storage[name][id]
23
27
  validate_all_present_fields!(current, attrs)
@@ -1,3 +1,3 @@
1
1
  module RestforceMock
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restforce_mock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Katz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-01 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: restforce
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
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'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.10'
34
34
  type: :development
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: '1.10'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '10.0'
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: '10.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
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
  description: Mock for Restforce gem
@@ -73,11 +73,11 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - .gitignore
77
- - .hound.yml
78
- - .rspec
79
- - .ruby-style.yml
80
- - .travis.yml
76
+ - ".gitignore"
77
+ - ".hound.yml"
78
+ - ".rspec"
79
+ - ".ruby-style.yml"
80
+ - ".travis.yml"
81
81
  - CODE_OF_CONDUCT.md
82
82
  - Gemfile
83
83
  - LICENSE.txt
@@ -99,17 +99,17 @@ require_paths:
99
99
  - lib
100
100
  required_ruby_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - '>='
107
+ - - ">="
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.0.14
112
+ rubygems_version: 2.2.2
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Mock for Restforce gem