spree-faq 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -2
- data/.hound.yml +0 -22
- data/.rspec +1 -3
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +2 -2
- data/README.md +3 -10
- data/app/assets/javascripts/{admin → spree/backend}/spree_faq.js.coffee +1 -1
- data/app/assets/javascripts/{store → spree/frontend}/spree_faq.js.coffee +1 -1
- data/app/assets/stylesheets/spree/backend/spree_faq.css +3 -0
- data/app/assets/stylesheets/{store → spree/frontend}/spree_faq.css.scss +1 -1
- data/app/controllers/spree/admin/question_categories_controller.rb +2 -10
- data/app/models/spree/question.rb +4 -6
- data/app/models/spree/question_category.rb +6 -8
- data/app/overrides/add_faq_admin_tab.rb +4 -4
- data/db/migrate/20140331032743_rename_questions_to_spree_questions.rb +1 -1
- data/db/migrate/20140331032751_rename_question_categories_to_spree_question_categories.rb +1 -1
- data/lib/generators/spree_faq/install/install_generator.rb +4 -4
- data/lib/spree_faq.rb +0 -1
- data/lib/spree_faq/engine.rb +9 -8
- data/lib/spree_faq/version.rb +3 -3
- data/spec/controllers/admin/question_categories_controller_spec.rb +10 -12
- data/spec/controllers/faqs_controller_spec.rb +5 -3
- data/spec/features/admin/faq_spec.rb +5 -5
- data/spec/features/faq_spec.rb +5 -5
- data/spec/models/question_category_spec.rb +11 -7
- data/spec/models/question_spec.rb +19 -18
- data/spec/spec_helper.rb +2 -6
- data/spec/support/capybara.rb +5 -1
- data/spec/support/database_cleaner.rb +2 -2
- data/spec/support/factory_girl.rb +1 -1
- data/spec/support/i18n.rb +4 -4
- data/spec/support/spree.rb +1 -1
- data/spec/translations/locale_spec.rb +10 -8
- data/spree_faq.gemspec +12 -11
- metadata +32 -20
- data/.reek +0 -19
- data/.rubocop.yml +0 -7
- data/app/assets/stylesheets/admin/spree_faq.css +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21f4befa05b8ad74321c8a4f948187e967f9dff9
|
4
|
+
data.tar.gz: 433f672aa602dbfd1448dc53bdd74b42420dd6e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75b2f0b9c311faa1bb40b8c1b9edd00ded342a6830e9b9f1ef0fe62177c27abdaae0a652ee19004f1019e50dca7dfb161ba65461674318fe031a8a6a1325e4ba
|
7
|
+
data.tar.gz: 0d2e6c5ee3ae07e9239ed1be045845dc4086fefd53e7b4b6d0083b6a70f90709f55805716826579dbfe75654b6778d41411cbb174f91b0587c85e05530afc188
|
data/.gitignore
CHANGED
data/.hound.yml
CHANGED
@@ -1,25 +1,3 @@
|
|
1
1
|
---
|
2
|
-
# Too picky.
|
3
2
|
LineLength:
|
4
3
|
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
|
-
# Rubocop default is leading but hound-ci use trailing.
|
15
|
-
DotPosition:
|
16
|
-
EnforcedStyle: leading
|
17
|
-
|
18
|
-
# Don't mess with RSpec DSL.
|
19
|
-
Blocks:
|
20
|
-
Exclude:
|
21
|
-
- 'spec/**/*'
|
22
|
-
|
23
|
-
# We really like the readability with newline in beginning of classes.
|
24
|
-
EmptyLinesAroundBody:
|
25
|
-
Enabled: false
|
data/.rspec
CHANGED
data/CONTRIBUTING.md
CHANGED
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
gem 'spree', github: 'spree/spree', branch: '2-
|
4
|
-
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-
|
3
|
+
gem 'spree', github: 'spree/spree', branch: '2-2-stable'
|
4
|
+
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-2-stable'
|
5
5
|
|
6
6
|
gemspec
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Spree Frequently Asked Question
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/futhr/spree-faq.png?branch=2-
|
4
|
-
[![Coverage Status](https://coveralls.io/repos/futhr/spree-faq/badge.png?branch=2-
|
3
|
+
[![Build Status](https://travis-ci.org/futhr/spree-faq.png?branch=2-2-stable)](https://travis-ci.org/futhr/spree-faq)
|
4
|
+
[![Coverage Status](https://coveralls.io/repos/futhr/spree-faq/badge.png?branch=2-2-stable)](https://coveralls.io/r/futhr/spree-faq)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/futhr/spree-faq.png)](https://codeclimate.com/github/futhr/spree-faq)
|
6
6
|
[![Gem Version](https://badge.fury.io/rb/spree-faq.png)](http://badge.fury.io/rb/spree-faq)
|
7
7
|
|
@@ -12,16 +12,9 @@ An Spree Commerce extension for managing FAQs.
|
|
12
12
|
Add to your `Gemfile`:
|
13
13
|
|
14
14
|
```ruby
|
15
|
-
gem '
|
15
|
+
gem 'spree_faq', '~> 2.2.0'
|
16
16
|
```
|
17
17
|
|
18
|
-
or:
|
19
|
-
|
20
|
-
```ruby
|
21
|
-
gem 'spree-faq', github: 'futhr/spree-faq', require: 'spree_faq', branch: '2-1-stable'
|
22
|
-
```
|
23
|
-
|
24
|
-
|
25
18
|
Then run from the command line:
|
26
19
|
|
27
20
|
bundle install
|
@@ -9,17 +9,9 @@ module Spree
|
|
9
9
|
@question_category ||= @object
|
10
10
|
end
|
11
11
|
|
12
|
-
def safe_params
|
13
|
-
[
|
14
|
-
:questions_attributes,
|
15
|
-
:question,
|
16
|
-
:answer,
|
17
|
-
question: [:question_category_id, :question, :answer]
|
18
|
-
]
|
19
|
-
end
|
20
|
-
|
21
12
|
def question_category_params
|
22
|
-
params.require(:question_category).permit(
|
13
|
+
params.require(:question_category).permit(:questions_attributes, :question, :answer,
|
14
|
+
question: [:question_category_id, :question, :answer])
|
23
15
|
end
|
24
16
|
end
|
25
17
|
end
|
@@ -1,8 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
acts_as_list
|
1
|
+
class Spree::Question < ActiveRecord::Base
|
2
|
+
acts_as_list
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
end
|
4
|
+
belongs_to :question_category, class_name: 'Spree::QuestionCategory'
|
5
|
+
validates :question_category_id, :question, :answer, presence: true
|
8
6
|
end
|
@@ -1,10 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
acts_as_list
|
1
|
+
class Spree::QuestionCategory < ActiveRecord::Base
|
2
|
+
acts_as_list
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
end
|
4
|
+
has_many :questions, class_name: 'Spree::Question'
|
5
|
+
validates :name, presence: true
|
6
|
+
validates :name, uniqueness: { case_sensitive: false }
|
7
|
+
accepts_nested_attributes_for :questions, allow_destroy: true
|
10
8
|
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
Deface::Override.new(virtual_path:
|
2
|
-
name:
|
3
|
-
insert_bottom:
|
4
|
-
text:
|
1
|
+
Deface::Override.new(virtual_path: "spree/admin/shared/_configuration_menu",
|
2
|
+
name: "add_faq_configuration_line",
|
3
|
+
insert_bottom: "[data-hook='admin_configurations_sidebar_menu']",
|
4
|
+
text: "<%= configurations_sidebar_menu_item Spree.t(:question_categories_admin, scope: :spree_faq), admin_question_categories_url %>",
|
5
5
|
disabled: false)
|
@@ -4,13 +4,13 @@ module SpreeFaq
|
|
4
4
|
class_option :auto_run_migrations, type: :boolean, default: false
|
5
5
|
|
6
6
|
def add_javascripts
|
7
|
-
append_file '
|
8
|
-
append_file '
|
7
|
+
append_file 'vendor/assets/javascripts/spree/frontend/all.js', "//= require spree/frontend/spree_faq\n"
|
8
|
+
append_file 'vendor/assets/javascripts/spree/backend/all.js', "//= require spree/backend/spree_faq\n"
|
9
9
|
end
|
10
10
|
|
11
11
|
def add_stylesheets
|
12
|
-
inject_into_file '
|
13
|
-
inject_into_file '
|
12
|
+
inject_into_file 'vendor/assets/stylesheets/spree/frontend/all.css', " *= require spree/frontend/spree_faq\n", before: /\*\//, verbose: true
|
13
|
+
inject_into_file 'vendor/assets/stylesheets/spree/backend/all.css', " *= require spree/backend/spree_faq\n", before: /\*\//, verbose: true
|
14
14
|
end
|
15
15
|
|
16
16
|
def add_migrations
|
data/lib/spree_faq.rb
CHANGED
data/lib/spree_faq/engine.rb
CHANGED
@@ -6,15 +6,16 @@ module SpreeFaq
|
|
6
6
|
|
7
7
|
config.autoload_paths += %W(#{config.root}/lib)
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
def self.activate
|
10
|
+
Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')) do |c|
|
11
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
12
|
+
end
|
13
|
+
|
14
|
+
Dir.glob(File.join(File.dirname(__FILE__), '../../app/overrides/*.rb')) do |c|
|
15
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
18
|
-
config.to_prepare
|
19
|
+
config.to_prepare &method(:activate).to_proc
|
19
20
|
end
|
20
|
-
end
|
21
|
+
end
|
data/lib/spree_faq/version.rb
CHANGED
@@ -1,16 +1,18 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Spree::Admin::QuestionCategoriesController do
|
2
4
|
stub_authorization!
|
3
5
|
|
4
6
|
let!(:user) { create(:user) }
|
5
7
|
let!(:question_category) { create(:question_category) }
|
6
8
|
let!(:question) { create(:question, question_category: question_category) }
|
7
|
-
let(:attributes) { attributes_for(:question_category) }
|
9
|
+
let (:attributes) { attributes_for(:question_category) }
|
8
10
|
|
9
|
-
before {
|
11
|
+
before { controller.stub spree_current_user: user }
|
10
12
|
|
11
13
|
context 'controller instance' do
|
12
|
-
it '
|
13
|
-
expect(controller).to
|
14
|
+
it 'use Admin::QuestionCategoriesController' do
|
15
|
+
expect(controller).to be_an_instance_of Spree::Admin::QuestionCategoriesController
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
@@ -65,17 +67,13 @@ RSpec.describe Spree::Admin::QuestionCategoriesController, type: :controller do
|
|
65
67
|
|
66
68
|
context 'permitted attributes' do
|
67
69
|
let(:permitted_attributes) do
|
68
|
-
[
|
69
|
-
:
|
70
|
-
:question,
|
71
|
-
:answer,
|
72
|
-
question: [:question_category_id, :question, :answer]
|
73
|
-
]
|
70
|
+
[:questions_attributes, :question, :answer,
|
71
|
+
question: [:question_category_id, :question, :answer]]
|
74
72
|
end
|
75
73
|
|
76
74
|
specify do
|
77
75
|
controller.params = { question_category: attributes }
|
78
|
-
|
76
|
+
controller.params.require(:question_category).should_receive(:permit).with(*permitted_attributes)
|
79
77
|
controller.send :question_category_params
|
80
78
|
end
|
81
79
|
end
|
@@ -1,9 +1,11 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Spree::FaqsController do
|
2
4
|
|
3
5
|
let!(:question_category) { create(:question_category) }
|
4
6
|
let!(:question) { create(:question, question_category: question_category) }
|
5
7
|
|
6
|
-
before {
|
8
|
+
before { controller.stub spree_current_user: nil }
|
7
9
|
|
8
10
|
context '#index' do
|
9
11
|
specify do
|
@@ -20,7 +22,7 @@ RSpec.describe Spree::FaqsController, type: :controller do
|
|
20
22
|
end
|
21
23
|
|
22
24
|
context '#default_title' do
|
23
|
-
it '
|
25
|
+
it 'return default title' do
|
24
26
|
expect(subject.default_title).to eq Spree.t(:frequently_asked_questions, scope: :spree_faq)
|
25
27
|
end
|
26
28
|
end
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
feature 'Admin FAQ', :js do
|
2
4
|
stub_authorization!
|
3
5
|
|
4
6
|
given!(:admin_user) { create(:admin_user) }
|
@@ -37,12 +39,10 @@ RSpec.feature 'Admin FAQ', :js do
|
|
37
39
|
|
38
40
|
given!(:question_category) { create(:question_category, name: 'Shopping') }
|
39
41
|
given!(:question) do
|
40
|
-
create(
|
41
|
-
:question,
|
42
|
+
create(:question,
|
42
43
|
question_category: question_category,
|
43
44
|
question: 'Do you sell stuff?',
|
44
|
-
answer: 'Think so..'
|
45
|
-
)
|
45
|
+
answer: 'Think so..')
|
46
46
|
end
|
47
47
|
|
48
48
|
background do
|
data/spec/features/faq_spec.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
feature 'FAQ', :js do
|
2
4
|
|
3
5
|
given!(:user) { create(:user) }
|
4
6
|
given!(:question_category) { create(:question_category, name: 'Shopping') }
|
5
7
|
given!(:question) do
|
6
|
-
create(
|
7
|
-
:question,
|
8
|
+
create(:question,
|
8
9
|
question_category: question_category,
|
9
10
|
question: 'Do you sell stuff?',
|
10
|
-
answer: 'Think so..'
|
11
|
-
)
|
11
|
+
answer: 'Think so..')
|
12
12
|
end
|
13
13
|
|
14
14
|
background do
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Spree::QuestionCategory do
|
2
4
|
|
3
5
|
context 'instance attributes' do
|
4
6
|
it 'create a new instance given valid attributes' do
|
@@ -6,12 +8,14 @@ RSpec.describe Spree::QuestionCategory, type: :model do
|
|
6
8
|
end
|
7
9
|
end
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
+
context 'factory' do
|
12
|
+
it 'is valid' do
|
13
|
+
expect(build(:question_category)).to be_valid
|
14
|
+
end
|
11
15
|
end
|
12
16
|
|
13
17
|
context 'relation' do
|
14
|
-
it {
|
18
|
+
it { should have_many(:questions) }
|
15
19
|
|
16
20
|
it 'have questions' do
|
17
21
|
expect(subject.questions).not_to be_nil
|
@@ -19,9 +23,9 @@ RSpec.describe Spree::QuestionCategory, type: :model do
|
|
19
23
|
end
|
20
24
|
|
21
25
|
context 'validation' do
|
22
|
-
it {
|
23
|
-
it {
|
24
|
-
it {
|
26
|
+
it { should validate_presence_of(:name) }
|
27
|
+
it { should validate_uniqueness_of(:name) }
|
28
|
+
it { should accept_nested_attributes_for(:questions) }
|
25
29
|
end
|
26
30
|
|
27
31
|
context 'acts as list' do
|
@@ -1,16 +1,20 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Spree::Question do
|
2
4
|
|
3
5
|
let!(:question_category) { create(:question_category) }
|
4
6
|
let(:question) { create(:question, question_category_id: question_category.id) }
|
5
7
|
|
6
8
|
subject { question }
|
7
9
|
|
8
|
-
|
9
|
-
|
10
|
+
context 'factory' do
|
11
|
+
it 'is valid' do
|
12
|
+
expect(build(:question)).to be_valid
|
13
|
+
end
|
10
14
|
end
|
11
15
|
|
12
16
|
context 'instance attributes' do
|
13
|
-
it '
|
17
|
+
it 'create a new instance given valid attributes' do
|
14
18
|
described_class.create!(question: 'Question 1',
|
15
19
|
answer: 'Answer 1',
|
16
20
|
question_category: create(:question_category))
|
@@ -18,34 +22,31 @@ RSpec.describe Spree::Question, type: :model do
|
|
18
22
|
end
|
19
23
|
|
20
24
|
context 'relation' do
|
21
|
-
it {
|
25
|
+
it { should belong_to(:question_category) }
|
22
26
|
|
23
|
-
it '
|
27
|
+
it 'belong to a category' do
|
24
28
|
expect(subject.question_category).not_to be_nil
|
25
29
|
end
|
26
30
|
end
|
27
31
|
|
28
32
|
context 'validation' do
|
29
|
-
it {
|
30
|
-
it {
|
31
|
-
it {
|
33
|
+
it { should validate_presence_of(:question_category_id) }
|
34
|
+
it { should validate_presence_of(:question) }
|
35
|
+
it { should validate_presence_of(:answer) }
|
32
36
|
|
33
|
-
it '
|
37
|
+
it 'require a category' do
|
34
38
|
invalid_question = build(:question, question_category: nil)
|
35
|
-
expect(invalid_question
|
36
|
-
expect(invalid_question.errors[:question_category_id].size).to be(1)
|
39
|
+
expect(invalid_question).to have(1).error_on(:question_category_id)
|
37
40
|
end
|
38
41
|
|
39
|
-
it '
|
42
|
+
it 'require a question' do
|
40
43
|
invalid_question = build(:question, question: nil)
|
41
|
-
expect(invalid_question
|
42
|
-
expect(invalid_question.errors[:question].size).to be(1)
|
44
|
+
expect(invalid_question).to have(1).error_on(:question)
|
43
45
|
end
|
44
46
|
|
45
|
-
it '
|
47
|
+
it 'require a answer' do
|
46
48
|
invalid_question = build(:question, answer: nil)
|
47
|
-
expect(invalid_question
|
48
|
-
expect(invalid_question.errors[:answer].size).to be(1)
|
49
|
+
expect(invalid_question).to have(1).error_on(:answer)
|
49
50
|
end
|
50
51
|
end
|
51
52
|
|
data/spec/spec_helper.rb
CHANGED
@@ -22,13 +22,9 @@ require 'shoulda-matchers'
|
|
22
22
|
require 'ffaker'
|
23
23
|
|
24
24
|
RSpec.configure do |config|
|
25
|
-
config.mock_with :rspec
|
26
|
-
mock.syntax = [:should, :expect]
|
27
|
-
end
|
28
|
-
|
25
|
+
config.mock_with :rspec
|
29
26
|
config.use_transactional_fixtures = false
|
30
|
-
config.
|
31
|
-
config.raise_errors_for_deprecations!
|
27
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
32
28
|
end
|
33
29
|
|
34
30
|
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
|
data/spec/support/capybara.rb
CHANGED
@@ -2,7 +2,11 @@ require 'capybara/rspec'
|
|
2
2
|
require 'capybara/rails'
|
3
3
|
require 'capybara/poltergeist'
|
4
4
|
|
5
|
+
module CapybaraHelpers; end
|
6
|
+
|
5
7
|
RSpec.configure do |config|
|
8
|
+
config.include CapybaraHelpers, type: :feature
|
9
|
+
|
6
10
|
Capybara.javascript_driver = :poltergeist
|
7
11
|
|
8
12
|
config.before(:each, :js) do
|
@@ -10,4 +14,4 @@ RSpec.configure do |config|
|
|
10
14
|
page.driver.browser.manage.window.maximize
|
11
15
|
end
|
12
16
|
end
|
13
|
-
end
|
17
|
+
end
|
@@ -8,11 +8,11 @@ RSpec.configure do |config|
|
|
8
8
|
end
|
9
9
|
|
10
10
|
config.before do
|
11
|
-
DatabaseCleaner.strategy =
|
11
|
+
DatabaseCleaner.strategy = example.metadata[:js] ? :truncation : :transaction
|
12
12
|
DatabaseCleaner.start
|
13
13
|
end
|
14
14
|
|
15
15
|
config.after do
|
16
16
|
DatabaseCleaner.clean
|
17
17
|
end
|
18
|
-
end
|
18
|
+
end
|
data/spec/support/i18n.rb
CHANGED
@@ -4,10 +4,10 @@ require 'i18n-spec'
|
|
4
4
|
RSpec.configure do |config|
|
5
5
|
|
6
6
|
config.after(type: :feature) do
|
7
|
-
|
8
|
-
if
|
9
|
-
puts "\e[1m\e[35mFound missing translations: #{
|
7
|
+
missing_translations = page.body.scan(/translation missing: #{I18n.locale}\.(.*?)[\s<\"&]/)
|
8
|
+
if missing_translations.any?
|
9
|
+
puts "\e[1m\e[35mFound missing translations: #{missing_translations.inspect}\e[0m"
|
10
10
|
puts "\e[1m\e[35mIn spec: #{example.location}\e[0m"
|
11
11
|
end
|
12
12
|
end
|
13
|
-
end
|
13
|
+
end
|
data/spec/support/spree.rb
CHANGED
@@ -1,13 +1,15 @@
|
|
1
|
-
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'locale' do
|
2
4
|
Dir.glob('config/locales/*.yml') do |locale_file|
|
3
5
|
context locale_file do
|
4
|
-
it {
|
5
|
-
it {
|
6
|
-
it {
|
7
|
-
it {
|
8
|
-
it {
|
9
|
-
it {
|
10
|
-
it {
|
6
|
+
it { should be_parseable }
|
7
|
+
it { should have_valid_pluralization_keys }
|
8
|
+
it { should_not have_missing_pluralization_keys }
|
9
|
+
it { should have_one_top_level_namespace }
|
10
|
+
it { should_not have_legacy_interpolations }
|
11
|
+
it { should have_a_valid_locale }
|
12
|
+
it { should be_a_complete_translation_of 'config/locales/en.yml' }
|
11
13
|
end
|
12
14
|
end
|
13
15
|
end
|
data/spree_faq.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
lib = File.expand_path('../lib/', __FILE__)
|
2
|
-
|
2
|
+
$:.unshift lib unless $:.include?(lib)
|
3
3
|
|
4
4
|
require 'spree_faq/version'
|
5
5
|
|
@@ -7,14 +7,14 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.name = 'spree-faq'
|
9
9
|
s.version = SpreeFaq.version
|
10
|
-
s.summary =
|
11
|
-
s.description =
|
10
|
+
s.summary = %q{Adds an easy FAQ page for Spree Commerce}
|
11
|
+
s.description = %q{With this gem you get an faq page and the management tools to make it very easy to update your faq and reduce the demand on your sites customer service}
|
12
12
|
s.required_ruby_version = '>= 1.9.3'
|
13
13
|
|
14
14
|
s.authors = ['Josh Nussbaum', 'Tobias Bohwalli']
|
15
15
|
s.email = 'hi@futhr.io'
|
16
16
|
s.homepage = 'https://github.com/futhr/spree-faq'
|
17
|
-
s.license =
|
17
|
+
s.license = %q{BSD-3}
|
18
18
|
|
19
19
|
s.files = `git ls-files`.split("\n")
|
20
20
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
@@ -23,18 +23,18 @@ Gem::Specification.new do |s|
|
|
23
23
|
|
24
24
|
s.has_rdoc = false
|
25
25
|
|
26
|
-
s.add_runtime_dependency 'spree_core', '~> 2.
|
26
|
+
s.add_runtime_dependency 'spree_core', '~> 2.2.0'
|
27
27
|
|
28
|
-
s.add_development_dependency 'rspec-rails', '~>
|
29
|
-
s.add_development_dependency 'capybara', '~> 2.
|
28
|
+
s.add_development_dependency 'rspec-rails', '~> 2.14'
|
29
|
+
s.add_development_dependency 'capybara', '~> 2.2.1'
|
30
30
|
s.add_development_dependency 'selenium-webdriver', '>= 2.40.0'
|
31
31
|
s.add_development_dependency 'poltergeist', '~> 1.5.0'
|
32
32
|
s.add_development_dependency 'factory_girl', '~> 4.4'
|
33
|
-
s.add_development_dependency 'shoulda-matchers', '~> 2.
|
33
|
+
s.add_development_dependency 'shoulda-matchers', '~> 2.5'
|
34
34
|
s.add_development_dependency 'sqlite3', '~> 1.3.8'
|
35
|
-
s.add_development_dependency 'simplecov', '~> 0.
|
35
|
+
s.add_development_dependency 'simplecov', '~> 0.7.1'
|
36
36
|
s.add_development_dependency 'database_cleaner', '~> 1.2.0'
|
37
|
-
s.add_development_dependency 'i18n-spec', '~> 0.
|
37
|
+
s.add_development_dependency 'i18n-spec', '~> 0.4.1'
|
38
38
|
s.add_development_dependency 'coffee-rails', '~> 4.0.0'
|
39
39
|
s.add_development_dependency 'sass-rails', '~> 4.0.0'
|
40
40
|
s.add_development_dependency 'ffaker', '>= 1.24.0'
|
@@ -42,4 +42,5 @@ Gem::Specification.new do |s|
|
|
42
42
|
s.add_development_dependency 'launchy', '>= 2.4.0'
|
43
43
|
s.add_development_dependency 'pry-rails', '>= 0.3.0'
|
44
44
|
s.add_development_dependency 'coveralls', '>= 0.7.0'
|
45
|
-
|
45
|
+
s.add_development_dependency 'localeapp', '>= 0.7.2'
|
46
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree-faq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Nussbaum
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-04-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: spree_core
|
@@ -17,42 +17,42 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 2.
|
20
|
+
version: 2.2.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 2.
|
27
|
+
version: 2.2.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rspec-rails
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
34
|
+
version: '2.14'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
41
|
+
version: '2.14'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: capybara
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 2.
|
48
|
+
version: 2.2.1
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 2.
|
55
|
+
version: 2.2.1
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: selenium-webdriver
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,14 +101,14 @@ dependencies:
|
|
101
101
|
requirements:
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '2.
|
104
|
+
version: '2.5'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: '2.
|
111
|
+
version: '2.5'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: sqlite3
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,14 +129,14 @@ dependencies:
|
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: 0.
|
132
|
+
version: 0.7.1
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: 0.
|
139
|
+
version: 0.7.1
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: database_cleaner
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,14 +157,14 @@ dependencies:
|
|
157
157
|
requirements:
|
158
158
|
- - "~>"
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version: 0.
|
160
|
+
version: 0.4.1
|
161
161
|
type: :development
|
162
162
|
prerelease: false
|
163
163
|
version_requirements: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
165
|
- - "~>"
|
166
166
|
- !ruby/object:Gem::Version
|
167
|
-
version: 0.
|
167
|
+
version: 0.4.1
|
168
168
|
- !ruby/object:Gem::Dependency
|
169
169
|
name: coffee-rails
|
170
170
|
requirement: !ruby/object:Gem::Requirement
|
@@ -263,6 +263,20 @@ dependencies:
|
|
263
263
|
- - ">="
|
264
264
|
- !ruby/object:Gem::Version
|
265
265
|
version: 0.7.0
|
266
|
+
- !ruby/object:Gem::Dependency
|
267
|
+
name: localeapp
|
268
|
+
requirement: !ruby/object:Gem::Requirement
|
269
|
+
requirements:
|
270
|
+
- - ">="
|
271
|
+
- !ruby/object:Gem::Version
|
272
|
+
version: 0.7.2
|
273
|
+
type: :development
|
274
|
+
prerelease: false
|
275
|
+
version_requirements: !ruby/object:Gem::Requirement
|
276
|
+
requirements:
|
277
|
+
- - ">="
|
278
|
+
- !ruby/object:Gem::Version
|
279
|
+
version: 0.7.2
|
266
280
|
description: With this gem you get an faq page and the management tools to make it
|
267
281
|
very easy to update your faq and reduce the demand on your sites customer service
|
268
282
|
email: hi@futhr.io
|
@@ -272,9 +286,7 @@ extra_rdoc_files: []
|
|
272
286
|
files:
|
273
287
|
- ".gitignore"
|
274
288
|
- ".hound.yml"
|
275
|
-
- ".reek"
|
276
289
|
- ".rspec"
|
277
|
-
- ".rubocop.yml"
|
278
290
|
- ".travis.yml"
|
279
291
|
- CONTRIBUTING.md
|
280
292
|
- Gemfile
|
@@ -282,10 +294,10 @@ files:
|
|
282
294
|
- LICENSE.md
|
283
295
|
- README.md
|
284
296
|
- Rakefile
|
285
|
-
- app/assets/javascripts/
|
286
|
-
- app/assets/javascripts/
|
287
|
-
- app/assets/stylesheets/
|
288
|
-
- app/assets/stylesheets/
|
297
|
+
- app/assets/javascripts/spree/backend/spree_faq.js.coffee
|
298
|
+
- app/assets/javascripts/spree/frontend/spree_faq.js.coffee
|
299
|
+
- app/assets/stylesheets/spree/backend/spree_faq.css
|
300
|
+
- app/assets/stylesheets/spree/frontend/spree_faq.css.scss
|
289
301
|
- app/controllers/spree/admin/question_categories_controller.rb
|
290
302
|
- app/controllers/spree/faqs_controller.rb
|
291
303
|
- app/models/spree/question.rb
|
data/.reek
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
---
|
2
|
-
UncommunicativeVariableName:
|
3
|
-
accept:
|
4
|
-
- t
|
5
|
-
- c
|
6
|
-
NestedIterators:
|
7
|
-
max_allowed_nesting: 2
|
8
|
-
DuplicateMethodCall:
|
9
|
-
enabled: false
|
10
|
-
IrresponsibleModule:
|
11
|
-
enabled: false
|
12
|
-
FeatureEnvy:
|
13
|
-
enabled: false
|
14
|
-
TooManyMethods:
|
15
|
-
enabled: false
|
16
|
-
TooManyStatements:
|
17
|
-
enabled: false
|
18
|
-
UtilityFunction:
|
19
|
-
enabled: false
|
data/.rubocop.yml
DELETED