handling_queue 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/.rspec +1 -0
- data/.rubocop.yml +41 -41
- data/.rubocop_todo.yml +7 -7
- data/Gemfile +26 -5
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +11 -41
- data/bin/console +0 -0
- data/handling_queue.gemspec +0 -0
- data/lib/handling_queue.rb +1 -1
- data/lib/handling_queue/request.rb +10 -2
- data/lib/handling_queue/version.rb +1 -1
- metadata +4 -4
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48f9113a5c82e1dd6825800997ca032e9af2f32fcdc4b48c83cc0df32ebbf255
|
4
|
+
data.tar.gz: 18cf5dd4f6ffffd7c5ad4076cab41f6f214c1fd4b51980ea438cfd610b4af3f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e571a07ea3fda2398a0da6fceacb4e0c9beff6f5e6044ca924d286e2100243eabbf1c99639356000799f74bd03c1fbac3216896e771342581a791b4ecce0ff87
|
7
|
+
data.tar.gz: 1c6a0d7b5e2dec78ac4e6efa0b272cb12e7c1bbd7fb4f880d3b323af647032363a9f19d7332c7259d09fed4907ccb7680538e554d5d582aa52f902afc7ba670e
|
data/.gitignore
CHANGED
File without changes
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/.rubocop.yml
CHANGED
@@ -1,41 +1,41 @@
|
|
1
|
-
inherit_from: .rubocop_todo.yml
|
2
|
-
|
3
|
-
require:
|
4
|
-
- rubocop-performance
|
5
|
-
|
6
|
-
AllCops:
|
7
|
-
DisplayCopNames: true
|
8
|
-
DisplayStyleGuide: true
|
9
|
-
ExtraDetails: false
|
10
|
-
TargetRubyVersion: 2.6
|
11
|
-
Exclude:
|
12
|
-
- config/**/*
|
13
|
-
- tmp/**/*
|
14
|
-
- Capfile
|
15
|
-
- Gemfile
|
16
|
-
- Rakefile
|
17
|
-
|
18
|
-
# Follow RubyGuides on this one
|
19
|
-
Layout/EndOfLine:
|
20
|
-
EnforcedStyle: lf
|
21
|
-
|
22
|
-
# Just enough
|
23
|
-
Layout/LineLength:
|
24
|
-
Max: 100
|
25
|
-
|
26
|
-
# Allow long testing methods
|
27
|
-
Metrics/MethodLength:
|
28
|
-
Exclude:
|
29
|
-
- test/test_*.rb
|
30
|
-
|
31
|
-
# Follow RubyGuides on this one
|
32
|
-
Style/HashSyntax:
|
33
|
-
EnforcedStyle: ruby19_no_mixed_keys
|
34
|
-
|
35
|
-
# Prefer using Rubies methods
|
36
|
-
Style/HashEachMethods:
|
37
|
-
Enabled: true
|
38
|
-
Style/HashTransformKeys:
|
39
|
-
Enabled: true
|
40
|
-
Style/HashTransformValues:
|
41
|
-
Enabled: true
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
require:
|
4
|
+
- rubocop-performance
|
5
|
+
|
6
|
+
AllCops:
|
7
|
+
DisplayCopNames: true
|
8
|
+
DisplayStyleGuide: true
|
9
|
+
ExtraDetails: false
|
10
|
+
TargetRubyVersion: 2.6
|
11
|
+
Exclude:
|
12
|
+
- config/**/*
|
13
|
+
- tmp/**/*
|
14
|
+
- Capfile
|
15
|
+
- Gemfile
|
16
|
+
- Rakefile
|
17
|
+
|
18
|
+
# Follow RubyGuides on this one
|
19
|
+
Layout/EndOfLine:
|
20
|
+
EnforcedStyle: lf
|
21
|
+
|
22
|
+
# Just enough
|
23
|
+
Layout/LineLength:
|
24
|
+
Max: 100
|
25
|
+
|
26
|
+
# Allow long testing methods
|
27
|
+
Metrics/MethodLength:
|
28
|
+
Exclude:
|
29
|
+
- test/test_*.rb
|
30
|
+
|
31
|
+
# Follow RubyGuides on this one
|
32
|
+
Style/HashSyntax:
|
33
|
+
EnforcedStyle: ruby19_no_mixed_keys
|
34
|
+
|
35
|
+
# Prefer using Rubies methods
|
36
|
+
Style/HashEachMethods:
|
37
|
+
Enabled: true
|
38
|
+
Style/HashTransformKeys:
|
39
|
+
Enabled: true
|
40
|
+
Style/HashTransformValues:
|
41
|
+
Enabled: true
|
data/.rubocop_todo.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2020-06-12 22:08:35 +0300 using RuboCop version 0.85.1.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2020-06-12 22:08:35 +0300 using RuboCop version 0.85.1.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
data/Gemfile
CHANGED
@@ -1,9 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
3
|
-
|
4
|
-
|
5
|
+
# Specify your gem's dependencies in vk_music.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
group :test, :development do
|
9
|
+
# Debugging console
|
10
|
+
gem 'pry'
|
11
|
+
|
12
|
+
# Another debugging console
|
13
|
+
gem 'byebug'
|
14
|
+
|
15
|
+
# The thing, forcing you to write good code
|
16
|
+
gem 'rubocop', require: false
|
17
|
+
gem 'rubocop-performance', require: false
|
18
|
+
|
19
|
+
# Rake tasks
|
20
|
+
gem 'rake', require: false
|
21
|
+
|
22
|
+
# Testing
|
23
|
+
gem 'rspec', require: false
|
5
24
|
|
6
|
-
|
7
|
-
gem '
|
25
|
+
# Docs
|
26
|
+
gem 'yard', require: false
|
8
27
|
|
9
|
-
|
28
|
+
# Test coverage
|
29
|
+
gem 'simplecov', require: false, group: :test
|
30
|
+
end
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
@@ -1,48 +1,18 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'rspec/core/rake_task'
|
3
5
|
require 'rubocop/rake_task'
|
4
|
-
|
6
|
+
require 'yard'
|
5
7
|
|
6
|
-
|
7
|
-
Rake::TestTask.new do |t|
|
8
|
-
t.libs << 'test'
|
9
|
-
t.test_files = FileList['test/test*.rb']
|
10
|
-
t.verbose = true
|
11
|
-
end
|
8
|
+
RSpec::Core::RakeTask.new(:spec)
|
12
9
|
|
13
|
-
|
14
|
-
desc 'Generate rubocop TODO file.'
|
15
|
-
task 'todo' do
|
16
|
-
puts `rubocop --auto-gen-config`
|
17
|
-
end
|
18
|
-
end
|
10
|
+
RuboCop::RakeTask.new
|
19
11
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
desc 'List undocumented elements'
|
27
|
-
task 'undoc' do
|
28
|
-
puts `yardoc stats --list-undoc lib/*`
|
29
|
-
end
|
12
|
+
YARD::Rake::YardocTask.new do |t|
|
13
|
+
t.files = ['lib/**/*.rb']
|
14
|
+
t.options = ['--any', '--extra', '--opts']
|
15
|
+
t.stats_options = ['--list-undoc']
|
30
16
|
end
|
31
17
|
|
32
|
-
|
33
|
-
desc 'Replace CRLF with LF.'
|
34
|
-
task :dos2unix, [:pattern] do |_t, args|
|
35
|
-
path_list = Dir.glob(args.pattern || '**/*.{rb,rake}', File::FNM_EXTGLOB)
|
36
|
-
counter = 0
|
37
|
-
path_list.each do |path|
|
38
|
-
next unless File.file?(path)
|
39
|
-
|
40
|
-
counter += 1
|
41
|
-
puts "Handling `#{path}`..."
|
42
|
-
content = File.read(path, mode: 'rb')
|
43
|
-
content.gsub!(/\r\n/, "\n")
|
44
|
-
File.write(path, content, mode: 'wb')
|
45
|
-
end
|
46
|
-
puts "Handled #{counter} files."
|
47
|
-
end
|
48
|
-
end
|
18
|
+
task default: %i[rubocop spec yard]
|
data/bin/console
CHANGED
File without changes
|
data/handling_queue.gemspec
CHANGED
File without changes
|
data/lib/handling_queue.rb
CHANGED
@@ -7,12 +7,20 @@ class HandlingQueue
|
|
7
7
|
attr_accessor :obj
|
8
8
|
|
9
9
|
# @return [void] handled object or +nil+ if not handled yet.
|
10
|
-
|
10
|
+
def re
|
11
|
+
return @re if re?
|
12
|
+
end
|
13
|
+
|
14
|
+
attr_writer :re
|
15
|
+
|
16
|
+
# @return [Boolean] whether handled
|
17
|
+
def re?
|
18
|
+
defined? @re
|
19
|
+
end
|
11
20
|
|
12
21
|
# @param obj [void] object to be handled.
|
13
22
|
def initialize(obj)
|
14
23
|
@obj = obj
|
15
|
-
@re = nil
|
16
24
|
end
|
17
25
|
end
|
18
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: handling_queue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fizvlad
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -18,9 +18,9 @@ extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- ".gitignore"
|
21
|
+
- ".rspec"
|
21
22
|
- ".rubocop.yml"
|
22
23
|
- ".rubocop_todo.yml"
|
23
|
-
- ".travis.yml"
|
24
24
|
- Gemfile
|
25
25
|
- LICENSE.txt
|
26
26
|
- README.md
|
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0'
|
53
53
|
requirements: []
|
54
|
-
rubygems_version: 3.1.
|
54
|
+
rubygems_version: 3.1.2
|
55
55
|
signing_key:
|
56
56
|
specification_version: 4
|
57
57
|
summary: General purpose text bots
|