mitake_sms 3.0.0 → 3.0.1

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: 0cf544b42ee5585ab48ee884c607ac8172d612050808ad6d7a04d3d1b50f84de
4
- data.tar.gz: 5ab5cb554757c3f064c130941bc5f6c7e1fb46b861d80f07031dbdc466eccf19
3
+ metadata.gz: ceed9a2e05d4247526e5a0719a3386d3a9dd866925d08829c78ed41ac47ff611
4
+ data.tar.gz: bf61229ec7650588a05c31bf22e91b53abe5cd1e619836be6c82352b9d6f5255
5
5
  SHA512:
6
- metadata.gz: 528e04551ed3d097c43c513ea289096167b58c16b0a11637fc6ba0baa414a1082cc0ffbbac11ea470349aab2f536fe4280736340929d5eb468bbe7680ff72b29
7
- data.tar.gz: f40efa10e466af71bea9cabb2d5f18dbf82a38250528f7cf319d7aac19ab02141fd0759105890f08c82f7e03e44f8881a801382a6cffbaca90bc747a35cdcdd6
6
+ metadata.gz: 75c255267db12788c336009c5705cdf1b4934c784ef2d66279fc47d16fb5443b3598a8055c022a2ed0bab7011160af3c2de3081f1887904efa38b6aef832a167
7
+ data.tar.gz: 4fbffd2ecda67eec403d9e254b2ba1528fceeaf19c061a5b1f909638676b113715bdb4273cae36ad9ca7f87251328e215ff14b9bd3d7d3f45ed64d00cc4f9d97
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.0.1] - 2026-11-03
9
+ ### Fixed
10
+ - Require `faraday-net_http >= 3.0`. Faraday 2.x still allows `faraday-net_http` 2.0.0, which
11
+ depends back on `faraday`; when a resolver picked it, Bundler aborted with "Your bundle requires
12
+ gems that depend on each other, creating an infinite loop"
13
+
8
14
  ## [3.0.0] - 2026-07-28
9
15
  ### Changed
10
16
  - Raised `required_ruby_version` to `>= 3.3.0`, from `>= 2.6.0`. CI now runs against
@@ -90,7 +90,7 @@ module MitakeSms
90
90
 
91
91
  perform_request('SmBulkSend', params: query_params) do |req|
92
92
  req.body = batch.map { |msg| format_batch_row(msg) }.join("\n")
93
- req.headers['Content-Type'] = 'text/plain'
93
+ req['Content-Type'] = 'text/plain'
94
94
  end
95
95
  end
96
96
 
@@ -139,7 +139,6 @@ module MitakeSms
139
139
  def build_connection
140
140
  Faraday.new(url: @config.api_url) do |conn|
141
141
  conn.request :url_encoded
142
- conn.adapter Faraday.default_adapter
143
142
  conn.options.timeout = @config.timeout
144
143
  conn.options.open_timeout = @config.open_timeout
145
144
  end
@@ -163,7 +162,7 @@ module MitakeSms
163
162
  # Mitake uses the client ID to suppress duplicate sends within 12 hours,
164
163
  # so it has to be unique per message rather than merely random.
165
164
  def generate_unique_client_id
166
- "#{Time.now.strftime('%Y%m%d%H%M%S%L')}-#{SecureRandom.uuid.delete('-')[0, 8]}"
165
+ "#{Time.now.strftime('%Y%m%d%H%M%S%L')}-#{SecureRandom.hex(4)}"
167
166
  end
168
167
  end
169
168
  end
@@ -55,16 +55,4 @@ module MitakeSms
55
55
  end
56
56
  end
57
57
  end
58
-
59
- # Methods for the MitakeSms module itself
60
- class << self
61
- def configure
62
- yield(config) if block_given?
63
- end
64
-
65
- # Return the Dry::Configurable object directly
66
- def config
67
- Configuration.config
68
- end
69
- end
70
58
  end
@@ -45,7 +45,6 @@ module MitakeSms
45
45
  def initialize(raw_response)
46
46
  @raw_response = raw_response
47
47
  @records = []
48
- @account_point = nil
49
48
  parse(raw_response)
50
49
  end
51
50
 
@@ -105,7 +104,8 @@ module MitakeSms
105
104
  def describe(record)
106
105
  status = record['statuscode']
107
106
  description = "#{status || '?'} #{STATUS_MESSAGES.fetch(status, '未知的狀態')}"
108
- record['msgid'] ? "#{record['msgid']}: #{description}" : description
107
+ msgid = record['msgid']
108
+ msgid ? "#{msgid}: #{description}" : description
109
109
  end
110
110
 
111
111
  def parse(response)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MitakeSms
4
- VERSION = "3.0.0"
4
+ VERSION = "3.0.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mitake_sms
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zac
@@ -29,6 +29,20 @@ dependencies:
29
29
  - - "<"
30
30
  - !ruby/object:Gem::Version
31
31
  version: '3.0'
32
+ - !ruby/object:Gem::Dependency
33
+ name: faraday-net_http
34
+ requirement: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '3.0'
39
+ type: :runtime
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '3.0'
32
46
  - !ruby/object:Gem::Dependency
33
47
  name: dry-configurable
34
48
  requirement: !ruby/object:Gem::Requirement
@@ -141,7 +155,6 @@ executables: []
141
155
  extensions: []
142
156
  extra_rdoc_files: []
143
157
  files:
144
- - ".rspec"
145
158
  - CHANGELOG.md
146
159
  - README.md
147
160
  - Rakefile
@@ -171,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
184
  - !ruby/object:Gem::Version
172
185
  version: '0'
173
186
  requirements: []
174
- rubygems_version: 4.0.16
187
+ rubygems_version: 4.0.20
175
188
  specification_version: 4
176
189
  summary: A Ruby client for Mitake SMS API
177
190
  test_files: []
data/.rspec DELETED
@@ -1,4 +0,0 @@
1
- --require spec_helper
2
- --format documentation
3
- --color
4
- --order random