rake-notes 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65ee7561dd3dea89670b7a7a1488e9abe17c1503
4
- data.tar.gz: f1247f57dd89c2a95a02b87c645de61e2f00c68c
3
+ metadata.gz: 7a118adeee9933454b2484edf35ea8393d6290e4
4
+ data.tar.gz: 0d9b5740f02e3fa0f58654bbc6136d4758582140
5
5
  SHA512:
6
- metadata.gz: a7cadfdd686dd6a4dc982648fa5c629dff06a0b8cca3ff3ea4ffdf8f0571e90b2f140d2ce43683fe1b89dd9e70d839c04f20184e13c6da78d7f75d44d3c04076
7
- data.tar.gz: 9df3c55a9e0087b89b88f6dfb168dbf82ed75dbe45adb63e8f0e0e7fb5174b049965d731cab6d07f49738c676c8c9d91749b27b85abaee4ebda789f59d13e4e6
6
+ metadata.gz: 87ad039547d084a3afe5453b843d63cd8bc7edaae1a283c015b3266d58658e7b09bf602e249b41b898f80f4403e4dfd602c8c5d811f832993138c77cda7c4428
7
+ data.tar.gz: e11bc0ac466b0f30a3e253154a9f89ab9fe977db33431766665379aa1f7bc14c0239727067c42ed0bc87b4857645cbe004dadedaf173ddbefa8a449597f99d88
data/.gitignore CHANGED
@@ -3,7 +3,6 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
- Gemfile.lock
7
6
  InstalledFiles
8
7
  _yardoc
9
8
  coverage
@@ -0,0 +1,28 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rake-notes (0.2.0)
5
+ colored
6
+ rake
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ colored (1.2)
12
+ diff-lcs (1.1.3)
13
+ rake (10.1.0)
14
+ rspec (2.11.0)
15
+ rspec-core (~> 2.11.0)
16
+ rspec-expectations (~> 2.11.0)
17
+ rspec-mocks (~> 2.11.0)
18
+ rspec-core (2.11.1)
19
+ rspec-expectations (2.11.3)
20
+ diff-lcs (~> 1.1.3)
21
+ rspec-mocks (2.11.3)
22
+
23
+ PLATFORMS
24
+ ruby
25
+
26
+ DEPENDENCIES
27
+ rake-notes!
28
+ rspec
@@ -1,3 +1,5 @@
1
+ require 'colored'
2
+
1
3
  module Rake
2
4
  module Notes
3
5
  # From:
@@ -21,6 +23,13 @@ module Rake
21
23
  RUBYFILES = %w( Vagrantfile Rakefile Puppetfile Gemfile )
22
24
 
23
25
  class Annotation < Struct.new(:line, :tag, :text)
26
+
27
+ COLORS = {
28
+ 'OPTIMIZE' => 'cyan',
29
+ 'FIXME' => 'magenta',
30
+ 'TODO' => 'yellow'
31
+ }
32
+
24
33
  # Returns a representation of the annotation that looks like this:
25
34
  #
26
35
  # [126] [TODO] This algorithm is simple and clearly correct, make it faster.
@@ -28,8 +37,9 @@ module Rake
28
37
  # If +options+ has a flag <tt>:tag</tt> the tag is shown as in the example above.
29
38
  # Otherwise the string contains just line and text.
30
39
  def to_s(options={})
31
- s = "[#{line.to_s.rjust(options[:indent])}] "
32
- s << "[#{tag}] " if options[:tag]
40
+ colored_tag = COLORS[tag.to_s].nil? ? tag : tag.send(COLORS[tag.to_s])
41
+ s = "[#{line.to_s.rjust(options[:indent]).green}] "
42
+ s << "[#{colored_tag}] " if options[:tag]
33
43
  s << text
34
44
  end
35
45
  end
@@ -1,5 +1,5 @@
1
1
  module Rake
2
2
  module Notes
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -18,6 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.require_paths = ["lib"]
19
19
 
20
20
  gem.add_dependency 'rake'
21
+ gem.add_dependency 'colored'
21
22
 
22
23
  gem.add_development_dependency 'rspec'
23
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-notes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Rehm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-09 00:00:00.000000000 Z
11
+ date: 2013-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: colored
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rspec
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -48,6 +62,7 @@ files:
48
62
  - .gitignore
49
63
  - .rspec
50
64
  - Gemfile
65
+ - Gemfile.lock
51
66
  - LICENSE.txt
52
67
  - README.md
53
68
  - Rakefile
@@ -77,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
92
  version: '0'
78
93
  requirements: []
79
94
  rubyforge_project:
80
- rubygems_version: 2.0.0
95
+ rubygems_version: 2.1.5
81
96
  signing_key:
82
97
  specification_version: 4
83
98
  summary: rake notes task for non-Rails' projects