spree_essentials 0.3.3 → 0.4.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -11
- data/app/controllers/{admin → spree/admin}/markdown_controller.rb +1 -1
- data/app/controllers/{admin → spree/admin}/uploads_controller.rb +3 -3
- data/app/helpers/{admin → spree/admin}/spree_essentials_helper.rb +2 -2
- data/app/models/spree/asset_decorator.rb +7 -0
- data/app/models/{upload.rb → spree/upload.rb} +1 -1
- data/app/overrides/spree_essentials.rb +2 -2
- data/app/views/{admin → spree/admin}/shared/_contents_sub_menu.html.erb +1 -1
- data/app/views/{admin → spree/admin}/shared/_contents_tab.html.erb +0 -0
- data/app/views/{admin → spree/admin}/uploads/_form.html.erb +0 -0
- data/app/views/{admin → spree/admin}/uploads/edit.html.erb +1 -1
- data/app/views/{admin → spree/admin}/uploads/index.html.erb +1 -1
- data/app/views/{admin → spree/admin}/uploads/new.html.erb +1 -1
- data/app/views/{admin → spree/admin}/uploads/picker.html.erb +0 -0
- data/config/locales/en.yml +23 -19
- data/config/routes.rb +4 -8
- data/lib/generators/templates/db/migrate/add_attachment_file_size_to_assets.rb +2 -2
- data/lib/spree_essentials.rb +1 -5
- data/lib/spree_essentials/test_helper.rb +7 -8
- data/lib/spree_essentials/version.rb +1 -1
- metadata +34 -37
- data/app/models/image_decorator.rb +0 -7
data/README.md
CHANGED
@@ -26,15 +26,8 @@ Installation
|
|
26
26
|
If you don't already have an existing Spree site, [click here](https://gist.github.com/946719) then come back later... You can also read the Spree docs [here](http://spreecommerce.com/documentation/getting_started.html)...
|
27
27
|
|
28
28
|
Spree Essentials can be installed by itself by adding the following to your Gemfile:
|
29
|
-
|
30
|
-
# Spree 1.0.x
|
31
|
-
gem 'spree_essentials', '~> 0.4.0.rc2'
|
32
|
-
|
33
|
-
# Spree 0.70.x
|
34
|
-
gem 'spree_essentials', '~> 0.3.3'
|
35
29
|
|
36
|
-
|
37
|
-
gem 'spree_essentials', '~> 0.2.3'
|
30
|
+
gem 'spree_essentials', '>= 0.3.2'
|
38
31
|
|
39
32
|
This isn't necessary if you're using spree_essentials based extensions. If that's the case, just include the extensions normally:
|
40
33
|
|
@@ -134,7 +127,7 @@ You can easily use the test/dummy app as a demo of spree_essentials. Just `cd` t
|
|
134
127
|
|
135
128
|
git clone git://github.com/citrus/spree_essentials.git
|
136
129
|
cd spree_essentials
|
137
|
-
|
130
|
+
cp test/dummy_hooks/after_migrate.rb.sample test/dummy_hooks/after_migrate.rb
|
138
131
|
bundle install
|
139
132
|
bundle exec dummier
|
140
133
|
cd test/dummy
|
@@ -154,9 +147,10 @@ To Do
|
|
154
147
|
Change Log
|
155
148
|
----------
|
156
149
|
|
157
|
-
**0.
|
150
|
+
**0.4.0.rc1 - 2012/1/16**
|
158
151
|
|
159
|
-
*
|
152
|
+
* Add Spree 1.0.0 compatibility
|
153
|
+
* Breaks with previous versions of Spree
|
160
154
|
|
161
155
|
|
162
156
|
**0.3.2 - 2011/12/30**
|
@@ -1,7 +1,7 @@
|
|
1
|
-
class Admin::UploadsController < Admin::ResourceController
|
1
|
+
class Spree::Admin::UploadsController < Spree::Admin::ResourceController
|
2
2
|
|
3
3
|
def index
|
4
|
-
render :template => request.xhr? ? '
|
4
|
+
render :template => "spree/admin/uploads/#{request.xhr? ? 'picker' : 'index'}", :layout => !request.xhr?
|
5
5
|
end
|
6
6
|
|
7
7
|
private
|
@@ -13,7 +13,7 @@ class Admin::UploadsController < Admin::ResourceController
|
|
13
13
|
def collection
|
14
14
|
params[:search] ||= {}
|
15
15
|
params[:search][:meta_sort] ||= "created_at.desc"
|
16
|
-
@search = Upload.metasearch(params[:search])
|
16
|
+
@search = Spree::Upload.metasearch(params[:search])
|
17
17
|
@collection = @search.page(params[:page]).per(Spree::Config[:orders_per_page])
|
18
18
|
end
|
19
19
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module Admin::SpreeEssentialsHelper
|
1
|
+
module Spree::Admin::SpreeEssentialsHelper
|
2
2
|
|
3
3
|
def contents_tab
|
4
4
|
routes = SpreeEssentials.essentials.map do |key, cls|
|
@@ -8,7 +8,7 @@ module Admin::SpreeEssentialsHelper
|
|
8
8
|
routes.push admin_uploads_path
|
9
9
|
cls = request.path.scan(Regexp.new(routes.join("|"))).empty? ? nil : 'selected'
|
10
10
|
content_tag :li, :class => cls do
|
11
|
-
link_to I18n.t('admin.shared.contents_tab.content'), routes.first
|
11
|
+
link_to I18n.t('spree.admin.shared.contents_tab.content'), routes.first
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
Deface::Override.new(:virtual_path => "layouts/admin",
|
1
|
+
Deface::Override.new(:virtual_path => "spree/layouts/admin",
|
2
2
|
:name => "spree_essential_admin_tabs",
|
3
3
|
:insert_bottom => "[data-hook='admin_tabs'], #admin_tabs[data-hook]",
|
4
|
-
:partial => "admin/shared/contents_tab",
|
4
|
+
:partial => "spree/admin/shared/contents_tab",
|
5
5
|
:disabled => false)
|
File without changes
|
File without changes
|
File without changes
|
data/config/locales/en.yml
CHANGED
@@ -8,6 +8,9 @@ en:
|
|
8
8
|
parsed_with: Parsed With
|
9
9
|
|
10
10
|
activerecord:
|
11
|
+
attributes:
|
12
|
+
order:
|
13
|
+
completed_at: Completed At
|
11
14
|
errors:
|
12
15
|
messages:
|
13
16
|
invalid_date_time: is an invalid date.
|
@@ -17,25 +20,26 @@ en:
|
|
17
20
|
file_name: File Name
|
18
21
|
size: Size
|
19
22
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
23
|
+
spree:
|
24
|
+
admin:
|
25
|
+
shared:
|
26
|
+
contents_tab:
|
27
|
+
content: Content
|
28
|
+
|
29
|
+
subnav:
|
30
|
+
uploads: Uploads
|
31
|
+
|
32
|
+
uploads:
|
33
|
+
new:
|
34
|
+
new_upload: New Upload
|
35
|
+
edit:
|
36
|
+
edit_upload: Edit Upload
|
37
|
+
preview: Preview
|
38
|
+
link: Link
|
39
|
+
index:
|
40
|
+
listing_uploads: Listing Uploads
|
41
|
+
new_upload: Upload a file
|
42
|
+
|
39
43
|
faker:
|
40
44
|
lorem:
|
41
45
|
words: [alias, consequatur, perferendis, voluptatem, accusantium, doloremque, aperiam, eaque, ipsa, quae, illo, inventore, veritatis, quasi, architecto, beatae, vitae, dicta, sunt, explicabo, aspernatur, aut, odit, aut, fugit, sed, quia, consequuntur, magni, dolores, eos, qui, ratione, voluptatem, sequi, nesciunt, neque, dolorem, ipsum, quia, dolor, sit, amet, consectetur, adipisci, velit, sed, quia, non, numquam, eius, modi, tempora, incidunt, ut, labore, et, dolore, magnam, aliquam, quaerat, voluptatem, ut, enim, ad, minima, veniam, quis, nostrum, exercitationem, ullam, corporis, nemo, enim, ipsam, voluptatem, quia, voluptas, sit, suscipit, laboriosam, nisi, ut, aliquid, ex, ea, commodi, consequatur, quis, autem, vel, eum, iure, reprehenderit, qui, in, ea, voluptate, velit, esse, quam, nihil, molestiae, et, iusto, odio, dignissimos, ducimus, qui, blanditiis, praesentium, laudantium, totam, rem, voluptatum, deleniti, atque, corrupti, quos, dolores, et, quas, molestias, excepturi, sint, occaecati, cupiditate, non, provident, sed, ut, perspiciatis, unde, omnis, iste, natus, error, similique, sunt, in, culpa, qui, officia, deserunt, mollitia, animi, id, est, laborum, et, dolorum, fuga, et, harum, quidem, rerum, facilis, est, et, expedita, distinctio, nam, libero, tempore, cum, soluta, nobis, est, eligendi, optio, cumque, nihil, impedit, quo, porro, quisquam, est, qui, minus, id, quod, maxime, placeat, facere, possimus, omnis, voluptas, assumenda, est, omnis, dolor, repellendus, temporibus, autem, quibusdam, et, aut, consequatur, vel, illum, qui, dolorem, eum, fugiat, quo, voluptas, nulla, pariatur, accusamus, officiis, debitis, aut, rerum, necessitatibus, saepe, eveniet, ut, et, voluptates, repudiandae, sint, molestiae, non, recusandae, itaque, earum, rerum, tenetur, sapiente, delectus, reiciendis, voluptatibus, maiores, doloribus, asperiores, repellat]
|
data/config/routes.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
class AddAttachmentFileSizeToAssets < ActiveRecord::Migration
|
2
2
|
def self.up
|
3
|
-
add_column :
|
3
|
+
add_column :spree_assets, :attachment_file_size, :integer
|
4
4
|
end
|
5
5
|
|
6
6
|
def self.down
|
7
|
-
remove_column :
|
7
|
+
remove_column :spree_assets, :attachment_file_size
|
8
8
|
end
|
9
9
|
end
|
data/lib/spree_essentials.rb
CHANGED
@@ -25,11 +25,7 @@ module SpreeEssentials
|
|
25
25
|
class Engine < Rails::Engine
|
26
26
|
|
27
27
|
config.autoload_paths += %W(#{config.root}/lib)
|
28
|
-
|
29
|
-
initializer :assets do |config|
|
30
|
-
Rails.application.config.assets.precompile += %w( markitup.css date.js jquery.autodate.js jquery.markitup.js markdown.set.js )
|
31
|
-
end
|
32
|
-
|
28
|
+
|
33
29
|
config.to_prepare do
|
34
30
|
#loads application's model / class decorators
|
35
31
|
Dir.glob File.expand_path("../../app/**/*_decorator.rb", __FILE__) do |c|
|
@@ -1,8 +1,7 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require 'faker'
|
1
|
+
require "rails/test_help"
|
2
|
+
require "shoulda"
|
3
|
+
require "factory_girl"
|
4
|
+
require "sqlite3"
|
6
5
|
|
7
6
|
ActionMailer::Base.delivery_method = :test
|
8
7
|
ActionMailer::Base.perform_deliveries = true
|
@@ -22,8 +21,8 @@ Capybara.default_selector = :css
|
|
22
21
|
class ActiveSupport::IntegrationCase < ActiveSupport::TestCase
|
23
22
|
|
24
23
|
include Capybara::DSL
|
25
|
-
include
|
26
|
-
|
24
|
+
include Spree::Core::Engine.routes.url_helpers
|
25
|
+
|
27
26
|
|
28
27
|
# Extreme hax! wtf is this for anyways.. and why is it erroring?
|
29
28
|
def testmail_admin_mail_method_url(*args)
|
@@ -39,7 +38,7 @@ class ActiveSupport::IntegrationCase < ActiveSupport::TestCase
|
|
39
38
|
teardown do
|
40
39
|
unless source.blank?
|
41
40
|
matches = source.match(/translation[\s-]+missing[^"]*/) || []
|
42
|
-
assert_equal 0, matches.length, "
|
41
|
+
assert_equal 0, matches.length, "** #{matches[0]}"
|
43
42
|
end
|
44
43
|
end
|
45
44
|
|
metadata
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_essentials
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.4.0.rc1
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Spencer Steffen
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-01-
|
12
|
+
date: 2012-01-16 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement: &
|
15
|
+
name: spree
|
16
|
+
requirement: &70184704119680 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 1.0.0.rc1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70184704119680
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rdiscount
|
27
|
-
requirement: &
|
27
|
+
requirement: &70184704118720 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.6.8
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70184704118720
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: shoulda
|
38
|
-
requirement: &
|
38
|
+
requirement: &70184704117940 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 3.0.0.beta2
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70184704117940
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: dummier
|
49
|
-
requirement: &
|
49
|
+
requirement: &70184704113180 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.2.4
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70184704113180
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: factory_girl
|
60
|
-
requirement: &
|
60
|
+
requirement: &70184704112600 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 2.3.2
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70184704112600
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: capybara
|
71
|
-
requirement: &
|
71
|
+
requirement: &70184704095680 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 1.1.2
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70184704095680
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: sqlite3
|
82
|
-
requirement: &
|
82
|
+
requirement: &70184704094600 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: 1.3.4
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70184704094600
|
91
91
|
description: Spree Essentials provides a base for several other Spree Commerce extensions.
|
92
92
|
The idea is to provide other extensions with common functionality such as an asset-upload
|
93
93
|
interface, a markdown editor, and a common admin-navigation tab.
|
@@ -137,20 +137,20 @@ files:
|
|
137
137
|
- app/assets/javascripts/jquery.markitup.js
|
138
138
|
- app/assets/javascripts/markdown.set.js
|
139
139
|
- app/assets/stylesheets/markitup.css.erb
|
140
|
-
- app/controllers/admin/markdown_controller.rb
|
141
|
-
- app/controllers/admin/uploads_controller.rb
|
142
|
-
- app/helpers/admin/spree_essentials_helper.rb
|
143
|
-
- app/models/
|
144
|
-
- app/models/upload.rb
|
140
|
+
- app/controllers/spree/admin/markdown_controller.rb
|
141
|
+
- app/controllers/spree/admin/uploads_controller.rb
|
142
|
+
- app/helpers/spree/admin/spree_essentials_helper.rb
|
143
|
+
- app/models/spree/asset_decorator.rb
|
144
|
+
- app/models/spree/upload.rb
|
145
145
|
- app/overrides/spree_essentials.rb
|
146
146
|
- app/validators/datetime_validator.rb
|
147
|
-
- app/views/admin/shared/_contents_sub_menu.html.erb
|
148
|
-
- app/views/admin/shared/_contents_tab.html.erb
|
149
|
-
- app/views/admin/uploads/_form.html.erb
|
150
|
-
- app/views/admin/uploads/edit.html.erb
|
151
|
-
- app/views/admin/uploads/index.html.erb
|
152
|
-
- app/views/admin/uploads/new.html.erb
|
153
|
-
- app/views/admin/uploads/picker.html.erb
|
147
|
+
- app/views/spree/admin/shared/_contents_sub_menu.html.erb
|
148
|
+
- app/views/spree/admin/shared/_contents_tab.html.erb
|
149
|
+
- app/views/spree/admin/uploads/_form.html.erb
|
150
|
+
- app/views/spree/admin/uploads/edit.html.erb
|
151
|
+
- app/views/spree/admin/uploads/index.html.erb
|
152
|
+
- app/views/spree/admin/uploads/new.html.erb
|
153
|
+
- app/views/spree/admin/uploads/picker.html.erb
|
154
154
|
- Rakefile
|
155
155
|
homepage: https://github.com/citrus/spree_essentials
|
156
156
|
licenses: []
|
@@ -166,16 +166,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
166
166
|
version: '0'
|
167
167
|
segments:
|
168
168
|
- 0
|
169
|
-
hash:
|
169
|
+
hash: 917132819264177002
|
170
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
171
|
none: false
|
172
172
|
requirements:
|
173
|
-
- - ! '
|
173
|
+
- - ! '>'
|
174
174
|
- !ruby/object:Gem::Version
|
175
|
-
version:
|
176
|
-
segments:
|
177
|
-
- 0
|
178
|
-
hash: 4082963416670233000
|
175
|
+
version: 1.3.1
|
179
176
|
requirements: []
|
180
177
|
rubyforge_project:
|
181
178
|
rubygems_version: 1.8.10
|