rake-notes 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +4 -1
- data/lib/rake/notes/source_annotation_extractor.rb +14 -3
- data/lib/rake/notes/version.rb +1 -1
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 88f073dcf915804bec0d7d2c75e3a02e4d4486d9e96d977cb8dfedc751b8c858
|
4
|
+
data.tar.gz: 98ff2797d5c369be557da8f647f3b1f8df93bb584b4594b4e18bb96a7f5efaf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 189cc28418cd172d609815f0460194172d8a7fd26cc4879412f78af6bd7f0252f516c826c576b76003a98128eb662ac3f63cb74bdedd2954f5923c80a1fe4155
|
7
|
+
data.tar.gz: 88345f8fb9ccf84de014d3b1c40b4c0b9b124fa510dec52b8f46f50a3d67eb75b58d614605a450060d6fcca892148b2ee92e55e61e15a641b1e76339343bd4c6
|
data/Gemfile.lock
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'colored'
|
2
|
+
require 'yaml'
|
2
3
|
|
3
4
|
module Rake
|
4
5
|
module Notes
|
@@ -21,12 +22,22 @@ module Rake
|
|
21
22
|
# of the line (or closing ERB comment tag) is considered to be their text.
|
22
23
|
class SourceAnnotationExtractor
|
23
24
|
RUBYFILES = %w( Vagrantfile Rakefile Puppetfile Gemfile )
|
25
|
+
# `gem install --standalone` puts gems into $project/bundle and it really slows
|
26
|
+
# down the rake task
|
27
|
+
DEFAULT_IGNORE_DIRS = { 'ignore' => [ './bundle', './vendor' ] }
|
24
28
|
|
25
|
-
|
29
|
+
def self.ignore_dirs
|
30
|
+
@ignore_dirs ||= begin
|
31
|
+
config = DEFAULT_IGNORE_DIRS
|
32
|
+
config = config.merge(YAML.safe_load(File.read('./.rake-notes.yml'))) if File.exist?('./.rake-notes.yml')
|
33
|
+
config['ignore'] || []
|
34
|
+
end
|
35
|
+
end
|
26
36
|
|
37
|
+
class Annotation < Struct.new(:line, :tag, :text)
|
27
38
|
COLORS = {
|
28
39
|
'OPTIMIZE' => 'cyan',
|
29
|
-
'FIXME' => '
|
40
|
+
'FIXME' => 'red',
|
30
41
|
'TODO' => 'yellow'
|
31
42
|
}
|
32
43
|
|
@@ -70,11 +81,11 @@ module Rake
|
|
70
81
|
# known file types are taken into account.
|
71
82
|
def find_in(dir)
|
72
83
|
results = {}
|
73
|
-
|
74
84
|
Dir.glob("#{dir}/*") do |item|
|
75
85
|
next if File.basename(item)[0] == ?.
|
76
86
|
|
77
87
|
if File.directory?(item)
|
88
|
+
next if SourceAnnotationExtractor.ignore_dirs.include?(item)
|
78
89
|
results.update(find_in(item))
|
79
90
|
elsif item =~ /\.(builder|rb|coffee|rake|pp|ya?ml|gemspec|feature)$/ || RUBYFILES.include?(File.basename(item))
|
80
91
|
results.update(extract_annotations_from(item, /#\s*(#{tag}):?\s*(.*)$/))
|
data/lib/rake/notes/version.rb
CHANGED
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-notes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Rehm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: colored
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
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
54
|
version: '0'
|
55
55
|
description: rake notes task for non-Rails' projects
|
@@ -59,8 +59,8 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
- .gitignore
|
63
|
-
- .rspec
|
62
|
+
- ".gitignore"
|
63
|
+
- ".rspec"
|
64
64
|
- Gemfile
|
65
65
|
- Gemfile.lock
|
66
66
|
- LICENSE.txt
|
@@ -82,17 +82,17 @@ require_paths:
|
|
82
82
|
- lib
|
83
83
|
required_ruby_version: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
|
-
- -
|
85
|
+
- - ">="
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
89
|
requirements:
|
90
|
-
- -
|
90
|
+
- - ">="
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
94
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.
|
95
|
+
rubygems_version: 2.7.6
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: rake notes task for non-Rails' projects
|