effective_addresses 1.0.6 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/effective/addresses_controller.rb +0 -1
  3. data/app/models/concerns/acts_as_addressable.rb +35 -9
  4. data/lib/effective_addresses/version.rb +1 -1
  5. data/lib/effective_addresses.rb +1 -1
  6. data/spec/controllers/addresses_controller_spec.rb +5 -2
  7. data/spec/dummy/README.rdoc +5 -258
  8. data/spec/dummy/Rakefile +1 -2
  9. data/spec/dummy/app/assets/javascripts/application.js +3 -5
  10. data/spec/dummy/app/assets/stylesheets/application.css +5 -3
  11. data/spec/dummy/app/controllers/application_controller.rb +3 -1
  12. data/spec/dummy/app/models/user.rb +24 -0
  13. data/spec/dummy/app/models/user_with_address.rb +3 -0
  14. data/spec/dummy/app/models/user_with_required_address.rb +3 -0
  15. data/spec/dummy/app/models/user_with_required_address_and_full_name.rb +3 -0
  16. data/spec/dummy/app/models/user_with_required_full_name.rb +3 -0
  17. data/spec/dummy/app/models/user_with_singular_address.rb +3 -0
  18. data/spec/dummy/app/views/layouts/application.html.erb +2 -2
  19. data/spec/dummy/bin/bundle +3 -0
  20. data/spec/dummy/bin/rails +4 -0
  21. data/spec/dummy/bin/rake +4 -0
  22. data/spec/dummy/config/application.rb +6 -42
  23. data/spec/dummy/config/boot.rb +4 -9
  24. data/spec/dummy/config/database.yml +9 -9
  25. data/spec/dummy/config/environment.rb +3 -3
  26. data/spec/dummy/config/environments/development.rb +19 -19
  27. data/spec/dummy/config/environments/production.rb +45 -29
  28. data/spec/dummy/config/environments/test.rb +17 -15
  29. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  30. data/spec/dummy/config/initializers/effective_addresses.rb +15 -0
  31. data/spec/dummy/config/initializers/session_store.rb +1 -6
  32. data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
  33. data/spec/dummy/config/routes.rb +1 -57
  34. data/spec/dummy/config/secrets.yml +22 -0
  35. data/spec/dummy/config.ru +1 -1
  36. data/spec/dummy/db/schema.rb +24 -1
  37. data/spec/dummy/db/test.sqlite3 +0 -0
  38. data/spec/dummy/log/test.log +11534 -0
  39. data/spec/models/acts_as_addressable_spec.rb +159 -0
  40. data/spec/models/address_spec.rb +1 -2
  41. data/spec/rails_helper.rb +60 -0
  42. data/spec/spec_helper.rb +87 -30
  43. data/spec/support/factories.rb +48 -1
  44. metadata +172 -24
  45. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  46. data/spec/dummy/config/initializers/inflections.rb +0 -15
  47. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  48. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  49. data/spec/dummy/config/locales/en.yml +0 -5
  50. data/spec/dummy/public/404.html +0 -26
  51. data/spec/dummy/public/422.html +0 -26
  52. data/spec/dummy/public/500.html +0 -25
  53. data/spec/dummy/public/favicon.ico +0 -0
  54. data/spec/dummy/script/rails +0 -6
  55. data/spec/dummy/spec_link +0 -3
@@ -1,15 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new inflection rules using the following format
4
- # (all these examples are active by default):
5
- # ActiveSupport::Inflector.inflections do |inflect|
6
- # inflect.plural /^(ox)$/i, '\1en'
7
- # inflect.singular /^(ox)en/i, '\1'
8
- # inflect.irregular 'person', 'people'
9
- # inflect.uncountable %w( fish sheep )
10
- # end
11
- #
12
- # These inflection rules are supported but not enabled by default:
13
- # ActiveSupport::Inflector.inflections do |inflect|
14
- # inflect.acronym 'RESTful'
15
- # end
@@ -1,5 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
- # Make sure the secret is at least 30 characters and all random,
6
- # no regular words or you'll be exposed to dictionary attacks.
7
- Dummy::Application.config.secret_token = '5dd5238532ef6f0d01d3ff61dbc6883723e7322af075be4ce61e1de72dc1fac345ae8a01b3d04b0fdc45aa4ecfef0079e9a6db714b2916b9ccfc1ce98cd1be94'
@@ -1,5 +0,0 @@
1
- # Sample localization file for English. Add more files in this directory for other locales.
2
- # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
-
4
- en:
5
- hello: "Hello world"
@@ -1,26 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The page you were looking for doesn't exist (404)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/404.html -->
21
- <div class="dialog">
22
- <h1>The page you were looking for doesn't exist.</h1>
23
- <p>You may have mistyped the address or the page may have moved.</p>
24
- </div>
25
- </body>
26
- </html>
@@ -1,26 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The change you wanted was rejected (422)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/422.html -->
21
- <div class="dialog">
22
- <h1>The change you wanted was rejected.</h1>
23
- <p>Maybe you tried to change something you didn't have access to.</p>
24
- </div>
25
- </body>
26
- </html>
@@ -1,25 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>We're sorry, but something went wrong (500)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/500.html -->
21
- <div class="dialog">
22
- <h1>We're sorry, but something went wrong.</h1>
23
- </div>
24
- </body>
25
- </html>
File without changes
@@ -1,6 +0,0 @@
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'
data/spec/dummy/spec_link DELETED
@@ -1,3 +0,0 @@
1
- You may have to link this to ../../spec
2
-
3
- spec/dummy > ln -s ../../spec spec