blastengine 0.6.1 → 0.6.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fc0c6d0e0ae11a8ec331c4893a7dc01e1e864cd9e5a9170429e3a9157071e55
4
- data.tar.gz: 3209cf3a38d25d8973500ed30b2e61dcdfa21e0f2fea28e092704f600352589c
3
+ metadata.gz: 126d3a382aa2b4d8f8993bcb3b7c553d9103a8fa8f5839b3eebf0531bc1ca82a
4
+ data.tar.gz: 68cb8fd128c3583cfd4656f7eb8e78cb85309728edca64c71be1748d676ba80b
5
5
  SHA512:
6
- metadata.gz: e187cc819ef4a049ae1e3fa38903293502db78f5b81ca2ee27acb172f5a3d92429e445d076c92227476bafb5260b3667539f40b1794eef5a4a8dead7d8c41d59
7
- data.tar.gz: 72cf1b0088c672d99363c26395aef7d681aa36fdd16b468694709f08d1c16d4dff5efbb96cf267d4c67e8aa894816a2b1ae5cfb21eb97157990120603d6f6fa2
6
+ metadata.gz: a897b4db612916980a305b4800abaa7bb6ff29ebd182a4be048e9d032b97ad309327aebc49fb606f48d31c376948626df215f6cd0038249fc63366e8b5fed4e2
7
+ data.tar.gz: c33c739312e078c5d7aedccd50ddd90b7dbb42f895b8dc1288636fc3d80d288a2a04ae689e43508ade2ed8fe6e2f5cf19aef2053e3ffdd5d92526e68152ccbb0
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/blastengine/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "blastengine"
7
+ spec.version = Blastengine::VERSION
8
+ spec.authors = ["Atsushi Nakatsugawa"]
9
+ spec.email = ["atsushi@moongift.jp"]
10
+
11
+ spec.summary = "SDK for sending email by blastengine"
12
+ spec.description = "This is a SDK for sending email by blastengine."
13
+ spec.homepage = "https://blastengine.jp/"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
16
+
17
+ # spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = "https://github.com/blastengineMania/blastengine-ruby"
21
+ spec.metadata["changelog_uri"] = "https://github.com/blastengineMania/blastengine-ruby/CHANGELOG.md"
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ `git ls-files -z`.split("\x0").reject do |f|
27
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
28
+ end
29
+ end
30
+ spec.bindir = "exe"
31
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
+ spec.require_paths = ["lib"]
33
+
34
+ # Uncomment to register a new dependency of your gem
35
+ # spec.add_dependency "example-gem", "~> 1.0"
36
+
37
+ # For more information and examples about making a new gem, check out our
38
+ # guide at: https://bundler.io/guides/creating_gem.html
39
+ end
@@ -96,6 +96,17 @@ module Blastengine
96
96
  @html_part = res["html_part"]
97
97
  end
98
98
 
99
+ #
100
+ # メール送信のキャンセル
101
+ #
102
+ def cancel
103
+ # APIリクエスト用のパス
104
+ path = "/deliveries/#{@delivery_id}/cancel"
105
+ # API実行
106
+ res = @@client.patch path, {}
107
+ return res["delivery_id"]
108
+ end
109
+
99
110
  #
100
111
  # バルクメールの削除
101
112
  #
@@ -144,14 +144,6 @@ module Blastengine
144
144
  return res["delivery_id"]
145
145
  end
146
146
 
147
- def cancel
148
- # APIリクエスト用のパス
149
- path = "/deliveries/#{@delivery_id}/cancel"
150
- # API実行
151
- res = @@client.patch path, {}
152
- return res["delivery_id"]
153
- end
154
-
155
147
  def import(file, ignore_errors = false)
156
148
  # APIリクエスト用のパス
157
149
  path = "/deliveries/#{@delivery_id}/emails/import"
@@ -42,7 +42,7 @@ module Blastengine
42
42
  raise "CC or BCC is not supported when sending at a specified time." if date != nil
43
43
  raise "CC or BCC is not supported when sending to multiple recipients." if @to.size > 1
44
44
  end
45
- if date != nil || @to.size == 1
45
+ if date == nil
46
46
  return self.sendTransaction();
47
47
  end
48
48
  return self.sendBulk(date)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Blastengine
4
- VERSION = "0.6.1"
4
+ VERSION = "0.6.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blastengine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Atsushi Nakatsugawa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-06 00:00:00.000000000 Z
11
+ date: 2024-04-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a SDK for sending email by blastengine.
14
14
  email:
@@ -25,6 +25,7 @@ files:
25
25
  - LICENSE
26
26
  - README.md
27
27
  - Rakefile
28
+ - blastengine.gemspec
28
29
  - lib/blastengine.rb
29
30
  - lib/blastengine/base.rb
30
31
  - lib/blastengine/bulk.rb