merb-builder 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +33 -21
- data/lib/merb-builder/template.rb +3 -3
- metadata +9 -7
data/Rakefile
CHANGED
@@ -1,29 +1,42 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake/gempackagetask'
|
3
|
+
require "extlib"
|
4
|
+
require 'merb-core/tasks/merb_rake_helper'
|
3
5
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
##############################################################################
|
7
|
+
# Package && release
|
8
|
+
##############################################################################
|
9
|
+
RUBY_FORGE_PROJECT = "merb"
|
10
|
+
PROJECT_URL = "http://merbivore.com"
|
11
|
+
PROJECT_SUMMARY = "Merb plugin that provides Builder support"
|
12
|
+
PROJECT_DESCRIPTION = PROJECT_SUMMARY
|
13
|
+
|
14
|
+
GEM_AUTHOR = "Jonathan Younger"
|
15
|
+
GEM_EMAIL = "jonathan@daikini.com"
|
16
|
+
|
17
|
+
GEM_NAME = "merb-builder"
|
18
|
+
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
|
19
|
+
GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.4") + PKG_BUILD
|
20
|
+
|
21
|
+
RELEASE_NAME = "REL #{GEM_VERSION}"
|
22
|
+
|
23
|
+
require "extlib/tasks/release"
|
11
24
|
|
12
25
|
spec = Gem::Specification.new do |s|
|
13
|
-
s.
|
14
|
-
s.
|
26
|
+
s.rubyforge_project = RUBY_FORGE_PROJECT
|
27
|
+
s.name = GEM_NAME
|
28
|
+
s.version = GEM_VERSION
|
15
29
|
s.platform = Gem::Platform::RUBY
|
16
30
|
s.has_rdoc = true
|
17
31
|
s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
|
18
|
-
s.summary =
|
19
|
-
s.description =
|
20
|
-
s.author =
|
21
|
-
s.email =
|
22
|
-
s.homepage =
|
23
|
-
s.add_dependency('merb-core', '>= 0.9.
|
32
|
+
s.summary = PROJECT_SUMMARY
|
33
|
+
s.description = PROJECT_DESCRIPTION
|
34
|
+
s.author = GEM_AUTHOR
|
35
|
+
s.email = GEM_EMAIL
|
36
|
+
s.homepage = PROJECT_URL
|
37
|
+
s.add_dependency('merb-core', '>= 0.9.4')
|
24
38
|
s.add_dependency('builder', '>= 2.0.0')
|
25
39
|
s.require_path = 'lib'
|
26
|
-
s.autorequire = PLUGIN
|
27
40
|
s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,spec}/**/*")
|
28
41
|
end
|
29
42
|
|
@@ -31,17 +44,16 @@ Rake::GemPackageTask.new(spec) do |pkg|
|
|
31
44
|
pkg.gem_spec = spec
|
32
45
|
end
|
33
46
|
|
34
|
-
|
35
|
-
|
47
|
+
desc "Install the gem"
|
36
48
|
task :install => [:package] do
|
37
|
-
sh %{sudo gem install #{install_home} pkg/#{
|
49
|
+
sh %{#{sudo} gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
|
38
50
|
end
|
39
51
|
|
40
52
|
namespace :jruby do
|
41
53
|
|
42
54
|
desc "Run :package and install the resulting .gem with jruby"
|
43
55
|
task :install => :package do
|
44
|
-
sh %{#{
|
56
|
+
sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
|
45
57
|
end
|
46
|
-
|
58
|
+
|
47
59
|
end
|
@@ -9,8 +9,8 @@ module Merb::Template
|
|
9
9
|
# name<~to_s>:: The name of the template method.
|
10
10
|
# mod<Class, Module>::
|
11
11
|
# The class or module wherein this method should be defined.
|
12
|
-
def self.compile_template(
|
13
|
-
path = File.expand_path(path)
|
12
|
+
def self.compile_template(io, name, mod)
|
13
|
+
path = File.expand_path(io.path)
|
14
14
|
method = mod.is_a?(Module) ? :module_eval : :instance_eval
|
15
15
|
mod.send(method, %{
|
16
16
|
def #{name}
|
@@ -20,7 +20,7 @@ module Merb::Template
|
|
20
20
|
c
|
21
21
|
end
|
22
22
|
xml = ::Builder::XmlMarkup.new(config)
|
23
|
-
self.instance_eval %{#{
|
23
|
+
self.instance_eval %{#{io.read}}
|
24
24
|
xml.target!
|
25
25
|
end
|
26
26
|
})
|
metadata
CHANGED
@@ -1,28 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Younger
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-08-13 00:00:00 +03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: merb-core
|
17
|
+
type: :runtime
|
17
18
|
version_requirement:
|
18
19
|
version_requirements: !ruby/object:Gem::Requirement
|
19
20
|
requirements:
|
20
21
|
- - ">="
|
21
22
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.9.
|
23
|
+
version: 0.9.4
|
23
24
|
version:
|
24
25
|
- !ruby/object:Gem::Dependency
|
25
26
|
name: builder
|
27
|
+
type: :runtime
|
26
28
|
version_requirement:
|
27
29
|
version_requirements: !ruby/object:Gem::Requirement
|
28
30
|
requirements:
|
@@ -68,7 +70,7 @@ files:
|
|
68
70
|
- spec/controllers/views/partial_ivars/index.xml.builder
|
69
71
|
- spec/spec_helper.rb
|
70
72
|
has_rdoc: true
|
71
|
-
homepage: http://
|
73
|
+
homepage: http://merbivore.com
|
72
74
|
post_install_message:
|
73
75
|
rdoc_options: []
|
74
76
|
|
@@ -88,8 +90,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
90
|
version:
|
89
91
|
requirements: []
|
90
92
|
|
91
|
-
rubyforge_project:
|
92
|
-
rubygems_version: 1.0
|
93
|
+
rubyforge_project: merb
|
94
|
+
rubygems_version: 1.2.0
|
93
95
|
signing_key:
|
94
96
|
specification_version: 2
|
95
97
|
summary: Merb plugin that provides Builder support
|