Skip to content

Commit 3d7c86f

Browse files
committed
Resolved conflict.
2 parents 0258dd0 + d87c825 commit 3d7c86f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+916
-182
lines changed

CHANGELOG

+61-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,63 @@
1+
== 0.9.2 "appropriate response to reality" 2008-03-24
2+
* Fix merb-flat and merb-very-flat generators
3+
* merb-gen no longer generates apps by default
4+
* fix templates so merb-gen will work.
5+
* cache_action and cache_page should only set cache for 200 responses (closing #207)
6+
* use Dir.chdir(dir){ sh "#{SUDO} rake install" } for windows compat in rakefile
7+
* merge drnics MERB_ROM stuff for merb-gen
8+
* add freeze task to the app rakefiles to freeze as git submoduels.
9+
* ok since merb-haml is in -more we will use Merb::Config not Merb::Plugin.config
10+
* Set mongrel as default adapter unless other alternative options are specified
11+
* Clean up Merb-Gen
12+
* Added Autotest mappings for full Merb applications for both the RSpec and Test/Unit libraries.
13+
* Removing un-needed js comment sequence from bundled asset tag.
14+
* merb-more rake install task escalates user privileges too early
15+
* don't reload classes in test mode
16+
* fix up merb-fcgi binary to work out of the box
17+
* adds implementation for #220 * modifies merb.fcgi to enable really working with fcgi setups * adds default .htaccess that manages the redirection to the CGI script
18+
* use __send__ not send, use require in merb-haml
19+
* Fix merb-haml spec to pull proper config
20+
* Fix action-args to honor controller actions defined using :define_method
21+
* fix merb-more rakefiles, fix haml config options
22+
* Added support for charset in css_include_tag
23+
* added merb-cache to the array of gems in Rakefile. closing #79
24+
* updated page caching to use logger
25+
* rearranged module/class structure
26+
* added expire_match support for memcache backend
27+
* config/environments/rake.rb now defaults to log/merb_rake.log
28+
* Now generates config/environments/rake.rb, so Rakefile uses a real environment for Rake (which you can override with MERB_ENV)
29+
* Make symbolize_keys! a noop temporarily.
30+
* move plugin config to main file in merb-assets
31+
* Auto-generated spec_helper.rb now uses :testing option instead of $TESTING global var
32+
* merb-cache can be disabled with config key :disable
33+
* implemented dummy cache store in order to be able to disable caching
34+
* Auto-generated spec_helper.rb now uses :testing option instead of $TESTING global var
35+
* framework.rb needs to be here.
36+
* Added ability to create unique, consistant paths to a static asset (js, css, image, video, etc) based on file name to assist in browsers slowed by HTTP Pipelining.
37+
* Added Gem path manipulation to frozen-merb template
38+
* The :merb_env task now logs to log/rake.log by default
39+
* Added merbtasks.rb
40+
* Cleanup of merb-gen generated Rakefile
41+
* By default classes should not be reloaded (reload_classes = false) in the TEST environment.
42+
* add clean task
43+
* Update task name to have dependencies handled correctly.
44+
* Corrects a spec that uses a helper. The helper needs to be in the Merb namespace
45+
* Fixed typo in freezer generator template
46+
* Template extension documentation
47+
* Revert "Adds a haml_buffer method to Haml::Helpers. This was reporting being missing when using haml in a form."
48+
* ignore bundle, and merb-more.rb
49+
* create merb-more.rb
50+
* capture and concat from AbstractController are private
51+
* Adds a haml_buffer method to Haml::Helpers. This was reporting being missing when using haml in a form.
52+
* Clean up flat app so it makes better use of the way custom frameworks work.
53+
* adding merb-cache to merb-more, thanks booss
54+
* Adds merb_test_unit to init.rb when generating an app with --test
55+
* MERB_TEST_SUITE=test|spec for a pre-selected test suite for merb-gen app generator
56+
* added MERB_ORM info to merb-gen usage
57+
* Uses MERB_ORM env variable to preselect an ORM for config/init.rb
58+
* Freezer refactor.
59+
* Introduce the `freeze' rake task
60+
161
== 0.9.1 "Some are half-wild, and some are just outlaws." 2008-02-29
262
* merb-action-args: Normalize calls to Merb.start
363
* merb-assets: Adds a before_app_loads to merb-assets and fixes XHTML
@@ -45,4 +105,4 @@
45105
* merb-parts: [merb-parts] Adds method missing so that controller methods
46106
are available in parts
47107
* merb-parts: Normalize calls to Merb.start
48-
* merb-test: rm -rf merb-test
108+
* merb-test: rm -rf merb-test

Rakefile

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## THESE ARE CRUCIAL
22
module Merb
33
# Set this to the version of merb-core that you are building against/for
4-
VERSION = "0.9.1"
4+
VERSION = "0.9.2"
55

66
# Set this to the version of merb-more you plan to release
7-
MORE_VERSION = "0.9.1"
7+
MORE_VERSION = "0.9.2"
88
end
99

1010
require "rake/clean"
@@ -14,7 +14,7 @@ include FileUtils
1414

1515
gems = %w[
1616
merb-action-args merb-assets merb-gen merb-haml
17-
merb-builder merb-mailer merb-parts
17+
merb-builder merb-mailer merb-parts merb-cache
1818
]
1919

2020
merb_more_spec = Gem::Specification.new do |s|
@@ -45,6 +45,7 @@ merb_spec = Gem::Specification.new do |s|
4545
s.files = %w( LICENSE README Rakefile TODO )
4646
s.add_dependency "merb-core", "= #{Merb::VERSION}"
4747
s.add_dependency "merb-more", "= #{Merb::MORE_VERSION}"
48+
s.add_dependency "mongrel", ">= 1.0.1"
4849
end
4950

5051
CLEAN.include ["**/.*.sw?", "pkg", "lib/*.bundle", "*.gem", "doc/rdoc", ".config", "coverage", "cache", "lib/merb-more.rb"]
@@ -66,21 +67,21 @@ end
6667

6768
desc "Install it all"
6869
task :install => [:install_gems, :package] do
69-
sh %{#{SUDO} gem install --local pkg/merb-more-#{Merb::MORE_VERSION}.gem}
70-
sh %{#{SUDO} gem install --local pkg/merb-#{Merb::MORE_VERSION}.gem}
70+
sh %{#{SUDO} gem install --local pkg/merb-more-#{Merb::MORE_VERSION}.gem --no-update-sources}
71+
sh %{#{SUDO} gem install --local pkg/merb-#{Merb::MORE_VERSION}.gem --no-update-sources}
7172
end
7273

7374
desc "Build the merb-more gems"
7475
task :build_gems do
7576
gems.each do |dir|
76-
sh %{cd #{dir}; rake package}
77+
Dir.chdir(dir){ sh "rake package" }
7778
end
7879
end
7980

8081
desc "Install the merb-more sub-gems"
8182
task :install_gems do
8283
gems.each do |dir|
83-
sh %{cd #{dir}; #{SUDO} rake install}
84+
Dir.chdir(dir){ sh "#{SUDO} rake install" }
8485
end
8586
end
8687

merb-action-args/Rakefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require 'rake/gempackagetask'
33

44
PLUGIN = "merb-action-args"
55
NAME = "merb-action-args"
6-
VERSION = "0.9.1"
6+
VERSION = "0.9.2"
77
AUTHOR = "Yehuda Katz"
88
99
HOMEPAGE = "http://merb-plugins.rubyforge.org/merb-haml/"
@@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|
2020
s.author = AUTHOR
2121
s.email = EMAIL
2222
s.homepage = HOMEPAGE
23-
s.add_dependency('merb-core', '>= 0.9.1')
23+
s.add_dependency('merb-core', '>= 0.9.2')
2424
s.require_path = 'lib'
2525
s.autorequire = PLUGIN
2626
s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*")
@@ -31,7 +31,7 @@ Rake::GemPackageTask.new(spec) do |pkg|
3131
end
3232

3333
task :install => [:package] do
34-
sh %{sudo gem install pkg/#{NAME}-#{VERSION}}
34+
sh %{sudo gem install pkg/#{NAME}-#{VERSION} --no-update-sources}
3535
end
3636

3737
namespace :jruby do
@@ -41,4 +41,4 @@ namespace :jruby do
4141
sh %{#{SUDO} jruby -S gem install pkg/#{NAME}-#{Merb::VERSION}.gem --no-rdoc --no-ri}
4242
end
4343

44-
end
44+
end

merb-action-args/lib/merb-action-args/abstract_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ def _call_action(action)
3131
raise BadRequest unless p || default
3232
p ? params[arg.to_sym] : default
3333
end
34-
send(action, *args)
34+
__send__(action, *args)
3535
end
3636
end

merb-action-args/lib/merb-action-args/get_args.rb

+13-5
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,19 @@ def arg_nodes
2222
end
2323

2424
def get_args
25-
arg_node = deep_array_node(:args)
26-
return nil unless arg_node
27-
args = arg_node.arg_nodes
28-
default_node = arg_node.deep_array_node(:block)
29-
return args unless default_node
25+
if arg_node = deep_array_node(:args)
26+
# method defined with def keyword
27+
args = arg_node.arg_nodes
28+
default_node = arg_node.deep_array_node(:block)
29+
return args unless default_node
30+
else
31+
# assuming method defined with Module#define_method
32+
return []
33+
end
34+
35+
# if it was defined with def, and we found the default_node,
36+
# that should bring us back to regularly scheduled programming..
37+
3038
lasgns = default_node[1..-1]
3139
lasgns.each do |asgn|
3240
args.assoc(asgn[1]) << eval(RubyToRuby.new.process(asgn[2]))

merb-action-args/spec/action_args_spec.rb

+4
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@
2222
lambda { dispatch_to(ActionArgs, :index) }.should raise_error(Merb::ControllerExceptions::BadRequest)
2323
end
2424

25+
it "should treat define_method actions as equal" do
26+
dispatch_to(ActionArgs, :dynamic_define_method).body.should == "mos def"
27+
end
28+
2529
end

merb-action-args/spec/controllers/action-args.rb

+4
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ def defaults_mixed(foo, bar ="bar", baz = "baz")
1616
"#{foo} #{bar} #{baz}"
1717
end
1818

19+
define_method :dynamic_define_method do
20+
"mos def"
21+
end
22+
1923
end

merb-action-args/spec/spec_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
$TESTING=true
22
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
33

4+
require "rubygems"
45
require "merb-core"
56
require "merb-action-args"
67
require File.dirname(__FILE__) / "controllers" / "action-args"
8+
require "spec"
79

810
Merb.start :environment => 'test'
911

merb-assets/Rakefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require 'rake/gempackagetask'
33

44
PLUGIN = "merb-assets"
55
NAME = "merb-assets"
6-
VERSION = "0.9.1"
6+
VERSION = "0.9.2"
77
AUTHOR = "Ezra Zygmuntowicz"
88
99
HOMEPAGE = "http://merb-plugins.rubyforge.org/merb-assets/"
@@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|
2020
s.author = AUTHOR
2121
s.email = EMAIL
2222
s.homepage = HOMEPAGE
23-
s.add_dependency('merb-core', '>= 0.9.1')
23+
s.add_dependency('merb-core', '>= 0.9.2')
2424
s.require_path = 'lib'
2525
s.autorequire = PLUGIN
2626
s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*")
@@ -31,7 +31,7 @@ Rake::GemPackageTask.new(spec) do |pkg|
3131
end
3232

3333
task :install => [:package] do
34-
sh %{sudo gem install pkg/#{NAME}-#{VERSION}}
34+
sh %{sudo gem install pkg/#{NAME}-#{VERSION} --no-update-sources --no-update-sources}
3535
end
3636

3737
namespace :jruby do
@@ -41,4 +41,4 @@ namespace :jruby do
4141
sh %{#{SUDO} jruby -S gem install pkg/#{NAME}-#{Merb::VERSION}.gem --no-rdoc --no-ri}
4242
end
4343

44-
end
44+
end

merb-assets/lib/merb-assets/assets_mixin.rb

+12-8
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def js_include_tag(*scripts)
390390
:src => asset_path(:javascript, script),
391391
:type => "text/javascript"
392392
}
393-
tags << %Q{<script #{attrs.to_xml_attributes}>//</script>}
393+
tags << %Q{<script #{attrs.to_xml_attributes}></script>}
394394
end
395395

396396
return tags
@@ -413,21 +413,24 @@ def js_include_tag(*scripts)
413413
#
414414
# ==== Examples
415415
# css_include_tag 'style'
416-
# # => <link href="/stylesheets/style.css" media="all" rel="Stylesheet" type="text/css" />
416+
# # => <link href="/stylesheets/style.css" media="all" rel="Stylesheet" type="text/css" charset="utf-8" />
417417
#
418418
# css_include_tag 'style.css', 'layout'
419-
# # => <link href="/stylesheets/style.css" media="all" rel="Stylesheet" type="text/css" />
420-
# # <link href="/stylesheets/layout.css" media="all" rel="Stylesheet" type="text/css" />
419+
# # => <link href="/stylesheets/style.css" media="all" rel="Stylesheet" type="text/css" charset="utf-8" />
420+
# # <link href="/stylesheets/layout.css" media="all" rel="Stylesheet" type="text/css" charset="utf-8" />
421421
#
422422
# css_include_tag :menu
423-
# # => <link href="/stylesheets/menu.css" media="all" rel="Stylesheet" type="text/css" />
423+
# # => <link href="/stylesheets/menu.css" media="all" rel="Stylesheet" type="text/css" charset="utf-8" />
424424
#
425425
# css_include_tag :style, :screen
426-
# # => <link href="/stylesheets/style.css" media="all" rel="Stylesheet" type="text/css" />
427-
# # <link href="/stylesheets/screen.css" media="all" rel="Stylesheet" type="text/css" />
426+
# # => <link href="/stylesheets/style.css" media="all" rel="Stylesheet" type="text/css" charset="utf-8" />
427+
# # <link href="/stylesheets/screen.css" media="all" rel="Stylesheet" type="text/css" charset="utf-8" />
428428
#
429429
# css_include_tag :style, :media => :print
430-
# # => <link href="/stylesheets/style.css" media="print" rel="Stylesheet" type="text/css" />
430+
# # => <link href="/stylesheets/style.css" media="print" rel="Stylesheet" type="text/css" charset="utf-8" />
431+
#
432+
# css_include_tag :style, :charset => 'iso-8859-1'
433+
# # => <link href="/stylesheets/style.css" media="print" rel="Stylesheet" type="text/css" charset="iso-8859-1" />
431434
def css_include_tag(*stylesheets)
432435
options = stylesheets.last.is_a?(Hash) ? stylesheets.pop : {}
433436
return nil if stylesheets.empty?
@@ -445,6 +448,7 @@ def css_include_tag(*stylesheets)
445448
:href => asset_path(:stylesheet, stylesheet),
446449
:type => "text/css",
447450
:rel => "Stylesheet",
451+
:charset => options[:charset] || 'utf-8',
448452
:media => options[:media] || :all
449453
}
450454
tags << %Q{<link #{attrs.to_xml_attributes} />}

merb-builder/Rakefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require 'rake/gempackagetask'
33

44
PLUGIN = "merb-builder"
55
NAME = "merb-builder"
6-
VERSION = "0.9.1"
6+
VERSION = "0.9.2"
77
AUTHOR = "Jonathan Younger"
88
99
HOMEPAGE = "http://merb-plugins.rubyforge.org/merb-builder/"
@@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|
2020
s.author = AUTHOR
2121
s.email = EMAIL
2222
s.homepage = HOMEPAGE
23-
s.add_dependency('merb-core', '>= 0.9.1')
23+
s.add_dependency('merb-core', '>= 0.9.2')
2424
s.require_path = 'lib'
2525
s.autorequire = PLUGIN
2626
s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*")
@@ -31,7 +31,7 @@ Rake::GemPackageTask.new(spec) do |pkg|
3131
end
3232

3333
task :install => [:package] do
34-
sh %{sudo gem install pkg/#{NAME}-#{VERSION}}
34+
sh %{sudo gem install pkg/#{NAME}-#{VERSION} --no-update-sources}
3535
end
3636

3737
namespace :jruby do

merb-cache/README

+8-7
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@ Implemented cache stores:
1717
- database (sequel, datamapper, activerecord)
1818

1919
== Quick intro
20-
cache_fragment is helpful to put chunks of data in cache without interferring with dynamic content.
20+
With fragment caching, you can mix dynamic and static content.
2121

22-
cache_action puts the whole action in cache but if you use before filters to restrict access,
23-
you can still protect your content.
22+
With action caching, the whole template is cached
23+
but the before filters are still processed.
2424

25-
cache_page is cache_action with file store (using .html extension in a separate directory).
26-
With page caching you output .html files (in public/cache/ by default) so you can then tell your proxy/webserver
27-
to serve these files directly thus bypassing the framework completely.
25+
With page caching, the whole template is put in html files in a special
26+
directory in order to be handled directly without triggering Merb.
2827

2928
== Quick API
3029

@@ -70,7 +69,8 @@ Implemented cache stores:
7069
or just:
7170
$ cd spec
7271
$ STORE=<cache_store> spec merb-cache_spec.rb
73-
# cache_store can be: memory, memcache, file, sequel, datamapper, activerecord
72+
# cache_store can be:
73+
# memory, memcache, file, sequel, datamapper, activerecord
7474

7575
== Sample configuration
7676

@@ -89,6 +89,7 @@ Implemented cache stores:
8989
#:store => "memcache",
9090
#:host => "127.0.0.1:11211",
9191
#:namespace => "merb_cache",
92+
#:no_tracking => "false",
9293

9394
#:store => "memory",
9495
# store could be: file, memcache, memory, database, dummy, ...

0 commit comments

Comments
 (0)