silent_bob 0.1.7 → 0.2.4

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: f354e5012fca522e0cd4020aec9d2dd0a5bddb32543d25456f855d80e22795b2
4
- data.tar.gz: 262b628c2a3e53b24e5cb9173db28757c150ac42faeb199e00420df1fa87ad41
3
+ metadata.gz: 16ccf1b283e9fe4e761206a27e1a65ca448a9a65617ae17db3e3def1c247c973
4
+ data.tar.gz: 44e16b133bd9b20e2f756ab89b1049e7ce435a224bd16550688d530704c3ba41
5
5
  SHA512:
6
- metadata.gz: 60242b3925ede51a4e951d7e62b3710edeb19c2cc2a5c8f3466eca2b5b7e7d5c6b470ed8a29b47fcc431287bcdbfb668388b92a117a8e5b3ea384789f7886ed7
7
- data.tar.gz: 635cc7f574329818d06277d80e737e9954b8699beceac82287afa13b914bc8be001a95e45a86989b6005df1d5cf30b17f14e0a5ad9db84b510a0d138939f01f4
6
+ metadata.gz: 28ed06e593b29df1605c7d7dd0e652e24813f6546914e94738a76c13eb34ac5e4f93c54888c367ae28f49015f4a54e4930204ac0e9213e53e421890e28c0d393
7
+ data.tar.gz: 2120a7687f604726a488a4a33122337621e8852128577885304b34fdea72d461ce9c7cef20deeb8be4d3e701f4d2031a8cab7045ff44ba9859ba7ab99fc8aa85
@@ -1,12 +1,20 @@
1
1
  stages:
2
+ - test
2
3
  - deploy
3
4
 
5
+ run_rspec:
6
+ stage: test
7
+ image: ruby:2.6.4
8
+ script:
9
+ - 'gem install bundler --no-document'
10
+ - 'bundle install'
11
+ - 'bundle exec rspec'
12
+
4
13
  publish_gem:
5
14
  stage: deploy
6
15
  image: ruby:2.6.4
7
16
  script:
8
- - 'mkdir ~/.gem'
9
- - 'echo -e "---\r\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials'
17
+ - 'mkdir -p ~/.gem && echo -e "---\r\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials'
10
18
  - 'chmod 0600 ~/.gem/credentials'
11
19
  - 'gem build silent_bob'
12
20
  - 'gem push "silent_bob-$(git describe --tags).gem"'
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
- --format documentation
1
+ --format progress
2
2
  --color
3
3
  --require spec_helper
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- silent_bob (0.1.7)
4
+ silent_bob (0.2.4)
5
5
  http (~> 4.3)
6
6
  mail (~> 2.5)
7
7
 
data/README.md CHANGED
@@ -47,7 +47,7 @@ SilentBob::SmsSender.new(to: '78881214455', body: 'sms-text', configuration: con
47
47
  To connect `SilentBob` to `ActionMailer`
48
48
 
49
49
  ```ruby
50
- ActionMailer::Base.add_delivery_method :revo_jay, SilentBob::Delivery
50
+ ActionMailer::Base.add_delivery_method :silent_bob_delivery, SilentBob::Delivery
51
51
  ```
52
52
 
53
53
  In this case `SilentBob::ConfigurationKeeper.default_config` **must be initialized**
@@ -1,7 +1,6 @@
1
1
  require 'silent_bob/version'
2
2
  require 'openssl'
3
3
  require 'http'
4
- require 'singleton'
5
4
  require 'base64'
6
5
  require 'silent_bob/configuration'
7
6
  require 'silent_bob/configuration_keeper'
@@ -36,7 +36,7 @@ module SilentBob
36
36
 
37
37
  def convert_attachments
38
38
  mail.attachments&.map do |attachment|
39
- { name: attachment.filename, body: attachment.body }
39
+ { name: attachment.filename, body: attachment.body.to_s&.encode('UTF-8') }
40
40
  end
41
41
  end
42
42
  end
@@ -44,7 +44,7 @@ module SilentBob
44
44
 
45
45
  def handle_attachments(attachments)
46
46
  attachments&.map do |attachment|
47
- { name: attachment[:name], body: Base64.encode64(attachment[:body]) }
47
+ { name: attachment[:name], body: attachment[:body]&.to_s }
48
48
  end
49
49
  end
50
50
  end
@@ -1,3 +1,3 @@
1
1
  module SilentBob
2
- VERSION = '0.1.7'.freeze
2
+ VERSION = '0.2.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: silent_bob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Lobanov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-04 00:00:00.000000000 Z
11
+ date: 2020-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http