localized_url_for 0.0.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.
Files changed (70) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +4 -0
  3. data/README.rdoc +22 -0
  4. data/Rakefile +2 -0
  5. data/lib/localized_url_for/version.rb +3 -0
  6. data/lib/localized_url_for.rb +14 -0
  7. data/localized_url_for.gemspec +26 -0
  8. data/spec/dummy_app/.gitignore +4 -0
  9. data/spec/dummy_app/.rspec +1 -0
  10. data/spec/dummy_app/Gemfile +31 -0
  11. data/spec/dummy_app/Gemfile.lock +124 -0
  12. data/spec/dummy_app/README +256 -0
  13. data/spec/dummy_app/Rakefile +7 -0
  14. data/spec/dummy_app/app/controllers/application_controller.rb +8 -0
  15. data/spec/dummy_app/app/controllers/index_controller.rb +4 -0
  16. data/spec/dummy_app/app/helpers/application_helper.rb +2 -0
  17. data/spec/dummy_app/app/helpers/index_helper.rb +2 -0
  18. data/spec/dummy_app/app/views/index/index.html.erb +1 -0
  19. data/spec/dummy_app/app/views/layouts/application.html.erb +14 -0
  20. data/spec/dummy_app/config/application.rb +42 -0
  21. data/spec/dummy_app/config/boot.rb +13 -0
  22. data/spec/dummy_app/config/database.yml +22 -0
  23. data/spec/dummy_app/config/environment.rb +5 -0
  24. data/spec/dummy_app/config/environments/development.rb +26 -0
  25. data/spec/dummy_app/config/environments/production.rb +49 -0
  26. data/spec/dummy_app/config/environments/test.rb +35 -0
  27. data/spec/dummy_app/config/initializers/backtrace_silencers.rb +7 -0
  28. data/spec/dummy_app/config/initializers/inflections.rb +10 -0
  29. data/spec/dummy_app/config/initializers/mime_types.rb +5 -0
  30. data/spec/dummy_app/config/initializers/secret_token.rb +7 -0
  31. data/spec/dummy_app/config/initializers/session_store.rb +8 -0
  32. data/spec/dummy_app/config/locales/en.yml +5 -0
  33. data/spec/dummy_app/config/routes.rb +62 -0
  34. data/spec/dummy_app/config.ru +4 -0
  35. data/spec/dummy_app/db/seeds.rb +7 -0
  36. data/spec/dummy_app/db/test.sqlite3 +0 -0
  37. data/spec/dummy_app/doc/README_FOR_APP +2 -0
  38. data/spec/dummy_app/lib/tasks/.gitkeep +0 -0
  39. data/spec/dummy_app/log/development.log +0 -0
  40. data/spec/dummy_app/log/production.log +0 -0
  41. data/spec/dummy_app/log/server.log +0 -0
  42. data/spec/dummy_app/log/test.log +1321 -0
  43. data/spec/dummy_app/public/404.html +26 -0
  44. data/spec/dummy_app/public/422.html +26 -0
  45. data/spec/dummy_app/public/500.html +26 -0
  46. data/spec/dummy_app/public/favicon.ico +0 -0
  47. data/spec/dummy_app/public/images/rails.png +0 -0
  48. data/spec/dummy_app/public/javascripts/application.js +2 -0
  49. data/spec/dummy_app/public/javascripts/controls.js +965 -0
  50. data/spec/dummy_app/public/javascripts/dragdrop.js +974 -0
  51. data/spec/dummy_app/public/javascripts/effects.js +1123 -0
  52. data/spec/dummy_app/public/javascripts/prototype.js +6001 -0
  53. data/spec/dummy_app/public/javascripts/rails.js +175 -0
  54. data/spec/dummy_app/public/robots.txt +5 -0
  55. data/spec/dummy_app/public/stylesheets/.gitkeep +0 -0
  56. data/spec/dummy_app/script/rails +6 -0
  57. data/spec/dummy_app/spec/controllers/index_controller_spec.rb +12 -0
  58. data/spec/dummy_app/spec/models/dummy_spec.rb +5 -0
  59. data/spec/dummy_app/spec/spec_helper.rb +34 -0
  60. data/spec/dummy_app/spec/stories/index_spec.rb +22 -0
  61. data/spec/dummy_app/tmp/capybara/capybara-201110180144123319871468.html +240 -0
  62. data/spec/dummy_app/tmp/capybara/capybara-201110180144449631082524.html +2 -0
  63. data/spec/dummy_app/tmp/capybara/capybara-201110180146112394830146.html +13 -0
  64. data/spec/dummy_app/tmp/capybara/capybara-201110180147068481536475.html +13 -0
  65. data/spec/dummy_app/tmp/capybara/capybara-201110180147359079378090.html +13 -0
  66. data/spec/dummy_app/tmp/capybara/capybara-201110180148059177742335.html +13 -0
  67. data/spec/dummy_app/tmp/capybara/capybara-201110180159476619542688.html +13 -0
  68. data/spec/dummy_app/vendor/plugins/.gitkeep +0 -0
  69. data/spec/spec_helper.rb +36 -0
  70. metadata +227 -0
@@ -0,0 +1,175 @@
1
+ (function() {
2
+ // Technique from Juriy Zaytsev
3
+ // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
4
+ function isEventSupported(eventName) {
5
+ var el = document.createElement('div');
6
+ eventName = 'on' + eventName;
7
+ var isSupported = (eventName in el);
8
+ if (!isSupported) {
9
+ el.setAttribute(eventName, 'return;');
10
+ isSupported = typeof el[eventName] == 'function';
11
+ }
12
+ el = null;
13
+ return isSupported;
14
+ }
15
+
16
+ function isForm(element) {
17
+ return Object.isElement(element) && element.nodeName.toUpperCase() == 'FORM'
18
+ }
19
+
20
+ function isInput(element) {
21
+ if (Object.isElement(element)) {
22
+ var name = element.nodeName.toUpperCase()
23
+ return name == 'INPUT' || name == 'SELECT' || name == 'TEXTAREA'
24
+ }
25
+ else return false
26
+ }
27
+
28
+ var submitBubbles = isEventSupported('submit'),
29
+ changeBubbles = isEventSupported('change')
30
+
31
+ if (!submitBubbles || !changeBubbles) {
32
+ // augment the Event.Handler class to observe custom events when needed
33
+ Event.Handler.prototype.initialize = Event.Handler.prototype.initialize.wrap(
34
+ function(init, element, eventName, selector, callback) {
35
+ init(element, eventName, selector, callback)
36
+ // is the handler being attached to an element that doesn't support this event?
37
+ if ( (!submitBubbles && this.eventName == 'submit' && !isForm(this.element)) ||
38
+ (!changeBubbles && this.eventName == 'change' && !isInput(this.element)) ) {
39
+ // "submit" => "emulated:submit"
40
+ this.eventName = 'emulated:' + this.eventName
41
+ }
42
+ }
43
+ )
44
+ }
45
+
46
+ if (!submitBubbles) {
47
+ // discover forms on the page by observing focus events which always bubble
48
+ document.on('focusin', 'form', function(focusEvent, form) {
49
+ // special handler for the real "submit" event (one-time operation)
50
+ if (!form.retrieve('emulated:submit')) {
51
+ form.on('submit', function(submitEvent) {
52
+ var emulated = form.fire('emulated:submit', submitEvent, true)
53
+ // if custom event received preventDefault, cancel the real one too
54
+ if (emulated.returnValue === false) submitEvent.preventDefault()
55
+ })
56
+ form.store('emulated:submit', true)
57
+ }
58
+ })
59
+ }
60
+
61
+ if (!changeBubbles) {
62
+ // discover form inputs on the page
63
+ document.on('focusin', 'input, select, texarea', function(focusEvent, input) {
64
+ // special handler for real "change" events
65
+ if (!input.retrieve('emulated:change')) {
66
+ input.on('change', function(changeEvent) {
67
+ input.fire('emulated:change', changeEvent, true)
68
+ })
69
+ input.store('emulated:change', true)
70
+ }
71
+ })
72
+ }
73
+
74
+ function handleRemote(element) {
75
+ var method, url, params;
76
+
77
+ var event = element.fire("ajax:before");
78
+ if (event.stopped) return false;
79
+
80
+ if (element.tagName.toLowerCase() === 'form') {
81
+ method = element.readAttribute('method') || 'post';
82
+ url = element.readAttribute('action');
83
+ params = element.serialize();
84
+ } else {
85
+ method = element.readAttribute('data-method') || 'get';
86
+ url = element.readAttribute('href');
87
+ params = {};
88
+ }
89
+
90
+ new Ajax.Request(url, {
91
+ method: method,
92
+ parameters: params,
93
+ evalScripts: true,
94
+
95
+ onComplete: function(request) { element.fire("ajax:complete", request); },
96
+ onSuccess: function(request) { element.fire("ajax:success", request); },
97
+ onFailure: function(request) { element.fire("ajax:failure", request); }
98
+ });
99
+
100
+ element.fire("ajax:after");
101
+ }
102
+
103
+ function handleMethod(element) {
104
+ var method = element.readAttribute('data-method'),
105
+ url = element.readAttribute('href'),
106
+ csrf_param = $$('meta[name=csrf-param]')[0],
107
+ csrf_token = $$('meta[name=csrf-token]')[0];
108
+
109
+ var form = new Element('form', { method: "POST", action: url, style: "display: none;" });
110
+ element.parentNode.insert(form);
111
+
112
+ if (method !== 'post') {
113
+ var field = new Element('input', { type: 'hidden', name: '_method', value: method });
114
+ form.insert(field);
115
+ }
116
+
117
+ if (csrf_param) {
118
+ var param = csrf_param.readAttribute('content'),
119
+ token = csrf_token.readAttribute('content'),
120
+ field = new Element('input', { type: 'hidden', name: param, value: token });
121
+ form.insert(field);
122
+ }
123
+
124
+ form.submit();
125
+ }
126
+
127
+
128
+ document.on("click", "*[data-confirm]", function(event, element) {
129
+ var message = element.readAttribute('data-confirm');
130
+ if (!confirm(message)) event.stop();
131
+ });
132
+
133
+ document.on("click", "a[data-remote]", function(event, element) {
134
+ if (event.stopped) return;
135
+ handleRemote(element);
136
+ event.stop();
137
+ });
138
+
139
+ document.on("click", "a[data-method]", function(event, element) {
140
+ if (event.stopped) return;
141
+ handleMethod(element);
142
+ event.stop();
143
+ });
144
+
145
+ document.on("submit", function(event) {
146
+ var element = event.findElement(),
147
+ message = element.readAttribute('data-confirm');
148
+ if (message && !confirm(message)) {
149
+ event.stop();
150
+ return false;
151
+ }
152
+
153
+ var inputs = element.select("input[type=submit][data-disable-with]");
154
+ inputs.each(function(input) {
155
+ input.disabled = true;
156
+ input.writeAttribute('data-original-value', input.value);
157
+ input.value = input.readAttribute('data-disable-with');
158
+ });
159
+
160
+ var element = event.findElement("form[data-remote]");
161
+ if (element) {
162
+ handleRemote(element);
163
+ event.stop();
164
+ }
165
+ });
166
+
167
+ document.on("ajax:after", "form", function(event, element) {
168
+ var inputs = element.select("input[type=submit][disabled=true][data-disable-with]");
169
+ inputs.each(function(input) {
170
+ input.value = input.readAttribute('data-original-value');
171
+ input.removeAttribute('data-original-value');
172
+ input.disabled = false;
173
+ });
174
+ });
175
+ })();
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe IndexController do
4
+
5
+ describe "GET 'index'" do
6
+ it "returns http success" do
7
+ get 'index'
8
+ response.should be_success
9
+ end
10
+ end
11
+
12
+ end
@@ -0,0 +1,5 @@
1
+ describe 'dummy' do
2
+ it 'should not throw error' do
3
+ Rails.application.routes.url_helpers.index_path.should == '/'
4
+ end
5
+ end
@@ -0,0 +1,34 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ ENV["RAILS_ENV"] ||= 'test'
3
+ require File.expand_path("../../config/environment", __FILE__)
4
+ require 'rspec/rails'
5
+ require 'rspec/autorun'
6
+ require 'capybara/rspec'
7
+
8
+ # Requires supporting ruby files with custom matchers and macros, etc,
9
+ # in spec/support/ and its subdirectories.
10
+ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
11
+
12
+ RSpec.configure do |config|
13
+ # == Mock Framework
14
+ #
15
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
16
+ #
17
+ # config.mock_with :mocha
18
+ # config.mock_with :flexmock
19
+ # config.mock_with :rr
20
+ config.mock_with :rspec
21
+
22
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
23
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
24
+
25
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
26
+ # examples within a transaction, remove the following line or assign false
27
+ # instead of true.
28
+ config.use_transactional_fixtures = true
29
+
30
+ # If true, the base class of anonymous controllers will be inferred
31
+ # automatically. This will be the default behavior in future versions of
32
+ # rspec-rails.
33
+ config.infer_base_class_for_anonymous_controllers = false
34
+ end
@@ -0,0 +1,22 @@
1
+ require 'spec_helper'
2
+
3
+ describe "GET 'index'", :type => :request do
4
+ it "should have localized url" do
5
+ visit '/'
6
+ page.find(".index")[:href].should == '/en'
7
+ end
8
+
9
+ context 'uk locale' do
10
+ before do
11
+ visit '/uk'
12
+ end
13
+
14
+ it "should have link to uk" do
15
+ I18n.locale.should == :uk
16
+ end
17
+
18
+ it "should set locale to uk" do
19
+ page.find(".index")[:href].should == '/uk'
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,240 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
+ <title>Ruby on Rails: Welcome aboard</title>
6
+ <style type="text/css" media="screen">
7
+ body {
8
+ margin: 0;
9
+ margin-bottom: 25px;
10
+ padding: 0;
11
+ background-color: #f0f0f0;
12
+ font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
13
+ font-size: 13px;
14
+ color: #333;
15
+ }
16
+
17
+ h1 {
18
+ font-size: 28px;
19
+ color: #000;
20
+ }
21
+
22
+ a {color: #03c}
23
+ a:hover {
24
+ background-color: #03c;
25
+ color: white;
26
+ text-decoration: none;
27
+ }
28
+
29
+
30
+ #page {
31
+ background-color: #f0f0f0;
32
+ width: 750px;
33
+ margin: 0;
34
+ margin-left: auto;
35
+ margin-right: auto;
36
+ }
37
+
38
+ #content {
39
+ float: left;
40
+ background-color: white;
41
+ border: 3px solid #aaa;
42
+ border-top: none;
43
+ padding: 25px;
44
+ width: 500px;
45
+ }
46
+
47
+ #sidebar {
48
+ float: right;
49
+ width: 175px;
50
+ }
51
+
52
+ #footer {
53
+ clear: both;
54
+ }
55
+
56
+
57
+ #header, #about, #getting-started {
58
+ padding-left: 75px;
59
+ padding-right: 30px;
60
+ }
61
+
62
+
63
+ #header {
64
+ background-image: url("images/rails.png");
65
+ background-repeat: no-repeat;
66
+ background-position: top left;
67
+ height: 64px;
68
+ }
69
+ #header h1, #header h2 {margin: 0}
70
+ #header h2 {
71
+ color: #888;
72
+ font-weight: normal;
73
+ font-size: 16px;
74
+ }
75
+
76
+
77
+ #about h3 {
78
+ margin: 0;
79
+ margin-bottom: 10px;
80
+ font-size: 14px;
81
+ }
82
+
83
+ #about-content {
84
+ background-color: #ffd;
85
+ border: 1px solid #fc0;
86
+ margin-left: -55px;
87
+ margin-right: -10px;
88
+ }
89
+ #about-content table {
90
+ margin-top: 10px;
91
+ margin-bottom: 10px;
92
+ font-size: 11px;
93
+ border-collapse: collapse;
94
+ }
95
+ #about-content td {
96
+ padding: 10px;
97
+ padding-top: 3px;
98
+ padding-bottom: 3px;
99
+ }
100
+ #about-content td.name {color: #555}
101
+ #about-content td.value {color: #000}
102
+
103
+ #about-content ul {
104
+ padding: 0;
105
+ list-style-type: none;
106
+ }
107
+
108
+ #about-content.failure {
109
+ background-color: #fcc;
110
+ border: 1px solid #f00;
111
+ }
112
+ #about-content.failure p {
113
+ margin: 0;
114
+ padding: 10px;
115
+ }
116
+
117
+
118
+ #getting-started {
119
+ border-top: 1px solid #ccc;
120
+ margin-top: 25px;
121
+ padding-top: 15px;
122
+ }
123
+ #getting-started h1 {
124
+ margin: 0;
125
+ font-size: 20px;
126
+ }
127
+ #getting-started h2 {
128
+ margin: 0;
129
+ font-size: 14px;
130
+ font-weight: normal;
131
+ color: #333;
132
+ margin-bottom: 25px;
133
+ }
134
+ #getting-started ol {
135
+ margin-left: 0;
136
+ padding-left: 0;
137
+ }
138
+ #getting-started li {
139
+ font-size: 18px;
140
+ color: #888;
141
+ margin-bottom: 25px;
142
+ }
143
+ #getting-started li h2 {
144
+ margin: 0;
145
+ font-weight: normal;
146
+ font-size: 18px;
147
+ color: #333;
148
+ }
149
+ #getting-started li p {
150
+ color: #555;
151
+ font-size: 13px;
152
+ }
153
+
154
+
155
+ #sidebar ul {
156
+ margin-left: 0;
157
+ padding-left: 0;
158
+ }
159
+ #sidebar ul h3 {
160
+ margin-top: 25px;
161
+ font-size: 16px;
162
+ padding-bottom: 10px;
163
+ border-bottom: 1px solid #ccc;
164
+ }
165
+ #sidebar li {
166
+ list-style-type: none;
167
+ }
168
+ #sidebar ul.links li {
169
+ margin-bottom: 5px;
170
+ }
171
+
172
+ </style>
173
+ <script type="text/javascript">
174
+ function about() {
175
+ info = document.getElementById('about-content');
176
+ if (window.XMLHttpRequest)
177
+ { xhr = new XMLHttpRequest(); }
178
+ else
179
+ { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
180
+ xhr.open("GET","rails/info/properties",false);
181
+ xhr.send("");
182
+ info.innerHTML = xhr.responseText;
183
+ info.style.display = 'block'
184
+ }
185
+ </script>
186
+ </head>
187
+ <body>
188
+ <div id="page">
189
+ <div id="sidebar">
190
+ <ul id="sidebar-items">
191
+ <li>
192
+ <h3>Browse the documentation</h3>
193
+ <ul class="links">
194
+ <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
195
+ <li><a href="http://stdlib.rubyonrails.org/">Ruby standard library</a></li>
196
+ <li><a href="http://corelib.rubyonrails.org/">Ruby core</a></li>
197
+ <li><a href="http://guides.rubyonrails.org/">Rails Guides</a></li>
198
+ </ul>
199
+ </li>
200
+ </ul>
201
+ </div>
202
+
203
+ <div id="content">
204
+ <div id="header">
205
+ <h1>Welcome aboard</h1>
206
+ <h2>You&#8217;re riding Ruby on Rails!</h2>
207
+ </div>
208
+
209
+ <div id="about">
210
+ <h3><a href="rails/info/properties" onclick="about(); return false">About your application&#8217;s environment</a></h3>
211
+ <div id="about-content" style="display: none"></div>
212
+ </div>
213
+
214
+ <div id="getting-started">
215
+ <h1>Getting started</h1>
216
+ <h2>Here&#8217;s how to get rolling:</h2>
217
+
218
+ <ol>
219
+ <li>
220
+ <h2>Use <code>rails generate</code> to create your models and controllers</h2>
221
+ <p>To see all available options, run it without parameters.</p>
222
+ </li>
223
+
224
+ <li>
225
+ <h2>Set up a default route and remove or rename this file</h2>
226
+ <p>Routes are set up in config/routes.rb.</p>
227
+ </li>
228
+
229
+ <li>
230
+ <h2>Create your database</h2>
231
+ <p>Run <code>rake db:migrate</code> to create your database. If you're not using SQLite (the default), edit <code>config/database.yml</code> with your username and password.</p>
232
+ </li>
233
+ </ol>
234
+ </div>
235
+ </div>
236
+
237
+ <div id="footer">&#160;</div>
238
+ </div>
239
+ </body>
240
+ </html>
@@ -0,0 +1,2 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2
+ <html><body><p>Not Found</p></body></html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
+ <title>DummyApp</title>
6
+ <script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/prototype.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/effects.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/dragdrop.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/controls.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/rails.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/application.js?1318889594" type="text/javascript"></script>
7
+ </head>
8
+ <body>
9
+
10
+ <a href="/?locale=en" class="index">Index page</a>
11
+
12
+ </body>
13
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
+ <title>DummyApp</title>
6
+ <script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/prototype.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/effects.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/dragdrop.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/controls.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/rails.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/application.js?1318889594" type="text/javascript"></script>
7
+ </head>
8
+ <body>
9
+
10
+ <a href="/en" class="index">Index page</a>
11
+
12
+ </body>
13
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
+ <title>DummyApp</title>
6
+ <script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/prototype.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/effects.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/dragdrop.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/controls.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/rails.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/application.js?1318889594" type="text/javascript"></script>
7
+ </head>
8
+ <body>
9
+
10
+ <a href="/en" class="index">Index page</a>
11
+
12
+ </body>
13
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
+ <title>DummyApp</title>
6
+ <script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/prototype.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/effects.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/dragdrop.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/controls.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/rails.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/application.js?1318889594" type="text/javascript"></script>
7
+ </head>
8
+ <body>
9
+
10
+ <a href="/en" class="index">Index page</a>
11
+
12
+ </body>
13
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
+ <title>DummyApp</title>
6
+ <script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/prototype.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/effects.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/dragdrop.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/controls.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/rails.js?1318889594" type="text/javascript"></script><script src="/Users/mishyn/workspace/mishyn/localized_url_for/spec/dummy_app/public/javascripts/application.js?1318889594" type="text/javascript"></script>
7
+ </head>
8
+ <body>
9
+
10
+ <a href="/en" class="index">Index page</a>
11
+
12
+ </body>
13
+ </html>
File without changes
@@ -0,0 +1,36 @@
1
+ require 'bundler/setup'
2
+
3
+ require 'localized_url_for'
4
+
5
+ ENV["RAILS_ENV"] ||= 'test'
6
+ require File.expand_path('../dummy_app/config/environment', __FILE__)
7
+ require 'rspec/rails'
8
+ require 'capybara/rspec'
9
+
10
+ # Requires supporting ruby files with custom matchers and macros, etc,
11
+ # in spec/support/ and its subdirectories.
12
+ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
13
+
14
+ RSpec.configure do |config|
15
+ # == Mock Framework
16
+ #
17
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
18
+ #
19
+ # config.mock_with :mocha
20
+ # config.mock_with :flexmock
21
+ # config.mock_with :rr
22
+ config.mock_with :rspec
23
+
24
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
25
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
26
+
27
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
28
+ # examples within a transaction, remove the following line or assign false
29
+ # instead of true.
30
+ config.use_transactional_fixtures = true
31
+
32
+ # If true, the base class of anonymous controllers will be inferred
33
+ # automatically. This will be the default behavior in future versions of
34
+ # rspec-rails.
35
+ config.infer_base_class_for_anonymous_controllers = false
36
+ end