smtpapi 0.1.8 → 0.1.9

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: 03db13b8fad2cfff41a85a74ae3d5b43c463b358c35bcad5a8d7dfa8ae1f06b3
4
- data.tar.gz: 2e6fc93174ddd3aa70ddfe929b2df651d07c0f16926e6cc71c44b2c4a91fc96f
3
+ metadata.gz: 7ea33650a2c95f7382b2803af80c12b1da1a20d33e11e8b118fb417687375c25
4
+ data.tar.gz: 5ec8b658a270602e58f7637e798f575cae607e1a5355b505e73f651923a0a403
5
5
  SHA512:
6
- metadata.gz: aa7d466509d90184e2c5c926af626e4a2105b063d5837f986736086dd541c2bc0b792bd1bad9a49cb8ee591c4ad42db8ea39b94795692bc0786e526e84961c8c
7
- data.tar.gz: ce4488347de557411bb13a8b197d617e84b4148b72d17d130f00b6c6ce24a56a91cd7d5f44aba9a2ddc6d174af3a945e2431e767ed1abf949752657706b88f53
6
+ metadata.gz: '02946689ed0272f288e96d3b38df12ed1dedda00b917aead376b3337cdcc90ebbd967a2735d67c8e7682b21aa42ad7e659f45ff8788e87a788e66b34db7c43b4'
7
+ data.tar.gz: a6aa16767d179f639dbfcce93e8b8bc0ade6c3c643d512456de1dfa47a8e4cd3b345b1d8c53e293621b303e72656b8956d35198bc511a69cf687732cf3b945f1
@@ -16,10 +16,6 @@ ParameterLists:
16
16
  AbcSize:
17
17
  Max: 34
18
18
 
19
- # Increase max number of "/" in %r
20
- RegexpLiteral:
21
- MaxSlashes: 0
22
-
23
19
  # Increase the max line number of class
24
20
  ClassLength:
25
21
  Max: 250
@@ -30,3 +26,6 @@ CyclomaticComplexity:
30
26
 
31
27
  PerceivedComplexity:
32
28
  Max: 11
29
+
30
+ Metrics/LineLength:
31
+ Max: 100
@@ -1,6 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - ruby-head
4
3
  - 2.7
5
4
  - 2.6
6
5
  - 2.5
@@ -10,14 +9,9 @@ before_script:
10
9
  - make install
11
10
  script:
12
11
  - make test
13
- matrix:
14
- allow_failures:
15
- - rvm: ruby-head
16
- fast_finish: true
17
12
  deploy:
18
13
  provider: rubygems
19
- api_key:
20
- secure: PRNz0pPyO99KdYcQ1WKkunc3TOz1N5ZmdT997KlzRYa5uos+IFqr5UsztJzOrus5iWoQdKKtLGSRYe1SFnXDkSOwK61Q5YvYdSqF3OE/QD63qHub+is4CxmfMmXg+eBGreSH+kIWlSD8N3ic2CDZR8JoQmhPcit6zCZSN3WVRfY=
14
+ api_key: $RUBYGEMS_API_KEY
21
15
  gem: smtpapi
22
16
  on:
23
17
  tags: true
@@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ [2020-09-02] Version 0.1.9
7
+ --------------------------
8
+ **Library - Chore**
9
+ - [PR #71](https://github.com/sendgrid/smtpapi-ruby/pull/71): Conformance To Style Standards With RuboCop & TravisCI. Thanks to [@alanunruh](https://github.com/alanunruh)!
10
+
11
+
6
12
  [2020-08-19] Version 0.1.8
7
13
  --------------------------
8
14
  **Library - Docs**
@@ -9,8 +9,6 @@ Hello! Thank you for choosing to help contribute to one of the SendGrid open sou
9
9
  - [Creating a Pull Request](#creating-a-pull-request)
10
10
  - [Code Reviews](#code-reviews)
11
11
 
12
- We use [Milestones](https://github.com/sendgrid/smtpapi-ruby/milestones) to help define current roadmaps, please feel free to grab an issue from the current milestone. Please indicate that you have begun work on it to avoid collisions. Once a PR is made, community review, comments, suggestions, and additional PRs are welcomed and encouraged.
13
-
14
12
  <a name="feature-request"></a>
15
13
  ## Feature Request
16
14
 
data/Makefile CHANGED
@@ -4,4 +4,5 @@ install:
4
4
  gem install bundler:1.14.6; bundle install
5
5
 
6
6
  test:
7
+ rubocop
7
8
  rake test
data/README.md CHANGED
@@ -19,7 +19,6 @@ All updates to this library is documented in our [CHANGELOG](CHANGELOG.md).
19
19
  - [Installation](#installation)
20
20
  - [Quick Start](#quick-start)
21
21
  - [Usage](#usage)
22
- - [Roadmap](#roadmap)
23
22
  - [How to Contribute](#contribute)
24
23
  - [About](#about)
25
24
  - [License](#license)
@@ -79,11 +78,6 @@ print header.to_json
79
78
  - [SendGrid Docs](https://sendgrid.com/docs/API_Reference/SMTP_API/index.html)
80
79
  - [Example Code](examples)
81
80
 
82
- <a name="roadmap"></a>
83
- # Roadmap
84
-
85
- If you are interested in the future direction of this project, please take a look at our [milestones](https://github.com/sendgrid/smtpapi-ruby/milestones). We would love to hear your feedback.
86
-
87
81
  <a name="contribute"></a>
88
82
  # How to Contribute
89
83
 
@@ -111,6 +111,26 @@ module Smtpapi
111
111
  self
112
112
  end
113
113
 
114
+ def json_string
115
+ escape_unicode(to_array.to_json)
116
+ end
117
+ alias_method :to_json, :json_string
118
+
119
+ def escape_unicode(str)
120
+ str.unpack('U*').map do |i|
121
+ if i > 65_535
122
+ "\\u#{format('%04x', ((i - 0x10000) / 0x400 + 0xD800))}" \
123
+ "\\u#{format('%04x', ((i - 0x10000) % 0x400 + 0xDC00))}"
124
+ elsif i > 127
125
+ "\\u#{format('%04x', i)}"
126
+ else
127
+ i.chr('UTF-8')
128
+ end
129
+ end.join
130
+ end
131
+
132
+ protected
133
+
114
134
  def to_array
115
135
  data = {}
116
136
  data['to'] = @to unless @to.empty?
@@ -132,26 +152,5 @@ module Smtpapi
132
152
 
133
153
  data
134
154
  end
135
-
136
- protected :to_array
137
-
138
- def json_string
139
- escape_unicode(to_array.to_json)
140
- end
141
-
142
- alias :to_json :json_string
143
-
144
- def escape_unicode(str)
145
- str.unpack('U*').map do |i|
146
- if i > 65_535
147
- "\\u#{format('%04x', ((i - 0x10000) / 0x400 + 0xD800))}" \
148
- "\\u#{format('%04x', ((i - 0x10000) % 0x400 + 0xDC00))}"
149
- elsif i > 127
150
- "\\u#{format('%04x', i)}"
151
- else
152
- i.chr('UTF-8')
153
- end
154
- end.join
155
- end
156
155
  end
157
156
  end
@@ -2,5 +2,5 @@
2
2
  # SendGrid smtpapi
3
3
  #
4
4
  module Smtpapi
5
- VERSION = '0.1.8'.freeze
5
+ VERSION = '0.1.9'.freeze
6
6
  end
@@ -13,8 +13,8 @@ Gem::Specification.new do |spec|
13
13
  spec.license = 'MIT'
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0")
16
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
16
+ spec.executables = spec.files.grep(/^bin/) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(/^(test|spec|features)/)
18
18
  spec.require_paths = ['lib']
19
19
 
20
20
  spec.add_development_dependency 'rake'
@@ -7,7 +7,7 @@ require './lib/smtpapi'
7
7
  #
8
8
  class SmtpapiTest < Test::Unit::TestCase
9
9
  def test_version
10
- assert_equal('0.1.8', Smtpapi::VERSION)
10
+ assert_equal('0.1.9', Smtpapi::VERSION)
11
11
  end
12
12
 
13
13
  def test_empty
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smtpapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wataru Sato
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-08-19 00:00:00.000000000 Z
12
+ date: 2020-09-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake