smpl_prflr 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/.rubocop.yml +65 -0
- data/.travis.yml +8 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +21 -0
- data/README.md +23 -0
- data/Rakefile +16 -0
- data/app/controllers/base_controller.rb +38 -0
- data/app/controllers/services_controller.rb +33 -0
- data/app/services/profile_service.rb +37 -0
- data/bin/smpl_prflr +5 -0
- data/config/app/app.rb +32 -0
- data/config/app/router.rb +50 -0
- data/config/application.rb +15 -0
- data/config/initializers/001_settings.rb +14 -0
- data/config.ru +4 -0
- data/lib/smpl_prflr.rb +70 -0
- data/smpl_prflr.gemspec +22 -0
- data/test/test_ping.rb +9 -0
- metadata +123 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6565230b4fcc96ffabea3468e83fc88a5f154e658c9cd51def13ff9c41d955f0
|
4
|
+
data.tar.gz: 7bf1bf8271d889aa031c4b49a465867976fae11d82fb32dbdfce7746340c74e1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f81675a1c2d92df34396583e9dea524ef868d84ac39ecad33a8d213b5f80b511ae79d0b4190e545d45f2bac56aefca8dd389302ab7862a22694f2096701a958c
|
7
|
+
data.tar.gz: 64e8ae3790723745e2a7708ba1d13c5c3bf580bfd7d78864872d8e1f5614c4ea38e7c22dfcbf9e412029624ba33d32337ce9b32c2e185d6e9a7d079f788c7ed7
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- Gemfile
|
4
|
+
- test/*
|
5
|
+
- Rakefile
|
6
|
+
- smpl_prflr.gemspec
|
7
|
+
- bin/*
|
8
|
+
- config.ru
|
9
|
+
|
10
|
+
Style/FrozenStringLiteralComment:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
Metrics/LineLength:
|
14
|
+
Max: 190
|
15
|
+
|
16
|
+
Style/Documentation:
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
Style/StringLiterals:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
Style/GlobalVars:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Metrics/MethodLength:
|
26
|
+
Max: 77
|
27
|
+
|
28
|
+
Metrics/BlockLength:
|
29
|
+
Max: 177
|
30
|
+
|
31
|
+
Naming/PredicateName:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
Style/GuardClause:
|
35
|
+
Enabled: false
|
36
|
+
|
37
|
+
Metrics/AbcSize:
|
38
|
+
Enabled: false
|
39
|
+
|
40
|
+
Style/MixinUsage:
|
41
|
+
Enabled: false
|
42
|
+
|
43
|
+
Lint/AmbiguousOperator:
|
44
|
+
Enabled: false
|
45
|
+
|
46
|
+
Naming/MemoizedInstanceVariableName:
|
47
|
+
Enabled: false
|
48
|
+
|
49
|
+
Naming/VariableNumber:
|
50
|
+
Enabled: false
|
51
|
+
|
52
|
+
Layout/DefEndAlignment:
|
53
|
+
Enabled: false
|
54
|
+
|
55
|
+
Style/MultilineIfModifier:
|
56
|
+
Enabled: false
|
57
|
+
|
58
|
+
Style/RaiseArgs:
|
59
|
+
Enabled: false
|
60
|
+
|
61
|
+
Style/IdenticalConditionalBranches:
|
62
|
+
Enabled: false
|
63
|
+
|
64
|
+
Style/ExplicitBlockArgument:
|
65
|
+
Enabled: false
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019-2022 Kondratev Ilya
|
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
|
13
|
+
in 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 NON-INFRINGEMENT. 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 THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# SMPL_PRFLR
|
2
|
+
**smpl_prflr** - Profiler your owc code.
|
3
|
+
|
4
|
+
## Dependencies:
|
5
|
+
```sh
|
6
|
+
ruby '2.7.2'
|
7
|
+
gem 'redis' '~> 4.6'
|
8
|
+
gem 'ruby-prof' '~>1.4'
|
9
|
+
```
|
10
|
+
## Install:
|
11
|
+
```sh
|
12
|
+
bundle install smpl_prflr
|
13
|
+
|
14
|
+
requre 'smpl_prflr'
|
15
|
+
```
|
16
|
+
## How is it works?:
|
17
|
+
```sh
|
18
|
+
require 'smpl_prflr'
|
19
|
+
|
20
|
+
SmplPrflr.new.p do
|
21
|
+
'your own code'
|
22
|
+
end
|
23
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
desc "Run spec"
|
5
|
+
task default: %i[test rubocop]
|
6
|
+
|
7
|
+
require 'rake/testtask'
|
8
|
+
Rake::TestTask.new do |test|
|
9
|
+
test.libs << 'test'
|
10
|
+
end
|
11
|
+
|
12
|
+
require 'rubocop/rake_task'
|
13
|
+
RuboCop::RakeTask.new do |task|
|
14
|
+
task.fail_on_error = true
|
15
|
+
task.requires << 'rubocop-rake'
|
16
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# The MIT License (MIT)
|
2
|
+
#
|
3
|
+
# Copyright (c) 2019-2022 Kondratev Ilya
|
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
|
13
|
+
# in 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 NON-INFRINGEMENT. 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 THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
class BaseController
|
24
|
+
def initialize(request)
|
25
|
+
@request = request
|
26
|
+
@response = Services::ProfileService.new
|
27
|
+
end
|
28
|
+
|
29
|
+
def not_found
|
30
|
+
build_response("not_found", status: 404)
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def build_response(body, status: 200)
|
36
|
+
[status, { "Content-Type" => "text/json" }, [body]]
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# The MIT License (MIT)
|
2
|
+
#
|
3
|
+
# Copyright (c) 2019-2022 Kondratev Ilya
|
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
|
13
|
+
# in 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 NON-INFRINGEMENT. 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 THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
class ServicesController < BaseController
|
24
|
+
def ping
|
25
|
+
result = "PONG"
|
26
|
+
build_response(result)
|
27
|
+
end
|
28
|
+
|
29
|
+
def profile
|
30
|
+
result = @response.load_profile
|
31
|
+
build_response(result)
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# The MIT License (MIT)
|
2
|
+
#
|
3
|
+
# Copyright (c) 2019-2022 Kondratev Ilya
|
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
|
13
|
+
# in 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 NON-INFRINGEMENT. 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 THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
module Services
|
24
|
+
class ProfileService
|
25
|
+
def initialize
|
26
|
+
@redis = Redis.new(
|
27
|
+
host: "127.0.0.1",
|
28
|
+
port: 6379,
|
29
|
+
db: 15
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
def load_profile
|
34
|
+
@redis.get(:profile)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/bin/smpl_prflr
ADDED
data/config/app/app.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# The MIT License (MIT)
|
2
|
+
#
|
3
|
+
# Copyright (c) 2019-2022 Kondratev Ilya
|
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
|
13
|
+
# in 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 NON-INFRINGEMENT. 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 THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
class App
|
24
|
+
def call(env)
|
25
|
+
request = Rack::Request.new(env)
|
26
|
+
serve_request(request)
|
27
|
+
end
|
28
|
+
|
29
|
+
def serve_request(request)
|
30
|
+
Router.new(request).route!
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# The MIT License (MIT)
|
2
|
+
#
|
3
|
+
# Copyright (c) 2019-2022 Kondratev Ilya
|
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
|
13
|
+
# in 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 NON-INFRINGEMENT. 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 THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
class Router
|
24
|
+
def initialize(request)
|
25
|
+
@request = request
|
26
|
+
end
|
27
|
+
|
28
|
+
def route!
|
29
|
+
return controller.not_found unless @request.get?
|
30
|
+
|
31
|
+
case @request.path
|
32
|
+
when "/ping"
|
33
|
+
controller.ping
|
34
|
+
when "/profile"
|
35
|
+
controller.profile
|
36
|
+
else
|
37
|
+
controller.not_found
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def controller
|
44
|
+
@controller ||= ServicesController.new(@request)
|
45
|
+
end
|
46
|
+
|
47
|
+
def params
|
48
|
+
JSON.parse(@request.body.read)
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# require gems
|
4
|
+
require 'bundler'
|
5
|
+
|
6
|
+
Bundler.require(:default, ENV["RACK_ENV"] || "development")
|
7
|
+
|
8
|
+
# require additional gem files
|
9
|
+
require "active_support/all"
|
10
|
+
|
11
|
+
# initialize application, logger, gems, etc.
|
12
|
+
require_all "config/initializers"
|
13
|
+
|
14
|
+
# require application
|
15
|
+
require_all "app"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "config"
|
4
|
+
|
5
|
+
Config.setup do |config|
|
6
|
+
config.const_name = "Settings"
|
7
|
+
config.use_env = false
|
8
|
+
end
|
9
|
+
|
10
|
+
env = ::ActiveSupport::StringInquirer.new(ENV["RACK_ENV"] || "development")
|
11
|
+
path = Dir.pwd << ("/config")
|
12
|
+
Config.load_and_set_settings(Config.setting_files(path, env))
|
13
|
+
|
14
|
+
Settings.env = env
|
data/config.ru
ADDED
data/lib/smpl_prflr.rb
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
# The MIT License (MIT)
|
2
|
+
#
|
3
|
+
# Copyright (c) 2019-2022 Kondratev Ilya
|
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
|
13
|
+
# in 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 NON-INFRINGEMENT. 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 THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
require 'ruby-prof'
|
24
|
+
require 'redis'
|
25
|
+
require 'logger'
|
26
|
+
|
27
|
+
class SmplPrflr
|
28
|
+
class ProfilerError < StandardError; end
|
29
|
+
DEFAULT_HOST = "127.0.0.1".freeze
|
30
|
+
|
31
|
+
# @author KILYA
|
32
|
+
# @param [String] host
|
33
|
+
# @param [Integer] port
|
34
|
+
# @param [Integer] db
|
35
|
+
# @example self.new(host: "http:/your.path", port: 555, db:1)
|
36
|
+
def initialize(host: DEFAULT_HOST, port: 6379, db: 15)
|
37
|
+
@logger = Logger.new($stdout)
|
38
|
+
@redis = Redis.new(
|
39
|
+
host: host,
|
40
|
+
port: port,
|
41
|
+
db: db
|
42
|
+
)
|
43
|
+
end
|
44
|
+
|
45
|
+
# @author KILYA
|
46
|
+
# @param nil
|
47
|
+
#
|
48
|
+
# @example PONG
|
49
|
+
# @return [String] PONG
|
50
|
+
def self.ping
|
51
|
+
"PONG"
|
52
|
+
end
|
53
|
+
|
54
|
+
# @author KILYA
|
55
|
+
# Profile block of your code
|
56
|
+
def p
|
57
|
+
profiled = ""
|
58
|
+
result = RubyProf.profile do
|
59
|
+
yield
|
60
|
+
end
|
61
|
+
|
62
|
+
printer = RubyProf::FlatPrinter.new(result)
|
63
|
+
printer.print(profiled, min_percent: 0)
|
64
|
+
@redis.set(:profile, profiled)
|
65
|
+
|
66
|
+
nil
|
67
|
+
rescue StandardError => e
|
68
|
+
@logger.error(e.message.to_s)
|
69
|
+
end
|
70
|
+
end
|
data/smpl_prflr.gemspec
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'English'
|
2
|
+
Gem::Specification.new do |s|
|
3
|
+
s.specification_version = 2 if s.respond_to? :specification_version=
|
4
|
+
if s.respond_to? :required_rubygems_version=
|
5
|
+
s.required_rubygems_version = Gem::Requirement.new('>= 0')
|
6
|
+
end
|
7
|
+
s.rubygems_version = '2.7'
|
8
|
+
s.required_ruby_version = '>=2.2'
|
9
|
+
s.name = 'smpl_prflr'
|
10
|
+
s.version = '0.0.1'
|
11
|
+
s.license = 'MIT'
|
12
|
+
s.summary = 'Profiler'
|
13
|
+
s.description = 'SmplPrflr for profiler own code.'
|
14
|
+
s.authors = ['Ilya Kondratev']
|
15
|
+
s.email = 'ilyafulleveline@gmail.com'
|
16
|
+
s.homepage = 'https://github.com/ikondratev/smpl_prflr'
|
17
|
+
s.files = `git ls-files`.split($RS)
|
18
|
+
s.add_dependency 'rubocop', '~> 1.26'
|
19
|
+
s.add_dependency 'rubocop-rake'
|
20
|
+
s.add_dependency 'ruby-prof', '~> 1.4', '>= 1.4.3'
|
21
|
+
s.add_dependency 'redis', '~> 4.6'
|
22
|
+
end
|
data/test/test_ping.rb
ADDED
metadata
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: smpl_prflr
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ilya Kondratev
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-04-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubocop
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.26'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.26'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop-rake
|
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: ruby-prof
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.4'
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 1.4.3
|
51
|
+
type: :runtime
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - "~>"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '1.4'
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 1.4.3
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: redis
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '4.6'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '4.6'
|
75
|
+
description: SmplPrflr for profiler own code.
|
76
|
+
email: ilyafulleveline@gmail.com
|
77
|
+
executables: []
|
78
|
+
extensions: []
|
79
|
+
extra_rdoc_files: []
|
80
|
+
files:
|
81
|
+
- ".gitignore"
|
82
|
+
- ".rubocop.yml"
|
83
|
+
- ".travis.yml"
|
84
|
+
- Gemfile
|
85
|
+
- LICENSE.txt
|
86
|
+
- README.md
|
87
|
+
- Rakefile
|
88
|
+
- app/controllers/base_controller.rb
|
89
|
+
- app/controllers/services_controller.rb
|
90
|
+
- app/services/profile_service.rb
|
91
|
+
- bin/smpl_prflr
|
92
|
+
- config.ru
|
93
|
+
- config/app/app.rb
|
94
|
+
- config/app/router.rb
|
95
|
+
- config/application.rb
|
96
|
+
- config/initializers/001_settings.rb
|
97
|
+
- lib/smpl_prflr.rb
|
98
|
+
- smpl_prflr.gemspec
|
99
|
+
- test/test_ping.rb
|
100
|
+
homepage: https://github.com/ikondratev/smpl_prflr
|
101
|
+
licenses:
|
102
|
+
- MIT
|
103
|
+
metadata: {}
|
104
|
+
post_install_message:
|
105
|
+
rdoc_options: []
|
106
|
+
require_paths:
|
107
|
+
- lib
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '2.2'
|
113
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
requirements: []
|
119
|
+
rubygems_version: 3.1.4
|
120
|
+
signing_key:
|
121
|
+
specification_version: 2
|
122
|
+
summary: Profiler
|
123
|
+
test_files: []
|