spree_essentials 0.4.0 → 0.5.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +12 -0
- data/README.md +14 -3
- data/Versionfile +1 -0
- data/app/controllers/spree/admin/uploads_controller.rb +4 -4
- data/app/models/spree/upload.rb +2 -0
- data/app/views/spree/admin/uploads/index.html.erb +15 -0
- data/config/locales/en.yml +4 -4
- data/config/locales/it.yml +0 -4
- data/lib/spree_essentials/version.rb +1 -1
- data/spree_essentials.gemspec +1 -1
- data/test/integration/spree/admin/upload_integration_test.rb +2 -2
- data/test/spree_essential_example/app/models/spree/example.rb +3 -0
- metadata +22 -25
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
Change Log
|
3
3
|
------------------------------------------------------------------------------
|
4
4
|
|
5
|
+
**0.50.0.rc1 - 2012/4/11**
|
6
|
+
|
7
|
+
* Spree 1.1.x compatibility
|
8
|
+
|
9
|
+
|
10
|
+
**0.40.0 - 2012/4/11**
|
11
|
+
|
12
|
+
* Add Italian translation - (@iloveitaly)
|
13
|
+
* Add Russian translation - (@shaggyone)
|
14
|
+
* Release v0.40.0
|
15
|
+
|
16
|
+
|
5
17
|
**0.40.0.rc3 - 2012/3/7**
|
6
18
|
|
7
19
|
* Normalize upload attachment location
|
data/README.md
CHANGED
@@ -25,7 +25,10 @@ If you don't already have an existing Spree site, [click here](https://gist.gith
|
|
25
25
|
|
26
26
|
Spree Essentials can be installed by itself by adding the following to your Gemfile:
|
27
27
|
|
28
|
-
```ruby
|
28
|
+
```ruby
|
29
|
+
# Spree 1.1.x
|
30
|
+
gem 'spree_essentials', '~> 0.5.0.rc1'
|
31
|
+
|
29
32
|
# Spree 1.0.x
|
30
33
|
gem 'spree_essentials', '~> 0.4.0'
|
31
34
|
|
@@ -164,7 +167,7 @@ That's all there is to it!
|
|
164
167
|
Notes
|
165
168
|
------------------------------------------------------------------------------
|
166
169
|
|
167
|
-
Spree Essentials is under constant development... Development is being done on OSX with Ruby 1.9.3 and usually the latest version of Spree. (currently 1.0.
|
170
|
+
Spree Essentials is under constant development... Development is being done on OSX with Ruby 1.9.3 and usually the latest version of Spree. (currently 1.1.0.rc1)
|
168
171
|
|
169
172
|
Please let me know if you find any bugs or have feature requests you'd like to see.
|
170
173
|
|
@@ -212,6 +215,11 @@ To Do
|
|
212
215
|
Change Log
|
213
216
|
------------------------------------------------------------------------------
|
214
217
|
|
218
|
+
**0.50.0.rc1 - 2012/4/11**
|
219
|
+
|
220
|
+
* Spree 1.1.x compatibility
|
221
|
+
|
222
|
+
|
215
223
|
**0.40.0 - 2012/4/11**
|
216
224
|
|
217
225
|
* Add Italian translation - (@iloveitaly)
|
@@ -263,7 +271,10 @@ Change Log
|
|
263
271
|
Contributors
|
264
272
|
------------------------------------------------------------------------------
|
265
273
|
|
266
|
-
|
274
|
+
* Spencer Steffen ([@citrus](https://github.com/citrus))
|
275
|
+
* Michael Bianco ([@iloveitaly](https://github.com/iloveitaly))
|
276
|
+
* Victor Zagorski ([@shaggyone](https://github.com/shaggyone))
|
277
|
+
|
267
278
|
|
268
279
|
If you'd like to help out feel free to fork and send me pull requests!
|
269
280
|
|
data/Versionfile
CHANGED
@@ -7,10 +7,10 @@ class Spree::Admin::UploadsController < Spree::Admin::ResourceController
|
|
7
7
|
private
|
8
8
|
|
9
9
|
def collection
|
10
|
-
params[:
|
11
|
-
params[:
|
12
|
-
@search = Spree::Upload.
|
13
|
-
@collection = @search.page(params[:page]).per(Spree::Config[:orders_per_page])
|
10
|
+
params[:q] ||= {}
|
11
|
+
params[:q][:sort] ||= "created_at.desc"
|
12
|
+
@search = Spree::Upload.search(params[:q])
|
13
|
+
@collection = @search.result.page(params[:page]).per(Spree::Config[:orders_per_page])
|
14
14
|
end
|
15
15
|
|
16
16
|
end
|
data/app/models/spree/upload.rb
CHANGED
@@ -32,6 +32,21 @@
|
|
32
32
|
|
33
33
|
<%= paginate @uploads %>
|
34
34
|
|
35
|
+
|
36
|
+
<% content_for :sidebar do %>
|
37
|
+
|
38
|
+
<div class="box">
|
39
|
+
<h3><%= t(:search) %></h3>
|
40
|
+
<%= search_form_for [ :admin, @search ] do |f| %>
|
41
|
+
<p>
|
42
|
+
<%= f.label :alt_cont, t("description") %><br />
|
43
|
+
<%= f.text_field :alt_cont, :size => 25 %>
|
44
|
+
</p>
|
45
|
+
<p><%= button t("search") %></p>
|
46
|
+
<% end %>
|
47
|
+
</div>
|
48
|
+
<% end %>
|
49
|
+
|
35
50
|
<div id="images"></div>
|
36
51
|
<br/>
|
37
52
|
<p>
|
data/config/locales/en.yml
CHANGED
@@ -19,6 +19,10 @@ en:
|
|
19
19
|
model_name: Upload
|
20
20
|
file_name: File Name
|
21
21
|
size: Size
|
22
|
+
|
23
|
+
# spree hack
|
24
|
+
first_name_start: "First Name starts with"
|
25
|
+
last_name_start: "Last Name starts with"
|
22
26
|
|
23
27
|
spree:
|
24
28
|
admin:
|
@@ -39,7 +43,3 @@ en:
|
|
39
43
|
index:
|
40
44
|
listing_uploads: Listing Uploads
|
41
45
|
new_upload: Upload a file
|
42
|
-
|
43
|
-
faker:
|
44
|
-
lorem:
|
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/locales/it.yml
CHANGED
@@ -38,7 +38,3 @@ it:
|
|
38
38
|
index:
|
39
39
|
listing_uploads: Elenco allegati
|
40
40
|
new_upload: Carica un file
|
41
|
-
|
42
|
-
faker:
|
43
|
-
lorem:
|
44
|
-
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/spree_essentials.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
-
s.add_runtime_dependency('spree_core', '~> 1.0.
|
21
|
+
s.add_runtime_dependency('spree_core', '~> 1.1.0.rc1')
|
22
22
|
s.add_runtime_dependency('rdiscount', '~> 1.6.8')
|
23
23
|
|
24
24
|
s.add_development_dependency('shoulda', '~> 3.0.0')
|
@@ -56,7 +56,7 @@ class Spree::Admin::UploadIntegrationTest < SpreeEssentials::IntegrationCase
|
|
56
56
|
should "display the index" do
|
57
57
|
visit spree.admin_uploads_path
|
58
58
|
assert has_link?("1.png", :href => @upload.attachment.url(:original))
|
59
|
-
assert_seen "Just an image!", :within => "tr#
|
59
|
+
assert_seen "Just an image!", :within => "tr#upload_#{@upload.id}"
|
60
60
|
within "td.actions" do
|
61
61
|
assert find("a.icon_link").native.attribute("href").include?(spree.edit_admin_upload_path(@upload))
|
62
62
|
assert has_selector?("a[href='#']")
|
@@ -65,7 +65,7 @@ class Spree::Admin::UploadIntegrationTest < SpreeEssentials::IntegrationCase
|
|
65
65
|
|
66
66
|
should "edit the upload" do
|
67
67
|
visit spree.edit_admin_upload_path(@upload)
|
68
|
-
assert_seen "Preview", :within => ".
|
68
|
+
assert_seen "Preview", :within => ".edit_upload p b"
|
69
69
|
assert has_xpath?("//img[@src='#{@upload.attachment.url(:small)}']")
|
70
70
|
attach_file "Attachment", @image2
|
71
71
|
fill_in "Description", :with => "Just another image"
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
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.5.0.rc1
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Spencer Steffen
|
@@ -13,18 +13,18 @@ date: 2012-04-11 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: spree_core
|
16
|
-
requirement: &
|
16
|
+
requirement: &70113426359420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.0.
|
21
|
+
version: 1.1.0.rc1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70113426359420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rdiscount
|
27
|
-
requirement: &
|
27
|
+
requirement: &70113426358360 !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: *70113426358360
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: shoulda
|
38
|
-
requirement: &
|
38
|
+
requirement: &70113426373740 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 3.0.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70113426373740
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: dummier
|
49
|
-
requirement: &
|
49
|
+
requirement: &70113426373240 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.3.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70113426373240
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: factory_girl
|
60
|
-
requirement: &
|
60
|
+
requirement: &70113426372760 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 2.6.0
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70113426372760
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: capybara
|
71
|
-
requirement: &
|
71
|
+
requirement: &70113426372040 !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: *70113426372040
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: sqlite3
|
82
|
-
requirement: &
|
82
|
+
requirement: &70113426371080 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 1.3.4
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70113426371080
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: simplecov
|
93
|
-
requirement: &
|
93
|
+
requirement: &70113426370380 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ~>
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
version: 0.6.1
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70113426370380
|
102
102
|
description: Spree Essentials provides a base for several other Spree Commerce extensions.
|
103
103
|
The idea is to provide other extensions with common functionality such as an asset-upload
|
104
104
|
interface, a markdown editor, and a common admin-navigation tab.
|
@@ -232,16 +232,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
232
232
|
version: '0'
|
233
233
|
segments:
|
234
234
|
- 0
|
235
|
-
hash: -
|
235
|
+
hash: -3957380634603286502
|
236
236
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
237
237
|
none: false
|
238
238
|
requirements:
|
239
|
-
- - ! '
|
239
|
+
- - ! '>'
|
240
240
|
- !ruby/object:Gem::Version
|
241
|
-
version:
|
242
|
-
segments:
|
243
|
-
- 0
|
244
|
-
hash: -4076361323675622024
|
241
|
+
version: 1.3.1
|
245
242
|
requirements: []
|
246
243
|
rubyforge_project:
|
247
244
|
rubygems_version: 1.8.17
|