public
Description: Merb More: The Full Stack. Take what you need; leave what you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-more.git
Search Repo:
moved the generated frozen merb script to merb-freezer
mattetti (author)
Tue Apr 08 21:56:26 -0700 2008
commit  d38b9897809380dbeff6c2b5616d6b4f2abd5efb
tree    97bc7b0458858f0ac384a33f584d4eac099cae20
parent  d9836c141784b3e73db0c1c08660d2673bcb0bae
...
12
13
14
 
...
12
13
14
15
0
@@ -12,4 +12,5 @@
0
 */coverage
0
 bundle
0
 lib/merb-more.rb
0
+*.DS_Store
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
0
@@ -1 +1,21 @@
0
+Copyright (c) 2008 Matt Aimonetti
0
+
0
+Permission is hereby granted, free of charge, to any person obtaining
0
+a copy of this software and associated documentation files (the
0
+"Software"), to deal in the Software without restriction, including
0
+without limitation the rights to use, copy, modify, merge, publish,
0
+distribute, sublicense, and/or sell copies of the Software, and to
0
+permit persons to whom the Software is furnished to do so, subject to
0
+the following conditions:
0
+
0
+The above copyright notice and this permission notice shall be
0
+included in all copies or substantial portions of the Software.
0
+
0
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
0
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
0
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
0
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
0
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
...
 
 
 
 
...
1
2
3
4
0
@@ -1 +1,5 @@
0
+merb-freezer
0
+============
0
+
0
+A plugin for the Merb framework that provides ...
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
0
@@ -1 +1,48 @@
0
+require 'rubygems'
0
+require 'rake/gempackagetask'
0
+
0
+PLUGIN = "merb-freezer"
0
+NAME = "merb-freezer"
0
+VERSION = "0.0.1"
0
+AUTHOR = "Matt Aimonetti"
0
+EMAIL = "mattaimonetti@gmail.com"
0
+HOMEPAGE = "http://www.merbivore.com"
0
+SUMMARY = "Merb plugin that let's you freeze Merb"
0
+
0
+spec = Gem::Specification.new do |s|
0
+ s.name = NAME
0
+ s.version = VERSION
0
+ s.platform = Gem::Platform::RUBY
0
+ s.has_rdoc = true
0
+ s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
0
+ s.summary = SUMMARY
0
+ s.description = s.summary
0
+ s.author = AUTHOR
0
+ s.email = EMAIL
0
+ s.homepage = HOMEPAGE
0
+ s.add_dependency('merb-core', '>= 0.9.2')
0
+ s.require_path = 'lib'
0
+ s.bindir = "bin"
0
+ s.executables = %w( frozen-merb )
0
+ s.autorequire = PLUGIN
0
+ s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*")
0
+end
0
+
0
+Rake::GemPackageTask.new(spec) do |pkg|
0
+ pkg.gem_spec = spec
0
+end
0
+
0
+desc "install merb-freezer"
0
+task :install => [:package] do
0
+ sh %{sudo gem install pkg/#{NAME}-#{VERSION}}
0
+end
0
+
0
+namespace :jruby do
0
+
0
+ desc "Run :package and install the resulting .gem with jruby"
0
+ task :install => :package do
0
+ sh %{#{SUDO} jruby -S gem install pkg/#{NAME}-#{Merb::VERSION}.gem --no-rdoc --no-ri}
0
+ end
0
+
0
+end
...
 
 
 
 
 
...
1
2
3
4
5
0
@@ -1 +1,6 @@
0
+TODO:
0
+Fix LICENSE with your name
0
+Fix Rakefile with your name and contact info
0
+Add your code to lib/merb-freezer.rb
0
+Add your Merb rake tasks to lib/merb-freezer/merbtasks.rb
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
0
@@ -1 +1,47 @@
0
+#!/usr/bin/env ruby
0
+
0
+__DIR__ = Dir.getwd
0
+framework = File.join(__DIR__,"framework")
0
+
0
+if File.directory?(framework)
0
+ puts "Running from frozen framework"
0
+ core = File.join(framework,"merb-core")
0
+ if File.directory?(core)
0
+ $:.push File.join(core,"lib")
0
+ end
0
+ more = File.join(framework,"merb-more")
0
+ if File.directory?(more)
0
+ Dir.new(more).select {|d| d =~ /merb-/}.each do |d|
0
+ $:.push File.join(more,d,'lib')
0
+ end
0
+ end
0
+ plugins = File.join(framework,"merb-plugins")
0
+ if File.directory?(plugins)
0
+ Dir.new(plugins).select {|d| d =~ /merb_/}.each do |d|
0
+ $:.push File.join(plugins,d,'lib')
0
+ end
0
+ end
0
+ require "merb-core/core_ext/kernel"
0
+ require "merb-core/core_ext/rubygems"
0
+else
0
+ gem = Dir["./gems/gems/merb-core-*"].last
0
+ if gem
0
+ require gem + "/lib/merb-core/core_ext/kernel"
0
+ require gem + "/lib/merb-core/core_ext/rubygems"
0
+
0
+ Gem.clear_paths
0
+ Gem.path.unshift(__DIR__+"/gems")
0
+ else
0
+ puts "Can't run frozen Merb from framework/ and/or gems/ please freeze Merb"
0
+ puts "Merb will try to start using the system gems"
0
+ end
0
+end
0
+
0
+require 'merb-core'
0
+unless %w[-a --adapter -i --irb-console -r --script-runner].any? { |o| ARGV.index(o) }
0
+ ARGV.push *%w[-a mongrel]
0
+end
0
+
0
+Merb.frozen! if (File.directory?(framework) || gem)
0
+Merb.start
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
0
@@ -1 +1,19 @@
0
+# make sure we're running inside Merb
0
+if defined?(Merb::Plugins)
0
+
0
+ # Merb gives you a Merb::Plugins.config hash...feel free to put your stuff in your piece of it
0
+ Merb::Plugins.config[:merb_freezer] = {
0
+ :merb_best_framework_ever => true
0
+ }
0
+
0
+ Merb::BootLoader.before_app_loads do
0
+ # require code that must be loaded before the application
0
+ end
0
+
0
+ Merb::BootLoader.after_app_loads do
0
+ # code that can be required after the application loads
0
+ end
0
+
0
+ Merb::Plugins.add_rakefiles "merb-freezer/merbtasks"
0
+end
...
 
 
 
 
 
 
...
1
2
3
4
5
6
0
@@ -1 +1,7 @@
0
+namespace :merb_freezer do
0
+ desc "Do something for merb-freezer"
0
+ task :default do
0
+ puts "merb-freezer doesn't do anything"
0
+ end
0
+end
...
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
0
@@ -1 +1,8 @@
0
+require File.dirname(__FILE__) + '/spec_helper'
0
+
0
+describe "merb-freezer" do
0
+ it "should do nothing" do
0
+ true.should == true
0
+ end
0
+end
...
 
 
...
1
2
0
@@ -1 +1,3 @@
0
+$TESTING=true
0
+$:.push File.join(File.dirname(__FILE__), '..', 'lib')

Comments

    No one has commented yet.