responders 0.6.5 → 0.7.0

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.
@@ -1,3 +1,8 @@
1
+ == 0.7
2
+
3
+ * Support Rails 3.1 onward
4
+ * Support namespaced engines
5
+
1
6
  == 0.6
2
7
 
3
8
  * Allow engine detection in generators
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem "rails", "~> 3.0.0"
3
+ gemspec
4
+
4
5
  gem "mocha"
5
6
 
6
7
  if RUBY_VERSION < "1.9"
@@ -1,80 +1,65 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ responders (0.7.0)
5
+ railties (~> 3.1)
6
+
1
7
  GEM
2
8
  remote: http://rubygems.org/
3
9
  specs:
4
- abstract (1.0.0)
5
- actionmailer (3.0.11)
6
- actionpack (= 3.0.11)
7
- mail (~> 2.2.19)
8
- actionpack (3.0.11)
9
- activemodel (= 3.0.11)
10
- activesupport (= 3.0.11)
11
- builder (~> 2.1.2)
12
- erubis (~> 2.6.6)
13
- i18n (~> 0.5.0)
14
- rack (~> 1.2.1)
15
- rack-mount (~> 0.6.14)
16
- rack-test (~> 0.5.7)
17
- tzinfo (~> 0.3.23)
18
- activemodel (3.0.11)
19
- activesupport (= 3.0.11)
20
- builder (~> 2.1.2)
21
- i18n (~> 0.5.0)
22
- activerecord (3.0.11)
23
- activemodel (= 3.0.11)
24
- activesupport (= 3.0.11)
25
- arel (~> 2.0.10)
26
- tzinfo (~> 0.3.23)
27
- activeresource (3.0.11)
28
- activemodel (= 3.0.11)
29
- activesupport (= 3.0.11)
30
- activesupport (3.0.11)
31
- arel (2.0.10)
32
- builder (2.1.2)
33
- erubis (2.6.6)
34
- abstract (>= 1.0.0)
35
- i18n (0.5.0)
10
+ actionpack (3.2.0)
11
+ activemodel (= 3.2.0)
12
+ activesupport (= 3.2.0)
13
+ builder (~> 3.0.0)
14
+ erubis (~> 2.7.0)
15
+ journey (~> 1.0.0)
16
+ rack (~> 1.4.0)
17
+ rack-cache (~> 1.1)
18
+ rack-test (~> 0.6.1)
19
+ sprockets (~> 2.1.2)
20
+ activemodel (3.2.0)
21
+ activesupport (= 3.2.0)
22
+ builder (~> 3.0.0)
23
+ activesupport (3.2.0)
24
+ i18n (~> 0.6)
25
+ multi_json (~> 1.0)
26
+ builder (3.0.0)
27
+ erubis (2.7.0)
28
+ hike (1.2.1)
29
+ i18n (0.6.0)
30
+ journey (1.0.0)
36
31
  json (1.6.5)
37
- mail (2.2.19)
38
- activesupport (>= 2.3.6)
39
- i18n (>= 0.4.0)
40
- mime-types (~> 1.16)
41
- treetop (~> 1.4.8)
42
32
  metaclass (0.0.1)
43
- mime-types (1.17.2)
44
33
  mocha (0.10.3)
45
34
  metaclass (~> 0.0.1)
46
- polyglot (0.3.3)
47
- rack (1.2.5)
48
- rack-mount (0.6.14)
49
- rack (>= 1.0.0)
50
- rack-test (0.5.7)
35
+ multi_json (1.0.4)
36
+ rack (1.4.1)
37
+ rack-cache (1.1)
38
+ rack (>= 0.4)
39
+ rack-ssl (1.3.2)
40
+ rack
41
+ rack-test (0.6.1)
51
42
  rack (>= 1.0)
52
- rails (3.0.11)
53
- actionmailer (= 3.0.11)
54
- actionpack (= 3.0.11)
55
- activerecord (= 3.0.11)
56
- activeresource (= 3.0.11)
57
- activesupport (= 3.0.11)
58
- bundler (~> 1.0)
59
- railties (= 3.0.11)
60
- railties (3.0.11)
61
- actionpack (= 3.0.11)
62
- activesupport (= 3.0.11)
43
+ railties (3.2.0)
44
+ actionpack (= 3.2.0)
45
+ activesupport (= 3.2.0)
46
+ rack-ssl (~> 1.3.2)
63
47
  rake (>= 0.8.7)
64
48
  rdoc (~> 3.4)
65
- thor (~> 0.14.4)
49
+ thor (~> 0.14.6)
66
50
  rake (0.9.2.2)
67
51
  rdoc (3.12)
68
52
  json (~> 1.4)
53
+ sprockets (2.1.2)
54
+ hike (~> 1.2)
55
+ rack (~> 1.0)
56
+ tilt (~> 1.1, != 1.3.0)
69
57
  thor (0.14.6)
70
- treetop (1.4.10)
71
- polyglot
72
- polyglot (>= 0.3.1)
73
- tzinfo (0.3.31)
58
+ tilt (1.3.3)
74
59
 
75
60
  PLATFORMS
76
61
  ruby
77
62
 
78
63
  DEPENDENCIES
79
64
  mocha
80
- rails (~> 3.0.0)
65
+ responders!
@@ -1,3 +1,4 @@
1
+ <% module_namespacing do -%>
1
2
  class <%= controller_class_name %>Controller < ApplicationController
2
3
  <% unless options[:singleton] -%>
3
4
  # GET /<%= table_name %>
@@ -51,3 +52,4 @@ class <%= controller_class_name %>Controller < ApplicationController
51
52
  respond_with(@<%= file_name %>)
52
53
  end
53
54
  end
55
+ <% end -%>
@@ -1,3 +1,3 @@
1
1
  module Responders
2
- VERSION = "0.6.5".freeze
2
+ VERSION = "0.7.0".freeze
3
3
  end
@@ -18,4 +18,6 @@ Gem::Specification.new do |s|
18
18
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
+
22
+ s.add_dependency "railties", "~> 3.1"
21
23
  end
@@ -115,7 +115,6 @@ class FlashResponderTest < ActionController::TestCase
115
115
  def test_sets_flash_message_can_be_set_to_now_only_on_success
116
116
  post :create, :flash_now => :on_success
117
117
  assert_equal "Resource created with success", @controller.flash.now[:success]
118
- assert_flash_now :success
119
118
  end
120
119
 
121
120
  def test_sets_flash_message_can_be_set_to_now_only_on_failure
@@ -137,12 +136,12 @@ class FlashResponderTest < ActionController::TestCase
137
136
 
138
137
  # If we have flash.now, it's always marked as used.
139
138
  def assert_flash_now(k)
140
- assert flash.instance_variable_get(:@used).include?(k.to_sym),
139
+ assert flash.instance_variable_get(:@used).to_a.include?(k.to_sym),
141
140
  "Expected #{k} to be in flash.now, but it's not."
142
141
  end
143
142
 
144
143
  def assert_not_flash_now(k)
145
- assert !flash.instance_variable_get(:@used).include?(k.to_sym),
144
+ assert !flash.instance_variable_get(:@used).to_a.include?(k.to_sym),
146
145
  "Expected #{k} to not be in flash.now, but it is."
147
146
  end
148
147
  end
@@ -65,13 +65,13 @@ class HttpCacheResponderTest < ActionController::TestCase
65
65
  def test_does_not_set_cache_unless_get_requests
66
66
  put :single
67
67
  assert_nil @response.headers["Last-Modified"]
68
- assert_equal 200, @response.status
68
+ assert_equal 204, @response.status
69
69
  end
70
70
 
71
71
  def test_does_not_use_cache_unless_get_requests
72
72
  @request.env["HTTP_IF_MODIFIED_SINCE"] = Time.utc(2009, 6).httpdate
73
73
  put :single
74
- assert_equal 200, @response.status
74
+ assert_equal 204, @response.status
75
75
  end
76
76
 
77
77
  def test_does_not_set_cache_if_http_cache_is_false
@@ -89,7 +89,6 @@ class HttpCacheResponderTest < ActionController::TestCase
89
89
  def test_does_not_set_cache_for_collection
90
90
  get :collection
91
91
  assert_nil @response.headers["Last-Modified"]
92
- assert_not_nil @response.headers["ETag"]
93
92
  assert_equal 200, @response.status
94
93
  end
95
94
 
metadata CHANGED
@@ -1,32 +1,33 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: responders
3
- version: !ruby/object:Gem::Version
4
- hash: 13
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7.0
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 6
9
- - 5
10
- version: 0.6.5
11
6
  platform: ruby
12
- authors:
13
- - "Jos\xC3\xA9 Valim"
7
+ authors:
8
+ - José Valim
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-01-25 00:00:00 Z
19
- dependencies: []
20
-
12
+ date: 2012-01-25 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: railties
16
+ requirement: &2151933860 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '3.1'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *2151933860
21
25
  description: A set of Rails 3 responders to dry up your application
22
26
  email: contact@plataformatec.com.br
23
27
  executables: []
24
-
25
28
  extensions: []
26
-
27
29
  extra_rdoc_files: []
28
-
29
- files:
30
+ files:
30
31
  - CHANGELOG.rdoc
31
32
  - Gemfile
32
33
  - Gemfile.lock
@@ -56,38 +57,29 @@ files:
56
57
  - test/views/addresses/new.html.erb
57
58
  homepage: http://github.com/plataformatec/responders
58
59
  licenses: []
59
-
60
60
  post_install_message:
61
61
  rdoc_options: []
62
-
63
- require_paths:
62
+ require_paths:
64
63
  - lib
65
- required_ruby_version: !ruby/object:Gem::Requirement
64
+ required_ruby_version: !ruby/object:Gem::Requirement
66
65
  none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: 3
71
- segments:
72
- - 0
73
- version: "0"
74
- required_rubygems_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
71
  none: false
76
- requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- hash: 3
80
- segments:
81
- - 0
82
- version: "0"
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
83
76
  requirements: []
84
-
85
77
  rubyforge_project: responders
86
- rubygems_version: 1.8.15
78
+ rubygems_version: 1.8.10
87
79
  signing_key:
88
80
  specification_version: 3
89
81
  summary: A set of Rails 3 responders to dry up your application
90
- test_files:
82
+ test_files:
91
83
  - test/collection_responder_test.rb
92
84
  - test/controller_method_test.rb
93
85
  - test/flash_responder_test.rb