restforce_mock 0.5.0 → 0.6.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: 75614ebb2f242748ce0a507b8a67eea2bb83d8ef
4
- data.tar.gz: 1a6fdf4d651054b110df083774af41d32019d51f
3
+ metadata.gz: d3ff569736337f68e7b37276c0fe828582e536b3
4
+ data.tar.gz: 0e764d7f47a41d1e85578250a156d1822763becd
5
5
  SHA512:
6
- metadata.gz: 2286120b33fdb1fa4b3cea120e62ae1314c60d76fff290f279090a57bd1a9affb9fcd2165185e57f9f0dee7292ae48e351f1d16484853fbb16c14b2a33e9c43b
7
- data.tar.gz: a91b1c1347a64ebcb4d248c3bc0cbafeca4d59a22addfd220503eef8058f0071305f3e90d184bfbf0c85c1fd0983c92122554ee690494033c401595bc1d4a354
6
+ metadata.gz: e2c82c655cd0e33dffbba1fbabcb4f64a2fb5bc71bc33480c2f66dbd8e0edec1e443165546adb63dabed895d514a1c0fd737cc7be9a7281c7717c7a09c32ea8d
7
+ data.tar.gz: 498453766638324d6ba45dc83230508494a85e47d56c99f1a44da5e187bdd0ccc648c0f79ccec5a71f77fa36f42f5f45a63ff23960696fe591846e9493bba2f8
data/README.md CHANGED
@@ -4,8 +4,6 @@
4
4
  - [![Version](http://img.shields.io/gem/v/restforce_mock.svg?style=flat-square)](https://rubygems.org/gems/restforce_mock)
5
5
  - [![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](http://opensource.org/licenses/MIT)
6
6
 
7
-
8
-
9
7
  Mock out [Restforce](https://github.com/ejholmes/restforce) in tests
10
8
 
11
9
  ## Installation
@@ -13,13 +11,16 @@ Mock out [Restforce](https://github.com/ejholmes/restforce) in tests
13
11
  Add this line to your application's Gemfile:
14
12
 
15
13
  ```ruby
16
- group :test do
14
+ group :development, :test do
17
15
 
18
16
  gem 'restforce_mock'
19
17
 
20
18
  end
21
19
  ```
22
20
 
21
+ _Note_: You may elect to add it to the `:test` group only if you do not want to
22
+ use rake task as described below
23
+
23
24
  And then execute:
24
25
 
25
26
  $ bundle
@@ -56,6 +57,32 @@ RestforceMock.configure do |config|
56
57
  end
57
58
  ```
58
59
 
60
+ ### Salesforce Schema
61
+
62
+ If you decide to use `config.schema_file` you will need to load schema from Salesforce.
63
+
64
+ Restforce_mock comes with a rake task
65
+
66
+ ```ruby
67
+ require 'organizations/tasks'
68
+ task "restforce_mock:schema:dump"
69
+ ```
70
+
71
+ Rake task requires environmental variables set up as described [here](https://github.com/ejholmes/restforce#usernamepassword-authentication)
72
+
73
+ You can now run
74
+
75
+ `rake restforce_mock:schema:dump`
76
+
77
+ #### Rails
78
+
79
+ If you environment (eg. Rails) setups salesforce variables
80
+
81
+ ```ruby
82
+ require 'organizations/tasks'
83
+ task "restforce_mock:schema:dump" => :environment
84
+ ```
85
+
59
86
  ### Mimicking Salesforce data
60
87
 
61
88
  To mimic Salesforce database, add some data to the `RestfoceMock` sandbox
@@ -3,7 +3,7 @@ require "rake"
3
3
  namespace :restforce_mock do
4
4
  namespace :schema do
5
5
  desc "Dump schema from Salesforce into file"
6
- task load: :environment do
6
+ task :dump do
7
7
  m = RestforceMock::SchemaManager.new
8
8
  m.dump_schema(
9
9
  RestforceMock.configuration.objects_for_schema,
@@ -1,3 +1,3 @@
1
1
  module RestforceMock
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restforce_mock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.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-12-15 00:00:00.000000000 Z
11
+ date: 2015-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: restforce