sf_cli 0.0.6 → 0.0.7.beta

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +3 -3
  3. data/lib/sf_cli/sf/console.rb +26 -0
  4. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1996a0f93b6d2f48ea8762961526eab00df5601c902f2ec81f21331382973e56
4
- data.tar.gz: da4da9fe6855d6f44f7995d932e6f658565b6e41091bd4c908e651a8286ece95
3
+ metadata.gz: 6d6a73aff083990381d6c9ed7c40dcc790d19bab64017646cf96f9924aa090e1
4
+ data.tar.gz: d30ccf71200791cc1a707a467cdc32ef77ac6d7354737a601afc7558a3730db5
5
5
  SHA512:
6
- metadata.gz: 36743c7b02fbdf21626a4dcf7ce299bdce68d99e0281bac62b08180ac48792b112b130402e3b75d589f13e57acdf33b33d139db00237818b784b6ab1cd37aef4
7
- data.tar.gz: d4008513bbbf74b24de5c94f0cfc868367b37c9d2d876806e8eb2f546669768db94c5c1f981dbad732214c16ca26ee969eeb7027c59abda23d49a6e7b8e038fa
6
+ metadata.gz: f26eeca12a7a749e9f301db3fb1d65afabcda9e1cf4ebff3f114eca5e88fcbe5e4bb6671fa51c42b5872b130c69af24b5739096982b4b74cfb37e2312b9563e6
7
+ data.tar.gz: ee67beea3aca77f3f04e8bf6e2ecded31da7e90f9dffb89c54e22e8da9007514ffc3b39658cf1b15a1237663bfead78e20e7b28384288d6062966012aebd73e2
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">>
@@ -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.6
4
+ version: 0.0.7.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takanobu Maekawa
@@ -22,6 +22,7 @@ files:
22
22
  - CHANGELOG.md
23
23
  - README.rdoc
24
24
  - lib/sf_cli.rb
25
+ - lib/sf_cli/sf/console.rb
25
26
  - lib/sf_cli/sf/core/base.rb
26
27
  - lib/sf_cli/sf/data/bulk_result_v2.rb
27
28
  - lib/sf_cli/sf/data/core.rb