sf_cli 0.0.6 → 0.0.7.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +3 -3
- data/bin/sfc +7 -0
- data/lib/sf_cli/sf/console.rb +26 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfe11b6577f9c950bc7ebe9a602392f843462d2121e4b53bad470ae5fc88d70a
|
4
|
+
data.tar.gz: 7b8be5a7d4d7fe214968a41ed334df490c59fec0c1308c922b98c53d7e6d5bc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5dd28989b46ed7044bf01f872197f29a591b005e0d150dd526c97d2c5fdf1e543a7112d3ccdff5867f967800f1673f2073a0585bb06223d8b541f8ac2ae2873
|
7
|
+
data.tar.gz: 25a31b68eed96337d806721c42c24ad1452728c00f2db8577c93f211a2147fab61c9a8b692978f67df8b690ea8aa94bbf21fea5200e8b6ac4c1c2ad71062474b
|
data/README.rdoc
CHANGED
@@ -89,13 +89,13 @@ then,
|
|
89
89
|
contact # => #<Contact: @Id="0035j00001RW3xbAAD", @Name="Akin Kristen">
|
90
90
|
contact.Name # Akin Kristen
|
91
91
|
|
92
|
-
==== query and get records
|
93
|
-
contacts = Contact.select(:Id, :Name).where(LastModifiedDate: :Yesterday).all # get all records that is modified yesterday
|
94
|
-
|
95
92
|
# these 2 example are the same meaning
|
96
93
|
Contact.select(Name).where(Name: 'John Smith', LastModifiedDate: :Yesterday).take
|
97
94
|
Contact.select(Name).where(Name: 'John Smith').where(LastModifiedDate: :Yesterday).take
|
98
95
|
|
96
|
+
==== query and get records
|
97
|
+
contacts = Contact.select(:Id, :Name).where(LastModifiedDate: :Yesterday).all # get all records that is modified yesterday
|
98
|
+
|
99
99
|
==== child-parent relationship
|
100
100
|
contact = Contact.select(:Id, :Name, "Account.Name").where(Name: 'Akin Kristen').take
|
101
101
|
contact # <Contact: @Id="0035j00001RW3xbAAD", @Name="Akin Kristen", @Account= #<Account @Name="Aethna Home Products">>
|
data/bin/sfc
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'sf_cli'
|
2
|
+
require 'sf_cli/sf/model'
|
3
|
+
require 'sf_cli/sf/model/sf_command_connection'
|
4
|
+
|
5
|
+
def sf_init(org_alias)
|
6
|
+
org_info = sf.org.display target_org: org_alias
|
7
|
+
conn = SfCli::Sf::Model::SfCommandConnection.new target_org: org_alias, instance_url: org_info.instance_url
|
8
|
+
SfCli::Sf::Model.set_connection conn
|
9
|
+
end
|
10
|
+
|
11
|
+
def generate(*object_types)
|
12
|
+
SfCli::Sf::Model.generate object_types
|
13
|
+
end
|
14
|
+
|
15
|
+
def connection
|
16
|
+
SfCli::Sf::Model.connection
|
17
|
+
end
|
18
|
+
|
19
|
+
def target_org
|
20
|
+
connection.target_org
|
21
|
+
end
|
22
|
+
|
23
|
+
alias :sfinit :sf_init
|
24
|
+
alias :gen :generate
|
25
|
+
alias :conn :connection
|
26
|
+
alias :org :target_org
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sf_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takanobu Maekawa
|
@@ -13,7 +13,8 @@ dependencies: []
|
|
13
13
|
description: This is a class library for introducing Salesforce CLI to Ruby scripting.
|
14
14
|
Currenty only sf command is the target of development.
|
15
15
|
email:
|
16
|
-
executables:
|
16
|
+
executables:
|
17
|
+
- sfc
|
17
18
|
extensions: []
|
18
19
|
extra_rdoc_files:
|
19
20
|
- README.rdoc
|
@@ -21,7 +22,9 @@ extra_rdoc_files:
|
|
21
22
|
files:
|
22
23
|
- CHANGELOG.md
|
23
24
|
- README.rdoc
|
25
|
+
- bin/sfc
|
24
26
|
- lib/sf_cli.rb
|
27
|
+
- lib/sf_cli/sf/console.rb
|
25
28
|
- lib/sf_cli/sf/core/base.rb
|
26
29
|
- lib/sf_cli/sf/data/bulk_result_v2.rb
|
27
30
|
- lib/sf_cli/sf/data/core.rb
|