tagz 9.9.2 → 9.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +6 -14
  2. data/Rakefile +69 -39
  3. data/lib/tagz.rb +3 -2
  4. data/tagz.gemspec +24 -5
  5. metadata +24 -18
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MjYzNWRiYjRkMjIwNjdkYjkzNDUzZjgxMzVlZWFkZGI4MDc5ZGE3Nw==
5
- data.tar.gz: !binary |-
6
- ZThkMmJlNzY4MmQ5NzdhNGU1OWE2ZjA4NTEzY2UzOGY3NWZmM2Y2ZQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- Yjg4ZDI4NTFiODRhZjMwZTFhMWIyNmZhZDliNjg2MDZmMGNlZGQ4NTY5N2I3
10
- NGU1ODA0NDBhODljZWVmMDgxMjdmNThhOTVjYzgyZTFkMzhlYTkwYzc1MzE2
11
- NzhiNGI2YmZmMGEwNDRjYjZhYThmZTVkZjNiYTdkZDBjZmJiYTQ=
12
- data.tar.gz: !binary |-
13
- NWRkNGM5Mjc4N2Q4MzhjODcwNzcwMDY2NzYwMjY5NTc1NTQ2OTJiNWU1ODIw
14
- ZmQ4YjBmN2QwMmY5YTVjOTI3ZTlmYTE1MDEwMDY4MTRmYTI5NGVjNzMwYjcx
15
- YjI1MGE2YTdkMGI2N2I4OTZhMDc0OTgwY2VmZjA1Yjk2ODYyNzY=
2
+ SHA1:
3
+ metadata.gz: 478bf0f9a8f4036066f899c902be996b8ef7975a
4
+ data.tar.gz: acee185297edb60d1abf2e5365db76159e1336e7
5
+ SHA512:
6
+ metadata.gz: 96720bc0b931ef870932f3c4569f8879528a954cc587a54aaa14be88fa170dd8cb75b63fbe07c9887236d82a80692a98ce9e1404574e588c29cfd0777b903b87
7
+ data.tar.gz: 87edf9d27135d1e25fc6a2425f85ca0e3c3f5d0f403007022f248e05c0e240a31eafd002a3f1cab0faaa6dd3b29367b1435a08b346b24a9ec0d7fedec0ca58b7
data/Rakefile CHANGED
@@ -1,8 +1,11 @@
1
1
  This.rubyforge_project = 'codeforpeople'
2
2
  This.author = "Ara T. Howard"
3
3
  This.email = "ara.t.howard@gmail.com"
4
- This.homepage = "http://github.com/ahoward/#{ This.lib }"
4
+ This.homepage = "https://github.com/ahoward/#{ This.lib }"
5
5
 
6
+ task :license do
7
+ open('LICENSE', 'w'){|fd| fd.puts "Ruby"}
8
+ end
6
9
 
7
10
  task :default do
8
11
  puts((Rake::Task.tasks.map{|task| task.name.gsub(/::/,':')} - ['default']).sort)
@@ -26,11 +29,10 @@ def run_tests!(which = nil)
26
29
 
27
30
  div = ('=' * 119)
28
31
  line = ('-' * 119)
29
- helper = "-r ./test/helper.rb" if test(?e, "./test/helper.rb")
30
32
 
31
33
  test_rbs.each_with_index do |test_rb, index|
32
34
  testno = index + 1
33
- command = "#{ This.ruby } -I ./lib -I ./test/lib #{ helper } #{ test_rb }"
35
+ command = "#{ This.ruby } -w -I ./lib -I ./test/lib #{ test_rb }"
34
36
 
35
37
  puts
36
38
  say(div, :color => :cyan, :bold => true)
@@ -59,9 +61,9 @@ end
59
61
 
60
62
 
61
63
  task :gemspec do
62
- ignore_extensions = 'git', 'svn', 'tmp', /sw./, 'bak', 'gem'
63
- ignore_directories = %w[ pkg ]
64
- ignore_files = %w[ test/log ]
64
+ ignore_extensions = ['git', 'svn', 'tmp', /sw./, 'bak', 'gem']
65
+ ignore_directories = ['pkg']
66
+ ignore_files = ['test/log']
65
67
 
66
68
  shiteless =
67
69
  lambda do |list|
@@ -87,10 +89,11 @@ task :gemspec do
87
89
  version = This.version
88
90
  files = shiteless[Dir::glob("**/**")]
89
91
  executables = shiteless[Dir::glob("bin/*")].map{|exe| File.basename(exe)}
90
- has_rdoc = true #File.exist?('doc')
92
+ #has_rdoc = true #File.exist?('doc')
91
93
  test_files = "test/#{ lib }.rb" if File.file?("test/#{ lib }.rb")
92
94
  summary = object.respond_to?(:summary) ? object.summary : "summary: #{ lib } kicks the ass"
93
95
  description = object.respond_to?(:description) ? object.description : "description: #{ lib } kicks the ass"
96
+ license = object.respond_to?(:license) ? object.license : "Ruby"
94
97
 
95
98
  if This.extensions.nil?
96
99
  This.extensions = []
@@ -101,46 +104,60 @@ task :gemspec do
101
104
  end
102
105
  extensions = [extensions].flatten.compact
103
106
 
107
+ if This.dependencies.nil?
108
+ dependencies = []
109
+ else
110
+ case This.dependencies
111
+ when Hash
112
+ dependencies = This.dependencies.values
113
+ when Array
114
+ dependencies = This.dependencies
115
+ end
116
+ end
117
+
104
118
  template =
105
119
  if test(?e, 'gemspec.erb')
106
120
  Template{ IO.read('gemspec.erb') }
107
121
  else
108
122
  Template {
109
123
  <<-__
110
- ## #{ lib }.gemspec
124
+ ## <%= lib %>.gemspec
111
125
  #
112
126
 
113
127
  Gem::Specification::new do |spec|
114
- spec.name = #{ lib.inspect }
115
- spec.version = #{ version.inspect }
128
+ spec.name = <%= lib.inspect %>
129
+ spec.version = <%= version.inspect %>
116
130
  spec.platform = Gem::Platform::RUBY
117
- spec.summary = #{ lib.inspect }
118
- spec.description = #{ description.inspect }
131
+ spec.summary = <%= lib.inspect %>
132
+ spec.description = <%= description.inspect %>
133
+ spec.license = <%= license.inspect %>
119
134
 
120
- spec.files = #{ files.inspect }
121
- spec.executables = #{ executables.inspect }
135
+ spec.files =\n<%= files.sort.pretty_inspect %>
136
+ spec.executables = <%= executables.inspect %>
122
137
 
123
138
  spec.require_path = "lib"
124
139
 
125
- spec.has_rdoc = #{ has_rdoc.inspect }
126
- spec.test_files = #{ test_files.inspect }
140
+ spec.test_files = <%= test_files.inspect %>
127
141
 
128
- # spec.add_dependency 'lib', '>= version'
142
+ <% dependencies.each do |lib_version| %>
143
+ spec.add_dependency(*<%= Array(lib_version).flatten.inspect %>)
144
+ <% end %>
129
145
 
130
- spec.extensions.push(*#{ extensions.inspect })
146
+ spec.extensions.push(*<%= extensions.inspect %>)
131
147
 
132
- spec.rubyforge_project = #{ This.rubyforge_project.inspect }
133
- spec.author = #{ This.author.inspect }
134
- spec.email = #{ This.email.inspect }
135
- spec.homepage = #{ This.homepage.inspect }
148
+ spec.rubyforge_project = <%= This.rubyforge_project.inspect %>
149
+ spec.author = <%= This.author.inspect %>
150
+ spec.email = <%= This.email.inspect %>
151
+ spec.homepage = <%= This.homepage.inspect %>
136
152
  end
137
153
  __
138
154
  }
139
155
  end
140
156
 
141
157
  Fu.mkdir_p(This.pkgdir)
142
- This.gemspec = File.join(This.dir, "#{ This.lib }.gemspec") #File.join(This.pkgdir, "gemspec.rb")
143
- open("#{ This.gemspec }", "w"){|fd| fd.puts(template)}
158
+ gemspec = "#{ lib }.gemspec"
159
+ open(gemspec, "w"){|fd| fd.puts(template)}
160
+ This.gemspec = gemspec
144
161
  end
145
162
 
146
163
  task :gem => [:clean, :gemspec] do
@@ -150,8 +167,8 @@ task :gem => [:clean, :gemspec] do
150
167
  `#{ cmd }`
151
168
  after = Dir['*.gem']
152
169
  gem = ((after - before).first || after.first) or abort('no gem!')
153
- Fu.mv gem, This.pkgdir
154
- This.gem = File.basename(gem)
170
+ Fu.mv(gem, This.pkgdir)
171
+ This.gem = File.join(This.pkgdir, File.basename(gem))
155
172
  end
156
173
 
157
174
  task :readme do
@@ -175,8 +192,8 @@ task :readme do
175
192
  end
176
193
 
177
194
  template =
178
- if test(?e, 'readme.erb')
179
- Template{ IO.read('readme.erb') }
195
+ if test(?e, 'README.erb')
196
+ Template{ IO.read('README.erb') }
180
197
  else
181
198
  Template {
182
199
  <<-__
@@ -207,12 +224,18 @@ task :release => [:clean, :gemspec, :gem] do
207
224
  gems = Dir[File.join(This.pkgdir, '*.gem')].flatten
208
225
  raise "which one? : #{ gems.inspect }" if gems.size > 1
209
226
  raise "no gems?" if gems.size < 1
210
- cmd = "rubyforge login && rubyforge add_release #{ This.rubyforge_project } #{ This.lib } #{ This.version } #{ This.pkgdir }/#{ This.gem }"
227
+
228
+ cmd = "gem push #{ This.gem }"
211
229
  puts cmd
212
- system cmd
213
- cmd = "gem push #{ This.pkgdir }/#{ This.gem }"
230
+ puts
231
+ system(cmd)
232
+ abort("cmd(#{ cmd }) failed with (#{ $?.inspect })") unless $?.exitstatus.zero?
233
+
234
+ cmd = "rubyforge login && rubyforge add_release #{ This.rubyforge_project } #{ This.lib } #{ This.version } #{ This.gem }"
214
235
  puts cmd
215
- system cmd
236
+ puts
237
+ system(cmd)
238
+ abort("cmd(#{ cmd }) failed with (#{ $?.inspect })") unless $?.exitstatus.zero?
216
239
  end
217
240
 
218
241
 
@@ -228,6 +251,7 @@ BEGIN {
228
251
  require 'erb'
229
252
  require 'fileutils'
230
253
  require 'rbconfig'
254
+ require 'pp'
231
255
 
232
256
  # fu shortcut
233
257
  #
@@ -260,6 +284,12 @@ BEGIN {
260
284
  end
261
285
  This.version = version
262
286
 
287
+ # see if dependencies are export by the module
288
+ #
289
+ if This.object.respond_to?(:dependencies)
290
+ This.dependencies = This.object.dependencies
291
+ end
292
+
263
293
  # we need to know the name of the lib an it's version
264
294
  #
265
295
  abort('no lib') unless This.lib
@@ -267,7 +297,7 @@ BEGIN {
267
297
 
268
298
  # discover full path to this ruby executable
269
299
  #
270
- c = Config::CONFIG
300
+ c = RbConfig::CONFIG
271
301
  bindir = c["bindir"] || c['BINDIR']
272
302
  ruby_install_name = c['ruby_install_name'] || c['RUBY_INSTALL_NAME'] || 'ruby'
273
303
  ruby_ext = c['EXEEXT'] || ''
@@ -286,11 +316,11 @@ BEGIN {
286
316
  def unindent(s)
287
317
  indent = nil
288
318
  s.each_line do |line|
289
- next if line =~ %r/^\s*$/
290
- indent = line[%r/^\s*/] and break
291
- end
292
- indent ? s.gsub(%r/^#{ indent }/, "") : s
319
+ next if line =~ %r/^\s*$/
320
+ indent = line[%r/^\s*/] and break
293
321
  end
322
+ indent ? s.gsub(%r/^#{ indent }/, "") : s
323
+ end
294
324
  extend self
295
325
  end
296
326
 
@@ -298,11 +328,11 @@ BEGIN {
298
328
  #
299
329
  class Template
300
330
  def initialize(&block)
301
- @block = block.binding
331
+ @block = block
302
332
  @template = block.call.to_s
303
333
  end
304
334
  def expand(b=nil)
305
- ERB.new(Util.unindent(@template)).result(b||@block)
335
+ ERB.new(Util.unindent(@template)).result((b||@block).binding)
306
336
  end
307
337
  alias_method 'to_s', 'expand'
308
338
  end
@@ -7,7 +7,7 @@ unless defined? Tagz
7
7
  require 'cgi'
8
8
 
9
9
  def Tagz.version()
10
- '9.9.2'
10
+ '9.10.0'
11
11
  end
12
12
 
13
13
  def Tagz.description
@@ -152,7 +152,8 @@ unless defined? Tagz
152
152
  begin
153
153
  return super
154
154
  ensure
155
- $!.set_backtrace caller(1) if $!
155
+ :do_nothing_until_strange_core_dump_in_ruby_2_5_is_fixed
156
+ # $!.set_backtrace caller(1) if $!
156
157
  end
157
158
  end
158
159
 
@@ -3,25 +3,44 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "tagz"
6
- spec.version = "9.9.2"
6
+ spec.version = "9.10.0"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "tagz"
9
9
  spec.description = "\n tagz.rb is generates html, xml, or any sgml variant like a small ninja\n running across the backs of a herd of giraffes swatting of heads like\n a mark-up weedwacker. weighing in at less than 300 lines of code\n tagz.rb adds an html/xml/sgml syntax to ruby that is both unobtrusive,\n safe, and available globally to objects without the need for any\n builder or superfluous objects. tagz.rb is designed for applications\n that generate html to be able to do so easily in any context without\n heavyweight syntax or scoping issues, like a ninja sword through\n butter.\n\n"
10
+ spec.license = "Ruby"
11
+
12
+ spec.files =
13
+ ["README",
14
+ "Rakefile",
15
+ "lib",
16
+ "lib/tagz",
17
+ "lib/tagz.rb",
18
+ "lib/tagz/rails.rb",
19
+ "readme.erb",
20
+ "samples",
21
+ "samples/a.rb",
22
+ "samples/b.rb",
23
+ "samples/c.rb",
24
+ "samples/d.rb",
25
+ "samples/e.rb",
26
+ "samples/f.rb",
27
+ "samples/g.rb",
28
+ "tagz.gemspec",
29
+ "test",
30
+ "test/tagz_test.rb"]
10
31
 
11
- spec.files = ["lib", "lib/tagz", "lib/tagz/rails.rb", "lib/tagz.rb", "Rakefile", "README", "readme.erb", "samples", "samples/a.rb", "samples/b.rb", "samples/c.rb", "samples/d.rb", "samples/e.rb", "samples/f.rb", "samples/g.rb", "tagz.gemspec", "test", "test/tagz_test.rb"]
12
32
  spec.executables = []
13
33
 
14
34
  spec.require_path = "lib"
15
35
 
16
- spec.has_rdoc = true
17
36
  spec.test_files = nil
18
37
 
19
- # spec.add_dependency 'lib', '>= version'
38
+
20
39
 
21
40
  spec.extensions.push(*[])
22
41
 
23
42
  spec.rubyforge_project = "codeforpeople"
24
43
  spec.author = "Ara T. Howard"
25
44
  spec.email = "ara.t.howard@gmail.com"
26
- spec.homepage = "http://github.com/ahoward/tagz"
45
+ spec.homepage = "https://github.com/ahoward/tagz"
27
46
  end
metadata CHANGED
@@ -1,32 +1,36 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tagz
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.9.2
4
+ version: 9.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ara T. Howard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-09 00:00:00.000000000 Z
11
+ date: 2018-02-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: ! "\n tagz.rb is generates html, xml, or any sgml variant like
14
- a small ninja\n running across the backs of a herd of giraffes swatting of
15
- heads like\n a mark-up weedwacker. weighing in at less than 300 lines of
16
- code\n tagz.rb adds an html/xml/sgml syntax to ruby that is both unobtrusive,\n
17
- \ safe, and available globally to objects without the need for any\n builder
18
- or superfluous objects. tagz.rb is designed for applications\n that generate
19
- html to be able to do so easily in any context without\n heavyweight syntax
20
- or scoping issues, like a ninja sword through\n butter.\n\n"
13
+ description: |2+
14
+
15
+ tagz.rb is generates html, xml, or any sgml variant like a small ninja
16
+ running across the backs of a herd of giraffes swatting of heads like
17
+ a mark-up weedwacker. weighing in at less than 300 lines of code
18
+ tagz.rb adds an html/xml/sgml syntax to ruby that is both unobtrusive,
19
+ safe, and available globally to objects without the need for any
20
+ builder or superfluous objects. tagz.rb is designed for applications
21
+ that generate html to be able to do so easily in any context without
22
+ heavyweight syntax or scoping issues, like a ninja sword through
23
+ butter.
24
+
21
25
  email: ara.t.howard@gmail.com
22
26
  executables: []
23
27
  extensions: []
24
28
  extra_rdoc_files: []
25
29
  files:
26
- - lib/tagz/rails.rb
27
- - lib/tagz.rb
28
- - Rakefile
29
30
  - README
31
+ - Rakefile
32
+ - lib/tagz.rb
33
+ - lib/tagz/rails.rb
30
34
  - readme.erb
31
35
  - samples/a.rb
32
36
  - samples/b.rb
@@ -37,8 +41,9 @@ files:
37
41
  - samples/g.rb
38
42
  - tagz.gemspec
39
43
  - test/tagz_test.rb
40
- homepage: http://github.com/ahoward/tagz
41
- licenses: []
44
+ homepage: https://github.com/ahoward/tagz
45
+ licenses:
46
+ - Ruby
42
47
  metadata: {}
43
48
  post_install_message:
44
49
  rdoc_options: []
@@ -46,18 +51,19 @@ require_paths:
46
51
  - lib
47
52
  required_ruby_version: !ruby/object:Gem::Requirement
48
53
  requirements:
49
- - - ! '>='
54
+ - - ">="
50
55
  - !ruby/object:Gem::Version
51
56
  version: '0'
52
57
  required_rubygems_version: !ruby/object:Gem::Requirement
53
58
  requirements:
54
- - - ! '>='
59
+ - - ">="
55
60
  - !ruby/object:Gem::Version
56
61
  version: '0'
57
62
  requirements: []
58
63
  rubyforge_project: codeforpeople
59
- rubygems_version: 2.0.3
64
+ rubygems_version: 2.6.8
60
65
  signing_key:
61
66
  specification_version: 4
62
67
  summary: tagz
63
68
  test_files: []
69
+ has_rdoc: