sf_cli 0.0.6 → 0.0.7.beta2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1996a0f93b6d2f48ea8762961526eab00df5601c902f2ec81f21331382973e56
4
- data.tar.gz: da4da9fe6855d6f44f7995d932e6f658565b6e41091bd4c908e651a8286ece95
3
+ metadata.gz: dfe11b6577f9c950bc7ebe9a602392f843462d2121e4b53bad470ae5fc88d70a
4
+ data.tar.gz: 7b8be5a7d4d7fe214968a41ed334df490c59fec0c1308c922b98c53d7e6d5bc4
5
5
  SHA512:
6
- metadata.gz: 36743c7b02fbdf21626a4dcf7ce299bdce68d99e0281bac62b08180ac48792b112b130402e3b75d589f13e57acdf33b33d139db00237818b784b6ab1cd37aef4
7
- data.tar.gz: d4008513bbbf74b24de5c94f0cfc868367b37c9d2d876806e8eb2f546669768db94c5c1f981dbad732214c16ca26ee969eeb7027c59abda23d49a6e7b8e038fa
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,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rake'
4
+
5
+ Rake.application.init
6
+ Rake.application.define_task(Rake::Task, :default) { system('irb -r sf_cli/sf/console') }
7
+ Rake.application.top_level
@@ -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.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