veils 0.0.1
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/.0pdd.yml +9 -0
- data/.gitignore +6 -0
- data/.pdd +5 -0
- data/.rubocop.yml +28 -0
- data/.rultor.yml +24 -0
- data/.travis.yml +12 -0
- data/Gemfile +25 -0
- data/LICENSE.txt +21 -0
- data/README.md +46 -0
- data/Rakefile +59 -0
- data/appveyor.yml +25 -0
- data/lib/veil.rb +83 -0
- data/test/test_veil.rb +54 -0
- data/veils.gemspec +51 -0
- metadata +131 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 28e3a15982feac585072903852cf0d915c26142081d0d1866e73811db8880ac2
|
4
|
+
data.tar.gz: 552a7dcd62680dee1ac43023113b584bbaa4780e1d42c7a0db856568528f55c2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 24b7089456ae3e48d368455604fe1afeadfbd77f571c5c84b8f009262bfb4e8620d06dc47d9d91266f55702ec35be4de8971e4da84d96e4a620164fbba16f315
|
7
|
+
data.tar.gz: cfa0ac89ba68aa920137fabd71128d6a73acd2d0488c0116c7a392d4a787c499337ebdee4faff39ccd936cf2758c9f12d12f3f1114718d882e5d78ac15ac7843
|
data/.0pdd.yml
ADDED
data/.gitignore
ADDED
data/.pdd
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
AllCops:
|
2
|
+
DisplayCopNames: true
|
3
|
+
TargetRubyVersion: 2.3
|
4
|
+
|
5
|
+
Layout/EndOfLine:
|
6
|
+
EnforcedStyle: lf
|
7
|
+
Style/MethodMissingSuper:
|
8
|
+
Enabled: false
|
9
|
+
Layout/EmptyLineAfterGuardClause:
|
10
|
+
Enabled: false
|
11
|
+
Layout/MultilineMethodCallIndentation:
|
12
|
+
Enabled: false
|
13
|
+
Metrics/AbcSize:
|
14
|
+
Max: 65
|
15
|
+
Metrics/BlockLength:
|
16
|
+
Max: 30
|
17
|
+
Metrics/MethodLength:
|
18
|
+
Max: 50
|
19
|
+
Metrics/ClassLength:
|
20
|
+
Max: 180
|
21
|
+
Metrics/CyclomaticComplexity:
|
22
|
+
Max: 10
|
23
|
+
Metrics/PerceivedComplexity:
|
24
|
+
Max: 10
|
25
|
+
Metrics/ParameterLists:
|
26
|
+
Max: 10
|
27
|
+
Layout/AlignParameters:
|
28
|
+
Enabled: false
|
data/.rultor.yml
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
assets:
|
2
|
+
rubygems.yml: yegor256/home#assets/rubygems.yml
|
3
|
+
install: |-
|
4
|
+
export GEM_HOME=~/.ruby
|
5
|
+
export GEM_PATH=$GEM_HOME:$GEM_PATH
|
6
|
+
sudo bundle install --no-color "--gemfile=$(pwd)/Gemfile"
|
7
|
+
release:
|
8
|
+
script: |-
|
9
|
+
bundle exec rake
|
10
|
+
rm -rf *.gem
|
11
|
+
sed -i "s/0\.0\.0/${tag}/g" veils.gemspec
|
12
|
+
git add veils.gemspec
|
13
|
+
git commit -m "Version set to ${tag}"
|
14
|
+
gem build veils.gemspec
|
15
|
+
chmod 0600 ../rubygems.yml
|
16
|
+
gem push *.gem --config-file ../rubygems.yml
|
17
|
+
merge:
|
18
|
+
script: |-
|
19
|
+
bundle install
|
20
|
+
bundle exec rake
|
21
|
+
deploy:
|
22
|
+
script: |-
|
23
|
+
echo 'Nothing to deploy'
|
24
|
+
exit -1
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020 Yegor Bugayenko
|
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 all
|
13
|
+
# 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 THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
source 'https://rubygems.org'
|
24
|
+
ruby '~>2.3'
|
25
|
+
gemspec
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Yegor Bugayenko
|
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,46 @@
|
|
1
|
+
<img src="/logo.svg" width="64px" height="64px"/>
|
2
|
+
|
3
|
+
[](https://www.elegantobjects.org)
|
4
|
+
[](http://www.rultor.com/p/yegor256/veils)
|
5
|
+
[](https://www.jetbrains.com/ruby/)
|
6
|
+
|
7
|
+
[](https://travis-ci.org/yegor256/veils)
|
8
|
+
[](https://ci.appveyor.com/project/yegor256/veils)
|
9
|
+
[](http://badge.fury.io/rb/veils)
|
10
|
+
[](https://codeclimate.com/github/yegor256/veils/maintainability)
|
11
|
+
[](http://rubydoc.info/github/yegor256/veils/master/frames)
|
12
|
+
|
13
|
+
[](https://hitsofcode.com/view/github/yegor256/veils)
|
14
|
+
[](https://github.com/yegor256/veils/blob/master/LICENSE.txt)
|
15
|
+
|
16
|
+
First, install it:
|
17
|
+
|
18
|
+
```bash
|
19
|
+
$ gem install veils
|
20
|
+
```
|
21
|
+
|
22
|
+
Then, use it like this:
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'veils'
|
26
|
+
obj = Veil.new(obj, to_s: 'Hello, world!')
|
27
|
+
```
|
28
|
+
|
29
|
+
The method `to_s` will return `Hello, world!` until some other
|
30
|
+
method is called and the veil is "pierced."
|
31
|
+
|
32
|
+
Keep in mind that `Veil` is thread-safe.
|
33
|
+
|
34
|
+
## How to contribute
|
35
|
+
|
36
|
+
Read [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
|
37
|
+
Make sure you build is green before you contribute
|
38
|
+
your pull request. You will need to have [Ruby](https://www.ruby-lang.org/en/) 2.3+ and
|
39
|
+
[Bundler](https://bundler.io/) installed. Then:
|
40
|
+
|
41
|
+
```
|
42
|
+
$ bundle update
|
43
|
+
$ bundle exec rake
|
44
|
+
```
|
45
|
+
|
46
|
+
If it's clean and you don't see any error messages, submit your pull request.
|
data/Rakefile
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020 Yegor Bugayenko
|
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 all
|
13
|
+
# 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 THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
require 'rubygems'
|
24
|
+
require 'rake'
|
25
|
+
require 'rake/clean'
|
26
|
+
|
27
|
+
CLEAN = FileList['coverage']
|
28
|
+
|
29
|
+
def name
|
30
|
+
@name ||= File.basename(Dir['*.gemspec'].first, '.*')
|
31
|
+
end
|
32
|
+
|
33
|
+
def version
|
34
|
+
Gem::Specification.load(Dir['*.gemspec'].first).version
|
35
|
+
end
|
36
|
+
|
37
|
+
task default: %i[clean test rubocop]
|
38
|
+
|
39
|
+
require 'rake/testtask'
|
40
|
+
desc 'Run all unit tests'
|
41
|
+
Rake::TestTask.new(:test) do |test|
|
42
|
+
test.libs << 'lib' << 'test'
|
43
|
+
test.pattern = 'test/**/test_*.rb'
|
44
|
+
test.verbose = false
|
45
|
+
end
|
46
|
+
|
47
|
+
require 'rdoc/task'
|
48
|
+
RDoc::Task.new do |rdoc|
|
49
|
+
rdoc.main = 'README.md'
|
50
|
+
rdoc.rdoc_dir = 'rdoc'
|
51
|
+
rdoc.rdoc_files.include('README.md', 'lib/**/*.rb')
|
52
|
+
end
|
53
|
+
|
54
|
+
require 'rubocop/rake_task'
|
55
|
+
desc 'Run RuboCop on all directories'
|
56
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
57
|
+
task.fail_on_error = true
|
58
|
+
task.requires << 'rubocop-rspec'
|
59
|
+
end
|
data/appveyor.yml
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
version: '{build}'
|
2
|
+
skip_tags: true
|
3
|
+
clone_depth: 10
|
4
|
+
branches:
|
5
|
+
only:
|
6
|
+
- master
|
7
|
+
except:
|
8
|
+
- gh-pages
|
9
|
+
os: Windows Server 2012
|
10
|
+
environment:
|
11
|
+
matrix:
|
12
|
+
- ruby_version: "25-x64"
|
13
|
+
install:
|
14
|
+
- ps: |
|
15
|
+
$Env:PATH = "C:\Ruby${Env:ruby_version}\bin;${Env:PATH}"
|
16
|
+
- bundle config --local path vendor/bundle
|
17
|
+
- ruby -v
|
18
|
+
- bundle -v
|
19
|
+
build_script:
|
20
|
+
- bundle update
|
21
|
+
- bundle install
|
22
|
+
test_script:
|
23
|
+
- bundle exec rake --quiet
|
24
|
+
cache:
|
25
|
+
- vendor/bundle
|
data/lib/veil.rb
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# (The MIT License)
|
4
|
+
#
|
5
|
+
# Copyright (c) 2020 Yegor Bugayenko
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included in all
|
15
|
+
# copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
24
|
+
|
25
|
+
# Veil is a simple decorator of an existing object that makes some of
|
26
|
+
# its methods cache all values and calculate them only once.
|
27
|
+
#
|
28
|
+
# For more information read
|
29
|
+
# {README}[https://github.com/yegor256/veils/blob/master/README.md] file.
|
30
|
+
#
|
31
|
+
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
32
|
+
# Copyright:: Copyright (c) 2020 Yegor Bugayenko
|
33
|
+
# License:: MIT
|
34
|
+
class Veil
|
35
|
+
def initialize(origin, methods = {})
|
36
|
+
@origin = origin
|
37
|
+
@methods = methods
|
38
|
+
@pierced = false
|
39
|
+
end
|
40
|
+
|
41
|
+
def to_s
|
42
|
+
method_missing(:to_s)
|
43
|
+
end
|
44
|
+
|
45
|
+
def to_json(options = nil)
|
46
|
+
return @origin.to_a.to_json(options) if @origin.is_a?(Array)
|
47
|
+
method_missing(:to_json, options)
|
48
|
+
end
|
49
|
+
|
50
|
+
def method_missing(*args)
|
51
|
+
if @pierced
|
52
|
+
through(args)
|
53
|
+
else
|
54
|
+
method = args[0]
|
55
|
+
if @methods.key?(method)
|
56
|
+
@methods[method]
|
57
|
+
else
|
58
|
+
@pierced = true
|
59
|
+
through(args)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def respond_to?(method, include_private = false)
|
65
|
+
@origin.respond_to?(method, include_private) || @methods[method]
|
66
|
+
end
|
67
|
+
|
68
|
+
def respond_to_missing?(_method, _include_private = false)
|
69
|
+
true
|
70
|
+
end
|
71
|
+
|
72
|
+
private
|
73
|
+
|
74
|
+
def through(args)
|
75
|
+
method = args[0]
|
76
|
+
unless @origin.respond_to?(method)
|
77
|
+
raise "Method #{method} is absent in #{@origin}"
|
78
|
+
end
|
79
|
+
@origin.__send__(*args) do |*a|
|
80
|
+
yield(*a) if block_given?
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
data/test/test_veil.rb
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# (The MIT License)
|
4
|
+
#
|
5
|
+
# Copyright (c) 2020 Yegor Bugayenko
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included in all
|
15
|
+
# copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
24
|
+
|
25
|
+
require 'minitest/autorun'
|
26
|
+
require 'json'
|
27
|
+
require_relative '../lib/veil'
|
28
|
+
|
29
|
+
# Veil test.
|
30
|
+
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
31
|
+
# Copyright:: Copyright (c) 2020 Yegor Bugayenko
|
32
|
+
# License:: MIT
|
33
|
+
class VeilTest < Minitest::Test
|
34
|
+
def test_simple
|
35
|
+
obj = Object.new
|
36
|
+
def obj.read(foo)
|
37
|
+
foo
|
38
|
+
end
|
39
|
+
|
40
|
+
def obj.touch; end
|
41
|
+
foo = Veil.new(obj, read: 1)
|
42
|
+
assert_equal(1, foo.read(5))
|
43
|
+
foo.to_s
|
44
|
+
foo.touch
|
45
|
+
assert_equal(5, foo.read(5))
|
46
|
+
end
|
47
|
+
|
48
|
+
def test_behaves_like_array
|
49
|
+
origin = [1, 2, 3]
|
50
|
+
foo = Veil.new(origin)
|
51
|
+
assert(foo.respond_to?(:to_json))
|
52
|
+
assert_equal(JSON.pretty_generate(origin), JSON.pretty_generate(foo))
|
53
|
+
end
|
54
|
+
end
|
data/veils.gemspec
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# (The MIT License)
|
4
|
+
#
|
5
|
+
# Copyright (c) 2020 Yegor Bugayenko
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included in all
|
15
|
+
# copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
24
|
+
|
25
|
+
require 'English'
|
26
|
+
Gem::Specification.new do |s|
|
27
|
+
s.specification_version = 2 if s.respond_to? :specification_version=
|
28
|
+
if s.respond_to? :required_rubygems_version=
|
29
|
+
s.required_rubygems_version = Gem::Requirement.new('>= 0')
|
30
|
+
end
|
31
|
+
s.rubygems_version = '2.3.3'
|
32
|
+
s.required_ruby_version = '>=2.3'
|
33
|
+
s.name = 'veils'
|
34
|
+
s.version = '0.0.1'
|
35
|
+
s.license = 'MIT'
|
36
|
+
s.summary = 'Ruby Veil Objects'
|
37
|
+
s.description = 'Decorate your existing Ruby object with veils
|
38
|
+
and some its methods will be cached.'
|
39
|
+
s.authors = ['Yegor Bugayenko']
|
40
|
+
s.email = 'yegor256@gmail.com'
|
41
|
+
s.homepage = 'http://github.com/yegor256/veils'
|
42
|
+
s.files = `git ls-files`.split($RS)
|
43
|
+
s.test_files = s.files.grep(%r{^(test)/})
|
44
|
+
s.rdoc_options = ['--charset=UTF-8']
|
45
|
+
s.extra_rdoc_files = ['README.md']
|
46
|
+
s.add_development_dependency 'minitest', '5.11.3'
|
47
|
+
s.add_development_dependency 'rake', '12.3.3'
|
48
|
+
s.add_development_dependency 'rdoc', '4.3.0'
|
49
|
+
s.add_development_dependency 'rubocop', '0.62.0'
|
50
|
+
s.add_development_dependency 'rubocop-rspec', '1.31.0'
|
51
|
+
end
|
metadata
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: veils
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yegor Bugayenko
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-05-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: minitest
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 5.11.3
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 5.11.3
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 12.3.3
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 12.3.3
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rdoc
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 4.3.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 4.3.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.62.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.62.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop-rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.31.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.31.0
|
83
|
+
description: |-
|
84
|
+
Decorate your existing Ruby object with veils
|
85
|
+
and some its methods will be cached.
|
86
|
+
email: yegor256@gmail.com
|
87
|
+
executables: []
|
88
|
+
extensions: []
|
89
|
+
extra_rdoc_files:
|
90
|
+
- README.md
|
91
|
+
files:
|
92
|
+
- ".0pdd.yml"
|
93
|
+
- ".gitignore"
|
94
|
+
- ".pdd"
|
95
|
+
- ".rubocop.yml"
|
96
|
+
- ".rultor.yml"
|
97
|
+
- ".travis.yml"
|
98
|
+
- Gemfile
|
99
|
+
- LICENSE.txt
|
100
|
+
- README.md
|
101
|
+
- Rakefile
|
102
|
+
- appveyor.yml
|
103
|
+
- lib/veil.rb
|
104
|
+
- test/test_veil.rb
|
105
|
+
- veils.gemspec
|
106
|
+
homepage: http://github.com/yegor256/veils
|
107
|
+
licenses:
|
108
|
+
- MIT
|
109
|
+
metadata: {}
|
110
|
+
post_install_message:
|
111
|
+
rdoc_options:
|
112
|
+
- "--charset=UTF-8"
|
113
|
+
require_paths:
|
114
|
+
- lib
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '2.3'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
requirements: []
|
126
|
+
rubygems_version: 3.0.1
|
127
|
+
signing_key:
|
128
|
+
specification_version: 2
|
129
|
+
summary: Ruby Veil Objects
|
130
|
+
test_files:
|
131
|
+
- test/test_veil.rb
|