sf_cli 1.2.0.beta1 → 1.2.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: 5fc80bbeed8177decb912d239a2c8746be03041bab2b21de5277fa329c632d93
4
- data.tar.gz: 9ed9c621df404fbbe850c6ef4ca68fe09cd931d6da71081b864f8ed684aff8c0
3
+ metadata.gz: e9e80b705227bf6cc0a20eb798294a8179ac417b70ee1720626c34ede61c57f9
4
+ data.tar.gz: a47fae091fde1fa337f11a3265dc27703a14642ad3dc287dfb400f41f3e0fcdb
5
5
  SHA512:
6
- metadata.gz: 15ccdd8cfb03aa62bc4ee5726f218598ae6326c6708cd3c8fd8e8ba01ba0ed6bb0d02deedf0889dc3aa90bfb026ac89b288352152bc8fce19ae5580acbfc8361
7
- data.tar.gz: d80b59be4dd3b8b14d419b69cc04173407b129a52025621c87d46f309bdf150980cbe2b446502f7e632e44835d158bb84c7ead153baf8be45f3f656b96c59c37
6
+ metadata.gz: c4f31ede06a4efd8e9bf8e257712ffa2f5be05e0b7a06e79d7d5a056671480d06eaaaace79c5b2896ae4037ae53de46620a5337841b8e9c415397c70fffc9f59
7
+ data.tar.gz: 24a8d99be40d9f0df743dbe0839dd25c31c6d3870123f50f2b806d580c588e37578a7d2341c2eb8a73f3003748e8ddc0ef44f7315467a2e8c67841e0b65189c3
data/README.rdoc CHANGED
@@ -67,7 +67,7 @@ Doing the same thing independently:
67
67
  Developer console integrates both sf_cli's command methods and object model librry into IRB to make scripting easier in REPL.
68
68
 
69
69
  You can directly use sf_cli's command methods:
70
- $ sf_cli
70
+ $ sf_cli -i
71
71
  > sf.query "SELECT Id, Name FROM Case", target_org: :your_org
72
72
 
73
73
  Object Model is also available:
@@ -80,3 +80,15 @@ There are some other console commands:
80
80
  > apex "System.debug('abc');" # execute Apex code instantly
81
81
 
82
82
  Type *help* to know all console commands
83
+
84
+ == Utility
85
+ sf_cli command also have other functions. As of 1.2.0, it can generate Salesforce DX project.
86
+
87
+ Create a project directory and files including manifest file
88
+ $ sf_cli -g project YOUR_PROJECT_NAME
89
+
90
+ Same as above, but the manifest file is built based on the org
91
+ $ sf_cli -g project YOUR_PROJECT_NAME -o YOUR_TARGET_ORG
92
+
93
+ Build project and manifest then retreave metadata such as Apex code at once
94
+ $ sf_cli -g project YOUR_PROJECT_NAME -o YOUR_TARGET_ORG -r
data/bin/sf_cli CHANGED
@@ -19,7 +19,6 @@ ensure
19
19
  Dir.chdir base_dir
20
20
  end
21
21
 
22
-
23
22
  params = {}
24
23
  opt = OptionParser.new
25
24
  Version = SfCli::VERSION
@@ -395,8 +395,18 @@ module SfCli
395
395
  field["permissionable"]
396
396
  end
397
397
 
398
+ PicklistValue = Data.define(:active, :default_value, :label, :valid_for, :value)
399
+
398
400
  def picklist_values
399
- field["picklistValues"]
401
+ field["picklistValues"].map do |value|
402
+ PicklistValue.new(
403
+ active: value['active'],
404
+ default_value: value['defaultValue'],
405
+ label: value['label'],
406
+ valid_for: value['validFor'],
407
+ value: value['value'],
408
+ )
409
+ end
400
410
  end
401
411
 
402
412
  def polymorphic_foreign_key?
@@ -1,3 +1,3 @@
1
1
  module SfCli
2
- VERSION = '1.2.0.beta1'
2
+ VERSION = '1.2.0'
3
3
  end
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.2.0.beta1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takanobu Maekawa