neuromancer-indexer 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +4 -4
- data/README.md +10 -0
- data/lib/neuromancer-indexer/rspec.rb +17 -0
- data/lib/neuromancer/indexer.rb +0 -2
- data/lib/neuromancer/indexer/client.rb +3 -5
- data/lib/neuromancer/indexer/version.rb +1 -1
- data/neuromancer-indexer.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bf1df12d4386c3ef0da0ef28114803dbe0623d1
|
4
|
+
data.tar.gz: 8af4ec37e2cf7b14796926d3e403b48b20866027
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 027b8f9c4a3fc6bab3c0487f223952d41aace4a8693ca226cd8563fdc0736311f538c36f3a80264a5009d74e231b75fc84b2fdec894632aad498123fb275d3c9
|
7
|
+
data.tar.gz: b01cfdc29a4451a771b2d3a2d3c18c1d02802dd3fada8298c7be542f5b0cd4d3200e58f6c0440aa3e685dbce342c8e3276975a8c3eeb5e8c942ea2d5ccef49c4
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
neuromancer-indexer (0.
|
4
|
+
neuromancer-indexer (0.2.0)
|
5
5
|
aws-sdk-sqs
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
aws-eventstream (1.0.3)
|
11
|
-
aws-partitions (1.
|
12
|
-
aws-sdk-core (3.
|
11
|
+
aws-partitions (1.226.0)
|
12
|
+
aws-sdk-core (3.69.1)
|
13
13
|
aws-eventstream (~> 1.0, >= 1.0.2)
|
14
14
|
aws-partitions (~> 1.0)
|
15
15
|
aws-sigv4 (~> 1.1)
|
@@ -40,7 +40,7 @@ PLATFORMS
|
|
40
40
|
ruby
|
41
41
|
|
42
42
|
DEPENDENCIES
|
43
|
-
bundler (~>
|
43
|
+
bundler (~> 1.17.3)
|
44
44
|
neuromancer-indexer!
|
45
45
|
rake (~> 10.0)
|
46
46
|
rspec (~> 3.0)
|
data/README.md
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module NeuromancerSpec
|
4
|
+
def self.stub
|
5
|
+
sqs = Aws::SQS::Client.new(
|
6
|
+
region: 'eu-central-1',
|
7
|
+
stub_responses: true
|
8
|
+
)
|
9
|
+
client = Neuromancer::Indexer::Client.new(sqs)
|
10
|
+
Neuromancer::Indexer.instance_variable_set('@client', client)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.unstub
|
14
|
+
client = Neuromancer::Indexer::Client.new
|
15
|
+
Neuromancer::Indexer.instance_variable_set('@client', client)
|
16
|
+
end
|
17
|
+
end
|
data/lib/neuromancer/indexer.rb
CHANGED
@@ -6,10 +6,11 @@ require 'aws-sdk-sqs'
|
|
6
6
|
module Neuromancer
|
7
7
|
module Indexer
|
8
8
|
class Client
|
9
|
-
attr_reader :config
|
9
|
+
attr_reader :config, :sqs
|
10
10
|
|
11
|
-
def initialize
|
11
|
+
def initialize(sqs)
|
12
12
|
@config = Neuromancer::Indexer.config
|
13
|
+
@sqs = sqs || Aws::SQS::Client.new(region: config.region)
|
13
14
|
end
|
14
15
|
|
15
16
|
def index(obj)
|
@@ -24,9 +25,6 @@ module Neuromancer
|
|
24
25
|
end
|
25
26
|
|
26
27
|
private
|
27
|
-
def sqs
|
28
|
-
@sqs ||= Aws::SQS::Client.new(region: config.region)
|
29
|
-
end
|
30
28
|
|
31
29
|
def validate_message!(message)
|
32
30
|
hash = JSON.parse(message)
|
data/neuromancer-indexer.gemspec
CHANGED
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
|
|
36
36
|
|
37
37
|
spec.add_dependency 'aws-sdk-sqs'
|
38
38
|
|
39
|
-
spec.add_development_dependency 'bundler', '~>
|
39
|
+
spec.add_development_dependency 'bundler', '~> 1.17.3'
|
40
40
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
41
41
|
spec.add_development_dependency 'rake', '~> 10.0'
|
42
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neuromancer-indexer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joergen Dahlke
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-sqs
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.17.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.17.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,6 +84,7 @@ files:
|
|
84
84
|
- Rakefile
|
85
85
|
- bin/console
|
86
86
|
- bin/setup
|
87
|
+
- lib/neuromancer-indexer/rspec.rb
|
87
88
|
- lib/neuromancer/indexer.rb
|
88
89
|
- lib/neuromancer/indexer/client.rb
|
89
90
|
- lib/neuromancer/indexer/configuration.rb
|