consenter 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/Rakefile +20 -9
- data/bin/setup +3 -2
- data/consenter.gemspec +8 -8
- data/exe/pick +23 -0
- data/lib/consenter/version.rb +2 -1
- metadata +26 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cb3b2767ec661ecf84d1179ad9469a981ecbd61e7a36e9fc77481c3962e9f04
|
4
|
+
data.tar.gz: 6de44fa228f445a7557d75f60fff0e23de5d37094aadcf6e612521f3fee423fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4149d2f81d9bacbd7da07f044e3cee099c637322cd131aea6873cc52a0cadb44a2632aeb356c8d6f03674e33292f0a9386310fab2bd4a94fa3387c1f565bb3c1
|
7
|
+
data.tar.gz: 7c5e4569486c30ae91ae3c536bd651a346f8783697a511cad808f2892c6c8cd76f1dcf81b2710ad27f17cbb9881b88961eb07e2c9d0291f9cd4946e5e7e58047
|
data/.rubocop.yml
CHANGED
data/Rakefile
CHANGED
@@ -1,4 +1,20 @@
|
|
1
|
+
# rubocop:disable Style/SymbolArray
|
2
|
+
# rubocop:disable Style/HashSyntax
|
3
|
+
|
1
4
|
require 'bundler/gem_tasks'
|
5
|
+
|
6
|
+
task :validate_gemspec do
|
7
|
+
Bundler.load_gemspec('consenter.gemspec').validate
|
8
|
+
end
|
9
|
+
|
10
|
+
task :version => :validate_gemspec do
|
11
|
+
puts Consenter::VERSION
|
12
|
+
end
|
13
|
+
|
14
|
+
require 'rubocop/rake_task'
|
15
|
+
|
16
|
+
RuboCop::RakeTask.new(:rubocop)
|
17
|
+
|
2
18
|
require 'rake/testtask'
|
3
19
|
|
4
20
|
Rake::TestTask.new(:test) do |t|
|
@@ -7,16 +23,11 @@ Rake::TestTask.new(:test) do |t|
|
|
7
23
|
t.test_files = FileList['test/**/*_test.rb']
|
8
24
|
end
|
9
25
|
|
10
|
-
|
11
|
-
|
12
|
-
task :validate_gemspec do
|
13
|
-
Bundler.load_gemspec('consenter.gemspec').validate
|
14
|
-
end
|
26
|
+
task :default => [:rubocop, :test]
|
15
27
|
|
16
|
-
task :
|
17
|
-
puts Consenter::VERSION
|
18
|
-
end
|
28
|
+
task :documentation
|
19
29
|
|
20
|
-
|
30
|
+
Rake::Task['build'].enhance([:default, :documentation])
|
21
31
|
|
22
32
|
# rubocop:enable Style/HashSyntax
|
33
|
+
# rubocop:enable Style/SymbolArray
|
data/bin/setup
CHANGED
data/consenter.gemspec
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'consenter/version'
|
5
4
|
|
6
5
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
6
|
+
spec.name = Consenter::NAME
|
8
7
|
spec.version = Consenter::VERSION
|
9
8
|
spec.authors = ['Peter Vandenberk']
|
10
9
|
spec.email = ['pvandenberk@mac.com']
|
@@ -12,8 +11,9 @@ Gem::Specification.new do |spec|
|
|
12
11
|
spec.summary = 'Idiomatic Enumerable extension to filter by consent'
|
13
12
|
spec.description = 'Ask for consent for each element in an Enumerable'
|
14
13
|
spec.homepage = 'https://github.com/pvdb/consenter'
|
14
|
+
spec.license = 'MIT'
|
15
15
|
|
16
|
-
spec.files = Dir.chdir(File.expand_path(
|
16
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
17
17
|
`git ls-files -z`
|
18
18
|
.split("\x0")
|
19
19
|
.reject { |f| f.match(%r{^(test|spec|features)/}) }
|
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
|
25
|
-
spec.add_development_dependency 'bundler'
|
26
|
-
spec.add_development_dependency '
|
27
|
-
spec.add_development_dependency '
|
28
|
-
spec.add_development_dependency '
|
25
|
+
spec.add_development_dependency 'bundler'
|
26
|
+
spec.add_development_dependency 'pry'
|
27
|
+
spec.add_development_dependency 'rake'
|
28
|
+
spec.add_development_dependency 'rubocop'
|
29
29
|
end
|
data/exe/pick
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
#
|
4
|
+
# this script is inspired by the various incarnations of
|
5
|
+
# a similar `pick` utility developed by Kernighan & Pike
|
6
|
+
# in their seminal "The UNIX Programming Environment"...
|
7
|
+
#
|
8
|
+
|
9
|
+
lib = File.expand_path('../lib', __dir__)
|
10
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
11
|
+
require 'consenter'
|
12
|
+
|
13
|
+
nul = ARGV.delete('-0') || ARGV.delete('-print0')
|
14
|
+
|
15
|
+
consented = ARGF.lazy.map(&:chomp).each_consented('Pick "%s"?').to_a
|
16
|
+
|
17
|
+
if nul
|
18
|
+
print consented.join("\0")
|
19
|
+
else
|
20
|
+
puts consented
|
21
|
+
end
|
22
|
+
|
23
|
+
# That's all Folks!
|
data/lib/consenter/version.rb
CHANGED
metadata
CHANGED
@@ -1,75 +1,76 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: consenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Vandenberk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: pry
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rubocop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0'
|
69
69
|
description: Ask for consent for each element in an Enumerable
|
70
70
|
email:
|
71
71
|
- pvandenberk@mac.com
|
72
|
-
executables:
|
72
|
+
executables:
|
73
|
+
- pick
|
73
74
|
extensions: []
|
74
75
|
extra_rdoc_files: []
|
75
76
|
files:
|
@@ -84,10 +85,12 @@ files:
|
|
84
85
|
- bin/console
|
85
86
|
- bin/setup
|
86
87
|
- consenter.gemspec
|
88
|
+
- exe/pick
|
87
89
|
- lib/consenter.rb
|
88
90
|
- lib/consenter/version.rb
|
89
91
|
homepage: https://github.com/pvdb/consenter
|
90
|
-
licenses:
|
92
|
+
licenses:
|
93
|
+
- MIT
|
91
94
|
metadata: {}
|
92
95
|
post_install_message:
|
93
96
|
rdoc_options: []
|