masterview 0.0.10 → 0.0.11
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/CHANGELOG +2 -0
- data/README +1 -5
- data/Rakefile +114 -35
- data/lib/masterview/masterview_version.rb +1 -1
- data/lib/masterview.rb +8 -3
- metadata +2 -2
data/CHANGELOG
CHANGED
data/README
CHANGED
@@ -43,11 +43,7 @@ Install in one of the two following ways depending on whether you can use gems o
|
|
43
43
|
|
44
44
|
If you can use gems you may simply do the following
|
45
45
|
|
46
|
-
gem install
|
47
|
-
|
48
|
-
gem install masterview_generator
|
49
|
-
|
50
|
-
gem install masterview_plugin_generator
|
46
|
+
gem install masterview_gem_pack
|
51
47
|
|
52
48
|
Now your gem is installed and you can skip these steps in the future. After creating your rails directory, change directory to it and run the following to create a very lightweight plugin instance for this application mainly consisting of an init.rb file which will get loaded at runtime. This init.rb refers to the gem for everything but allows you to override any constants or setup that has been provided. See MasterView module masterview.rb for a list of the available constants.
|
53
49
|
|
data/Rakefile
CHANGED
@@ -105,11 +105,11 @@ end
|
|
105
105
|
# Rake::SshDirPublisher.new("foobar.com", "dist/api/#{PKG_NAME}", "doc").upload
|
106
106
|
#end
|
107
107
|
|
108
|
-
MASTERVIEW = MetaProject::Project::XForge::RubyForge.new('masterview')
|
109
108
|
|
110
109
|
task :verify_rubyforge do
|
111
110
|
raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
|
112
111
|
raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
|
112
|
+
MASTERVIEW = MetaProject::Project::XForge::RubyForge.new('masterview')
|
113
113
|
end
|
114
114
|
|
115
115
|
task :verify_gmail do
|
@@ -119,36 +119,37 @@ end
|
|
119
119
|
|
120
120
|
|
121
121
|
desc 'Build all packages'
|
122
|
-
task :
|
122
|
+
task :package => ['masterview_plugin:package',
|
123
123
|
'masterview:package',
|
124
|
-
'masterview_parser:package',
|
125
124
|
'masterview_generator:package',
|
126
|
-
'masterview_plugin_generator:package'
|
125
|
+
'masterview_plugin_generator:package',
|
126
|
+
'masterview_gem_pack:package']
|
127
127
|
|
128
128
|
desc 'Re-build all packages'
|
129
|
-
task :
|
129
|
+
task :repackage => ['masterview_plugin:repackage',
|
130
130
|
'masterview:repackage',
|
131
|
-
'masterview_parser:repackage',
|
132
131
|
'masterview_generator:repackage',
|
133
|
-
'masterview_plugin_generator:repackage'
|
132
|
+
'masterview_plugin_generator:repackage',
|
133
|
+
'masterview_gem_pack:repackage']
|
134
134
|
|
135
135
|
desc 'Release all files'
|
136
|
-
task :
|
136
|
+
task :release_files => ['masterview_plugin:release_files',
|
137
137
|
'masterview:release_files',
|
138
138
|
'masterview_generator:release_files',
|
139
|
-
'masterview_plugin_generator:release_files'
|
139
|
+
'masterview_plugin_generator:release_files',
|
140
|
+
'masterview_gem_pack:release_files']
|
140
141
|
|
141
|
-
namespace '
|
142
|
+
namespace 'masterview_plugin' do
|
142
143
|
module MasterViewComplete
|
143
144
|
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
|
144
|
-
PKG_NAME = '
|
145
|
+
PKG_NAME = 'masterview_plugin'
|
145
146
|
PKG_VERSION = MasterView::VERSION::STRING + PKG_BUILD
|
146
147
|
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
147
148
|
PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"
|
148
149
|
RELEASE_NAME = "REL #{PKG_VERSION}"
|
149
150
|
PKG_FILES = FileList[
|
150
151
|
"lib/**/*",
|
151
|
-
"generators/**/*",
|
152
|
+
"generators/masterview/**/*", #exclude the masterview_plugin generator, not needed for non-gem install
|
152
153
|
"directives/**/*",
|
153
154
|
"test/**/*",
|
154
155
|
"example/**/*",
|
@@ -215,6 +216,79 @@ namespace 'masterview_complete' do
|
|
215
216
|
end
|
216
217
|
end
|
217
218
|
|
219
|
+
namespace 'masterview_gem_pack' do
|
220
|
+
module MasterViewGemPack
|
221
|
+
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
|
222
|
+
PKG_NAME = 'masterview_gem_pack'
|
223
|
+
PKG_VERSION = MasterView::VERSION::STRING + PKG_BUILD
|
224
|
+
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
225
|
+
PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"
|
226
|
+
RELEASE_NAME = "REL #{PKG_VERSION}"
|
227
|
+
PKG_FILES = FileList[
|
228
|
+
"[A-Z]*",
|
229
|
+
].exclude(/\bCVS\b|~$|\.svn|semantic.cache/)
|
230
|
+
|
231
|
+
spec = Gem::Specification.new do |s|
|
232
|
+
s.name = PKG_NAME
|
233
|
+
s.version = PKG_VERSION
|
234
|
+
s.summary = "A (x)html friendly template engine for rails with the power of layouts, and partials. This gem package includes the other masterview gems for easy installation"
|
235
|
+
s.has_rdoc = true
|
236
|
+
s.files = PKG_FILES
|
237
|
+
s.require_path = '.'
|
238
|
+
s.extra_rdoc_files = ['README']
|
239
|
+
s.add_dependency( 'masterview' )
|
240
|
+
s.add_dependency( 'masterview_generator' )
|
241
|
+
s.add_dependency( 'masterview_plugin_generator' )
|
242
|
+
s.author = "Jeff Barczewski"
|
243
|
+
s.email = "jeff.barczewski@gmail.com"
|
244
|
+
s.homepage = "http://masterview.org/"
|
245
|
+
end
|
246
|
+
|
247
|
+
# Create Rubygem package
|
248
|
+
Rake::GemPackageTask.new(spec) do |p|
|
249
|
+
p.gem_spec = spec
|
250
|
+
p.need_tar = false
|
251
|
+
p.need_zip = false
|
252
|
+
end
|
253
|
+
|
254
|
+
desc "Release files on RubyForge."
|
255
|
+
task :release_files => [ :verify_rubyforge ] do
|
256
|
+
release_files = ["gem"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
|
257
|
+
|
258
|
+
Rake::XForge::Release.new(MASTERVIEW) do |release|
|
259
|
+
release.user_name = ENV['RUBYFORGE_USER']
|
260
|
+
release.password = ENV['RUBYFORGE_PASSWORD']
|
261
|
+
release.files = release_files.to_a
|
262
|
+
release.release_name = RELEASE_NAME
|
263
|
+
release.package_name = PKG_NAME
|
264
|
+
|
265
|
+
notes = []
|
266
|
+
File.open("RELEASE_NOTES") do |file|
|
267
|
+
file.each do |line|
|
268
|
+
line.chomp!
|
269
|
+
line.gsub!(/^#.*$/, '') and next
|
270
|
+
notes << line
|
271
|
+
end
|
272
|
+
end
|
273
|
+
release.release_notes = notes.join("\n")
|
274
|
+
|
275
|
+
changes = []
|
276
|
+
File.open("CHANGELOG") do |file|
|
277
|
+
current = true
|
278
|
+
|
279
|
+
file.each do |line|
|
280
|
+
line.chomp!
|
281
|
+
current = false if current and line =~ /^==/
|
282
|
+
break if line.empty? and not current
|
283
|
+
changes << line
|
284
|
+
end
|
285
|
+
end
|
286
|
+
release.release_changes = changes.join("\n")
|
287
|
+
end
|
288
|
+
end
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
218
292
|
namespace 'masterview' do
|
219
293
|
module MasterViewGem
|
220
294
|
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
|
@@ -303,31 +377,20 @@ namespace 'masterview_generator' do
|
|
303
377
|
PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"
|
304
378
|
RELEASE_NAME = "REL #{PKG_VERSION}"
|
305
379
|
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
spec = Gem::Specification.new do |s|
|
313
|
-
s.name = PKG_NAME
|
314
|
-
s.version = PKG_VERSION
|
315
|
-
s.summary = "A (x)html friendly template engine for rails with the power of layouts, and partials. MasterView Generator for GEM"
|
316
|
-
s.has_rdoc = false
|
317
|
-
s.files = PKG_FILES
|
318
|
-
s.require_path = '.'
|
319
|
-
s.autorequire = 'masterview_generator'
|
320
|
-
s.author = "Jeff Barczewski"
|
321
|
-
s.email = "jeff.barczewski@gmail.com"
|
322
|
-
s.homepage = "http://masterview.org/"
|
380
|
+
desc "Package masterview_generator"
|
381
|
+
task :package do
|
382
|
+
work_dir = Dir.getwd
|
383
|
+
Dir.chdir 'generators/masterview'
|
384
|
+
system( "rake package" )
|
385
|
+
Dir.chdir work_dir
|
323
386
|
end
|
324
387
|
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
388
|
+
desc "Repackage masterview_generator"
|
389
|
+
task :repackage do
|
390
|
+
work_dir = Dir.getwd
|
391
|
+
Dir.chdir 'generators/masterview'
|
392
|
+
system( "rake repackage" )
|
393
|
+
Dir.chdir work_dir
|
331
394
|
end
|
332
395
|
|
333
396
|
desc "Release files on RubyForge."
|
@@ -382,6 +445,22 @@ namespace 'masterview_plugin_generator' do
|
|
382
445
|
"[A-Z]*"
|
383
446
|
].exclude(/\bCVS\b|~$|\.svn|semantic.cache/)
|
384
447
|
|
448
|
+
desc "Package masterview_generator"
|
449
|
+
task :package do
|
450
|
+
work_dir = Dir.getwd
|
451
|
+
Dir.chdir 'generators/masterview_plugin'
|
452
|
+
system( "rake package" )
|
453
|
+
Dir.chdir work_dir
|
454
|
+
end
|
455
|
+
|
456
|
+
desc "Repackage masterview_generator"
|
457
|
+
task :repackage do
|
458
|
+
work_dir = Dir.getwd
|
459
|
+
Dir.chdir 'generators/masterview_plugin'
|
460
|
+
system( "rake repackage" )
|
461
|
+
Dir.chdir work_dir
|
462
|
+
end
|
463
|
+
|
385
464
|
desc "Release files on RubyForge."
|
386
465
|
task :release_files => [ :verify_rubyforge ] do
|
387
466
|
release_files = ["gem"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
|
data/lib/masterview.rb
CHANGED
@@ -96,8 +96,12 @@ require 'facets/core/string/indent'
|
|
96
96
|
require 'facets/core/string/starts_with'
|
97
97
|
|
98
98
|
#optional external gem requires, added functionality when available
|
99
|
-
|
100
|
-
require 'tidy'
|
99
|
+
begin
|
100
|
+
require 'tidy'
|
101
|
+
rescue LoadError
|
102
|
+
# Tidy was not available to load
|
103
|
+
end
|
104
|
+
# log4r is required in section below
|
101
105
|
|
102
106
|
#internal requires
|
103
107
|
require 'masterview/masterview_version'
|
@@ -115,12 +119,13 @@ module MasterView
|
|
115
119
|
|
116
120
|
# setup logger
|
117
121
|
begin
|
122
|
+
require 'log4r'
|
118
123
|
include Log4r # will use log4r if available, otherwise default to logger
|
119
124
|
|
120
125
|
# Logger which will be used to output debug, warn, and error messages, will use log4r if available, otherwise logger
|
121
126
|
Log = Logger.new 'MasterView'
|
122
127
|
Log.outputters = Outputter.stdout
|
123
|
-
rescue # else fallback to built in logger
|
128
|
+
rescue LoadError, NameError # else fallback to built in logger
|
124
129
|
require 'logger'
|
125
130
|
Log = Logger.new STDOUT # :nodoc:
|
126
131
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: masterview
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2006-04-
|
6
|
+
version: 0.0.11
|
7
|
+
date: 2006-04-22 00:00:00 -05:00
|
8
8
|
summary: A (x)html friendly template engine for rails with the power of layouts, and partials.
|
9
9
|
require_paths:
|
10
10
|
- lib
|