Class: Danger::DangerDeploygate
- Inherits:
-
Plugin
- Object
- Plugin
- Danger::DangerDeploygate
- Defined in:
- lib/deploygate/plugin.rb
Instance Attribute Summary collapse
- #token ⇒ Object
-
#user ⇒ String
Uploading user or group name.
Instance Method Summary collapse
Instance Attribute Details
#token ⇒ Object
20 21 22 |
# File 'lib/deploygate/plugin.rb', line 20 def token @token ||= ENV['DEPLOYGATE_API_TOKEN'] end |
#user ⇒ String
Uploading user or group name
11 12 13 |
# File 'lib/deploygate/plugin.rb', line 11 def user @user end |
Instance Method Details
#upload(binary, filename, message = nil, distribution_name = nil) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/deploygate/plugin.rb', line 24 def upload(binary, filename, = nil, distribution_name = nil) client = DeployGate::Client.new(user, token) response = client.upload(binary, filename, , distribution_name) app_name = response['results']['name'] revision = "##{response['results']['revision']}" url = "https://deploygate.com#{response['results']['path']}" "DeployGate Uploaded #{app_name} #{revision}, see detail: #{url}" end |