remont 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/ci.yml +28 -0
- data/.gitignore +11 -0
- data/.rbenv +1 -0
- data/.rspec +3 -0
- data/.rubocop.yml +13 -0
- data/.ruby-version +1 -0
- data/.travis.yml +7 -0
- data/CHANGELOG.md +0 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/README.md +133 -0
- data/Rakefile +6 -0
- data/bin/console +7 -0
- data/bin/setup +8 -0
- data/lib/remont/attribute.rb +26 -0
- data/lib/remont/config.rb +16 -0
- data/lib/remont/railtie.rb +8 -0
- data/lib/remont/record_processor.rb +48 -0
- data/lib/remont/schema.rb +87 -0
- data/lib/remont/script.rb +30 -0
- data/lib/remont/tasks/remont.rake +5 -0
- data/lib/remont/version.rb +3 -0
- data/lib/remont.rb +20 -0
- data/remont.gemspec +36 -0
- metadata +169 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2ffe65eff0fe907d7834a94e028001396ad17937b313cb9197475b66c4938c33
|
4
|
+
data.tar.gz: 7247441b4f59709a8c877da6ae9a9679f27c02916ca553f0f7f9d9f2808c9805
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 60ae2dc780851f4bef7436e65b2143cfd5b8454b2cd5f3dc512985f32ab061f59eed24ff769e34fc26adabe43a7346aaf411b824d8e9979153b7fac342792e05
|
7
|
+
data.tar.gz: 745d82eac997e1bda274f2e5fc20f3f6b10b69043efe0de83746804725fea5b7a5b5bf99c585d9f866ca88e6bd9d1c1a901855c6b7cc034f4ebf1846b56e9446
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
lint:
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
steps:
|
10
|
+
- uses: actions/checkout@v2
|
11
|
+
- name: Set up Ruby
|
12
|
+
uses: ruby/setup-ruby@v1
|
13
|
+
with:
|
14
|
+
ruby-version: '2.7'
|
15
|
+
bundler-cache: true
|
16
|
+
- name: Run rubocop
|
17
|
+
run: bundle exec rubocop
|
18
|
+
test:
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v2
|
22
|
+
- name: Set up Ruby
|
23
|
+
uses: ruby/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: '2.7'
|
26
|
+
bundler-cache: true
|
27
|
+
- name: Run specs
|
28
|
+
run: bundle exec rspec
|
data/.gitignore
ADDED
data/.rbenv
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.2
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.2
|
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
File without changes
|
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 team.rails@infinum.com. 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/README.md
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
# Remont
|
2
|
+
|
3
|
+
A DSL for describing and running the row-level processing of the records in the database (eg. anonymization)
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
Add this line to your application's Gemfile:
|
7
|
+
```ruby
|
8
|
+
gem 'remont'
|
9
|
+
```
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install remont
|
18
|
+
|
19
|
+
## Application configuration
|
20
|
+
Add `config/initializers/remont.rb`
|
21
|
+
```ruby
|
22
|
+
Remont.setup do |config|
|
23
|
+
config.process_timestamp_attribute = :processed_at
|
24
|
+
config.script_path = 'db/remont.rb'
|
25
|
+
end
|
26
|
+
```
|
27
|
+
|
28
|
+
| Option | Default value | Description |
|
29
|
+
| --- | :---: | --- |
|
30
|
+
| `process_timestamp_attribute` | `:processed_at` | processing status attribute identifier |
|
31
|
+
| `script_path` | `'db/remont.rb'` | entry point for the schema processing task |
|
32
|
+
|
33
|
+
On successful record processing, `process_timestamp_attribute` on the record will be set to the current processing time (`Time.now.getlocal`).
|
34
|
+
|
35
|
+
## Usage
|
36
|
+
In the following example, the intention is to simulate anonymization of the `users` and `orders` table.
|
37
|
+
- configure the global options
|
38
|
+
```ruby
|
39
|
+
# config/initializers/remont.rb
|
40
|
+
Remont.setup do |config|
|
41
|
+
config.process_timestamp_attribute = :anonyzmied_at
|
42
|
+
config.script_path = 'db/anonymize.rb'
|
43
|
+
end
|
44
|
+
```
|
45
|
+
- define processing script
|
46
|
+
```ruby
|
47
|
+
# db/anonymize.rb
|
48
|
+
schema model: User do
|
49
|
+
attribute(:email) { 'user@example.com' }
|
50
|
+
end
|
51
|
+
|
52
|
+
schema model: Order do
|
53
|
+
attribute(:billing_address) { '23 Wall Street, NY' }
|
54
|
+
end
|
55
|
+
```
|
56
|
+
- and run `bundle exec rake remont`
|
57
|
+
|
58
|
+
Running the rake task would result in updating `email` (and `anonymized_at`) column for each row in the `users` table, and `billing_address` column for each row in the `orders` table.
|
59
|
+
|
60
|
+
### Schema
|
61
|
+
Defines database table hosting the rows to be processed. The initial dataset is defined through the `model` option in the `schema` method. `model` value must be a subclass of the `ActiveRecord::Base`.
|
62
|
+
```ruby
|
63
|
+
schema model: Order do
|
64
|
+
end
|
65
|
+
```
|
66
|
+
### Controlling the scope
|
67
|
+
Scope of the data that will be processed is controlled
|
68
|
+
- with `scope` option in the `schema` method
|
69
|
+
- by declaring custom `scope` within the `schema` block
|
70
|
+
```ruby
|
71
|
+
# skip admin records
|
72
|
+
schema model: User, scope: { |scope| scope.where.not(role: :admin) } do
|
73
|
+
end
|
74
|
+
|
75
|
+
schema model: Order do
|
76
|
+
# process only active records
|
77
|
+
scope { |scope| scope.where(status: :active) }
|
78
|
+
end
|
79
|
+
```
|
80
|
+
### Skipping the processed records
|
81
|
+
In some cases, it's desirable to skip already processed records. You can opt-in to this behavior by declaring `without_processed` within the `schema` block. When declared, the processing dataset query will be extended with a condition that excludes already processed records (ie. `where(Remont.process_timestamp_attribute => nil)`)
|
82
|
+
```ruby
|
83
|
+
schema model: User do
|
84
|
+
without_processed
|
85
|
+
# ...
|
86
|
+
end
|
87
|
+
```
|
88
|
+
### Callbacks
|
89
|
+
Custom pre-processing or post-processing behavior can be declared using `before` and `after` callbacks.
|
90
|
+
```ruby
|
91
|
+
schema model: User do
|
92
|
+
before { |record| Rails.logger.info("Started processing: #{record.id}") }
|
93
|
+
after { |record| Rails.logger.info("Finished processing: #{record.id}") }
|
94
|
+
end
|
95
|
+
```
|
96
|
+
### Attributes
|
97
|
+
Attributes are processed using processors (an object which responds to the `call` method). The processor can be defined either as a block or with the `:using` option passed to the `attribute` method.
|
98
|
+
```ruby
|
99
|
+
require 'securerandom'
|
100
|
+
|
101
|
+
class CachedNick
|
102
|
+
def initialize
|
103
|
+
@cache = Hash.new { |hash, nick| hash[nick] = SecureRandom.uuid }
|
104
|
+
end
|
105
|
+
|
106
|
+
def call(nick, _record)
|
107
|
+
@cache[nick]
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
schema model: User do
|
112
|
+
attribute(:email) { |email, record| "#{record.id}-#{email}" }
|
113
|
+
attribute(:nickname, using: CachedNick.new)
|
114
|
+
end
|
115
|
+
```
|
116
|
+
|
117
|
+
## Development
|
118
|
+
|
119
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
120
|
+
|
121
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
122
|
+
|
123
|
+
## Contributing
|
124
|
+
|
125
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/infinum/remont. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
126
|
+
|
127
|
+
## License
|
128
|
+
|
129
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
130
|
+
|
131
|
+
## Code of Conduct
|
132
|
+
|
133
|
+
Everyone interacting in the Remont project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/infinum/remont/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
data/bin/setup
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
module Remont
|
2
|
+
class Attribute
|
3
|
+
# @return [Symbol]
|
4
|
+
attr_reader :name
|
5
|
+
|
6
|
+
# @param [Symbol] name
|
7
|
+
# @param [Hash] opts
|
8
|
+
# @option [#call] :using
|
9
|
+
# @param [Proc] processor
|
10
|
+
def initialize(name, opts = {}, &processor)
|
11
|
+
@name = name
|
12
|
+
@processor = opts.fetch(:using, processor)
|
13
|
+
end
|
14
|
+
|
15
|
+
# @param [Object] value
|
16
|
+
# @param [ActiveRecord::Base] record
|
17
|
+
# @return [Object]
|
18
|
+
def process(value, record)
|
19
|
+
processor.call(value, record)
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
attr_reader :processor
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Remont
|
2
|
+
class Config
|
3
|
+
DEFAULT_SCRIPT_PATH = 'db/remont.rb'.freeze
|
4
|
+
|
5
|
+
# @return [Symbol]
|
6
|
+
attr_accessor :process_timestamp_attribute
|
7
|
+
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :script_path
|
10
|
+
|
11
|
+
def initialize
|
12
|
+
@process_timestamp_attribute = :processed_at
|
13
|
+
@script_path = DEFAULT_SCRIPT_PATH
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module Remont
|
2
|
+
class RecordProcessor
|
3
|
+
NOOP = proc {}
|
4
|
+
|
5
|
+
# @param [Array<Remont::Attribute>] attributes
|
6
|
+
# @param [Proc] before
|
7
|
+
# @param [Proc] after
|
8
|
+
def initialize(attributes, before, after)
|
9
|
+
@attributes = attributes
|
10
|
+
@before = before || NOOP
|
11
|
+
@after = after || NOOP
|
12
|
+
end
|
13
|
+
|
14
|
+
# @param [ActiveRecord::Base] record
|
15
|
+
# @return [ActiveRecord::Base] record
|
16
|
+
def process!(record)
|
17
|
+
before.call(record)
|
18
|
+
record.update_columns( # rubocop:disable Rails/SkipsModelValidations
|
19
|
+
processed_attributes(record)
|
20
|
+
)
|
21
|
+
after.call(record)
|
22
|
+
|
23
|
+
record
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
attr_reader :attributes
|
29
|
+
attr_reader :before
|
30
|
+
attr_reader :after
|
31
|
+
|
32
|
+
def processed_attributes(record)
|
33
|
+
attributes
|
34
|
+
.select { |attribute| record.send(attribute.name).present? }
|
35
|
+
.reduce(default_processed_attributes) do |memo, attribute|
|
36
|
+
memo.merge(attribute.name => attribute.process(record.send(attribute.name), record))
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def default_processed_attributes
|
41
|
+
return {} unless Remont.config.process_timestamp_attribute
|
42
|
+
|
43
|
+
{
|
44
|
+
Remont.config.process_timestamp_attribute => Time.now.getlocal
|
45
|
+
}
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
module Remont
|
2
|
+
class Schema
|
3
|
+
DEFAULT_SCOPE = proc { |scope| scope }
|
4
|
+
WITHOUT_PROCESSED = proc { |scope| scope.where(Remont.config.process_timestamp_attribute => nil) }
|
5
|
+
|
6
|
+
# @param [Hash] opts
|
7
|
+
# @option [Class] :model
|
8
|
+
# @option [Proc] :scope
|
9
|
+
# @param [Proc] block
|
10
|
+
def initialize(opts = {}, &block)
|
11
|
+
@model = opts.fetch(:model)
|
12
|
+
@model_scope = opts.fetch(:scope, DEFAULT_SCOPE)
|
13
|
+
@without_processed_scope = DEFAULT_SCOPE
|
14
|
+
@before_cb = nil
|
15
|
+
@after_cb = nil
|
16
|
+
@attributes = []
|
17
|
+
|
18
|
+
instance_eval(&block)
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [Remont::Schema]
|
22
|
+
def without_processed
|
23
|
+
@without_processed_scope = WITHOUT_PROCESSED
|
24
|
+
|
25
|
+
self
|
26
|
+
end
|
27
|
+
|
28
|
+
# @param [Proc] scope
|
29
|
+
# @return [Remont::Schema]
|
30
|
+
def scope(&scope)
|
31
|
+
@model_scope = scope
|
32
|
+
|
33
|
+
self
|
34
|
+
end
|
35
|
+
|
36
|
+
# @param [Symbol] name
|
37
|
+
# @param [Hash] opts
|
38
|
+
# @option [#call] :using
|
39
|
+
# @param [Proc] processor
|
40
|
+
# @return [Remont::Schema]
|
41
|
+
def attribute(...)
|
42
|
+
@attributes << Attribute.new(...)
|
43
|
+
|
44
|
+
self
|
45
|
+
end
|
46
|
+
|
47
|
+
# @param [Proc] block
|
48
|
+
# @return [Remont::Schema]
|
49
|
+
def before(&block)
|
50
|
+
@before_cb = block
|
51
|
+
|
52
|
+
self
|
53
|
+
end
|
54
|
+
|
55
|
+
# @param [Proc] block
|
56
|
+
# @return [Remont::Schema]
|
57
|
+
def after(&block)
|
58
|
+
@after_cb = block
|
59
|
+
|
60
|
+
self
|
61
|
+
end
|
62
|
+
|
63
|
+
# @return [Any]
|
64
|
+
def process!
|
65
|
+
records_for_processing.find_each { |record| processor.process!(record) }
|
66
|
+
end
|
67
|
+
|
68
|
+
private
|
69
|
+
|
70
|
+
attr_reader :model
|
71
|
+
attr_reader :without_processed_scope
|
72
|
+
attr_reader :model_scope
|
73
|
+
attr_reader :attributes
|
74
|
+
attr_reader :before_cb
|
75
|
+
attr_reader :after_cb
|
76
|
+
|
77
|
+
def processor
|
78
|
+
@processor ||= RecordProcessor.new(attributes, before_cb, after_cb)
|
79
|
+
end
|
80
|
+
|
81
|
+
def records_for_processing
|
82
|
+
model_scope.call(
|
83
|
+
without_processed_scope.call(model.all)
|
84
|
+
)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Remont
|
2
|
+
class Script
|
3
|
+
# @path [String] path
|
4
|
+
def initialize(path)
|
5
|
+
@path = path
|
6
|
+
@schemas = []
|
7
|
+
end
|
8
|
+
|
9
|
+
# @return [Object]
|
10
|
+
def run!
|
11
|
+
instance_eval(File.read(path))
|
12
|
+
|
13
|
+
schemas.each(&:process!)
|
14
|
+
end
|
15
|
+
|
16
|
+
# @param [Hash] opts
|
17
|
+
# @option [Proc] :model
|
18
|
+
# @option [Proc] :scope
|
19
|
+
# @param [Proc] block
|
20
|
+
# @return [Remont::Schema]
|
21
|
+
def schema(...)
|
22
|
+
@schemas << Schema.new(...)
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
attr_reader :schemas
|
28
|
+
attr_reader :path
|
29
|
+
end
|
30
|
+
end
|
data/lib/remont.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'remont/version'
|
2
|
+
|
3
|
+
require 'remont/config'
|
4
|
+
require 'remont/attribute'
|
5
|
+
require 'remont/railtie' if defined?(Rails::Railtie)
|
6
|
+
require 'remont/record_processor'
|
7
|
+
require 'remont/schema'
|
8
|
+
require 'remont/script'
|
9
|
+
|
10
|
+
module Remont
|
11
|
+
# @yield [Remont::Config]
|
12
|
+
def self.setup
|
13
|
+
yield config
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [Remont::Config]
|
17
|
+
def self.config
|
18
|
+
@config ||= Config.new
|
19
|
+
end
|
20
|
+
end
|
data/remont.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require_relative 'lib/remont/version'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = 'remont'
|
5
|
+
spec.version = Remont::VERSION
|
6
|
+
spec.authors = ['Rails Team']
|
7
|
+
spec.email = ['team.rails@infinum.com']
|
8
|
+
|
9
|
+
spec.summary = 'DSL for row level data processing.'
|
10
|
+
spec.homepage = 'https://github.com/infinum/remont'
|
11
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
|
12
|
+
|
13
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
14
|
+
|
15
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
16
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
17
|
+
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/master/CHANGELOG.md"
|
18
|
+
|
19
|
+
# Specify which files should be added to the gem when it is released.
|
20
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
21
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
22
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
23
|
+
end
|
24
|
+
spec.bindir = 'exe'
|
25
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
|
+
spec.require_paths = ['lib']
|
27
|
+
|
28
|
+
spec.add_development_dependency 'activerecord'
|
29
|
+
spec.add_development_dependency 'pry'
|
30
|
+
spec.add_development_dependency 'rake'
|
31
|
+
spec.add_development_dependency 'rspec'
|
32
|
+
spec.add_development_dependency 'rubocop-infinum'
|
33
|
+
spec.add_development_dependency 'sqlite3'
|
34
|
+
spec.add_development_dependency 'timecop'
|
35
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,169 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: remont
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Rails Team
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-03-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activerecord
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
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: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '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: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop-infinum
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: sqlite3
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: timecop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description:
|
112
|
+
email:
|
113
|
+
- team.rails@infinum.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".github/workflows/ci.yml"
|
119
|
+
- ".gitignore"
|
120
|
+
- ".rbenv"
|
121
|
+
- ".rspec"
|
122
|
+
- ".rubocop.yml"
|
123
|
+
- ".ruby-version"
|
124
|
+
- ".travis.yml"
|
125
|
+
- CHANGELOG.md
|
126
|
+
- CODE_OF_CONDUCT.md
|
127
|
+
- Gemfile
|
128
|
+
- README.md
|
129
|
+
- Rakefile
|
130
|
+
- bin/console
|
131
|
+
- bin/setup
|
132
|
+
- lib/remont.rb
|
133
|
+
- lib/remont/attribute.rb
|
134
|
+
- lib/remont/config.rb
|
135
|
+
- lib/remont/railtie.rb
|
136
|
+
- lib/remont/record_processor.rb
|
137
|
+
- lib/remont/schema.rb
|
138
|
+
- lib/remont/script.rb
|
139
|
+
- lib/remont/tasks/remont.rake
|
140
|
+
- lib/remont/version.rb
|
141
|
+
- remont.gemspec
|
142
|
+
homepage: https://github.com/infinum/remont
|
143
|
+
licenses: []
|
144
|
+
metadata:
|
145
|
+
allowed_push_host: https://rubygems.org
|
146
|
+
homepage_uri: https://github.com/infinum/remont
|
147
|
+
source_code_uri: https://github.com/infinum/remont
|
148
|
+
changelog_uri: https://github.com/infinum/remont/blob/master/CHANGELOG.md
|
149
|
+
rubygems_mfa_required: 'true'
|
150
|
+
post_install_message:
|
151
|
+
rdoc_options: []
|
152
|
+
require_paths:
|
153
|
+
- lib
|
154
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: 2.7.0
|
159
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
164
|
+
requirements: []
|
165
|
+
rubygems_version: 3.1.4
|
166
|
+
signing_key:
|
167
|
+
specification_version: 4
|
168
|
+
summary: DSL for row level data processing.
|
169
|
+
test_files: []
|