rss_observer 0.1.0
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 +7 -0
- data/.circleci/config.yml +61 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.rubocop.yml +13 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +58 -0
- data/LICENSE.txt +21 -0
- data/README.md +56 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/rubocop.sh +41 -0
- data/bin/setup +8 -0
- data/lib/rss_observer/logger.rb +20 -0
- data/lib/rss_observer/middleware.rb +41 -0
- data/lib/rss_observer/version.rb +5 -0
- data/lib/rss_observer.rb +9 -0
- data/rss_observer.gemspec +33 -0
- metadata +146 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 2f2a9029cb2676680915fd9536a2d5687f93a7b49f5a26f4e25408169f148645
|
|
4
|
+
data.tar.gz: c228a4a65ecbb54993a0ad8e549293a92d89d563d6f5eb33dedfa71732966edc
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 12e390587a75867a3d9bf20657fcbdf5bb6c3fd86ed4c91f2688f9f01be0a55d617d700cb43b64732a6f0d28b6c82d444be9c3c5f3bf3bbe1448a835b3b78f22
|
|
7
|
+
data.tar.gz: bc19e017e7973c6375943fa853dc860baed1ff95058a7a5a9cff4565bda0883490dd8b6e2b3ca30af1a080701827530bb7bb75f48b7a7e1de7696c0cb392219b
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Ruby CircleCI 2.0 configuration file
|
|
2
|
+
#
|
|
3
|
+
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
|
4
|
+
#
|
|
5
|
+
version: 2
|
|
6
|
+
jobs:
|
|
7
|
+
build:
|
|
8
|
+
docker:
|
|
9
|
+
# specify the version you desire here
|
|
10
|
+
- image: circleci/ruby:2.4.1-node-browsers
|
|
11
|
+
|
|
12
|
+
# Specify service dependencies here if necessary
|
|
13
|
+
# CircleCI maintains a library of pre-built images
|
|
14
|
+
# documented at https://circleci.com/docs/2.0/circleci-images/
|
|
15
|
+
# - image: circleci/postgres:9.4
|
|
16
|
+
|
|
17
|
+
working_directory: ~/repo
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- checkout
|
|
21
|
+
|
|
22
|
+
# Download and cache dependencies
|
|
23
|
+
- restore_cache:
|
|
24
|
+
keys:
|
|
25
|
+
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
|
26
|
+
# fallback to using the latest cache if no exact match is found
|
|
27
|
+
- v1-dependencies-
|
|
28
|
+
|
|
29
|
+
- run:
|
|
30
|
+
name: install dependencies
|
|
31
|
+
command: |
|
|
32
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
|
33
|
+
|
|
34
|
+
- save_cache:
|
|
35
|
+
paths:
|
|
36
|
+
- ./vendor/bundle
|
|
37
|
+
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
|
38
|
+
|
|
39
|
+
# run tests!
|
|
40
|
+
- run:
|
|
41
|
+
name: run tests
|
|
42
|
+
command: |
|
|
43
|
+
mkdir /tmp/test-results
|
|
44
|
+
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
|
|
45
|
+
circleci tests split --split-by=timings)"
|
|
46
|
+
|
|
47
|
+
bundle exec rspec \
|
|
48
|
+
--format progress \
|
|
49
|
+
--format RspecJunitFormatter \
|
|
50
|
+
--out /tmp/test-results/rspec.xml \
|
|
51
|
+
--format progress \
|
|
52
|
+
$TEST_FILES
|
|
53
|
+
- run:
|
|
54
|
+
name: run rubocop
|
|
55
|
+
command: bash bin/rubocop.sh
|
|
56
|
+
# collect reports
|
|
57
|
+
- store_test_results:
|
|
58
|
+
path: /tmp/test-results
|
|
59
|
+
- store_artifacts:
|
|
60
|
+
path: /tmp/test-results
|
|
61
|
+
destination: test-results
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# The behavior of RuboCop can be controlled via the .rubocop.yml
|
|
2
|
+
# configuration file. It makes it possible to enable/disable
|
|
3
|
+
# certain cops (checks) and to alter their behavior if they accept
|
|
4
|
+
# any parameters. The file can be placed either in your home
|
|
5
|
+
# directory or in some project directory.
|
|
6
|
+
#
|
|
7
|
+
# RuboCop will start looking for the configuration file in the directory
|
|
8
|
+
# where the inspected file is and continue its way up to the root directory.
|
|
9
|
+
#
|
|
10
|
+
# See https://github.com/rubocop-hq/rubocop/blob/master/manual/configuration.md
|
|
11
|
+
|
|
12
|
+
Metrics/LineLength:
|
|
13
|
+
Max: 120
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
|
10
|
+
orientation.
|
|
11
|
+
|
|
12
|
+
## Our Standards
|
|
13
|
+
|
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
|
15
|
+
include:
|
|
16
|
+
|
|
17
|
+
* Using welcoming and inclusive language
|
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
|
19
|
+
* Gracefully accepting constructive criticism
|
|
20
|
+
* Focusing on what is best for the community
|
|
21
|
+
* Showing empathy towards other community members
|
|
22
|
+
|
|
23
|
+
Examples of unacceptable behavior by participants include:
|
|
24
|
+
|
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
+
advances
|
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
+
* Public or private harassment
|
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
|
30
|
+
address, without explicit permission
|
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
+
professional setting
|
|
33
|
+
|
|
34
|
+
## Our Responsibilities
|
|
35
|
+
|
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
+
response to any instances of unacceptable behavior.
|
|
39
|
+
|
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
+
threatening, offensive, or harmful.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
+
when an individual is representing the project or its community. Examples of
|
|
50
|
+
representing a project or community include using an official project e-mail
|
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
|
53
|
+
further defined and clarified by project maintainers.
|
|
54
|
+
|
|
55
|
+
## Enforcement
|
|
56
|
+
|
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
+
reported by contacting the project team at maciek@dubinski.net. All
|
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
|
63
|
+
|
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
+
members of the project's leadership.
|
|
67
|
+
|
|
68
|
+
## Attribution
|
|
69
|
+
|
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
|
72
|
+
|
|
73
|
+
[homepage]: http://contributor-covenant.org
|
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
rss_observer (0.1.0)
|
|
5
|
+
get_process_mem (~> 0.2)
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
ast (2.4.0)
|
|
11
|
+
diff-lcs (1.3)
|
|
12
|
+
ffi (1.11.1)
|
|
13
|
+
get_process_mem (0.2.4)
|
|
14
|
+
ffi (~> 1.0)
|
|
15
|
+
jaro_winkler (1.5.3)
|
|
16
|
+
parallel (1.17.0)
|
|
17
|
+
parser (2.6.4.0)
|
|
18
|
+
ast (~> 2.4.0)
|
|
19
|
+
rainbow (3.0.0)
|
|
20
|
+
rake (10.5.0)
|
|
21
|
+
rspec (3.8.0)
|
|
22
|
+
rspec-core (~> 3.8.0)
|
|
23
|
+
rspec-expectations (~> 3.8.0)
|
|
24
|
+
rspec-mocks (~> 3.8.0)
|
|
25
|
+
rspec-core (3.8.2)
|
|
26
|
+
rspec-support (~> 3.8.0)
|
|
27
|
+
rspec-expectations (3.8.4)
|
|
28
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
29
|
+
rspec-support (~> 3.8.0)
|
|
30
|
+
rspec-mocks (3.8.1)
|
|
31
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
32
|
+
rspec-support (~> 3.8.0)
|
|
33
|
+
rspec-support (3.8.2)
|
|
34
|
+
rspec_junit_formatter (0.3.0)
|
|
35
|
+
rspec-core (>= 2, < 4, != 2.12.0)
|
|
36
|
+
rubocop (0.74.0)
|
|
37
|
+
jaro_winkler (~> 1.5.1)
|
|
38
|
+
parallel (~> 1.10)
|
|
39
|
+
parser (>= 2.6)
|
|
40
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
41
|
+
ruby-progressbar (~> 1.7)
|
|
42
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
|
43
|
+
ruby-progressbar (1.10.1)
|
|
44
|
+
unicode-display_width (1.6.0)
|
|
45
|
+
|
|
46
|
+
PLATFORMS
|
|
47
|
+
ruby
|
|
48
|
+
|
|
49
|
+
DEPENDENCIES
|
|
50
|
+
bundler (~> 1.17)
|
|
51
|
+
rake (~> 10.0)
|
|
52
|
+
rspec (~> 3.0)
|
|
53
|
+
rspec_junit_formatter (~> 0.3)
|
|
54
|
+
rss_observer!
|
|
55
|
+
rubocop (~> 0.74)
|
|
56
|
+
|
|
57
|
+
BUNDLED WITH
|
|
58
|
+
1.17.2
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Maciek Dubiński
|
|
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 in
|
|
13
|
+
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 NONINFRINGEMENT. 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
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# RssObserver
|
|
2
|
+
|
|
3
|
+
Rails middleware for observing of RSS changes around the request.
|
|
4
|
+
|
|
5
|
+
[](https://circleci.com/gh/irvingwashington/rss_observer)
|
|
6
|
+
|
|
7
|
+
# Installation
|
|
8
|
+
|
|
9
|
+
Add the line
|
|
10
|
+
```gem 'rss_observer'```
|
|
11
|
+
to your Gemfile and run bundle install.
|
|
12
|
+
|
|
13
|
+
# Configuration
|
|
14
|
+
|
|
15
|
+
To use this middleware in a Rails application, modify relevant environment file (or application.rb to log rss in all environments).
|
|
16
|
+
You can use the supplied STDOUT logger and insert the RssObserver middleware after `Rails::Rack::Logger`.
|
|
17
|
+
```ruby
|
|
18
|
+
require 'rss_observer/logger'
|
|
19
|
+
module FooApp
|
|
20
|
+
class Application < Rails::Application
|
|
21
|
+
# ...
|
|
22
|
+
config.middleware.insert_after Rails::Rack::Logger, RssObserver::Middleware, RssObserver::Logger.new
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
More realistically, you'll need something more production-ready.
|
|
28
|
+
You can prepare a custom class that will make use of `Rails.logger`, that, with request_id in log tags will allow you to match
|
|
29
|
+
the usage log with actual request logs.
|
|
30
|
+
|
|
31
|
+
```ruby
|
|
32
|
+
# lib/rails_logger_handler.rb
|
|
33
|
+
class RailsLoggerHandler
|
|
34
|
+
def call(kilobytes)
|
|
35
|
+
Rails.logger.info "RSS change: #{kilobytes} KB"
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# config/application.rb
|
|
40
|
+
require_relative '../lib/rails_logger_handler'
|
|
41
|
+
module FooApp
|
|
42
|
+
class Application < Rails::Application
|
|
43
|
+
# ...
|
|
44
|
+
config.log_tags = [:request_id]
|
|
45
|
+
config.middleware.insert_after Rails::Rack::Logger, RssObserver::Middleware, RailsLoggerHandler.new
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
# Example
|
|
51
|
+
|
|
52
|
+
RssObserver vs Default Rails request logs
|
|
53
|
+
```
|
|
54
|
+
I, [2019-09-03T14:56:22.735264 #7290] INFO -- : [96956f1a-7f7f-4836-a8a1-bc3c05696433] Completed 200 OK in 47ms (Views: 29.7ms | ActiveRecord: 6.3ms | Allocations: 18614)
|
|
55
|
+
I, [2019-09-03T14:56:22.737113 #7290] INFO -- : [96956f1a-7f7f-4836-a8a1-bc3c05696433] Memory change: 264.0 KB
|
|
56
|
+
```
|
data/Rakefile
ADDED
data/bin/console
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require 'bundler/setup'
|
|
5
|
+
require 'rss_observer'
|
|
6
|
+
|
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
9
|
+
|
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
11
|
+
# require "pry"
|
|
12
|
+
# Pry.start
|
|
13
|
+
|
|
14
|
+
require 'irb'
|
|
15
|
+
IRB.start(__FILE__)
|
data/bin/rubocop.sh
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# Inspired by http://takemikami.com/2018/01/30/RubocopPullRequestCI.html
|
|
4
|
+
|
|
5
|
+
BASE_REMOTE=origin
|
|
6
|
+
BASE_BRANCH=master
|
|
7
|
+
|
|
8
|
+
git fetch $BASE_REMOTE $BASE_BRANCH
|
|
9
|
+
|
|
10
|
+
diff_list=()
|
|
11
|
+
commit_list=`git --no-pager log --no-merges $BASE_REMOTE/$BASE_BRANCH...HEAD | grep -e '^commit' | sed -e "s/^commit \(.\{8\}\).*/\1/"`
|
|
12
|
+
|
|
13
|
+
for f in `git --no-pager diff $BASE_REMOTE/$BASE_BRANCH...HEAD --name-only`; do
|
|
14
|
+
for c in $commit_list; do
|
|
15
|
+
diffs=`git --no-pager blame --follow --show-name -s $f | grep $c | sed -e "s/^[^ ]* *\([^ ]*\) *\([0-9]*\)*).*$/\1:\2/"`
|
|
16
|
+
for ln in $diffs; do
|
|
17
|
+
diff_list+=("$ln")
|
|
18
|
+
done
|
|
19
|
+
done
|
|
20
|
+
done
|
|
21
|
+
|
|
22
|
+
err_count=0
|
|
23
|
+
err_lines=()
|
|
24
|
+
|
|
25
|
+
while read line; do
|
|
26
|
+
for m in ${diff_list[@]}; do
|
|
27
|
+
if [[ "$line" =~ "$m" ]]; then
|
|
28
|
+
err_count=$(($err_count + 1))
|
|
29
|
+
err_lines+=("$line")
|
|
30
|
+
break
|
|
31
|
+
fi
|
|
32
|
+
done
|
|
33
|
+
done < <(bundle exec rubocop --format emacs)
|
|
34
|
+
|
|
35
|
+
if [ $err_count -ne 0 ]; then
|
|
36
|
+
echo -e "\033[31m$err_count Lint Errors\033[0;39m"
|
|
37
|
+
echo -e "\033[31m-----------------------------------\033[0;39m\n"
|
|
38
|
+
printf '\033[31m%s\n' "${err_lines[@]}"
|
|
39
|
+
echo -e "\033[31mPlease resolve them before merging.\033[0;39m"
|
|
40
|
+
exit 1
|
|
41
|
+
fi
|
data/bin/setup
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RssObserver
|
|
4
|
+
# Basic handler, outputting the memory change information to standard output
|
|
5
|
+
class Logger
|
|
6
|
+
# @param logger [Logger]
|
|
7
|
+
def initialize(logger = Logger.new(STDOUT))
|
|
8
|
+
@logger = logger
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# @param kilobytes [Float]
|
|
12
|
+
def call(kilobytes)
|
|
13
|
+
logger.info "Memory change: #{kilobytes} KB"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
|
|
18
|
+
attr_reader :logger
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'get_process_mem'
|
|
4
|
+
|
|
5
|
+
module RssObserver
|
|
6
|
+
# Class containing the Rails Middleware that
|
|
7
|
+
class Middleware
|
|
8
|
+
UnsupportedHandlerError = Class.new(RssObserver::Error)
|
|
9
|
+
|
|
10
|
+
# @param app [Object] Rails middleware instance
|
|
11
|
+
# @param handler [Object] Handler that accepts memory change updates
|
|
12
|
+
def initialize(app, handler)
|
|
13
|
+
@app = app
|
|
14
|
+
unless handler.respond_to?(:call)
|
|
15
|
+
raise UnsupportedHandlerError, 'Handler must respond to the #call(kilobytes) method'
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
@handler = handler
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# @param env [Hash] Full application environment hash
|
|
22
|
+
# @return [Array] Status code, hash of headers, response body
|
|
23
|
+
def call(env)
|
|
24
|
+
before_memory = current_memory
|
|
25
|
+
|
|
26
|
+
app.call(env).tap do
|
|
27
|
+
memory_change = current_memory - before_memory
|
|
28
|
+
handler.call(memory_change)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
private
|
|
33
|
+
|
|
34
|
+
attr_reader :app, :handler
|
|
35
|
+
|
|
36
|
+
def current_memory
|
|
37
|
+
@mem ||= GetProcessMem.new
|
|
38
|
+
@mem.kb
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
data/lib/rss_observer.rb
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
|
+
require 'rss_observer/version'
|
|
6
|
+
|
|
7
|
+
Gem::Specification.new do |spec|
|
|
8
|
+
spec.name = 'rss_observer'
|
|
9
|
+
spec.version = RssObserver::VERSION
|
|
10
|
+
spec.authors = ['Maciek Dubiński']
|
|
11
|
+
spec.email = ['maciek@dubinski.net']
|
|
12
|
+
|
|
13
|
+
spec.summary = 'Rails middleware for observing of RSS changes around a request.'
|
|
14
|
+
spec.description = 'Rails middleware for observing of RSS changes around a request.'
|
|
15
|
+
spec.homepage = 'https://github.com/irvingwashington/rss_observer'
|
|
16
|
+
spec.license = 'MIT'
|
|
17
|
+
|
|
18
|
+
# Specify which files should be added to the gem when it is released.
|
|
19
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
20
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
21
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
22
|
+
end
|
|
23
|
+
spec.bindir = 'exe'
|
|
24
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
25
|
+
spec.require_paths = ['lib']
|
|
26
|
+
|
|
27
|
+
spec.add_dependency 'get_process_mem', '~> 0.2'
|
|
28
|
+
spec.add_development_dependency 'bundler', '~> 1.17'
|
|
29
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
|
30
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
31
|
+
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.3'
|
|
32
|
+
spec.add_development_dependency 'rubocop', '~> 0.74'
|
|
33
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: rss_observer
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Maciek Dubiński
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2019-09-03 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: get_process_mem
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0.2'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0.2'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: bundler
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '1.17'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '1.17'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '10.0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '10.0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rspec
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '3.0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '3.0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: rspec_junit_formatter
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - "~>"
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0.3'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - "~>"
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0.3'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: rubocop
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - "~>"
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0.74'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - "~>"
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0.74'
|
|
97
|
+
description: Rails middleware for observing of RSS changes around a request.
|
|
98
|
+
email:
|
|
99
|
+
- maciek@dubinski.net
|
|
100
|
+
executables: []
|
|
101
|
+
extensions: []
|
|
102
|
+
extra_rdoc_files: []
|
|
103
|
+
files:
|
|
104
|
+
- ".circleci/config.yml"
|
|
105
|
+
- ".gitignore"
|
|
106
|
+
- ".rspec"
|
|
107
|
+
- ".rubocop.yml"
|
|
108
|
+
- ".travis.yml"
|
|
109
|
+
- CODE_OF_CONDUCT.md
|
|
110
|
+
- Gemfile
|
|
111
|
+
- Gemfile.lock
|
|
112
|
+
- LICENSE.txt
|
|
113
|
+
- README.md
|
|
114
|
+
- Rakefile
|
|
115
|
+
- bin/console
|
|
116
|
+
- bin/rubocop.sh
|
|
117
|
+
- bin/setup
|
|
118
|
+
- lib/rss_observer.rb
|
|
119
|
+
- lib/rss_observer/logger.rb
|
|
120
|
+
- lib/rss_observer/middleware.rb
|
|
121
|
+
- lib/rss_observer/version.rb
|
|
122
|
+
- rss_observer.gemspec
|
|
123
|
+
homepage: https://github.com/irvingwashington/rss_observer
|
|
124
|
+
licenses:
|
|
125
|
+
- MIT
|
|
126
|
+
metadata: {}
|
|
127
|
+
post_install_message:
|
|
128
|
+
rdoc_options: []
|
|
129
|
+
require_paths:
|
|
130
|
+
- lib
|
|
131
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
|
+
requirements:
|
|
133
|
+
- - ">="
|
|
134
|
+
- !ruby/object:Gem::Version
|
|
135
|
+
version: '0'
|
|
136
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
|
+
requirements:
|
|
138
|
+
- - ">="
|
|
139
|
+
- !ruby/object:Gem::Version
|
|
140
|
+
version: '0'
|
|
141
|
+
requirements: []
|
|
142
|
+
rubygems_version: 3.0.3
|
|
143
|
+
signing_key:
|
|
144
|
+
specification_version: 4
|
|
145
|
+
summary: Rails middleware for observing of RSS changes around a request.
|
|
146
|
+
test_files: []
|