actionpack 1.3.0 → 1.3.1
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.
Potentially problematic release.
This version of actionpack might be problematic. Click here for more details.
- data/CHANGELOG +9 -0
- data/lib/action_controller/assertions/action_pack_assertions.rb +8 -0
- data/lib/action_controller/caching.rb +1 -1
- data/lib/action_controller/cookies.rb +1 -1
- data/lib/action_controller/support/binding_of_caller.rb +2 -2
- data/lib/action_controller/support/core_ext/string/inflections.rb +4 -0
- data/lib/action_controller/support/inflector.rb +4 -0
- data/rakefile +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
*1.3.1* (January 18th, 2005)
|
2
|
+
|
3
|
+
* Fixed a bug where cookies wouldn't be set if a symbol was used instead of a string as the key
|
4
|
+
|
5
|
+
* Added assert_cookie_equal to assert the contents of a named cookie
|
6
|
+
|
7
|
+
* Fixed bug in page caching that prevented it from working at all
|
8
|
+
|
9
|
+
|
1
10
|
*1.3.0* (January 17th, 2005)
|
2
11
|
|
3
12
|
* Added an extensive caching module that offers three levels of granularity (page, action, fragment) and a variety of stores.
|
@@ -60,6 +60,14 @@ module Test #:nodoc:
|
|
60
60
|
msg = build_message(message, "<?> expected in session['?'] but was <?>", expected, key, response.session[key])
|
61
61
|
assert_block(msg) { expected == response.session[key] }
|
62
62
|
end
|
63
|
+
|
64
|
+
# -- cookie assertions ---------------------------------------------------
|
65
|
+
|
66
|
+
def assert_cookie_equal(expected = nil, key = nil, message = nil)
|
67
|
+
response = acquire_assertion_target
|
68
|
+
msg = build_message(message, "<?> expected in cookies['?'] but was <?>", expected, key, response.cookies[key.to_s].first)
|
69
|
+
assert_block(msg) { expected == response.cookies[key.to_s].first }
|
70
|
+
end
|
63
71
|
|
64
72
|
# -- flash assertions ---------------------------------------------------
|
65
73
|
|
@@ -121,7 +121,7 @@ module ActionController #:nodoc:
|
|
121
121
|
|
122
122
|
private
|
123
123
|
def caching_allowed
|
124
|
-
!@request.
|
124
|
+
!@request.post? && (@request.parameters.reject { |k, v| %w( id action controller ).include?(k) }).empty?
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|
@@ -48,7 +48,7 @@ module ActionController #:nodoc:
|
|
48
48
|
options = options.inject({}) { |options, pair| options[pair.first.to_s] = pair.last; options }
|
49
49
|
options["name"] = name.to_s
|
50
50
|
else
|
51
|
-
options = { "name" => name, "value" => options }
|
51
|
+
options = { "name" => name.to_s, "value" => options }
|
52
52
|
end
|
53
53
|
|
54
54
|
set_cookie(options)
|
@@ -2,7 +2,7 @@ begin
|
|
2
2
|
require 'simplecc'
|
3
3
|
rescue LoadError
|
4
4
|
class Continuation #:nodoc:
|
5
|
-
def create(*args, &block)
|
5
|
+
def self.create(*args, &block)
|
6
6
|
cc = nil; result = callcc {|c| cc = c; block.call(cc) if block and args.empty?}
|
7
7
|
result ||= args
|
8
8
|
return *[cc, *result]
|
@@ -36,7 +36,7 @@ class Binding #:nodoc:
|
|
36
36
|
# If you don't do this an Exception will be raised. Because of
|
37
37
|
# the way that Binding.of_caller is implemented it has to be
|
38
38
|
# done this way.
|
39
|
-
def of_caller(&block)
|
39
|
+
def self.of_caller(&block)
|
40
40
|
old_critical = Thread.critical
|
41
41
|
Thread.critical = true
|
42
42
|
count = 0
|
@@ -31,6 +31,10 @@ module ActiveSupport #:nodoc:
|
|
31
31
|
def classify
|
32
32
|
Inflector.classify(self)
|
33
33
|
end
|
34
|
+
|
35
|
+
def humanize
|
36
|
+
Inflector.humanize(self)
|
37
|
+
end
|
34
38
|
|
35
39
|
def foreign_key(separate_class_name_and_id_with_underscore = true)
|
36
40
|
Inflector.foreign_key(self, separate_class_name_and_id_with_underscore)
|
@@ -27,6 +27,10 @@ module Inflector
|
|
27
27
|
camel_cased_word.to_s.gsub(/([A-Z]+)([A-Z])/,'\1_\2').gsub(/([a-z])([A-Z])/,'\1_\2').downcase
|
28
28
|
end
|
29
29
|
|
30
|
+
def humanize(lower_case_and_underscored_word)
|
31
|
+
lower_case_and_underscored_word.to_s.gsub(/_/, " ").capitalize
|
32
|
+
end
|
33
|
+
|
30
34
|
def demodulize(class_name_in_module)
|
31
35
|
class_name_in_module.to_s.gsub(/^.*::/, '')
|
32
36
|
end
|
data/rakefile
CHANGED
@@ -8,7 +8,7 @@ require 'rake/contrib/rubyforgepublisher'
|
|
8
8
|
|
9
9
|
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
|
10
10
|
PKG_NAME = 'actionpack'
|
11
|
-
PKG_VERSION = '1.3.
|
11
|
+
PKG_VERSION = '1.3.1' + PKG_BUILD
|
12
12
|
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
13
13
|
|
14
14
|
desc "Default Task"
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: actionpack
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.3.
|
7
|
-
date: 2005-01-
|
6
|
+
version: 1.3.1
|
7
|
+
date: 2005-01-18
|
8
8
|
summary: Web-flow and rendering framework putting the VC in MVC.
|
9
9
|
require_paths:
|
10
10
|
- lib
|