basquiat 1.3.0.pre.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/Guardfile +8 -7
  4. data/README.md +4 -2
  5. data/Rakefile +2 -0
  6. data/basquiat.gemspec +5 -5
  7. data/lib/basquiat/adapters/base_adapter.rb +10 -9
  8. data/lib/basquiat/adapters/base_message.rb +1 -0
  9. data/lib/basquiat/adapters/rabbitmq/configuration.rb +14 -13
  10. data/lib/basquiat/adapters/rabbitmq/connection.rb +7 -4
  11. data/lib/basquiat/adapters/rabbitmq/events.rb +3 -4
  12. data/lib/basquiat/adapters/rabbitmq/message.rb +6 -1
  13. data/lib/basquiat/adapters/rabbitmq/requeue_strategies/auto_acknowledge.rb +1 -0
  14. data/lib/basquiat/adapters/rabbitmq/requeue_strategies/base_strategy.rb +2 -1
  15. data/lib/basquiat/adapters/rabbitmq/requeue_strategies/basic_acknowledge.rb +1 -0
  16. data/lib/basquiat/adapters/rabbitmq/requeue_strategies/dead_lettering.rb +2 -3
  17. data/lib/basquiat/adapters/rabbitmq/requeue_strategies/delayed_delivery.rb +24 -25
  18. data/lib/basquiat/adapters/rabbitmq/requeue_strategies.rb +1 -0
  19. data/lib/basquiat/adapters/rabbitmq/session.rb +6 -0
  20. data/lib/basquiat/adapters/rabbitmq_adapter.rb +2 -1
  21. data/lib/basquiat/adapters/test_adapter.rb +1 -0
  22. data/lib/basquiat/adapters.rb +1 -0
  23. data/lib/basquiat/errors/strategy_not_registered.rb +1 -0
  24. data/lib/basquiat/errors/subclass_responsibility.rb +1 -3
  25. data/lib/basquiat/errors.rb +1 -0
  26. data/lib/basquiat/interfaces/base.rb +7 -1
  27. data/lib/basquiat/rails/railtie.rb +1 -0
  28. data/lib/basquiat/support/configuration.rb +3 -2
  29. data/lib/basquiat/support/hash_refinements.rb +1 -0
  30. data/lib/basquiat/support/json.rb +1 -0
  31. data/lib/basquiat/support.rb +1 -0
  32. data/lib/basquiat/version.rb +2 -1
  33. data/lib/basquiat.rb +2 -1
  34. data/spec/lib/adapters/base_adapter_spec.rb +1 -0
  35. data/spec/lib/adapters/base_message_spec.rb +1 -0
  36. data/spec/lib/adapters/rabbitmq/configuration_spec.rb +1 -0
  37. data/spec/lib/adapters/rabbitmq/connection_spec.rb +1 -0
  38. data/spec/lib/adapters/rabbitmq/events_spec.rb +1 -0
  39. data/spec/lib/adapters/rabbitmq/message_spec.rb +1 -0
  40. data/spec/lib/adapters/rabbitmq/requeue_strategies/auto_acknowledge_spec.rb +1 -0
  41. data/spec/lib/adapters/rabbitmq/requeue_strategies/base_strategy_spec.rb +11 -0
  42. data/spec/lib/adapters/rabbitmq/requeue_strategies/basic_acknowledge_spec.rb +12 -5
  43. data/spec/lib/adapters/rabbitmq/requeue_strategies/dead_lettering_spec.rb +15 -12
  44. data/spec/lib/adapters/rabbitmq/requeue_strategies/delayed_delivery_spec.rb +7 -8
  45. data/spec/lib/adapters/rabbitmq_adapter_spec.rb +4 -3
  46. data/spec/lib/adapters/test_adapter_spec.rb +1 -0
  47. data/spec/lib/basquiat_spec.rb +1 -0
  48. data/spec/lib/interfaces/base_spec.rb +1 -0
  49. data/spec/lib/support/configuration_spec.rb +1 -0
  50. data/spec/lib/support/hash_refinements_spec.rb +1 -0
  51. data/spec/lib/support/json_spec.rb +1 -0
  52. data/spec/spec_helper.rb +3 -0
  53. data/spec/support/rabbitmq_queue_matchers.rb +1 -0
  54. data/spec/support/shared_examples/basquiat_adapter_shared_examples.rb +2 -1
  55. metadata +7 -17
  56. data/.codeclimate.yml +0 -50
  57. data/.gitignore +0 -23
  58. data/.metrics +0 -6
  59. data/.reek +0 -2
  60. data/.rspec +0 -5
  61. data/.rubocop.yml +0 -14
  62. data/.ruby-gemset +0 -1
  63. data/.ruby-version +0 -1
  64. data/basquiat_docker.sh +0 -35
  65. data/docker/Dockerfile +0 -15
  66. data/docker/guard_start.sh +0 -3
  67. data/docker-compose.yml +0 -15
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'basquiat/adapters/rabbitmq_adapter'
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'basquiat/adapters/rabbitmq_adapter'
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'basquiat/adapters/rabbitmq_adapter'
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'basquiat/adapters/rabbitmq_adapter'
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'basquiat/adapters/rabbitmq_adapter'
3
4
 
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+ require 'spec_helper'
3
+ require 'basquiat/adapters/rabbitmq_adapter'
4
+
5
+ RSpec.describe Basquiat::Adapters::RabbitMq::BaseStrategy do
6
+ subject(:strategy) { Basquiat::Adapters::RabbitMq::BaseStrategy.new(Object.new) }
7
+
8
+ it 'needs to be extended' do
9
+ expect { strategy.run('messages') }.to raise_error Basquiat::Errors::SubclassResponsibility
10
+ end
11
+ end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'basquiat/adapters/rabbitmq_adapter'
3
4
 
@@ -5,20 +6,26 @@ describe 'Requeue Strategies' do
5
6
  let(:adapter) { Basquiat::Adapters::RabbitMq.new }
6
7
  let(:base_options) do
7
8
  { connection: { hosts: [ENV.fetch('BASQUIAT_RABBITMQ_1_PORT_5672_TCP_ADDR') { 'localhost' }],
8
- port: ENV.fetch('BASQUIAT_RABBITMQ_1_PORT_5672_TCP_PORT') { 5672 } },
9
- publisher: { persistent: true } }
9
+ port: ENV.fetch('BASQUIAT_RABBITMQ_1_PORT_5672_TCP_PORT') { 5672 } },
10
+ publisher: { persistent: true },
11
+ requeue: { enabled: true, strategy: 'basic_ack' }
12
+ }
10
13
  end
11
14
 
12
15
  before(:each) { adapter.adapter_options(base_options) }
13
16
  after(:each) { remove_queues_and_exchanges(adapter) }
14
17
 
15
- describe 'BasickAcknowledge (aka the default)' do
18
+ describe 'BasickAcknowledge' do
19
+ it 'certify that BasicAcknowledge is being used' do
20
+ expect(adapter.strategy.class).to eq Basquiat::Adapters::RabbitMq::BasicAcknowledge
21
+ end
22
+
16
23
  it 'acks a message by default' do
17
24
  adapter.subscribe_to('some.event', ->(_) { 'Everything is AWESOME!' })
18
25
  adapter.listen(block: false)
19
26
 
20
27
  adapter.publish('some.event', data: 'stupid message')
21
- sleep 0.5 # Wait for the listening thread.
28
+ sleep 0.3 # Wait for the listening thread.
22
29
 
23
30
  expect(adapter.session.queue.message_count).to eq(0)
24
31
  expect(adapter.session.queue).to_not have_unacked_messages
@@ -29,7 +36,7 @@ describe 'Requeue Strategies' do
29
36
  adapter.listen(block: false)
30
37
 
31
38
  adapter.publish('some.event', data: 'stupid message')
32
- sleep 0.5 # Wait for the listening thread.
39
+ sleep 0.3 # Wait for the listening thread.
33
40
 
34
41
  expect(adapter.session.queue.message_count).to eq(0)
35
42
  expect(adapter.session.queue).to_not have_unacked_messages
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'basquiat/adapters/rabbitmq_adapter'
3
4
 
@@ -5,13 +6,13 @@ describe Basquiat::Adapters::RabbitMq::DeadLettering do
5
6
  let(:adapter) { Basquiat::Adapters::RabbitMq.new }
6
7
  let(:base_options) do
7
8
  { connection: { hosts: [ENV.fetch('BASQUIAT_RABBITMQ_1_PORT_5672_TCP_ADDR') { 'localhost' }],
8
- port: ENV.fetch('BASQUIAT_RABBITMQ_1_PORT_5672_TCP_PORT') { 5672 } },
9
+ port: ENV.fetch('BASQUIAT_RABBITMQ_1_PORT_5672_TCP_PORT') { 5672 } },
9
10
  publisher: { persistent: true } }
10
11
  end
11
12
 
12
13
  before(:each) do
13
14
  adapter.adapter_options(base_options)
14
- adapter.adapter_options(requeue: { enabled: true, strategy: 'dead_lettering' })
15
+ adapter.adapter_options(requeue: { enabled: true, strategy: 'dead_lettering', options: { ttl: 100 } })
15
16
  end
16
17
 
17
18
  after(:each) { remove_queues_and_exchanges(adapter) }
@@ -31,12 +32,12 @@ describe Basquiat::Adapters::RabbitMq::DeadLettering do
31
32
  channel = session.channel
32
33
  expect(channel.queues.keys).to include('basquiat.dlq')
33
34
  expect(channel.queues['basquiat.dlq'].arguments)
34
- .to match(hash_including('x-dead-letter-exchange' => session.exchange.name, 'x-message-ttl' => 1000))
35
+ .to match(hash_including('x-dead-letter-exchange' => session.exchange.name, 'x-message-ttl' => 100))
35
36
  expect(session.queue.arguments).to match(hash_including('x-dead-letter-exchange' => 'basquiat.dlx'))
36
37
 
37
38
  expect do
38
39
  channel.exchanges['basquiat.dlx'].publish('some message', routing_key: 'some.event')
39
- sleep 0.1
40
+ sleep 0.01
40
41
  end.to change { channel.queues['basquiat.dlq'].message_count }.by(1)
41
42
  end
42
43
 
@@ -53,7 +54,7 @@ describe Basquiat::Adapters::RabbitMq::DeadLettering do
53
54
  end
54
55
  end
55
56
 
56
- it 'this queue then process the message' do
57
+ it 'from this queue then process the message' do
57
58
  sample = 0
58
59
  adapter.subscribe_to('sample.message',
59
60
  lambda do |msg|
@@ -64,18 +65,20 @@ describe Basquiat::Adapters::RabbitMq::DeadLettering do
64
65
  adapter.listen(block: false)
65
66
  adapter.publish('sample.message', key: 'message')
66
67
 
67
- sleep 3
68
+ sleep 0.5
68
69
  expect(sample).to eq(3)
69
70
  end
70
71
 
71
- it 'another queue then drop the message' do
72
+ it 'from another queue then drop the message' do
72
73
  ack_count = 0
73
- sample = 0
74
+ sample = 0
74
75
 
75
76
  other = Basquiat::Adapters::RabbitMq.new
76
- other.adapter_options(base_options.merge(queue:
77
- { name: 'other_queue' },
78
- requeue: { enabled: true, strategy: 'dead_lettering', ttl: 5 }))
77
+ other.adapter_options(base_options.merge(queue: { name: 'other_queue' },
78
+ requeue: { enabled: true,
79
+ strategy: 'dead_lettering',
80
+ options: { ttl: 100 } }))
81
+
79
82
  other.subscribe_to('sample.message', ->(_msg) { ack_count += 1 })
80
83
 
81
84
  adapter.subscribe_to('sample.message',
@@ -88,7 +91,7 @@ describe Basquiat::Adapters::RabbitMq::DeadLettering do
88
91
  adapter.listen(block: false)
89
92
  adapter.publish('sample.message', key: 'message')
90
93
 
91
- sleep 3
94
+ sleep 0.5
92
95
  remove_queues_and_exchanges(other)
93
96
  expect(ack_count).to eq(1)
94
97
  expect(sample).to eq(3)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'basquiat/adapters/rabbitmq_adapter'
3
4
 
@@ -6,13 +7,12 @@ describe Basquiat::Adapters::RabbitMq::DelayedDelivery do
6
7
  let(:base_options) do
7
8
  { connection: { hosts: [ENV.fetch('BASQUIAT_RABBITMQ_1_PORT_5672_TCP_ADDR') { 'localhost' }],
8
9
  port: ENV.fetch('BASQUIAT_RABBITMQ_1_PORT_5672_TCP_PORT') { 5672 } },
9
- publisher: { persistent: true } }
10
+ publisher: { persistent: true } }
10
11
  end
11
12
 
12
13
  before(:each) do
13
14
  adapter.adapter_options(base_options)
14
- adapter.class.register_strategy :ddl, Basquiat::Adapters::RabbitMq::DelayedDelivery
15
- adapter.adapter_options(requeue: { enabled: true, strategy: 'ddl' })
15
+ adapter.adapter_options(requeue: { enabled: true, strategy: 'delayed_delivery', options: { retries: 3 } })
16
16
  adapter.strategy # initialize the strategy
17
17
  end
18
18
 
@@ -26,8 +26,7 @@ describe Basquiat::Adapters::RabbitMq::DelayedDelivery do
26
26
  it 'creates the timeout queues' do
27
27
  channel = adapter.session.channel
28
28
  expect(channel.queues.keys).to contain_exactly('basquiat.ddlq_1', 'basquiat.ddlq_2', 'basquiat.ddlq_4',
29
- 'basquiat.ddlq_8', 'basquiat.ddlq_16', 'basquiat.queue',
30
- 'basquiat.ddlq_rejected')
29
+ 'basquiat.queue', 'basquiat.ddlq_rejected')
31
30
  end
32
31
 
33
32
  it 'set the message ttl and dead letter exchange for the delayed queues' do
@@ -36,7 +35,7 @@ describe Basquiat::Adapters::RabbitMq::DelayedDelivery do
36
35
  expect(channel.queues['basquiat.ddlq_1'].arguments)
37
36
  .to match(hash_including('x-dead-letter-exchange' => session.exchange.name, 'x-message-ttl' => 1_000))
38
37
 
39
- expect(channel.queues['basquiat.ddlq_8'].arguments['x-message-ttl']).to eq(8_000)
38
+ expect(channel.queues['basquiat.ddlq_4'].arguments['x-message-ttl']).to eq(4_000)
40
39
  end
41
40
 
42
41
  it 'binds the delayed queues' do
@@ -78,7 +77,7 @@ describe Basquiat::Adapters::RabbitMq::DelayedDelivery do
78
77
  adapter.listen(block: false)
79
78
 
80
79
  expect do
81
- session.publish('32000.basquiat.queue.some.event', data: 'some message')
80
+ session.publish('4000.basquiat.queue.some.event', data: 'some message')
82
81
  sleep 0.3
83
82
  end.to change { session.channel.queues['basquiat.ddlq_rejected'].message_count }.by(1)
84
83
  end
@@ -97,7 +96,7 @@ describe Basquiat::Adapters::RabbitMq::DelayedDelivery do
97
96
  end)
98
97
  adapter.listen(block: false)
99
98
  session.publish('some.event', data: 'some message')
100
- sleep 1.3
99
+ sleep 0.5
101
100
  expect(analysed).to eq(1)
102
101
  expect(session.queue).to_not have_unacked_messages
103
102
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'basquiat/adapters/rabbitmq_adapter'
3
4
 
@@ -34,7 +35,7 @@ describe Basquiat::Adapters::RabbitMq do
34
35
  adapter.subscribe_to('some.event', ->(_msg) { fail ArgumentError })
35
36
  adapter.listen(block: false, rescue_proc: -> (ex, _msg) { coisa = ex.class.to_s })
36
37
  adapter.publish('some.event', data: 'coisa')
37
- sleep 0.7
38
+ sleep 0.3
38
39
 
39
40
  expect(coisa).to eq('ArgumentError')
40
41
  end
@@ -44,7 +45,7 @@ describe Basquiat::Adapters::RabbitMq do
44
45
  adapter.subscribe_to('some.event', ->(msg) { message = msg[:data].upcase })
45
46
  adapter.listen(block: false)
46
47
  adapter.publish('some.event', data: 'message')
47
- sleep 0.7
48
+ sleep 0.3
48
49
 
49
50
  expect(message).to eq('MESSAGE')
50
51
  end
@@ -56,7 +57,7 @@ describe Basquiat::Adapters::RabbitMq do
56
57
  subject.listen(block: false)
57
58
 
58
59
  subject.publish('other.event.test', data: 'some stuff')
59
- sleep 0.7
60
+ sleep 0.3
60
61
 
61
62
  expect(message_received).to eq('SOME STUFF')
62
63
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  describe Basquiat::Adapters::Test do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  describe Basquiat do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  describe Basquiat::Base do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  describe Basquiat::Configuration do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
 
3
4
  describe Basquiat::HashRefinements do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  describe Basquiat::Json do
2
3
  it "returns an empty hash if it can't parse the payload" do
3
4
  expect(Basquiat::Json.decode('Idaho Potato')).to eq({})
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,10 @@
1
+ # frozen_string_literal: true
1
2
  $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
3
  require 'codeclimate-test-reporter'
3
4
  require 'simplecov'
5
+
4
6
  CodeClimate::TestReporter.start
7
+
5
8
  SimpleCov.start do
6
9
  add_filter { |source| source.lines_of_code <= 3 }
7
10
  add_filter { |source| source.filename =~ /spec/ }
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'uri'
2
3
  require 'net/http'
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  shared_examples_for 'a Basquiat::Adapter' do
2
3
  [:adapter_options,
3
4
  :base_options,
@@ -5,7 +6,7 @@ shared_examples_for 'a Basquiat::Adapter' do
5
6
  :publish,
6
7
  :subscribe_to,
7
8
  :disconnect].each do |meth|
8
- it "#{meth}" do
9
+ it meth.to_s do
9
10
  expect(adapter).to respond_to(:meth)
10
11
  end
11
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basquiat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0.pre.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcello "mereghost" Rocha
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-29 00:00:00.000000000 Z
11
+ date: 2016-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -258,24 +258,12 @@ executables: []
258
258
  extensions: []
259
259
  extra_rdoc_files: []
260
260
  files:
261
- - ".codeclimate.yml"
262
- - ".gitignore"
263
- - ".metrics"
264
- - ".reek"
265
- - ".rspec"
266
- - ".rubocop.yml"
267
- - ".ruby-gemset"
268
- - ".ruby-version"
269
261
  - Gemfile
270
262
  - Guardfile
271
263
  - LICENSE.txt
272
264
  - README.md
273
265
  - Rakefile
274
266
  - basquiat.gemspec
275
- - basquiat_docker.sh
276
- - docker-compose.yml
277
- - docker/Dockerfile
278
- - docker/guard_start.sh
279
267
  - lib/basquiat.rb
280
268
  - lib/basquiat/adapters.rb
281
269
  - lib/basquiat/adapters/base_adapter.rb
@@ -310,6 +298,7 @@ files:
310
298
  - spec/lib/adapters/rabbitmq/events_spec.rb
311
299
  - spec/lib/adapters/rabbitmq/message_spec.rb
312
300
  - spec/lib/adapters/rabbitmq/requeue_strategies/auto_acknowledge_spec.rb
301
+ - spec/lib/adapters/rabbitmq/requeue_strategies/base_strategy_spec.rb
313
302
  - spec/lib/adapters/rabbitmq/requeue_strategies/basic_acknowledge_spec.rb
314
303
  - spec/lib/adapters/rabbitmq/requeue_strategies/dead_lettering_spec.rb
315
304
  - spec/lib/adapters/rabbitmq/requeue_strategies/delayed_delivery_spec.rb
@@ -339,12 +328,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
339
328
  version: '0'
340
329
  required_rubygems_version: !ruby/object:Gem::Requirement
341
330
  requirements:
342
- - - ">"
331
+ - - ">="
343
332
  - !ruby/object:Gem::Version
344
- version: 1.3.1
333
+ version: '0'
345
334
  requirements: []
346
335
  rubyforge_project:
347
- rubygems_version: 2.4.8
336
+ rubygems_version: 2.5.1
348
337
  signing_key:
349
338
  specification_version: 4
350
339
  summary: A pluggable library that aims to hide message queue complexity
@@ -356,6 +345,7 @@ test_files:
356
345
  - spec/lib/adapters/rabbitmq/events_spec.rb
357
346
  - spec/lib/adapters/rabbitmq/message_spec.rb
358
347
  - spec/lib/adapters/rabbitmq/requeue_strategies/auto_acknowledge_spec.rb
348
+ - spec/lib/adapters/rabbitmq/requeue_strategies/base_strategy_spec.rb
359
349
  - spec/lib/adapters/rabbitmq/requeue_strategies/basic_acknowledge_spec.rb
360
350
  - spec/lib/adapters/rabbitmq/requeue_strategies/dead_lettering_spec.rb
361
351
  - spec/lib/adapters/rabbitmq/requeue_strategies/delayed_delivery_spec.rb
data/.codeclimate.yml DELETED
@@ -1,50 +0,0 @@
1
- # This is a sample .codeclimate.yml configured for Engine analysis on Code
2
- # Climate Platform. For an overview of the Code Climate Platform, see here:
3
- # http://docs.codeclimate.com/article/300-the-codeclimate-platform
4
-
5
- # Under the engines key, you can configure which engines will analyze your repo.
6
- # Each key is an engine name. For each value, you need to specify enabled: true
7
- # to enable the engine as well as any other engines-specific configuration.
8
-
9
- # For more details, see here:
10
- # http://docs.codeclimate.com/article/289-configuring-your-repository-via-codeclimate-yml#platform
11
-
12
- # For a list of all available engines, see here:
13
- # http://docs.codeclimate.com/article/296-engines-available-engines
14
-
15
- engines:
16
- # to turn on an engine, add it here and set enabled to `true`
17
- # to turn off an engine, set enabled to `false` or remove it
18
- rubocop:
19
- enabled: true
20
- golint:
21
- enabled: false
22
- gofmt:
23
- enabled: false
24
- eslint:
25
- enabled: false
26
- csslint:
27
- enabled: false
28
-
29
- # Engines can analyze files and report issues on them, but you can separately
30
- # decide which files will receive ratings based on those issues. This is
31
- # specified by path patterns under the ratings key.
32
-
33
- # For more details see here:
34
- # http://docs.codeclimate.com/article/289-configuring-your-repository-via-codeclimate-yml#platform
35
-
36
- # Note: If the ratings key is not specified, this will result in a 0.0 GPA on your dashboard.
37
-
38
- # ratings:
39
- # paths:
40
- # - app/**
41
- # - lib/**
42
- # - "**.rb"
43
- # - "**.go"
44
-
45
- # You can globally exclude files from being analyzed by any engine using the
46
- # exclude_paths key.
47
-
48
- #exclude_paths:
49
- #- spec/**/*
50
- #- vendor/**/*
data/.gitignore DELETED
@@ -1,23 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
18
- .idea
19
- bin
20
- docker/Gemfile
21
- log
22
- .tags*
23
- doc
data/.metrics DELETED
@@ -1,6 +0,0 @@
1
- MetricFu::Configuration.run do |config|
2
- config.configure_metric(:cane) do |cane|
3
- cane.line_length = 120
4
- cane.no_doc = 'y'
5
- end
6
- end
data/.reek DELETED
@@ -1,2 +0,0 @@
1
- IrresponsibleModule:
2
- enabled: false
data/.rspec DELETED
@@ -1,5 +0,0 @@
1
- --format documentation
2
- --color
3
- --fail-fast
4
- --order rand
5
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,14 +0,0 @@
1
- AllCops:
2
- Exclude:
3
- - 'bin/*'
4
- - 'docker/*'
5
- - 'Guardfile'
6
- - 'basquiat.gemspec'
7
- Metrics/LineLength:
8
- Max: 119
9
-
10
- Style/AlignHash:
11
- EnforcedHashRocketStyle: table
12
-
13
- Style/Documentation:
14
- Enabled: false
data/.ruby-gemset DELETED
@@ -1 +0,0 @@
1
- basquiat
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- ruby-2.2.3
data/basquiat_docker.sh DELETED
@@ -1,35 +0,0 @@
1
- #!/bin/sh
2
- function bundle_list() {
3
- bundle list
4
- }
5
-
6
- function generate_gemfile() {
7
- bundle_list | awk '
8
- BEGIN {
9
- FS=" "
10
- print "source \"https://rubygems.org\"";
11
- format = "gem \"%s\", \"%s\"\r\n";
12
- }
13
- {
14
- if ($2 == "bundler") {
15
- next;
16
- }
17
- if ($1 == "*") {
18
- match($3, "[^()]+");
19
- version = substr($3,RSTART,RLENGTH);
20
- printf format, $2, version;
21
- }
22
- }' > docker/Gemfile
23
- }
24
-
25
- function stop_and_remove_containers {
26
- docker-compose stop rabbitmq
27
- docker rm basquiat_basquiat_run_1
28
- docker rm --volumes=true basquiat_rabbitmq_1
29
- }
30
-
31
- generate_gemfile
32
- docker-compose start rabbitmq
33
- docker-compose run --service-ports basquiat
34
-
35
- trap stop_and_remove_containers EXIT SIGINT SIGTERM SIGKILL
data/docker/Dockerfile DELETED
@@ -1,15 +0,0 @@
1
- FROM mereghost/ruby:2.2.2
2
-
3
- RUN useradd -mg users -G network dev
4
- VOLUME /basquiat
5
- WORKDIR /basquiat
6
-
7
- ENV REFRESHED_AT 2015-03-29
8
- USER dev
9
- COPY Gemfile /tmp/Gemfile
10
-
11
- #This is needed by bundler =/
12
- ENV GEM_HOME=/home/dev/.gem
13
- RUN cd /tmp && bundle install
14
-
15
- EXPOSE 8808
@@ -1,3 +0,0 @@
1
- #!/usr/bin/bash
2
- cd /basquiat
3
- bin/guard start -c --no-notify -p
data/docker-compose.yml DELETED
@@ -1,15 +0,0 @@
1
- basquiat:
2
- build: docker
3
- command: /basquiat/docker/guard_start.sh
4
- volumes:
5
- - ./:/basquiat
6
- links:
7
- - rabbitmq
8
- ports:
9
- - "8808"
10
-
11
- rabbitmq:
12
- image: rabbitmq:3-management
13
- ports:
14
- - "15672"
15
- - "5672"