hen 0.7.0 → 0.7.1

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: d550997b7aaa45957a960114ce0343e5dd27cb29
4
- data.tar.gz: 7fd60ffa855f0735cc37eb52900210ee043f1a42
3
+ metadata.gz: 498ad06883b7b8ed922913e433a2b14686432080
4
+ data.tar.gz: a9009b33ac57e4695df6cf2fca97bc43628d4b9a
5
5
  SHA512:
6
- metadata.gz: 76f095d06132a9ca99ccf20cf5c792a4b5da7e00975d2bd6912a5939f02806d4820b7013483e4929fe3e2ebb71422ea1515cb85e957aa7576b07761877707722
7
- data.tar.gz: 5be59b9729067e560edb255c97e96a14e14a691c9332eb22228f5f486f81540eb6975576953af71dde076d359795319620644c2a15d8c1294419ced542414004
6
+ metadata.gz: dc962996c983173994195733d666dffa587f21a5b8f061244e677ff62eba928eab425fd43b4cdc1320a5c4f131780576ab394c43aacee2bf3f022988eb5f6862
7
+ data.tar.gz: aa2f6ca6d9635d68abcdf8e5522f455dd5f270357a7cc2eed60d646ecc643e77008bf7819e8ea635f998d2174a2a7d31088a496fd2daeaeb1c42cb744efba152
data/ChangeLog CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  = Revision history for hen
4
4
 
5
+ == 0.7.1 [2014-10-17]
6
+
7
+ * Specify default dependency for hen with pessimistic version constraint.
8
+ * Recognize +extra_files+ option for RDoc task.
9
+ * Respect RDoc option +root+ when looking for +main+ file.
10
+ * Prefer +README+ as +main+ file.
11
+
5
12
  == 0.7.0 [2014-10-07]
6
13
 
7
14
  * Require at least Ruby 1.9.3.
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to hen version 0.7.0
5
+ This documentation refers to hen version 0.7.1
6
6
 
7
7
 
8
8
  == DESCRIPTION
data/lib/hen/version.rb CHANGED
@@ -4,7 +4,7 @@ class Hen
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 7
7
- TINY = 0
7
+ TINY = 1
8
8
 
9
9
  class << self
10
10
 
@@ -18,6 +18,11 @@ class Hen
18
18
  to_a.join('.')
19
19
  end
20
20
 
21
+ # Pessimistic version constraint.
22
+ def pessimistic_requirement
23
+ ["~> #{MAJOR}.#{MINOR}", ">= #{to_s}"]
24
+ end
25
+
21
26
  end
22
27
 
23
28
  end
data/lib/hens/gem.rake CHANGED
@@ -134,7 +134,7 @@ Hen gem: :rdoc do
134
134
  dependencies = Array(gem_options.delete(:dependencies))
135
135
  development_dependencies = Array(gem_options.delete(:development_dependencies))
136
136
 
137
- default_dependencies = %w[hen rake]
137
+ default_dependencies = [['hen', *Hen::Version.pessimistic_requirement], 'rake']
138
138
  default_dependencies << 'rake-compiler' unless gem_options[:extensions].empty?
139
139
 
140
140
  unless (test_files = gem_options[:files].grep(/\A(?:test|spec)s?\//)).empty?
@@ -149,18 +149,21 @@ Hen gem: :rdoc do
149
149
  default_dependencies << test_dependency.tr('/', '-') if test_dependency
150
150
  end
151
151
 
152
- default_dependencies -= dependencies + development_dependencies + [gem_name]
152
+ exclude_default_dependencies = [gem_name]
153
153
 
154
- dependencies.each { |dependency|
155
- spec.add_dependency(*dependency)
154
+ dependencies.each { |name, *requirements|
155
+ exclude_default_dependencies << name
156
+ spec.add_runtime_dependency(name, *requirements)
156
157
  }
157
158
 
158
- development_dependencies.each { |dependency|
159
- spec.add_development_dependency(*dependency)
159
+ development_dependencies.each { |name, *requirements|
160
+ exclude_default_dependencies << name
161
+ spec.add_development_dependency(name, *requirements)
160
162
  }
161
163
 
162
- default_dependencies.each { |dependency|
163
- spec.add_development_dependency(*dependency)
164
+ default_dependencies.each { |name, *requirements|
165
+ next if exclude_default_dependencies.include?(name)
166
+ spec.add_development_dependency(name, *requirements)
164
167
  }
165
168
 
166
169
  ### => set options!
data/lib/hens/rdoc.rake CHANGED
@@ -40,7 +40,10 @@ Hen :rdoc do
40
40
 
41
41
  ### rdoc_files, main
42
42
 
43
- rdoc_files = FileList[rdoc_options.delete(:rdoc_files)].sort_by { |file|
43
+ rdoc_files = FileList[[
44
+ rdoc_options.delete(:rdoc_files),
45
+ rdoc_options.delete(:extra_files)
46
+ ].compact.flatten].sort_by { |file|
44
47
  [file.length, file]
45
48
  }
46
49
 
@@ -52,8 +55,13 @@ Hen :rdoc do
52
55
  rdoc_files_local = []
53
56
  end
54
57
 
55
- rdoc_options.delete(:main) unless rdoc_files.include?(rdoc_options[:main])
56
- rdoc_options[:main] ||= rdoc_files.first || rdoc_files_local.first
58
+ rdoc_options.delete(:main) unless rdoc_files.include?(
59
+ File.join(rdoc_options.values_at(:root, :main).compact))
60
+
61
+ rdoc_options[:main] ||= begin
62
+ main_candidates = rdoc_files.empty? ? rdoc_files_local : rdoc_files
63
+ main_candidates.grep(%r{\Areadme[^/]*\z}i).first || main_candidates.first
64
+ end
57
65
 
58
66
  ### rdoc_options
59
67
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Wille
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-07 00:00:00.000000000 Z
11
+ date: 2014-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
@@ -106,18 +106,16 @@ licenses:
106
106
  metadata: {}
107
107
  post_install_message: |2+
108
108
 
109
- hen-0.7.0 [2014-10-07]:
109
+ hen-0.7.1 [2014-10-17]:
110
110
 
111
- * Require at least Ruby 1.9.3.
112
- * Task <tt>doc:publish:github</tt> cleans up before adding new files.
113
- * Task <tt>doc:publish:github</tt> performs local clone and shallow checkout
114
- instead of fetching the full history.
115
- * When setting +post_install_message+, gem files are searched for log file;
116
- specify +HEN_CHANGELOG+ to override.
111
+ * Specify default dependency for hen with pessimistic version constraint.
112
+ * Recognize +extra_files+ option for RDoc task.
113
+ * Respect RDoc option +root+ when looking for +main+ file.
114
+ * Prefer +README+ as +main+ file.
117
115
 
118
116
  rdoc_options:
119
117
  - "--title"
120
- - hen Application documentation (v0.7.0)
118
+ - hen Application documentation (v0.7.1)
121
119
  - "--charset"
122
120
  - UTF-8
123
121
  - "--line-numbers"