impressionist 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -1
  3. data/Rakefile +17 -4
  4. data/app/models/impressionist/impressionable.rb +2 -2
  5. data/impressionist.gemspec +4 -3
  6. data/lib/impressionist/engine.rb +8 -25
  7. data/lib/impressionist/load.rb +6 -4
  8. data/lib/impressionist/models/active_record/impression.rb +5 -2
  9. data/lib/impressionist/models/mongoid/impression.rb +8 -15
  10. data/lib/impressionist/models/mongoid/impressionist/impressionable.rb +13 -32
  11. data/lib/impressionist/rails_toggle.rb +22 -0
  12. data/lib/impressionist/setup_association.rb +48 -0
  13. data/lib/impressionist/version.rb +1 -1
  14. data/tests/README +1 -0
  15. data/tests/spec/minitest_helper.rb +4 -0
  16. data/tests/spec/rails_toggle_spec.rb +26 -0
  17. data/tests/spec/setup_association_spec.rb +55 -0
  18. data/{test_app → tests/test_app}/.gitignore +0 -0
  19. data/{test_app → tests/test_app}/.rspec +0 -0
  20. data/{test_app → tests/test_app}/Gemfile +4 -15
  21. data/{test_app → tests/test_app}/README +0 -0
  22. data/{test_app → tests/test_app}/README.rdoc +0 -0
  23. data/{test_app → tests/test_app}/Rakefile +0 -0
  24. data/{test_app → tests/test_app}/app/assets/images/rails.png +0 -0
  25. data/{test_app → tests/test_app}/app/assets/javascripts/application.js +0 -0
  26. data/{test_app → tests/test_app}/app/assets/stylesheets/application.css +0 -0
  27. data/{test_app → tests/test_app}/app/controllers/application_controller.rb +0 -0
  28. data/{test_app → tests/test_app}/app/controllers/articles_controller.rb +0 -0
  29. data/{test_app → tests/test_app}/app/controllers/dummy_controller.rb +0 -0
  30. data/{test_app → tests/test_app}/app/controllers/posts_controller.rb +0 -0
  31. data/{test_app → tests/test_app}/app/controllers/widgets_controller.rb +0 -0
  32. data/{test_app → tests/test_app}/app/helpers/application_helper.rb +0 -0
  33. data/{test_app → tests/test_app}/app/mailers/.gitkeep +0 -0
  34. data/{test_app → tests/test_app}/app/models/.gitkeep +0 -0
  35. data/{test_app → tests/test_app}/app/models/article.rb +0 -0
  36. data/{test_app → tests/test_app}/app/models/dummy.rb +0 -0
  37. data/{test_app → tests/test_app}/app/models/post.rb +0 -0
  38. data/{test_app → tests/test_app}/app/models/user.rb +0 -0
  39. data/{test_app → tests/test_app}/app/models/widget.rb +0 -0
  40. data/{test_app → tests/test_app}/app/views/articles/index.html.erb +0 -0
  41. data/{test_app → tests/test_app}/app/views/articles/show.html.erb +0 -0
  42. data/{test_app → tests/test_app}/app/views/dummy/index.html.erb +0 -0
  43. data/{test_app → tests/test_app}/app/views/layouts/application.html.erb +0 -0
  44. data/{test_app → tests/test_app}/app/views/posts/edit.html.erb +0 -0
  45. data/{test_app → tests/test_app}/app/views/posts/index.html.erb +0 -0
  46. data/{test_app → tests/test_app}/app/views/posts/show.html.erb +0 -0
  47. data/{test_app → tests/test_app}/app/views/widgets/index.html.erb +0 -0
  48. data/{test_app → tests/test_app}/app/views/widgets/new.html.erb +0 -0
  49. data/{test_app → tests/test_app}/app/views/widgets/show.html.erb +0 -0
  50. data/{test_app → tests/test_app}/config.ru +0 -0
  51. data/{test_app → tests/test_app}/config/application.rb +0 -0
  52. data/{test_app → tests/test_app}/config/boot.rb +0 -0
  53. data/{test_app → tests/test_app}/config/cucumber.yml +0 -0
  54. data/{test_app → tests/test_app}/config/database.yml +0 -0
  55. data/{test_app → tests/test_app}/config/environment.rb +0 -0
  56. data/{test_app → tests/test_app}/config/environments/development.rb +0 -0
  57. data/{test_app → tests/test_app}/config/environments/pg_test.rb +0 -0
  58. data/{test_app → tests/test_app}/config/environments/production.rb +0 -0
  59. data/{test_app → tests/test_app}/config/environments/test.rb +0 -0
  60. data/{test_app → tests/test_app}/config/initializers/backtrace_silencers.rb +0 -0
  61. data/tests/test_app/config/initializers/impression.rb +2 -0
  62. data/{test_app → tests/test_app}/config/initializers/inflections.rb +0 -0
  63. data/{test_app → tests/test_app}/config/initializers/mime_types.rb +0 -0
  64. data/{test_app → tests/test_app}/config/initializers/secret_token.rb +0 -0
  65. data/{test_app → tests/test_app}/config/initializers/session_store.rb +0 -0
  66. data/{test_app → tests/test_app}/config/initializers/wrap_parameters.rb +0 -0
  67. data/{test_app → tests/test_app}/config/locales/en.yml +0 -0
  68. data/{test_app → tests/test_app}/config/routes.rb +0 -0
  69. data/{test_app → tests/test_app}/db/migrate/20110201153144_create_articles.rb +0 -0
  70. data/{test_app → tests/test_app}/db/migrate/20110210205028_create_posts.rb +0 -0
  71. data/{test_app → tests/test_app}/db/migrate/20111127184039_create_widgets.rb +0 -0
  72. data/tests/test_app/db/schema.rb +60 -0
  73. data/{test_app → tests/test_app}/db/seeds.rb +0 -0
  74. data/{test_app → tests/test_app}/lib/assets/.gitkeep +0 -0
  75. data/{test_app → tests/test_app}/lib/tasks/.gitkeep +0 -0
  76. data/{test_app → tests/test_app}/lib/tasks/cucumber.rake +0 -0
  77. data/{test_app → tests/test_app}/log/.gitkeep +0 -0
  78. data/{test_app → tests/test_app}/public/404.html +0 -0
  79. data/{test_app → tests/test_app}/public/422.html +0 -0
  80. data/{test_app → tests/test_app}/public/500.html +0 -0
  81. data/{test_app → tests/test_app}/public/favicon.ico +0 -0
  82. data/{test_app → tests/test_app}/public/images/rails.png +0 -0
  83. data/{test_app → tests/test_app}/public/index.html +0 -0
  84. data/{test_app → tests/test_app}/public/javascripts/application.js +0 -0
  85. data/{test_app → tests/test_app}/public/javascripts/controls.js +0 -0
  86. data/{test_app → tests/test_app}/public/javascripts/dragdrop.js +0 -0
  87. data/{test_app → tests/test_app}/public/javascripts/effects.js +0 -0
  88. data/{test_app → tests/test_app}/public/javascripts/prototype.js +0 -0
  89. data/{test_app → tests/test_app}/public/javascripts/rails.js +0 -0
  90. data/{test_app → tests/test_app}/public/robots.txt +0 -0
  91. data/{test_app → tests/test_app}/public/stylesheets/.gitkeep +0 -0
  92. data/{test_app → tests/test_app}/script/cucumber +0 -0
  93. data/{test_app → tests/test_app}/script/rails +0 -0
  94. data/{test_app → tests/test_app}/spec/controllers/articles_controller_spec.rb +0 -0
  95. data/{test_app → tests/test_app}/spec/controllers/dummy_controller_spec.rb +0 -0
  96. data/{test_app → tests/test_app}/spec/controllers/impressionist_uniqueness_spec.rb +45 -45
  97. data/{test_app → tests/test_app}/spec/controllers/posts_controller_spec.rb +0 -0
  98. data/{test_app → tests/test_app}/spec/controllers/widgets_controller_spec.rb +2 -2
  99. data/{test_app → tests/test_app}/spec/fixtures/articles.yml +0 -0
  100. data/{test_app → tests/test_app}/spec/fixtures/impressions.yml +0 -0
  101. data/{test_app → tests/test_app}/spec/fixtures/posts.yml +0 -0
  102. data/{test_app → tests/test_app}/spec/fixtures/widgets.yml +0 -0
  103. data/{test_app → tests/test_app}/spec/initializers/initializers_spec.rb +0 -0
  104. data/{test_app → tests/test_app}/spec/models/bots_spec.rb +0 -0
  105. data/{test_app → tests/test_app}/spec/models/counter_caching_spec.rb +0 -0
  106. data/{test_app → tests/test_app}/spec/models/model_spec.rb +0 -0
  107. data/{test_app → tests/test_app}/spec/rails_generators/rails_generators_spec.rb +0 -0
  108. data/tests/test_app/spec/spec_helper.rb +31 -0
  109. metadata +224 -99
  110. data/lib/impressionist/set_up_association.rb +0 -14
  111. data/spec/spec_helper.rb +0 -5
  112. data/test_app/config/initializers/impression.rb +0 -5
  113. data/test_app/spec/spec_helper.rb +0 -38
data/spec/spec_helper.rb DELETED
@@ -1,5 +0,0 @@
1
- module Impressionist
2
- def self.mattr_accessor(accessor)
3
- class_variable_set("@@#{accessor}", accessor)
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- # Use this hook to configure impressionist parameters
2
- Impressionist.setup do |config|
3
- # Define ORM. Could be :active_record (default) and :mongo_mapper
4
- # config.orm = :active_record
5
- end
@@ -1,38 +0,0 @@
1
- ENV["RAILS_ENV"] ||= 'test'
2
- unless ENV['CI']
3
- require 'simplecov'
4
- SimpleCov.start 'rails'
5
- end
6
- require File.expand_path("../../config/environment", __FILE__)
7
- require 'rspec/rails'
8
- require 'capybara/rails'
9
- require 'capybara/rspec'
10
-
11
- # Requires supporting ruby files with custom matchers and macros, etc,
12
- # in spec/support/ and its subdirectories.
13
- Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
14
-
15
- RSpec.configure do |config|
16
- # == Mock Framework
17
- #
18
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
19
- #
20
- # config.mock_with :mocha
21
- # config.mock_with :flexmock
22
- # config.mock_with :rr
23
- config.mock_with :rspec
24
-
25
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
26
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
27
-
28
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
29
- # examples within a transaction, remove the following line or assign false
30
- # instead of true.
31
- config.use_transactional_fixtures = true
32
-
33
- # make the rails logger usable in the tests as logger.xxx "..."
34
- def logger
35
- Rails.logger
36
- end
37
-
38
- end