sqrewdriver 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +52 -0
- data/LICENSE.txt +21 -0
- data/README.md +84 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/sqrewdriver.rb +20 -0
- data/lib/sqrewdriver/client.rb +208 -0
- data/lib/sqrewdriver/errors.rb +21 -0
- data/lib/sqrewdriver/serdes/json_serde.rb +42 -0
- data/lib/sqrewdriver/serdes/raw_serde.rb +16 -0
- data/lib/sqrewdriver/version.rb +3 -0
- data/sqrewdriver.gemspec +31 -0
- metadata +130 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 960177a8b086b8f3a761255650cd099772374d5a775fa0eaddadbc7c11d0a4e6
|
4
|
+
data.tar.gz: 0a187eac2691915e97ff7fa321aeef27bef3d4b3aeeee11826e310c34108ea71
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f5ffdc6396c6fca90c6c33cb385da8a7df5dff42f536dcf3716bca5733f7b7e1c1ddccbcc4957211666760c837f2550871daec05650558a9cbc917fc036d4fc1
|
7
|
+
data.tar.gz: 7ffd2951ebf5171c0821dcf1ec71a34a96953d8f3e61f17c92291104aeee33372b9d13c697be7411e30ef22913e99832b563dd2352338a9c3d2164eb44a4e0c1
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
sqrewdriver (0.1.0)
|
5
|
+
aws-sdk-sqs
|
6
|
+
concurrent-ruby
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
aws-eventstream (1.0.1)
|
12
|
+
aws-partitions (1.141.0)
|
13
|
+
aws-sdk-core (3.46.2)
|
14
|
+
aws-eventstream (~> 1.0)
|
15
|
+
aws-partitions (~> 1.0)
|
16
|
+
aws-sigv4 (~> 1.0)
|
17
|
+
jmespath (~> 1.0)
|
18
|
+
aws-sdk-sqs (1.10.0)
|
19
|
+
aws-sdk-core (~> 3, >= 3.39.0)
|
20
|
+
aws-sigv4 (~> 1.0)
|
21
|
+
aws-sigv4 (1.0.3)
|
22
|
+
concurrent-ruby (1.1.4)
|
23
|
+
diff-lcs (1.3)
|
24
|
+
jmespath (1.4.0)
|
25
|
+
oj (3.7.9)
|
26
|
+
rake (10.5.0)
|
27
|
+
rspec (3.8.0)
|
28
|
+
rspec-core (~> 3.8.0)
|
29
|
+
rspec-expectations (~> 3.8.0)
|
30
|
+
rspec-mocks (~> 3.8.0)
|
31
|
+
rspec-core (3.8.0)
|
32
|
+
rspec-support (~> 3.8.0)
|
33
|
+
rspec-expectations (3.8.2)
|
34
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
35
|
+
rspec-support (~> 3.8.0)
|
36
|
+
rspec-mocks (3.8.0)
|
37
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
+
rspec-support (~> 3.8.0)
|
39
|
+
rspec-support (3.8.0)
|
40
|
+
|
41
|
+
PLATFORMS
|
42
|
+
ruby
|
43
|
+
|
44
|
+
DEPENDENCIES
|
45
|
+
bundler (~> 2.0)
|
46
|
+
oj
|
47
|
+
rake (~> 10.0)
|
48
|
+
rspec (~> 3.0)
|
49
|
+
sqrewdriver!
|
50
|
+
|
51
|
+
BUNDLED WITH
|
52
|
+
2.0.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 joker1007
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# sqrewdriver
|
2
|
+
|
3
|
+
This gem extend Amazon SQS client. (parallelize and aggregation).
|
4
|
+
|
5
|
+
## Features
|
6
|
+
|
7
|
+
- Message buffering and Use SendMessageBatch implicitly
|
8
|
+
- Sending message on thread pool by [concurrent-ruby](https://github.com/ruby-concurrency/concurrent-ruby)
|
9
|
+
- Message Aggregation into serialized array
|
10
|
+
- Serialize message implicitly (default: JSON format)
|
11
|
+
- Currently, Support only `send_message_buffered`
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
Add this line to your application's Gemfile:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
gem 'sqrewdriver'
|
19
|
+
```
|
20
|
+
|
21
|
+
And then execute:
|
22
|
+
|
23
|
+
$ bundle
|
24
|
+
|
25
|
+
Or install it yourself as:
|
26
|
+
|
27
|
+
$ gem install sqrewdriver
|
28
|
+
|
29
|
+
## Usage
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
client = Sqrewdriver::Client.new(queue_url: "https://sqs.ap-northeast-1.amazonaws.com/dummy/dummy")
|
33
|
+
|
34
|
+
# or
|
35
|
+
|
36
|
+
sqs = Aws::SQS::Client.new(log_level: :debug)
|
37
|
+
client = Sqrewdriver::Client.new(
|
38
|
+
queue_url: "https://sqs.ap-northeast-1.amazonaws.com/dummy/dummy",
|
39
|
+
client: sqs
|
40
|
+
)
|
41
|
+
|
42
|
+
# If use message aggregation
|
43
|
+
|
44
|
+
client = Sqrewdriver::Client.new(
|
45
|
+
queue_url: "https://sqs.ap-northeast-1.amazonaws.com/dummy/dummy",
|
46
|
+
aggregate_messages_per: 100
|
47
|
+
) # one SQS message is a serialized array having 100 items.
|
48
|
+
|
49
|
+
payload_data.each do |d|
|
50
|
+
client.send_message_buffered(message_body: d)
|
51
|
+
end
|
52
|
+
|
53
|
+
client.flush # Don't forget to call flush finally
|
54
|
+
|
55
|
+
# If any exception occurs when client is flushing messages,
|
56
|
+
# client raises `Sqrewdriver::SendMessageErrors`
|
57
|
+
```
|
58
|
+
|
59
|
+
### Change serializer
|
60
|
+
|
61
|
+
Serializer needs `dump(value)` method.
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
client = Sqrewdriver::Client.new(
|
65
|
+
queue_url: "https://sqs.ap-northeast-1.amazonaws.com/dummy/dummy",
|
66
|
+
serializer: YAML
|
67
|
+
)
|
68
|
+
```
|
69
|
+
|
70
|
+
If you want to pass options to serializer, Please implement wrapping class.
|
71
|
+
|
72
|
+
## Development
|
73
|
+
|
74
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
75
|
+
|
76
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
77
|
+
|
78
|
+
## Contributing
|
79
|
+
|
80
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/joker1007/sqrewdriver.
|
81
|
+
|
82
|
+
## License
|
83
|
+
|
84
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "sqrewdriver"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/sqrewdriver.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require "sqrewdriver/version"
|
2
|
+
require "sqrewdriver/serdes/json_serde"
|
3
|
+
|
4
|
+
module Sqrewdriver
|
5
|
+
class << self
|
6
|
+
# @return [#dump]
|
7
|
+
def default_serializer
|
8
|
+
@default_serializer
|
9
|
+
end
|
10
|
+
|
11
|
+
# @param serializer [#dump]
|
12
|
+
def default_serializer=(serializer)
|
13
|
+
@default_serializer = serializer
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
self.default_serializer = Serdes::JSONSerde.new
|
18
|
+
end
|
19
|
+
|
20
|
+
require "sqrewdriver/client"
|
@@ -0,0 +1,208 @@
|
|
1
|
+
require "set"
|
2
|
+
require "monitor"
|
3
|
+
require "concurrent"
|
4
|
+
require "sqrewdriver/errors"
|
5
|
+
require "aws-sdk-sqs"
|
6
|
+
|
7
|
+
module Sqrewdriver
|
8
|
+
class Client
|
9
|
+
MAX_BATCH_SIZE = 10
|
10
|
+
MAX_PAYLOAD_SIZE = 256 * 1024
|
11
|
+
|
12
|
+
def initialize(queue_url:, client: nil, threads: 32, serializer: Sqrewdriver.default_serializer, aggregate_messages_per: nil, flush_retry_count: 5, **options)
|
13
|
+
if client
|
14
|
+
@client = client
|
15
|
+
else
|
16
|
+
@client = Aws::SQS::Client.new(options)
|
17
|
+
end
|
18
|
+
|
19
|
+
@queue_url = queue_url
|
20
|
+
@message_buffer = Concurrent::Array.new
|
21
|
+
@thread_pool = Concurrent::FixedThreadPool.new(threads)
|
22
|
+
@flush_retry_count = flush_retry_count
|
23
|
+
@waiting_futures = Concurrent::Set.new
|
24
|
+
@flush_mutex = Mutex.new
|
25
|
+
@aggregate_messages_per = aggregate_messages_per
|
26
|
+
|
27
|
+
ensure_serializer_for_aggregation!(serializer)
|
28
|
+
|
29
|
+
@sending_buffer = SendingBuffer.new(client: @client, queue_url: queue_url, serializer: serializer, thread_pool: @thread_pool)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Add a message to buffer.
|
33
|
+
#
|
34
|
+
# If count of buffered messages exceed 10 or aggregate_messages_per
|
35
|
+
# else if sum of message size exceeds 256KB,
|
36
|
+
# send payload to SQS asynchronously.
|
37
|
+
def send_message_buffered(queue_url: nil, **params)
|
38
|
+
add_message_to_buffer(params)
|
39
|
+
|
40
|
+
if need_flush?
|
41
|
+
flush_async
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
class SendingBuffer
|
46
|
+
class Chunk
|
47
|
+
attr_reader :data, :bytesize
|
48
|
+
|
49
|
+
def initialize
|
50
|
+
@data = []
|
51
|
+
@bytesize = 0
|
52
|
+
end
|
53
|
+
|
54
|
+
def add(message, size)
|
55
|
+
@data << message
|
56
|
+
@bytesize += size
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
include MonitorMixin
|
61
|
+
|
62
|
+
attr_reader :chunks
|
63
|
+
|
64
|
+
def initialize(client:, queue_url:, serializer:, thread_pool:)
|
65
|
+
super()
|
66
|
+
@client = client
|
67
|
+
@queue_url = queue_url
|
68
|
+
@chunks = Concurrent::Array.new
|
69
|
+
@serializer = serializer
|
70
|
+
@thread_pool = thread_pool
|
71
|
+
end
|
72
|
+
|
73
|
+
def add_message(message)
|
74
|
+
serialized = @serializer.dump(message[:message_body])
|
75
|
+
message[:message_body] = serialized
|
76
|
+
add_size = calculate_message_size(serialized, message[:attributes])
|
77
|
+
|
78
|
+
synchronize do
|
79
|
+
@chunks << Chunk.new if @chunks.empty?
|
80
|
+
if @chunks.last.bytesize + add_size > MAX_PAYLOAD_SIZE
|
81
|
+
new_chunk = Chunk.new
|
82
|
+
new_chunk.add(message, add_size)
|
83
|
+
@chunks << new_chunk
|
84
|
+
else
|
85
|
+
@chunks.last.add(message, add_size)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
def add_aggregated_messages(messages)
|
91
|
+
base_message = messages[0]
|
92
|
+
|
93
|
+
message_bodies = messages.map { |m| m[:message_body] }
|
94
|
+
serialized = @serializer.dump(message_bodies)
|
95
|
+
base_message[:message_body] = serialized
|
96
|
+
add_size = calculate_message_size(serialized, base_message[:message_attributes])
|
97
|
+
|
98
|
+
synchronize do
|
99
|
+
@chunks << Chunk.new if @chunks.empty?
|
100
|
+
if @chunks.last.bytesize + add_size > MAX_PAYLOAD_SIZE
|
101
|
+
new_chunk = Chunk.new
|
102
|
+
new_chunk.add(base_message, add_size)
|
103
|
+
@chunks << new_chunk
|
104
|
+
else
|
105
|
+
@chunks.last.add(base_message, add_size)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
def has_full_chunk?
|
111
|
+
@chunks.size > 1
|
112
|
+
end
|
113
|
+
|
114
|
+
def send_first_chunk_async
|
115
|
+
Concurrent::Promises.future_on(@thread_pool, @chunks) do |chunks|
|
116
|
+
sending = chunks.shift
|
117
|
+
if sending
|
118
|
+
sending.data.each_with_index do |params, idx|
|
119
|
+
params[:id] = idx.to_s
|
120
|
+
params
|
121
|
+
end
|
122
|
+
send_message_batch_with_retry(entries: sending.data)
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
private
|
128
|
+
|
129
|
+
def calculate_message_size(body, attributes)
|
130
|
+
sum = body.bytesize
|
131
|
+
attributes&.each do |n, a|
|
132
|
+
sum += n.bytesize
|
133
|
+
sum += a[:data_type].bytesize
|
134
|
+
sum += a[:string_value].bytesyze
|
135
|
+
sum += a[:binary_value].bytesyze
|
136
|
+
sum += a[:string_list_values].sum(&:bytesize)
|
137
|
+
sum += a[:binaly_list_values].sum(&:bytesize)
|
138
|
+
end
|
139
|
+
sum
|
140
|
+
end
|
141
|
+
|
142
|
+
def send_message_batch_with_retry(entries:, retry_count: 0)
|
143
|
+
resp = @client.send_message_batch(queue_url: @queue_url, entries: entries)
|
144
|
+
|
145
|
+
unless resp.failed.empty?
|
146
|
+
raise SendMessageBatchFailure.new(resp.failed) if retry_count >= @flush_retry_count
|
147
|
+
|
148
|
+
failed_entries = resp.failed.map { |f| entries[f.id.to_i] }
|
149
|
+
send_message_batch_with_retry(entries: failed_entries, retry_count: retry_count + 1)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
def flush_async
|
155
|
+
until @message_buffer.empty? do
|
156
|
+
if @aggregate_messages_per
|
157
|
+
messages = @message_buffer.shift(@aggregate_messages_per)
|
158
|
+
@sending_buffer.add_aggregated_messages(messages)
|
159
|
+
else
|
160
|
+
message = @message_buffer.shift
|
161
|
+
@sending_buffer.add_message(message)
|
162
|
+
end
|
163
|
+
|
164
|
+
if @sending_buffer.has_full_chunk?
|
165
|
+
send_first_chunk_async
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
send_first_chunk_async
|
170
|
+
end
|
171
|
+
|
172
|
+
def wait_flushing(timeout = nil)
|
173
|
+
zipped = Concurrent::Promises.zip_futures_on(@thread_pool, *@waiting_futures)
|
174
|
+
exceptions = zipped.reason(timeout)
|
175
|
+
raise Sqrewdriver::SendMessageErrors.new(exceptions) if exceptions
|
176
|
+
end
|
177
|
+
|
178
|
+
def flush
|
179
|
+
flush_async
|
180
|
+
wait_flushing
|
181
|
+
end
|
182
|
+
|
183
|
+
private
|
184
|
+
|
185
|
+
def add_message_to_buffer(params)
|
186
|
+
@message_buffer << params
|
187
|
+
end
|
188
|
+
|
189
|
+
def need_flush?
|
190
|
+
@message_buffer.length >= (@aggregate_messages_per&.*(10) || 10)
|
191
|
+
end
|
192
|
+
|
193
|
+
def send_first_chunk_async
|
194
|
+
future = @sending_buffer.send_first_chunk_async
|
195
|
+
@waiting_futures << future
|
196
|
+
future.on_resolution_using(@thread_pool) do |fulfilled, value, reason|
|
197
|
+
@waiting_futures.delete(future)
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
def ensure_serializer_for_aggregation!(serializer)
|
202
|
+
valid_serializer = @aggregate_messages_per.nil? || serializer.is_a?(Sqrewdriver::Serdes::JSONSerde)
|
203
|
+
unless valid_serializer
|
204
|
+
raise InvalidSerializer, "If you use `aggregate_messages_per`, serializer must be `Oj` or `MultiJson`"
|
205
|
+
end
|
206
|
+
end
|
207
|
+
end
|
208
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Sqrewdriver
|
2
|
+
class SendMessageErrors < StandardError
|
3
|
+
attr :errors
|
4
|
+
|
5
|
+
def initialize(errors)
|
6
|
+
@errors = errors
|
7
|
+
end
|
8
|
+
|
9
|
+
def messages
|
10
|
+
@errors.map(&:message)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class SendMessageBatchFailure < StandardError
|
15
|
+
attr_reader :failed
|
16
|
+
|
17
|
+
def initialize(failed)
|
18
|
+
@failed = failed
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Sqrewdriver
|
2
|
+
module Serdes
|
3
|
+
class JSONSerde
|
4
|
+
class JSONWrapper
|
5
|
+
def dump(val, **options)
|
6
|
+
JSON.generate(val, **options)
|
7
|
+
end
|
8
|
+
|
9
|
+
def load(val, **options)
|
10
|
+
JSON.load(val, nil, **options)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def initialize(backend: :json, serialize_options: {}, deserialize_options: {})
|
15
|
+
@serialize_options = serialize_options
|
16
|
+
@deserialize_options = deserialize_options
|
17
|
+
@backend = lookup_json_backend(backend)
|
18
|
+
end
|
19
|
+
|
20
|
+
def dump(val)
|
21
|
+
@backend.dump(val, **@serialize_options)
|
22
|
+
end
|
23
|
+
|
24
|
+
def load(val)
|
25
|
+
@backend.load(val, **@deserialize_options)
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def lookup_json_backend(name)
|
31
|
+
case name
|
32
|
+
when :json
|
33
|
+
require "json"
|
34
|
+
JSONWrapper.new
|
35
|
+
when :oj
|
36
|
+
require "oj"
|
37
|
+
Oj
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
data/sqrewdriver.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "sqrewdriver/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "sqrewdriver"
|
7
|
+
spec.version = Sqrewdriver::VERSION
|
8
|
+
spec.authors = ["joker1007"]
|
9
|
+
spec.email = ["kakyoin.hierophant@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = %q{This gem extend Amazon SQS client. (parallelize and aggregation)}
|
12
|
+
spec.description = %q{This gem extend Amazon SQS client. (parallelize and aggregation)}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
# Specify which files should be added to the gem when it is released.
|
17
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
19
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
end
|
21
|
+
spec.bindir = "exe"
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_runtime_dependency "aws-sdk-sqs"
|
26
|
+
spec.add_runtime_dependency "concurrent-ruby"
|
27
|
+
|
28
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
29
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
30
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sqrewdriver
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- joker1007
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-03-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aws-sdk-sqs
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: concurrent-ruby
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
description: This gem extend Amazon SQS client. (parallelize and aggregation)
|
84
|
+
email:
|
85
|
+
- kakyoin.hierophant@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- ".travis.yml"
|
93
|
+
- Gemfile
|
94
|
+
- Gemfile.lock
|
95
|
+
- LICENSE.txt
|
96
|
+
- README.md
|
97
|
+
- Rakefile
|
98
|
+
- bin/console
|
99
|
+
- bin/setup
|
100
|
+
- lib/sqrewdriver.rb
|
101
|
+
- lib/sqrewdriver/client.rb
|
102
|
+
- lib/sqrewdriver/errors.rb
|
103
|
+
- lib/sqrewdriver/serdes/json_serde.rb
|
104
|
+
- lib/sqrewdriver/serdes/raw_serde.rb
|
105
|
+
- lib/sqrewdriver/version.rb
|
106
|
+
- sqrewdriver.gemspec
|
107
|
+
homepage: ''
|
108
|
+
licenses:
|
109
|
+
- MIT
|
110
|
+
metadata: {}
|
111
|
+
post_install_message:
|
112
|
+
rdoc_options: []
|
113
|
+
require_paths:
|
114
|
+
- lib
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
requirements: []
|
126
|
+
rubygems_version: 3.0.3
|
127
|
+
signing_key:
|
128
|
+
specification_version: 4
|
129
|
+
summary: This gem extend Amazon SQS client. (parallelize and aggregation)
|
130
|
+
test_files: []
|