refinerycms-page-images 2.0.1 → 2.1.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.
Files changed (37) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +20 -9
  3. data/Gemfile +22 -51
  4. data/Rakefile +2 -0
  5. data/app/assets/javascripts/refinery/page-image-picker.js.erb +173 -150
  6. data/app/assets/stylesheets/refinery/page-image-picker.css.scss +6 -0
  7. data/app/views/refinery/admin/pages/tabs/_images.html.erb +2 -1
  8. data/app/views/refinery/admin/pages/tabs/_images_field.html.erb +15 -3
  9. data/config/locales/bg.yml +1 -0
  10. data/config/locales/cs.yml +1 -0
  11. data/config/locales/de.yml +3 -1
  12. data/config/locales/en.yml +2 -0
  13. data/config/locales/es.yml +19 -0
  14. data/config/locales/fr.yml +1 -0
  15. data/config/locales/ja.yml +18 -0
  16. data/config/locales/nl.yml +1 -0
  17. data/config/locales/pt-BR.yml +1 -0
  18. data/config/locales/ru.yml +1 -0
  19. data/config/locales/sk.yml +1 -0
  20. data/lib/generators/refinery/templates/config/initializers/refinery/page_images.rb.erb +2 -0
  21. data/lib/refinery/page_images.rb +15 -2
  22. data/lib/refinery/page_images/configuration.rb +25 -1
  23. data/lib/refinery/page_images/engine.rb +17 -19
  24. data/lib/refinery/page_images/extension.rb +2 -2
  25. data/readme.md +48 -2
  26. data/refinerycms-page-images.gemspec +7 -8
  27. data/spec/factories/page-images.rb +2 -2
  28. data/spec/features/attach_page_images_spec.rb +58 -0
  29. data/spec/lib/refinery/initializer_spec.rb +42 -0
  30. data/spec/models/refinery/blog_spec.rb +3 -3
  31. data/spec/models/refinery/page_spec.rb +26 -16
  32. data/spec/spec_helper.rb +21 -46
  33. metadata +43 -82
  34. data/spec/requests/attach_page_images_spec.rb +0 -29
  35. data/spec/support/database_cleaner.rb +0 -17
  36. data/spec/support/devise.rb +0 -8
  37. data/spec/support/refinery.rb +0 -6
@@ -1,29 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe "attach page images" do
4
- login_refinery_user
5
-
6
- before(:each) do
7
- Factory(:page)
8
-
9
- visit refinery.admin_pages_path
10
-
11
- click_link "Edit this page"
12
- end
13
-
14
- it "shows images tab" do
15
- within "#custom_images_tab" do
16
- page.should have_content("Images")
17
- end
18
- end
19
-
20
- # This spec actually is broken in a way because Add Image link would
21
- # be visible to capybara even if we don't click on Images tab.
22
- it "shows add image link" do
23
- within "#custom_images_tab" do
24
- click_link "Images"
25
- end
26
-
27
- page.should have_content("Add Image")
28
- end
29
- end
@@ -1,17 +0,0 @@
1
- require 'database_cleaner'
2
-
3
- RSpec.configure do |config|
4
- config.use_transactional_fixtures = false
5
-
6
- config.before(:suite) do
7
- DatabaseCleaner.strategy = :truncation
8
- end
9
-
10
- config.before(:each) do
11
- DatabaseCleaner.start
12
- end
13
-
14
- config.after(:each) do
15
- DatabaseCleaner.clean
16
- end
17
- end
@@ -1,8 +0,0 @@
1
- require 'devise'
2
-
3
- RSpec.configure do |config|
4
- config.mock_with :rspec
5
- config.use_transactional_fixtures = false
6
-
7
- config.include Devise::TestHelpers, :type => :controller
8
- end
@@ -1,6 +0,0 @@
1
- require 'refinerycms-testing'
2
-
3
- RSpec.configure do |config|
4
- config.extend Refinery::Testing::ControllerMacros::Authentication, :type => :controller
5
- config.extend Refinery::Testing::RequestMacros::Authentication, :type => :request
6
- end