activerecord_any_of 1.2 → 1.3

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 (106) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -38
  3. data/Rakefile +9 -27
  4. data/lib/activerecord_any_of/alternative_builder.rb +25 -9
  5. data/lib/activerecord_any_of/version.rb +1 -1
  6. data/lib/activerecord_any_of.rb +4 -4
  7. data/spec/activerecord_any_of_spec.rb +196 -0
  8. data/spec/db/database.yml +28 -0
  9. data/spec/db/schema.rb +33 -0
  10. data/{test → spec}/fixtures/authors.yml +0 -0
  11. data/{test → spec}/fixtures/posts.yml +0 -0
  12. data/spec/fixtures/users.yml +9 -0
  13. data/spec/spec_helper.rb +36 -0
  14. data/spec/support/models.rb +34 -0
  15. metadata +76 -203
  16. data/test/activerecord_any_of_test.rb +0 -114
  17. data/test/dummy_rails3/README.rdoc +0 -261
  18. data/test/dummy_rails3/Rakefile +0 -7
  19. data/test/dummy_rails3/app/assets/javascripts/application.js +0 -15
  20. data/test/dummy_rails3/app/assets/stylesheets/application.css +0 -13
  21. data/test/dummy_rails3/app/controllers/application_controller.rb +0 -3
  22. data/test/dummy_rails3/app/helpers/application_helper.rb +0 -2
  23. data/test/dummy_rails3/app/models/author.rb +0 -4
  24. data/test/dummy_rails3/app/models/post.rb +0 -4
  25. data/test/dummy_rails3/app/models/special_post.rb +0 -2
  26. data/test/dummy_rails3/app/models/sti_post.rb +0 -2
  27. data/test/dummy_rails3/app/views/layouts/application.html.erb +0 -14
  28. data/test/dummy_rails3/config/application.rb +0 -59
  29. data/test/dummy_rails3/config/boot.rb +0 -10
  30. data/test/dummy_rails3/config/database.yml +0 -25
  31. data/test/dummy_rails3/config/environment.rb +0 -5
  32. data/test/dummy_rails3/config/environments/development.rb +0 -37
  33. data/test/dummy_rails3/config/environments/production.rb +0 -67
  34. data/test/dummy_rails3/config/environments/test.rb +0 -37
  35. data/test/dummy_rails3/config/initializers/backtrace_silencers.rb +0 -7
  36. data/test/dummy_rails3/config/initializers/inflections.rb +0 -15
  37. data/test/dummy_rails3/config/initializers/mime_types.rb +0 -5
  38. data/test/dummy_rails3/config/initializers/secret_token.rb +0 -7
  39. data/test/dummy_rails3/config/initializers/session_store.rb +0 -8
  40. data/test/dummy_rails3/config/initializers/wrap_parameters.rb +0 -14
  41. data/test/dummy_rails3/config/locales/en.yml +0 -5
  42. data/test/dummy_rails3/config/routes.rb +0 -58
  43. data/test/dummy_rails3/config.ru +0 -4
  44. data/test/dummy_rails3/db/development.sqlite3 +0 -0
  45. data/test/dummy_rails3/db/migrate/20130617172335_create_authors.rb +0 -9
  46. data/test/dummy_rails3/db/migrate/20130617173313_create_posts.rb +0 -12
  47. data/test/dummy_rails3/db/schema.rb +0 -31
  48. data/test/dummy_rails3/db/test.sqlite3 +0 -0
  49. data/test/dummy_rails3/log/development.log +0 -101
  50. data/test/dummy_rails3/log/test.log +0 -2875
  51. data/test/dummy_rails3/public/404.html +0 -26
  52. data/test/dummy_rails3/public/422.html +0 -26
  53. data/test/dummy_rails3/public/500.html +0 -25
  54. data/test/dummy_rails3/public/favicon.ico +0 -0
  55. data/test/dummy_rails3/script/rails +0 -6
  56. data/test/dummy_rails3/test/fixtures/authors.yml +0 -7
  57. data/test/dummy_rails3/test/fixtures/posts.yml +0 -13
  58. data/test/dummy_rails3/test/unit/author_test.rb +0 -7
  59. data/test/dummy_rails3/test/unit/post_test.rb +0 -7
  60. data/test/dummy_rails4/README.rdoc +0 -28
  61. data/test/dummy_rails4/Rakefile +0 -6
  62. data/test/dummy_rails4/app/assets/javascripts/application.js +0 -13
  63. data/test/dummy_rails4/app/assets/stylesheets/application.css +0 -13
  64. data/test/dummy_rails4/app/controllers/application_controller.rb +0 -5
  65. data/test/dummy_rails4/app/helpers/application_helper.rb +0 -2
  66. data/test/dummy_rails4/app/models/author.rb +0 -3
  67. data/test/dummy_rails4/app/models/post.rb +0 -3
  68. data/test/dummy_rails4/app/models/special_post.rb +0 -2
  69. data/test/dummy_rails4/app/models/sti_post.rb +0 -2
  70. data/test/dummy_rails4/app/views/layouts/application.html.erb +0 -14
  71. data/test/dummy_rails4/bin/bundle +0 -3
  72. data/test/dummy_rails4/bin/rails +0 -4
  73. data/test/dummy_rails4/bin/rake +0 -4
  74. data/test/dummy_rails4/config/application.rb +0 -23
  75. data/test/dummy_rails4/config/boot.rb +0 -5
  76. data/test/dummy_rails4/config/database.yml +0 -25
  77. data/test/dummy_rails4/config/environment.rb +0 -5
  78. data/test/dummy_rails4/config/environments/development.rb +0 -29
  79. data/test/dummy_rails4/config/environments/production.rb +0 -80
  80. data/test/dummy_rails4/config/environments/test.rb +0 -36
  81. data/test/dummy_rails4/config/initializers/backtrace_silencers.rb +0 -7
  82. data/test/dummy_rails4/config/initializers/filter_parameter_logging.rb +0 -4
  83. data/test/dummy_rails4/config/initializers/inflections.rb +0 -16
  84. data/test/dummy_rails4/config/initializers/mime_types.rb +0 -5
  85. data/test/dummy_rails4/config/initializers/secret_token.rb +0 -12
  86. data/test/dummy_rails4/config/initializers/session_store.rb +0 -3
  87. data/test/dummy_rails4/config/initializers/wrap_parameters.rb +0 -14
  88. data/test/dummy_rails4/config/locales/en.yml +0 -23
  89. data/test/dummy_rails4/config/routes.rb +0 -56
  90. data/test/dummy_rails4/config.ru +0 -4
  91. data/test/dummy_rails4/db/development.sqlite3 +0 -0
  92. data/test/dummy_rails4/db/migrate/20130617172335_create_authors.rb +0 -9
  93. data/test/dummy_rails4/db/migrate/20130617173313_create_posts.rb +0 -12
  94. data/test/dummy_rails4/db/schema.rb +0 -31
  95. data/test/dummy_rails4/db/test.sqlite3 +0 -0
  96. data/test/dummy_rails4/log/development.log +0 -21
  97. data/test/dummy_rails4/log/test.log +0 -1527
  98. data/test/dummy_rails4/public/404.html +0 -58
  99. data/test/dummy_rails4/public/422.html +0 -58
  100. data/test/dummy_rails4/public/500.html +0 -57
  101. data/test/dummy_rails4/public/favicon.ico +0 -0
  102. data/test/dummy_rails4/test/fixtures/authors.yml +0 -7
  103. data/test/dummy_rails4/test/fixtures/posts.yml +0 -13
  104. data/test/dummy_rails4/test/unit/author_test.rb +0 -7
  105. data/test/dummy_rails4/test/unit/post_test.rb +0 -7
  106. data/test/test_helper.rb +0 -15
@@ -1,58 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The page you were looking for doesn't exist (404)</title>
5
- <style>
6
- body {
7
- background-color: #EFEFEF;
8
- color: #2E2F30;
9
- text-align: center;
10
- font-family: arial, sans-serif;
11
- }
12
-
13
- div.dialog {
14
- width: 25em;
15
- margin: 4em auto 0 auto;
16
- border: 1px solid #CCC;
17
- border-right-color: #999;
18
- border-left-color: #999;
19
- border-bottom-color: #BBB;
20
- border-top: #B00100 solid 4px;
21
- border-top-left-radius: 9px;
22
- border-top-right-radius: 9px;
23
- background-color: white;
24
- padding: 7px 4em 0 4em;
25
- }
26
-
27
- h1 {
28
- font-size: 100%;
29
- color: #730E15;
30
- line-height: 1.5em;
31
- }
32
-
33
- body > p {
34
- width: 33em;
35
- margin: 0 auto 1em;
36
- padding: 1em 0;
37
- background-color: #F7F7F7;
38
- border: 1px solid #CCC;
39
- border-right-color: #999;
40
- border-bottom-color: #999;
41
- border-bottom-left-radius: 4px;
42
- border-bottom-right-radius: 4px;
43
- border-top-color: #DADADA;
44
- color: #666;
45
- box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
- }
47
- </style>
48
- </head>
49
-
50
- <body>
51
- <!-- This file lives in public/404.html -->
52
- <div class="dialog">
53
- <h1>The page you were looking for doesn't exist.</h1>
54
- <p>You may have mistyped the address or the page may have moved.</p>
55
- </div>
56
- <p>If you are the application owner check the logs for more information.</p>
57
- </body>
58
- </html>
@@ -1,58 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The change you wanted was rejected (422)</title>
5
- <style>
6
- body {
7
- background-color: #EFEFEF;
8
- color: #2E2F30;
9
- text-align: center;
10
- font-family: arial, sans-serif;
11
- }
12
-
13
- div.dialog {
14
- width: 25em;
15
- margin: 4em auto 0 auto;
16
- border: 1px solid #CCC;
17
- border-right-color: #999;
18
- border-left-color: #999;
19
- border-bottom-color: #BBB;
20
- border-top: #B00100 solid 4px;
21
- border-top-left-radius: 9px;
22
- border-top-right-radius: 9px;
23
- background-color: white;
24
- padding: 7px 4em 0 4em;
25
- }
26
-
27
- h1 {
28
- font-size: 100%;
29
- color: #730E15;
30
- line-height: 1.5em;
31
- }
32
-
33
- body > p {
34
- width: 33em;
35
- margin: 0 auto 1em;
36
- padding: 1em 0;
37
- background-color: #F7F7F7;
38
- border: 1px solid #CCC;
39
- border-right-color: #999;
40
- border-bottom-color: #999;
41
- border-bottom-left-radius: 4px;
42
- border-bottom-right-radius: 4px;
43
- border-top-color: #DADADA;
44
- color: #666;
45
- box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
- }
47
- </style>
48
- </head>
49
-
50
- <body>
51
- <!-- This file lives in public/422.html -->
52
- <div class="dialog">
53
- <h1>The change you wanted was rejected.</h1>
54
- <p>Maybe you tried to change something you didn't have access to.</p>
55
- </div>
56
- <p>If you are the application owner check the logs for more information.</p>
57
- </body>
58
- </html>
@@ -1,57 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>We're sorry, but something went wrong (500)</title>
5
- <style>
6
- body {
7
- background-color: #EFEFEF;
8
- color: #2E2F30;
9
- text-align: center;
10
- font-family: arial, sans-serif;
11
- }
12
-
13
- div.dialog {
14
- width: 25em;
15
- margin: 4em auto 0 auto;
16
- border: 1px solid #CCC;
17
- border-right-color: #999;
18
- border-left-color: #999;
19
- border-bottom-color: #BBB;
20
- border-top: #B00100 solid 4px;
21
- border-top-left-radius: 9px;
22
- border-top-right-radius: 9px;
23
- background-color: white;
24
- padding: 7px 4em 0 4em;
25
- }
26
-
27
- h1 {
28
- font-size: 100%;
29
- color: #730E15;
30
- line-height: 1.5em;
31
- }
32
-
33
- body > p {
34
- width: 33em;
35
- margin: 0 auto 1em;
36
- padding: 1em 0;
37
- background-color: #F7F7F7;
38
- border: 1px solid #CCC;
39
- border-right-color: #999;
40
- border-bottom-color: #999;
41
- border-bottom-left-radius: 4px;
42
- border-bottom-right-radius: 4px;
43
- border-top-color: #DADADA;
44
- color: #666;
45
- box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
- }
47
- </style>
48
- </head>
49
-
50
- <body>
51
- <!-- This file lives in public/500.html -->
52
- <div class="dialog">
53
- <h1>We're sorry, but something went wrong.</h1>
54
- </div>
55
- <p>If you are the application owner check the logs for more information.</p>
56
- </body>
57
- </html>
File without changes
@@ -1,7 +0,0 @@
1
- # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
-
3
- one:
4
- name: MyString
5
-
6
- two:
7
- name: MyString
@@ -1,13 +0,0 @@
1
- # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
-
3
- one:
4
- title: MyString
5
- body: MyText
6
- user_id:
7
- type:
8
-
9
- two:
10
- title: MyString
11
- body: MyText
12
- user_id:
13
- type:
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class AuthorTest < ActiveSupport::TestCase
4
- # test "the truth" do
5
- # assert true
6
- # end
7
- end
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class PostTest < ActiveSupport::TestCase
4
- # test "the truth" do
5
- # assert true
6
- # end
7
- end
data/test/test_helper.rb DELETED
@@ -1,15 +0,0 @@
1
- # Configure Rails Environment
2
- ENV["RAILS_ENV"] = "test"
3
-
4
- dummy_app = ENV[ 'RAILS_VERSION' ] == '3' ? 'dummy_rails3' : 'dummy_rails4'
5
-
6
- require File.expand_path("../#{dummy_app}/config/environment.rb", __FILE__)
7
- require "rails/test_help"
8
-
9
- Rails.backtrace_cleaner.remove_silencers!
10
-
11
- # Load support files
12
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
13
-
14
- # Load fixtures from the engine
15
- ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)