hoe 3.1.1 → 3.2.0
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.
- data.tar.gz.sig +0 -0
- data/History.txt +8 -0
- data/lib/hoe.rb +7 -5
- data/lib/hoe/flog.rb +5 -3
- metadata +5 -5
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
=== 3.2.0 / 2012-11-09
|
2
|
+
|
3
|
+
* 3 minor enhancements:
|
4
|
+
|
5
|
+
* Added flog_method and defaulted it to max_method
|
6
|
+
* Changed flog_threshold to 20, 2x the industry average. Be strong. You can do it.
|
7
|
+
* Hoe#timebomb will now default finis/start values to 1/1 and 12/31 of the current year if not specified.
|
8
|
+
|
1
9
|
=== 3.1.1 / 2012-11-03
|
2
10
|
|
3
11
|
* 1 bug fix:
|
data/lib/hoe.rb
CHANGED
@@ -91,7 +91,7 @@ class Hoe
|
|
91
91
|
include Rake::DSL if defined?(Rake::DSL)
|
92
92
|
|
93
93
|
# duh
|
94
|
-
VERSION = '3.
|
94
|
+
VERSION = '3.2.0'
|
95
95
|
|
96
96
|
@@plugins = [:clean, :debug, :deps, :flay, :flog, :newb, :package,
|
97
97
|
:publish, :gemcutter, :signing, :test]
|
@@ -807,12 +807,14 @@ class Hoe
|
|
807
807
|
end
|
808
808
|
|
809
809
|
##
|
810
|
-
# Provide a linear degrading value from n to m over start to finis
|
810
|
+
# Provide a linear degrading value from n to m over start to finis
|
811
|
+
# dates. If not provided, start and finis will default to 1/1 and
|
812
|
+
# 12/31 of the current year.
|
811
813
|
|
812
|
-
def timebomb n, m, finis =
|
814
|
+
def timebomb n, m, finis = nil, start = nil
|
813
815
|
require 'time'
|
814
|
-
finis = Time.parse
|
815
|
-
start = Time.parse
|
816
|
+
finis = Time.parse(finis || "#{Time.now.year}-12-31")
|
817
|
+
start = Time.parse(start || "#{Time.now.year}-01-01")
|
816
818
|
rest = (finis - Time.now)
|
817
819
|
full = (finis - start)
|
818
820
|
|
data/lib/hoe/flog.rb
CHANGED
@@ -10,12 +10,14 @@ module Hoe::Flog
|
|
10
10
|
# Optional: flog threshold to determine threshold failure. [default: 1500-200]
|
11
11
|
|
12
12
|
attr_accessor :flog_threshold
|
13
|
+
attr_accessor :flog_method
|
13
14
|
|
14
15
|
##
|
15
16
|
# Initialize variables for plugin.
|
16
17
|
|
17
18
|
def initialize_flog
|
18
|
-
self.
|
19
|
+
self.flog_method ||= :max_method
|
20
|
+
self.flog_threshold ||= 20 # 2x industry avg
|
19
21
|
end
|
20
22
|
|
21
23
|
##
|
@@ -24,8 +26,8 @@ module Hoe::Flog
|
|
24
26
|
def define_flog_tasks
|
25
27
|
begin
|
26
28
|
require 'flog_task'
|
27
|
-
FlogTask.new :flog, self.flog_threshold
|
28
|
-
rescue
|
29
|
+
FlogTask.new :flog, self.flog_threshold, nil, self.flog_method
|
30
|
+
rescue LoadError
|
29
31
|
# skip
|
30
32
|
end
|
31
33
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hoe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 3.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 3.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Davis
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
FBHgymkyj/AOSqKRIpXPhjC6
|
37
37
|
-----END CERTIFICATE-----
|
38
38
|
|
39
|
-
date: 2012-11-
|
39
|
+
date: 2012-11-09 00:00:00 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
metadata.gz.sig
CHANGED
Binary file
|