launch_control 0.2.0 → 0.3.0
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 +4 -4
- data/lib/launch_control/version.rb +1 -1
- data/lib/launch_control.rb +6 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cedb72e0ceeb41f1a30265d49b5ba4cbeddd6b0a
|
|
4
|
+
data.tar.gz: 27b9caca86cd706b2f509347c67b0054381f7a25
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 69908ed2fb4475dca09b5964cb9a284e50854c592f1df943186876c48d566e6d0581ca5a4dfd7e14c3ae43363763f3636cf7251b6c2489c906bd1c6585a59a63
|
|
7
|
+
data.tar.gz: 9b89ca09b98df72836bc22054380606bc3ca174a9e720103019cd8194eb51e35b0073f1ab39cd7d05afca8bd4ba65022422ba15e2b66e5bc2bdff63c0d0591da
|
data/lib/launch_control.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
require "launch_control/version"
|
|
2
2
|
require "launch_control/mandrill_contract"
|
|
3
3
|
require 'mandrill'
|
|
4
|
-
require 'pry'
|
|
5
4
|
require 'active_support/core_ext/hash/keys'
|
|
6
5
|
require 'active_support/core_ext/object/blank'
|
|
6
|
+
require 'base64'
|
|
7
7
|
|
|
8
8
|
module LaunchControl
|
|
9
9
|
|
|
@@ -134,13 +134,15 @@ module LaunchControl
|
|
|
134
134
|
end
|
|
135
135
|
|
|
136
136
|
#
|
|
137
|
-
# Expects an array of hashes containing the
|
|
138
|
-
# attachment details.
|
|
137
|
+
# Expects an array of hashes containing the attachment details.
|
|
139
138
|
#
|
|
140
139
|
# i.e.
|
|
141
140
|
#
|
|
142
141
|
# [{ type: 'text/plain', 'name': 'test.txt', content: '1234' }]
|
|
143
142
|
#
|
|
143
|
+
# Type is the mime type of the file.
|
|
144
|
+
# Content is the content of the file, preferably in UTF-8 encoding.
|
|
145
|
+
#
|
|
144
146
|
def build_attachments
|
|
145
147
|
if @attachments.empty?
|
|
146
148
|
[]
|
|
@@ -150,7 +152,7 @@ module LaunchControl
|
|
|
150
152
|
{
|
|
151
153
|
'type' => attachment[:type],
|
|
152
154
|
'name' => attachment[:name],
|
|
153
|
-
'content' => attachment[:content]
|
|
155
|
+
'content' => Base64.encode64(attachment[:content])
|
|
154
156
|
}
|
|
155
157
|
end
|
|
156
158
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: launch_control
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Teague
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-12-
|
|
11
|
+
date: 2015-12-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: mandrill-api
|