sf_cli 1.0.0.beta5 → 1.0.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
  SHA256:
3
- metadata.gz: d0d747d19bb4e6c437c2314d83d2e11e138b8f3e241a43a59556fa7fad0829f6
4
- data.tar.gz: 9474614d2da8a4bf6b7bc297d81d3221b90a13a65dba0727c1aa8067418bf37b
3
+ metadata.gz: c83fc3297315182771f73c3ff599bfdd9abcff1c72a401d69bc8a734e9c7cd17
4
+ data.tar.gz: 8ed2425d43258abcc43e7ba9ec0dadf1cc18474d47ea286b38998b564cd68e6d
5
5
  SHA512:
6
- metadata.gz: 951b09d44c48730ddb22fbe60b54b58179a4c5b34d42e2b374f5a68c291c1d5514dc735cd6a7585840cfaec1936d4b9187ab6846472d870142e502ddec1e8368
7
- data.tar.gz: 4636eb0848036329af68fb63aec261e4eee191147d6c4327b4cc6ad4f4d516a8ae3c59239af0d969a0cbdc6ce6d8979e00984f90770167fe37e369bce2b3434c
6
+ metadata.gz: f97ab229a3000ac570e2d46ccaf393a6f64fd5717587449dede15c149286624b2b37356f7ef5bbe23772a8e8f14519d291b3addfab0114b5963c5831d7f3d604
7
+ data.tar.gz: fb431e461147f16d9a2bac7cf13970f011dc53d77f936dd09a60ed47b2b28259722c3457f435136bfae03673d4bb8df6099ff234852fd03d16c221cf284fe481
data/README.rdoc CHANGED
@@ -63,3 +63,20 @@ With sf command:
63
63
  Doing the same thing independently:
64
64
  contact = Contact.select(:Id, :Name).where(Name: 'Akin Kristen').take
65
65
  contact.Name # Akin Kristen
66
+ == Developer Console
67
+ Developer console integrates both sf_cli's command methods and object model librry into IRB to make scripting easier in REPL.
68
+
69
+ You can directly use sf_cli's command methods:
70
+ $ sf_cli
71
+ > sf.query "SELECT Id, Name FROM Case", target_org: :your_org
72
+
73
+ Object Model is also available:
74
+ > use :your_org_name
75
+ > gen :Account, :Contact, :User #=> generate 3 Object model classes
76
+ > acc = Account.find_by Name: 'Hoge Fuga'
77
+
78
+ There are some other console commands:
79
+ > query "SELECT Id, Name, ... FROM BazBar__c" # just same as `sf data query` with human readable format
80
+ > apex "System.debug('abc');" # execute Apex code instantly
81
+
82
+ Type `help` for the help of all console commands
@@ -12,8 +12,6 @@ module SfCli
12
12
  module Commands
13
13
  def use(target_org)
14
14
  org_info = sf.org.display target_org: target_org
15
- #sf.org.login_web target_org: target_org, instance_url: org_info.instance_url unless org_info.connected?
16
-
17
15
  conn = SfCli::Sf::Model::SfCommandConnection.new target_org: target_org, instance_url: org_info.instance_url
18
16
  conn.open unless org_info.connected?
19
17
 
@@ -59,11 +57,11 @@ module SfCli
59
57
  alias :gen :generate
60
58
  alias :conn :connection
61
59
 
62
- def help(command = nil)
60
+ def help
63
61
  conf.inspect_mode = false
64
62
  puts <<~HELP
65
63
  Available commands:
66
- use --- set current org. If you use your default org, this isn't needed.
64
+ use --- set current org.
67
65
  gen --- generate Object model classes
68
66
  query --- Query by SOQL with human readable format
69
67
  apex --- run Apex code
@@ -74,14 +72,14 @@ module SfCli
74
72
  use target-org
75
73
 
76
74
  parameters:
77
- targat-org --- Username or alias of the org you are going to use.
75
+ targat-org --- Username or alias of the org you are going to use. If you are not sure about them, check by `sf org list`.
78
76
 
79
77
  [gen]
80
78
  gen object-name, object-name, ...
81
79
  generate object-name, object-name, ...
82
80
 
83
81
  parameters:
84
- object-name --- Comma separated Names. Symbol or String can be OK. At least 1 object name is required.
82
+ object-name --- Comma separated Names. Symbol or String can be OK. At least 1 object name is required.
85
83
 
86
84
  example:
87
85
  gen :Account, :Contact, :User
@@ -9,6 +9,7 @@ module SfCli
9
9
  #
10
10
  # @see https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_project_commands_unified.htm command reference
11
11
  #
12
+ # @private :nodoc: just for developers
12
13
  module Project
13
14
  # @private :nodoc: just for developers
14
15
  class Core
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: 1.0.0.beta5
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takanobu Maekawa