upperkut 0.4.2 → 0.4.3

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: 7df8b216fb097f8d01ad91f7580cb4648bbf834e89be961a6783a3689fbc03bb
4
- data.tar.gz: 7c68ccd22b96dc6b452e4b1209afad23666001b5947401248a588edcff2c0f81
3
+ metadata.gz: f0f14e4a7d808332518409862efb32023d4ce63c2b6763316926224466e4da26
4
+ data.tar.gz: cfb90ce922010cf730b1fe431f5faae1b4ef76669335832063ece76de6d7fe26
5
5
  SHA512:
6
- metadata.gz: e55d0ec6ed6316ef5090f6673ec916fcd96e9be35a3a5d9ec756aac8b7406557dc51b9484bfc4722521faec45f89bc16622d3995aa43712b352519dafc0203ad
7
- data.tar.gz: 8d0b096af3143fcec72d4deea83b25938c93b0a640a1ea306558e03983dc74d0caba66cf1d755978711fda1ba55f253b3a68cf40496a4efe6ae3be0b86e4eb8d
6
+ metadata.gz: efa7ae73e7f9830c4ddd163d66a54a730591d417f86233b780d80c033fd2f4301e7e0a819251a4c80e81830c9655fd6ebf9cbd16f58b2b11bf05684fad860686
7
+ data.tar.gz: c49347c38e4bdce0c14933297b15c456a3f258047fb67d6bc70a2e75a899f1582908d38259bd62d23e96f1be4e6b8073373555a93211ca6e95a411906ff03b0b
data/lib/upperkut/cli.rb CHANGED
@@ -13,8 +13,23 @@ module Upperkut
13
13
  end
14
14
 
15
15
  def start
16
- if file = @options[:file]
17
- require file
16
+ if target_required = @options[:require]
17
+ if File.directory?(target_required)
18
+ require 'rails'
19
+ if ::Rails::VERSION::MAJOR == 4
20
+ require File.expand_path("#{@options[:require]}/config/application.rb")
21
+ ::Rails::Application.initializer "upperkut.eager_load" do
22
+ ::Rails.application.config.eager_load = true
23
+ end
24
+
25
+ require File.expand_path("#{@options[:require]}/config/environment.rb")
26
+ else
27
+ require 'sidekiq/rails'
28
+ require File.expand_path("#{@options[:require]}/config/environment.rb")
29
+ end
30
+ else
31
+ require file
32
+ end
18
33
  end
19
34
 
20
35
  if log_level = @options[:log_level]
@@ -71,7 +86,7 @@ module Upperkut
71
86
  @options[:worker] = arg
72
87
  end
73
88
  o.on('-r', '--require FILE', 'Indicate a file to be required') do |arg|
74
- @options[:file] = arg
89
+ @options[:require] = arg
75
90
  end
76
91
  o.on('-c', '--concurrency INT', 'Numbers of threads to spawn') do |arg|
77
92
  @options[:concurrency] = Integer(arg)
@@ -1,3 +1,3 @@
1
1
  module Upperkut
2
- VERSION = '0.4.2'.freeze
2
+ VERSION = '0.4.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upperkut
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Sousa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-01 00:00:00.000000000 Z
11
+ date: 2018-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis