silent_bob 0.1.9 → 0.2.5

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: fdb324c0ba18023ec4d33523e0fd909b6836af92ab3ea6d9f5461a79ad8b2b02
4
- data.tar.gz: 837b8df0f2f4d695beb6a27cf48d99fced0f1674246ee6c818cc42bbb2451219
3
+ metadata.gz: f2f02c2941a93861999c265020d2008f2b525f80fdc53b3543852e0d6beb7579
4
+ data.tar.gz: 69be3d35c0e9774c4d7a6ae408109e3c851f45b7c4d0f14518efa14ade485c85
5
5
  SHA512:
6
- metadata.gz: aae15999b8ba0f2a47a7ee386fa9baddcfe6c2345492ff270492c30682c9aed18dcc16d563be57b6868e0b0a035c148e75ba381b15d91abf14796602dae7d1a9
7
- data.tar.gz: 91d580230af969e0c331d9a41140f3417d31aac0e5f6b31a6d255118c460d3f5c25ff1fc2c7208a58c7a4d6f23ae808f809f6a6783198a6c5697b9f9e10859d1
6
+ metadata.gz: bb4d9e899a38cbae99706313730f496e38da9899c060e8013e6aa3ea272ad36c27c553dc425a11447b4c86fbe50c7fc957b40f5bf8b0c562863b627a67bba87c
7
+ data.tar.gz: 6701a2233d6e71c6dd23444a7c80d58307a8ccb493e52afe6ab912c3221b1c0fbce99d622869bcde6a03c17f4f42af16810e99f8cce15b33d2e8896db0da2ec9
@@ -1,14 +1,21 @@
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
17
  - 'mkdir -p ~/.gem && echo -e "---\r\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials'
9
18
  - 'chmod 0600 ~/.gem/credentials'
10
- - 'echo $RUBYGEMS_API_KEY'
11
- - 'cat ~/.gem/credentials'
12
19
  - 'gem build silent_bob'
13
20
  - 'gem push "silent_bob-$(git describe --tags).gem"'
14
21
  allow_failure: true
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.9)
4
+ silent_bob (0.2.5)
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&.force_encoding('UTF-8')&.encode }
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.9'.freeze
2
+ VERSION = '0.2.5'.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.9
4
+ version: 0.2.5
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-07 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