hen 0.6.2 → 0.6.3

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: 1167e70ec7058579e4666f164d41a387b4893760
4
- data.tar.gz: bfca533a615a855b59f6262c06c30c38b955317b
3
+ metadata.gz: 411e49bf6115cade4f5c44b8040bfb5964e77d31
4
+ data.tar.gz: 8c4647e28461ff1e49fd0768bae8b26d137b64b2
5
5
  SHA512:
6
- metadata.gz: d72747df855e5586743d61e8387a1c4092624a7a68155f2b4797bb09b66045936de9d74e4651a56b4809858a43efb1dbd3e36393323782d9704defdbf4c539cb
7
- data.tar.gz: 75458dd29d893ae09fadb776021555a4d9f2e9918152a9359c198643db9f171d61c9d368b56bc148f357a2f92344f4a49784cb8df7eb1edb62d3e8445a37353d
6
+ metadata.gz: 4477dad2ec9f108fd5a8705c09c2e7d3175355ed68a5216f3c8ba6de25b0efcd4c1ecac19f97ed0bb1a6683755320ff9463f60c22b6a7f8a1b012a83b278bc3d
7
+ data.tar.gz: b3fade51de0c9b7f065285570fd425816faf0b965a07f58aeb05550a42fcfdaac7038fd0f60ea44c30a57143ac737ed1fb69f313c40e537c3a74bddc91fd346a
data/ChangeLog CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  = Revision history for hen
4
4
 
5
+ == 0.6.3 [2014-08-01]
6
+
7
+ * Added general support for other variables in skeleton paths.
8
+ * Ignore missing ChangeLog for post_install_message.
9
+ * Housekeeping.
10
+
5
11
  == 0.6.2 [2014-05-13]
6
12
 
7
13
  * Avoid circular dependency for 'gem:native' task.
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to hen version 0.6.2
5
+ This documentation refers to hen version 0.6.3
6
6
 
7
7
 
8
8
  == DESCRIPTION
@@ -57,7 +57,7 @@ You can even extend Hen with your own tasks. More on that later. (TODO)
57
57
 
58
58
  == LINKS
59
59
 
60
- Documentation:: https://blackwinter.github.io/hen/
60
+ Documentation:: https://blackwinter.github.com/hen
61
61
  Source code:: https://github.com/blackwinter/hen
62
62
  RubyGem:: https://rubygems.org/gems/hen
63
63
 
data/Rakefile CHANGED
@@ -13,6 +13,6 @@ Hen.lay! {{
13
13
  :license => %q{AGPL-3.0},
14
14
  :homepage => :blackwinter,
15
15
  :extra_files => FileList['lib/hens/*.rake'].to_a,
16
- :dependencies => %w[highline safe_yaml] << ['ruby-nuggets', '>= 0.8.4']
16
+ :dependencies => %w[highline nuggets safe_yaml]
17
17
  }
18
18
  }}
@@ -14,7 +14,7 @@ This documentation refers to <%= progname %> version 0.0.0.
14
14
 
15
15
  == LINKS
16
16
 
17
- Documentation:: https://<%= githubuser %>.github.io/<%= progname %>/
17
+ Documentation:: https://<%= githubuser %>.github.com/<%= progname %>
18
18
  Source code:: https://github.com/<%= githubuser %>/<%= progname %>
19
19
  RubyGem:: https://rubygems.org/gems/<%= progname %>
20
20
 
data/lib/hen/commands.rb CHANGED
@@ -134,18 +134,15 @@ Usage: #{$0} {#{COMMANDS.keys.sort.join('|')}} [arguments] [options]
134
134
  end
135
135
 
136
136
  def create_skel(path, skel, created, replace)
137
- progname = progname(File.basename(path))
137
+ progname(File.basename(path)) # pre-fill
138
138
 
139
139
  git = create_git(path, created)
140
140
 
141
141
  Dir.chdir(skel) {
142
142
  Dir['**/*'].each { |sample|
143
- dir, name = File.split(sample.gsub('__progname__', progname))
144
- name.sub!(/\A_/, '.')
143
+ next unless target = mangle_target(path, sample, git)
145
144
 
146
- next if name.start_with?('.git') unless git
147
-
148
- created << target = File.join(path, dir, name)
145
+ created << target
149
146
 
150
147
  File.directory?(sample) ? FileUtils.mkdir_p(target) :
151
148
  replace[target] = render(sample, target).scan(/### .+ ###/)
@@ -189,6 +186,15 @@ Usage: #{$0} {#{COMMANDS.keys.sort.join('|')}} [arguments] [options]
189
186
  }
190
187
  end
191
188
 
189
+ def mangle_target(path, sample, git)
190
+ target = sample.gsub(/__(.+?)__/) { send($1) }
191
+
192
+ dir, name = File.split(target)
193
+ name.sub!(/\A_/, '.')
194
+
195
+ File.join(path, dir, name) if git || !name.start_with?('.git')
196
+ end
197
+
192
198
  end
193
199
 
194
200
  end
data/lib/hen/version.rb CHANGED
@@ -4,7 +4,7 @@ class Hen
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 6
7
- TINY = 2
7
+ TINY = 3
8
8
 
9
9
  class << self
10
10
 
data/lib/hens/gem.rake CHANGED
@@ -68,21 +68,25 @@ Hen :gem => :rdoc do
68
68
 
69
69
  gem_options[:post_install_message] = case post_install_message
70
70
  when nil, true
71
- msg, ver = [], gem_options[:version].sub(/\.?[^\d.].*/, '')
71
+ if File.readable?(log = ENV['HEN_CHANGELOG'] || 'ChangeLog')
72
+ msg, ver = [], gem_options[:version].sub(/\.?[^\d.].*/, '')
72
73
 
73
- heading, found = /\A== (#{Regexp.escape(ver)}\D.*)/o, false
74
+ heading, found = /\A== (#{Regexp.escape(ver)}\D.*)/o, false
74
75
 
75
- File.foreach(ENV['HEN_CHANGELOG'] || 'ChangeLog') { |line|
76
- line.chomp!
76
+ File.foreach(log) { |line|
77
+ line.chomp!
77
78
 
78
- case line
79
- when heading then msg << "#{gem_name}-#{found = $1}:"
80
- when /\A== / then break if found
81
- else msg << line if found
82
- end
83
- }
79
+ case line
80
+ when heading then msg << "#{gem_name}-#{found = $1}:"
81
+ when /\A== / then break if found
82
+ else msg << line if found
83
+ end
84
+ }
84
85
 
85
- "\n#{msg.join("\n").strip}\n\n" unless msg.empty?
86
+ "\n#{msg.join("\n").strip}\n\n" unless msg.empty?
87
+ elsif post_install_message
88
+ warn "File not found: #{log}. Skipping post_install_message." if Hen.verbose
89
+ end
86
90
  when false
87
91
  else post_install_message
88
92
  end
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.6.2
4
+ version: 0.6.3
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-05-13 00:00:00.000000000 Z
11
+ date: 2014-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: safe_yaml
28
+ name: nuggets
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: ruby-nuggets
42
+ name: safe_yaml
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.8.4
47
+ version: '0'
48
48
  type: :runtime
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.8.4
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -106,16 +106,15 @@ licenses:
106
106
  metadata: {}
107
107
  post_install_message: |2+
108
108
 
109
- hen-0.6.2 [2014-05-13]:
109
+ hen-0.6.3 [2014-08-01]:
110
110
 
111
- * Avoid circular dependency for 'gem:native' task.
112
- * Added default dependency for rake-compiler.
113
- * Updated sample project skeleton.
114
- * New DSL method 'tasks'.
111
+ * Added general support for other variables in skeleton paths.
112
+ * Ignore missing ChangeLog for post_install_message.
113
+ * Housekeeping.
115
114
 
116
115
  rdoc_options:
117
116
  - "--title"
118
- - hen Application documentation (v0.6.2)
117
+ - hen Application documentation (v0.6.3)
119
118
  - "--charset"
120
119
  - UTF-8
121
120
  - "--line-numbers"
@@ -136,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
135
  version: '0'
137
136
  requirements: []
138
137
  rubyforge_project:
139
- rubygems_version: 2.2.2.x
138
+ rubygems_version: 2.4.1
140
139
  signing_key:
141
140
  specification_version: 4
142
141
  summary: Just another project helper that integrates with Rake.