refinerycms-page-images 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +20 -9
- data/Gemfile +22 -51
- data/Rakefile +2 -0
- data/app/assets/javascripts/refinery/page-image-picker.js.erb +173 -150
- data/app/assets/stylesheets/refinery/page-image-picker.css.scss +6 -0
- data/app/views/refinery/admin/pages/tabs/_images.html.erb +2 -1
- data/app/views/refinery/admin/pages/tabs/_images_field.html.erb +15 -3
- data/config/locales/bg.yml +1 -0
- data/config/locales/cs.yml +1 -0
- data/config/locales/de.yml +3 -1
- data/config/locales/en.yml +2 -0
- data/config/locales/es.yml +19 -0
- data/config/locales/fr.yml +1 -0
- data/config/locales/ja.yml +18 -0
- data/config/locales/nl.yml +1 -0
- data/config/locales/pt-BR.yml +1 -0
- data/config/locales/ru.yml +1 -0
- data/config/locales/sk.yml +1 -0
- data/lib/generators/refinery/templates/config/initializers/refinery/page_images.rb.erb +2 -0
- data/lib/refinery/page_images.rb +15 -2
- data/lib/refinery/page_images/configuration.rb +25 -1
- data/lib/refinery/page_images/engine.rb +17 -19
- data/lib/refinery/page_images/extension.rb +2 -2
- data/readme.md +48 -2
- data/refinerycms-page-images.gemspec +7 -8
- data/spec/factories/page-images.rb +2 -2
- data/spec/features/attach_page_images_spec.rb +58 -0
- data/spec/lib/refinery/initializer_spec.rb +42 -0
- data/spec/models/refinery/blog_spec.rb +3 -3
- data/spec/models/refinery/page_spec.rb +26 -16
- data/spec/spec_helper.rb +21 -46
- metadata +43 -82
- data/spec/requests/attach_page_images_spec.rb +0 -29
- data/spec/support/database_cleaner.rb +0 -17
- data/spec/support/devise.rb +0 -8
- 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
|
data/spec/support/devise.rb
DELETED
data/spec/support/refinery.rb
DELETED