Module: Metaforce
- Defined in:
- lib/metaforce/cli.rb,
lib/metaforce/job.rb,
lib/metaforce-beta.rb,
lib/metaforce/login.rb,
lib/metaforce/client.rb,
lib/metaforce/config.rb,
lib/metaforce/version.rb,
lib/metaforce/job/crud.rb,
lib/metaforce/manifest.rb,
lib/metaforce/job/deploy.rb,
lib/metaforce/job/retrieve.rb,
lib/metaforce/abstract_client.rb,
lib/metaforce/metadata/client.rb,
lib/metaforce/services/client.rb,
lib/metaforce/metadata/client/crud.rb,
lib/metaforce/metadata/client/file.rb,
lib/metaforce/reporters/base_reporter.rb,
lib/metaforce/reporters/deploy_reporter.rb,
lib/metaforce/reporters/retrieve_reporter.rb
Defined Under Namespace
Modules: Metadata, Reporters, Services Classes: AbstractClient, CLI, Client, Configuration, Job, Login, Manifest
Constant Summary collapse
- VERSION =
'1.2.1'
Class Attribute Summary collapse
Class Method Summary collapse
-
.configuration ⇒ Object
Returns the current Configuration.
-
.configure {|configuration| ... } ⇒ Object
Yields the Configuration.
- .log? ⇒ Boolean
-
.login(options = {}) ⇒ Object
Performs a login and retrurns the session.
-
.new(*args) ⇒ Object
Public: Initializes instances of the metadata and services api clients and provides helper methods for deploying and retrieving code.
Class Attribute Details
.log(message) ⇒ Object
27 28 29 30 |
# File 'lib/metaforce/config.rb', line 27 def log() return unless Metaforce.log? Metaforce.configuration.logger.send :debug, end |
Class Method Details
.configuration ⇒ Object
9 10 11 |
# File 'lib/metaforce/config.rb', line 9 def configuration @configuration ||= Configuration.new end |
.configure {|configuration| ... } ⇒ Object
Yields the Configuration
Metaforce.configure do |config|
config.username = "username"
config.password = "password"
end
19 20 21 |
# File 'lib/metaforce/config.rb', line 19 def configure yield configuration end |
.log? ⇒ Boolean
23 24 25 |
# File 'lib/metaforce/config.rb', line 23 def log? @log ||= false end |
.login(options = {}) ⇒ Object
Performs a login and retrurns the session
26 27 28 29 30 31 32 |
# File 'lib/metaforce-beta.rb', line 26 def login(={}) = HashWithIndifferentAccess.new() username = .fetch(:username, ENV['SALESFORCE_USERNAME']) password = .fetch(:password, ENV['SALESFORCE_PASSWORD']) security_token = .fetch(:security_token, ENV['SALESFORCE_SECURITY_TOKEN']) Login.new(username, password, security_token).login end |
.new(*args) ⇒ Object
Public: Initializes instances of the metadata and services api clients and provides helper methods for deploying and retrieving code.
21 22 23 |
# File 'lib/metaforce-beta.rb', line 21 def new(*args) Client.new(*args) end |