solidus_product_description_editor 1.0.1
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.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.hound.yml +21 -0
- data/.rspec +3 -0
- data/.rubocop.yml +8 -0
- data/.travis.yml +11 -0
- data/CHANGELOG.md +2 -0
- data/CONTRIBUTING.md +83 -0
- data/Gemfile +5 -0
- data/Guardfile +9 -0
- data/LICENSE.md +26 -0
- data/README.md +37 -0
- data/Rakefile +21 -0
- data/app/overrides/add_description_editor_to_admin_products_form.rb +7 -0
- data/app/views/spree/admin/products/form/_description_editor.html.erb +45 -0
- data/bin/rails +7 -0
- data/lib/solidus_product_description_editor.rb +2 -0
- data/lib/solidus_product_description_editor/engine.rb +15 -0
- data/lib/solidus_product_description_editor/version.rb +17 -0
- data/screenshot.png +0 -0
- data/solidus_product_description_editor.gemspec +26 -0
- data/spec/spec_helper.rb +93 -0
- metadata +80 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3b1de4cebfca7023de10b3e6e2cb39f91e05b48a
|
4
|
+
data.tar.gz: 864c0324f37c927fb00d22ed8a76e44849873311
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 72fe3070fd8029dd82011602d3bd16894963f645eaac884c6a4472f813070182b77cf68b5b003c9ad94afefea487221c93565f439a722a1ab981cadd6f7aa394
|
7
|
+
data.tar.gz: 30bfc2c35c211c463e4a4fef9ef7d66755db69bf0051b6653927102389664ace29da1d2362ea0de42f23bdd94918898de4080c515f6680ecf01dabf9dfb7e8d4
|
data/.gitignore
ADDED
data/.hound.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
# Too picky.
|
3
|
+
LineLength:
|
4
|
+
Enabled: false
|
5
|
+
|
6
|
+
# This should truly be on for well documented gems.
|
7
|
+
Documentation:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
# Neatly aligned code is to swell.
|
11
|
+
SingleSpaceBeforeFirstArg:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
# Don't mess with RSpec DSL.
|
15
|
+
Blocks:
|
16
|
+
Exclude:
|
17
|
+
- 'spec/**/*'
|
18
|
+
|
19
|
+
# Avoid contradictory style rules by enforce single quotes.
|
20
|
+
StringLiterals:
|
21
|
+
EnforcedStyle: single_quotes
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
*(Originally copied from [Spree Static Content's Contribution guidelines](https://github.com/spree-contrib/spree_static_content/blob/master/CONTRIBUTING.md)*
|
4
|
+
|
5
|
+
Solidus Product Description Editor is an open source project and we encourage contributions.
|
6
|
+
|
7
|
+
In the spirit of [free software][1], **everyone** is encouraged to help improve this project.
|
8
|
+
|
9
|
+
Here are some ways *you* can contribute:
|
10
|
+
|
11
|
+
* by using prerelease versions
|
12
|
+
* by reporting [bugs][2]
|
13
|
+
* by suggesting new features
|
14
|
+
* by writing [translations][3]
|
15
|
+
* by writing or editing documentation
|
16
|
+
* by writing specifications
|
17
|
+
* by writing code (*no patch is too small*: fix typos, add comments, clean up inconsistent whitespace)
|
18
|
+
* by refactoring code
|
19
|
+
* by resolving [issues][2]
|
20
|
+
* by reviewing patches
|
21
|
+
|
22
|
+
---
|
23
|
+
|
24
|
+
## Filing an issue
|
25
|
+
|
26
|
+
When filing an issue on this extension, please first do these things:
|
27
|
+
|
28
|
+
* Verify you can reproduce this issue in a brand new application.
|
29
|
+
* Run through the steps to reproduce the issue again.
|
30
|
+
|
31
|
+
In the issue itself please provide:
|
32
|
+
|
33
|
+
* A comprehensive list of steps to reproduce the issue.
|
34
|
+
* What you're *expecting* to happen compared with what's *actually* happening.
|
35
|
+
* The version of Solidus *and* the version of Rails.
|
36
|
+
* A list of all extensions.
|
37
|
+
* Any relevant stack traces ("Full trace" preferred)
|
38
|
+
* Your `Gemfile`
|
39
|
+
|
40
|
+
In 99% of cases, this information is enough to determine the cause and solution to the problem that is being described.
|
41
|
+
|
42
|
+
---
|
43
|
+
|
44
|
+
## Pull requests
|
45
|
+
|
46
|
+
We gladly accept pull requests to fix bugs and, in some circumstances, add new features to this extension.
|
47
|
+
|
48
|
+
Here's a quick guide:
|
49
|
+
|
50
|
+
1. Fork the repo.
|
51
|
+
|
52
|
+
2. Run the tests. We only take pull requests with passing tests, and it's great to know that you have a clean slate.
|
53
|
+
|
54
|
+
3. Create new branch then make changes and add tests for your changes. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, we need tests!
|
55
|
+
|
56
|
+
4. Push to your fork and submit a pull request. If the changes will apply cleanly to the latest stable branches and master branch, you will only need to submit one pull request.
|
57
|
+
|
58
|
+
At this point you're waiting on us. We may suggest some changes or improvements or alternatives.
|
59
|
+
|
60
|
+
Some things that will increase the chance that your pull request is accepted, taken straight from the Ruby on Rails guide:
|
61
|
+
|
62
|
+
* Use Rails idioms and helpers.
|
63
|
+
* Include tests that fail without your code, and pass with it.
|
64
|
+
* Update the documentation, the surrounding one, examples elsewhere, guides, whatever is affected by your contribution.
|
65
|
+
|
66
|
+
---
|
67
|
+
|
68
|
+
## TL;DR
|
69
|
+
|
70
|
+
* Fork the repo
|
71
|
+
* Clone your repo
|
72
|
+
* Run `bundle install`
|
73
|
+
* Run `bundle exec rake test_app` to create the test application in `spec/dummy`
|
74
|
+
* Make your changes
|
75
|
+
* Ensure specs pass by running `bundle exec rspec spec`
|
76
|
+
* Ensure all syntax ok by running `rubocop .`
|
77
|
+
* Submit your pull request
|
78
|
+
|
79
|
+
And in case we didn't emphasize it enough: **we love tests!**
|
80
|
+
|
81
|
+
[1]: http://www.fsf.org/licensing/essays/free-sw.html
|
82
|
+
[2]: https://github.com/whelton/solidus_product_description_editor/issues
|
83
|
+
[3]: https://github.com/whelton/solidus_product_description_editor/tree/master/config/locales
|
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
guard 'rspec', cmd: 'bundle exec rspec' do
|
2
|
+
watch('spec/spec_helper.rb') { 'spec' }
|
3
|
+
watch('config/routes.rb') { 'spec/controllers' }
|
4
|
+
watch('app/controllers/application_controller.rb') { 'spec/controllers' }
|
5
|
+
watch(%r{^spec/(.+)_spec\.rb$}) { |m| "spec/#{m[1]}_spec.rb"}
|
6
|
+
watch(%r{^app/(.+)_decorator\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
7
|
+
watch(%r{^(app|lib)/(.+)(\.rb|\.erb)$}) { |m| "spec/#{m[2]}_spec.rb" }
|
8
|
+
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb" }
|
9
|
+
end
|
data/LICENSE.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
Copyright (c) 2016 James Whelton and contributors.
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without modification,
|
5
|
+
are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
* Redistributions of source code must retain the above copyright notice,
|
8
|
+
this list of conditions and the following disclaimer.
|
9
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
10
|
+
this list of conditions and the following disclaimer in the documentation
|
11
|
+
and/or other materials provided with the distribution.
|
12
|
+
* Neither the name Spree nor the names of its contributors may be used to
|
13
|
+
endorse or promote products derived from this software without specific
|
14
|
+
prior written permission.
|
15
|
+
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
20
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
21
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
22
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
23
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
24
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
25
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
26
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Solidus Product Description Editor
|
2
|
+
|
3
|
+
Adds a WYSIWYG editor to the product description field in the admin.
|
4
|
+
Presently [CKEditor](http://ckeditor.com/).
|
5
|
+
|
6
|
+
**Note:** The CKEditor files are accessed from a CDN and not bundled into the gem.
|
7
|
+
If you're paranoid about remote javascript, perhaps give it a miss.
|
8
|
+
|
9
|
+

|
10
|
+
|
11
|
+
---
|
12
|
+
|
13
|
+
## Basic Installation
|
14
|
+
|
15
|
+
Add to your `Gemfile`:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
gem 'solidus_product_description_editor'
|
19
|
+
```
|
20
|
+
|
21
|
+
That's it!
|
22
|
+
|
23
|
+
---
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
|
27
|
+
See corresponding [guidelines][1] and check out the [issues][2].
|
28
|
+
|
29
|
+
---
|
30
|
+
|
31
|
+
Copyright (c) 2016 [James Whelton][3] and [contributors][4], released under the [New BSD License][5]
|
32
|
+
|
33
|
+
[1]: https://github.com/whelton/solidus_product_description_editor/blob/master/CONTRIBUTING.md
|
34
|
+
[2]: https://github.com/whelton/solidus_product_description_editor/issues
|
35
|
+
[3]: https://github.com/whelton
|
36
|
+
[4]: https://github.com/whelton/solidus_product_description_editor/graphs/contributors
|
37
|
+
[5]: https://github.com/whelton/solidus_product_description_editor/blob/master/LICENSE.md
|
data/Rakefile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
Bundler::GemHelper.install_tasks
|
3
|
+
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
require 'spree/testing_support/extension_rake'
|
6
|
+
|
7
|
+
RSpec::Core::RakeTask.new
|
8
|
+
|
9
|
+
task :default do
|
10
|
+
if Dir['spec/dummy'].empty?
|
11
|
+
Rake::Task[:test_app].invoke
|
12
|
+
Dir.chdir('../../')
|
13
|
+
end
|
14
|
+
Rake::Task[:spec].invoke
|
15
|
+
end
|
16
|
+
|
17
|
+
desc 'Generates a dummy app for testing'
|
18
|
+
task :test_app do
|
19
|
+
ENV['LIB_NAME'] = 'solidus_product_description_editor'
|
20
|
+
Rake::Task['extension:test_app'].invoke
|
21
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Deface::Override.new(
|
2
|
+
original: 'ae5fbdbfdad589150842ace6b1f18cc2dde46d5b',
|
3
|
+
virtual_path: 'spree/admin/products/_form',
|
4
|
+
name: 'add_description_editor_to_admin_products_form',
|
5
|
+
insert_bottom: '[data-hook="admin_product_form_description"]',
|
6
|
+
partial: 'spree/admin/products/form/description_editor'
|
7
|
+
)
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<!-- Product Description Editor -->
|
2
|
+
<textarea name="product_description_editor" id="product_description_editor" rows="22">
|
3
|
+
<%= @product.description.html_safe %>
|
4
|
+
</textarea><!-- /#product_description_editor -->
|
5
|
+
|
6
|
+
<!-- Styling -->
|
7
|
+
<style>
|
8
|
+
/* Hide Product Description Textarea */
|
9
|
+
textarea#product_description {
|
10
|
+
display: none;
|
11
|
+
}
|
12
|
+
</style>
|
13
|
+
|
14
|
+
<!-- Scripts -->
|
15
|
+
<script src="//cdn.ckeditor.com/4.5.6/full/ckeditor.js"></script>
|
16
|
+
<script>
|
17
|
+
$( document ).ready(function() {
|
18
|
+
// Initialize the editor with configuration
|
19
|
+
var productDescriptionEditor = CKEDITOR.replace('product_description_editor', {
|
20
|
+
toolbar: [
|
21
|
+
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source', '-', 'Preview', '-', 'Maximize'] },
|
22
|
+
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
|
23
|
+
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
|
24
|
+
{ name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar' ] },
|
25
|
+
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
|
26
|
+
'/',
|
27
|
+
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
|
28
|
+
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
|
29
|
+
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] }
|
30
|
+
],
|
31
|
+
toolbar_mini : [
|
32
|
+
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
|
33
|
+
{ name: 'styles', items: [ 'Font', 'FontSize' ] },
|
34
|
+
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
|
35
|
+
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
|
36
|
+
{ name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar' ] }
|
37
|
+
]
|
38
|
+
});
|
39
|
+
|
40
|
+
// On form submit, set the content of the (hidden) description field to the html
|
41
|
+
$('#edit_product_<%= @product.id.to_s %>').on('submit', function(){
|
42
|
+
$('#product_description').val( productDescriptionEditor.getData() );
|
43
|
+
});
|
44
|
+
});
|
45
|
+
</script>
|
data/bin/rails
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
module SolidusProductDescriptionEditor
|
2
|
+
class Engine < Rails::Engine
|
3
|
+
engine_name 'solidus_product_description_editor'
|
4
|
+
|
5
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
6
|
+
|
7
|
+
def self.activate
|
8
|
+
Dir.glob(File.join(File.dirname(__FILE__), "../../app/**/*_decorator*.rb")) do |c|
|
9
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
config.to_prepare(&method(:activate).to_proc)
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module SolidusProductDescriptionEditor
|
2
|
+
module_function
|
3
|
+
|
4
|
+
# Returns the version of the currently loaded SolidusProductDescriptionEditor as a
|
5
|
+
# <tt>Gem::Version</tt>.
|
6
|
+
def version
|
7
|
+
Gem::Version.new VERSION::STRING
|
8
|
+
end
|
9
|
+
|
10
|
+
module VERSION
|
11
|
+
MAJOR = 1
|
12
|
+
MINOR = 0
|
13
|
+
TINY = 1
|
14
|
+
|
15
|
+
STRING = [MAJOR, MINOR, TINY].compact.join('.')
|
16
|
+
end
|
17
|
+
end
|
data/screenshot.png
ADDED
Binary file
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib/', __FILE__)
|
3
|
+
$LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
require 'solidus_product_description_editor/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.name = 'solidus_product_description_editor'
|
10
|
+
s.version = SolidusProductDescriptionEditor.version
|
11
|
+
s.summary = 'Adds a WYSIWYG editor to the product description field in admin'
|
12
|
+
s.description = s.summary
|
13
|
+
s.required_ruby_version = '>= 2.0.0'
|
14
|
+
|
15
|
+
s.author = 'James Whelton'
|
16
|
+
s.email = 'james@whelton.io'
|
17
|
+
s.homepage = 'https://github.com/whelton/solidus_product_description_editor'
|
18
|
+
s.license = 'BSD-3'
|
19
|
+
|
20
|
+
s.files = `git ls-files`.split("\n")
|
21
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
22
|
+
s.require_path = 'lib'
|
23
|
+
s.requirements << 'none'
|
24
|
+
|
25
|
+
s.add_dependency 'solidus_core', '~> 1.1'
|
26
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
# Run Coverage report
|
2
|
+
require 'simplecov'
|
3
|
+
SimpleCov.start do
|
4
|
+
add_filter 'spec/dummy'
|
5
|
+
add_group 'Controllers', 'app/controllers'
|
6
|
+
add_group 'Helpers', 'app/helpers'
|
7
|
+
add_group 'Mailers', 'app/mailers'
|
8
|
+
add_group 'Models', 'app/models'
|
9
|
+
add_group 'Views', 'app/views'
|
10
|
+
add_group 'Libraries', 'lib'
|
11
|
+
end
|
12
|
+
|
13
|
+
# Configure Rails Environment
|
14
|
+
ENV['RAILS_ENV'] = 'test'
|
15
|
+
|
16
|
+
require File.expand_path('../dummy/config/environment.rb', __FILE__)
|
17
|
+
|
18
|
+
require 'rspec/rails'
|
19
|
+
require 'database_cleaner'
|
20
|
+
require 'ffaker'
|
21
|
+
|
22
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
23
|
+
# in spec/support/ and its subdirectories.
|
24
|
+
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
|
25
|
+
|
26
|
+
# Requires factories and other useful helpers defined in spree_core.
|
27
|
+
require 'spree/testing_support/authorization_helpers'
|
28
|
+
require 'spree/testing_support/capybara_ext'
|
29
|
+
require 'spree/testing_support/controller_requests'
|
30
|
+
require 'spree/testing_support/factories'
|
31
|
+
require 'spree/testing_support/url_helpers'
|
32
|
+
|
33
|
+
# Requires factories defined in lib/solidus_product_description_editor/factories.rb
|
34
|
+
require 'solidus_product_description_editor/factories'
|
35
|
+
|
36
|
+
RSpec.configure do |config|
|
37
|
+
config.include FactoryGirl::Syntax::Methods
|
38
|
+
|
39
|
+
# Infer an example group's spec type from the file location.
|
40
|
+
config.infer_spec_type_from_file_location!
|
41
|
+
|
42
|
+
# == URL Helpers
|
43
|
+
#
|
44
|
+
# Allows access to Spree's routes in specs:
|
45
|
+
#
|
46
|
+
# visit spree.admin_path
|
47
|
+
# current_path.should eql(spree.products_path)
|
48
|
+
config.include Spree::TestingSupport::UrlHelpers
|
49
|
+
|
50
|
+
# == Requests support
|
51
|
+
#
|
52
|
+
# Adds convenient methods to request Spree's controllers
|
53
|
+
# spree_get :index
|
54
|
+
config.include Spree::TestingSupport::ControllerRequests, type: :controller
|
55
|
+
|
56
|
+
# == Mock Framework
|
57
|
+
#
|
58
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
59
|
+
#
|
60
|
+
# config.mock_with :mocha
|
61
|
+
# config.mock_with :flexmock
|
62
|
+
# config.mock_with :rr
|
63
|
+
config.mock_with :rspec
|
64
|
+
config.color = true
|
65
|
+
|
66
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
67
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
68
|
+
|
69
|
+
# Capybara javascript drivers require transactional fixtures set to false, and we use DatabaseCleaner
|
70
|
+
# to cleanup after each test instead. Without transactional fixtures set to false the records created
|
71
|
+
# to setup a test will be unavailable to the browser, which runs under a separate server instance.
|
72
|
+
config.use_transactional_fixtures = false
|
73
|
+
|
74
|
+
# Ensure Suite is set to use transactions for speed.
|
75
|
+
config.before :suite do
|
76
|
+
DatabaseCleaner.strategy = :transaction
|
77
|
+
DatabaseCleaner.clean_with :truncation
|
78
|
+
end
|
79
|
+
|
80
|
+
# Before each spec check if it is a Javascript test and switch between using database transactions or not where necessary.
|
81
|
+
config.before :each do
|
82
|
+
DatabaseCleaner.strategy = RSpec.current_example.metadata[:js] ? :truncation : :transaction
|
83
|
+
DatabaseCleaner.start
|
84
|
+
end
|
85
|
+
|
86
|
+
# After each spec clean the database.
|
87
|
+
config.after :each do
|
88
|
+
DatabaseCleaner.clean
|
89
|
+
end
|
90
|
+
|
91
|
+
config.fail_fast = ENV['FAIL_FAST'] || false
|
92
|
+
config.order = 'random'
|
93
|
+
end
|
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: solidus_product_description_editor
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- James Whelton
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-01-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: solidus_core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.1'
|
27
|
+
description: Adds a WYSIWYG editor to the product description field in admin
|
28
|
+
email: james@whelton.io
|
29
|
+
executables: []
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- ".gitignore"
|
34
|
+
- ".hound.yml"
|
35
|
+
- ".rspec"
|
36
|
+
- ".rubocop.yml"
|
37
|
+
- ".travis.yml"
|
38
|
+
- CHANGELOG.md
|
39
|
+
- CONTRIBUTING.md
|
40
|
+
- Gemfile
|
41
|
+
- Guardfile
|
42
|
+
- LICENSE.md
|
43
|
+
- README.md
|
44
|
+
- Rakefile
|
45
|
+
- app/overrides/add_description_editor_to_admin_products_form.rb
|
46
|
+
- app/views/spree/admin/products/form/_description_editor.html.erb
|
47
|
+
- bin/rails
|
48
|
+
- lib/solidus_product_description_editor.rb
|
49
|
+
- lib/solidus_product_description_editor/engine.rb
|
50
|
+
- lib/solidus_product_description_editor/version.rb
|
51
|
+
- screenshot.png
|
52
|
+
- solidus_product_description_editor.gemspec
|
53
|
+
- spec/spec_helper.rb
|
54
|
+
homepage: https://github.com/whelton/solidus_product_description_editor
|
55
|
+
licenses:
|
56
|
+
- BSD-3
|
57
|
+
metadata: {}
|
58
|
+
post_install_message:
|
59
|
+
rdoc_options: []
|
60
|
+
require_paths:
|
61
|
+
- lib
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 2.0.0
|
67
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
72
|
+
requirements:
|
73
|
+
- none
|
74
|
+
rubyforge_project:
|
75
|
+
rubygems_version: 2.4.5
|
76
|
+
signing_key:
|
77
|
+
specification_version: 4
|
78
|
+
summary: Adds a WYSIWYG editor to the product description field in admin
|
79
|
+
test_files:
|
80
|
+
- spec/spec_helper.rb
|