launch_control 0.2.0 → 0.3.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
  SHA1:
3
- metadata.gz: ee687630f13a9d0b6b0f3baa0300f5d91240cfef
4
- data.tar.gz: bc485064ffaec5ac0562a0c76fc5397f6a0c8d8f
3
+ metadata.gz: cedb72e0ceeb41f1a30265d49b5ba4cbeddd6b0a
4
+ data.tar.gz: 27b9caca86cd706b2f509347c67b0054381f7a25
5
5
  SHA512:
6
- metadata.gz: 3b962cf8888dee834f9282604cddaca3f03a055140c28040502ddbd76e84d72a2724a4fe29c1860ed51898247fc271c513bfef9dafd57f9c858930047a7585f3
7
- data.tar.gz: c02d214871a6630cd49e709483edc8fb44d6c76380bb145de7884cf346dcd0c63cfd6ce70077872e856287c056b96d1095391a6b713ba09f45a4d479c3e966f6
6
+ metadata.gz: 69908ed2fb4475dca09b5964cb9a284e50854c592f1df943186876c48d566e6d0581ca5a4dfd7e14c3ae43363763f3636cf7251b6c2489c906bd1c6585a59a63
7
+ data.tar.gz: 9b89ca09b98df72836bc22054380606bc3ca174a9e720103019cd8194eb51e35b0073f1ab39cd7d05afca8bd4ba65022422ba15e2b66e5bc2bdff63c0d0591da
@@ -1,3 +1,3 @@
1
1
  module LaunchControl
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -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.2.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-02 00:00:00.000000000 Z
11
+ date: 2015-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mandrill-api