spree_essentials 0.4.0.rc3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -14,7 +14,6 @@ Current essential-aware extensions include:
14
14
 
15
15
  * [spree_essential_cms](https://github.com/citrus/spree_essential_cms): A full featured CMS with pages, contents, images and more
16
16
  * [spree_essential_blog](https://github.com/citrus/spree_essential_blog): A blog complete with archives, categories, tags and related products
17
- * [spree_essential_news](https://github.com/citrus/spree_essential_news): A news system, also complete with archives, tags and related products. (yes it's pretty much the exact same thing as the blog)
18
17
  * [spree_essential_press](https://github.com/citrus/spree_essential_press): A simple press page for displaying media related content.
19
18
 
20
19
 
@@ -28,7 +27,7 @@ Spree Essentials can be installed by itself by adding the following to your Gemf
28
27
 
29
28
  ```ruby
30
29
  # Spree 1.0.x
31
- gem 'spree_essentials', '~> 0.4.0.rc3'
30
+ gem 'spree_essentials', '~> 0.4.0'
32
31
 
33
32
  # Spree 0.70.x
34
33
  gem 'spree_essentials', '~> 0.3.3'
@@ -81,6 +80,86 @@ rails s
81
80
  Now login to the admin and click on the 'Content' tab!
82
81
 
83
82
 
83
+
84
+
85
+ ------------------------------------------------------------------------------
86
+ Deploying
87
+ ------------------------------------------------------------------------------
88
+
89
+ Follow these steps if you plan host your attachments with a CDN like amazon s3. This is useful when deploying to [heroku](http://heroku.com).
90
+
91
+ First, add the [aws-sdk](http://rubygems.org/gems/aws-sdk) gem to your `Gemfile`
92
+
93
+ ```ruby
94
+ gem 'aws-sdk', '~> 1.3'
95
+ ```
96
+
97
+ Then run:
98
+
99
+ ```bash
100
+ bundle install
101
+ ```
102
+
103
+
104
+ Next, create some buckets on s3. I use the [s3cmd](http://s3tools.org/s3cmd).
105
+
106
+ ```bash
107
+ s3cmd mb s3://yoursite.dev --acl-public
108
+ s3cmd mb s3://yoursite.com --acl-public
109
+ ```
110
+
111
+
112
+ Now create a config file for s3 in `config/s3.yml`
113
+
114
+ ```yml
115
+ # config/s3.yml
116
+ defaults: &defaults
117
+ s3_protocol: http
118
+ access_key_id: YOUR_KEY
119
+ secret_access_key: YOUR_SECRET
120
+ bucket: yoursite.dev
121
+
122
+ development:
123
+ <<: *defaults
124
+
125
+ test:
126
+ <<: *defaults
127
+
128
+ production:
129
+ <<: *defaults
130
+ bucket: yoursite.com
131
+ ```
132
+
133
+
134
+ Lastly, create a [decorator](http://guides.spreecommerce.com/logic_customization.html) for the upload model in `app/models/spree/upload_decorator.rb`.
135
+
136
+ ```ruby
137
+ # app/models/spree/upload_decorator.rb
138
+ Spree::Upload.attachment_definitions[:attachment].merge!(
139
+ :storage => 's3',
140
+ :s3_credentials => Rails.root.join('config', 's3.yml'),
141
+ :path => "/uploads/:id/:style/:basename.:extension"
142
+ )
143
+ ```
144
+
145
+
146
+ If you're using the [CMS](https://github.com/citrus/spree_essential_cms) or [blog](https://github.com/citrus/spree_essential_blog) extensions you can set the config on each model like so:
147
+
148
+ ```ruby
149
+ # app/models/spree/asset_decorator.rb
150
+ [ Spree::Content, Spree::PageImage, Spree::PostImage, Spree::Upload ].each do |cls|
151
+ cls.attachment_definitions[:attachment].merge!(
152
+ :storage => 's3',
153
+ :s3_credentials => Rails.root.join('config', 's3.yml'),
154
+ :path => "/:class/:id/:style/:basename.:extension"
155
+ )
156
+ end
157
+ ```
158
+
159
+
160
+ That's all there is to it!
161
+
162
+
84
163
  ------------------------------------------------------------------------------
85
164
  Notes
86
165
  ------------------------------------------------------------------------------
@@ -133,6 +212,13 @@ To Do
133
212
  Change Log
134
213
  ------------------------------------------------------------------------------
135
214
 
215
+ **0.40.0 - 2012/4/11**
216
+
217
+ * Add Italian translation - (@iloveitaly)
218
+ * Add Russian translation - (@shaggyone)
219
+ * Release v0.40.0
220
+
221
+
136
222
  **0.40.0.rc3 - 2012/3/7**
137
223
 
138
224
  * Normalize upload attachment location
data/Versionfile CHANGED
@@ -1,4 +1,4 @@
1
- "1.0.x" => { :version => "0.4.0.rc3" }
1
+ "1.0.x" => { :version => "0.4.0" }
2
2
  "0.70.x" => { :version => "0.3.2" }
3
3
  "0.60.x" => { :version => "0.2.3" }
4
4
  "0.50.x" => { :version => "0.2.3" }
@@ -4,7 +4,7 @@
4
4
  <% SpreeEssentials.essentials.each_pair do |name, cls| %>
5
5
  <%= tab *cls.sub_tab if defined?(cls.sub_tab) %>
6
6
  <% end %>
7
- <%= tab :uploads, :label => 'spree.admin.subnav.uploads' %>
7
+ <%= tab :uploads, :label => t('spree.admin.subnav.uploads') %>
8
8
  </ul>
9
9
  <% end %>
10
10
  <% end %>
@@ -0,0 +1,44 @@
1
+ it:
2
+ successfully_created: "%{resource} è stato creato con successo!"
3
+ successfully_removed: "%{resource} è stato rimosso con successo!"
4
+ successfully_updated: "%{resource} è stato aggiornato con successo!"
5
+
6
+ essentials:
7
+ parsed_with: Interpretato con
8
+
9
+ activerecord:
10
+ attributes:
11
+ order:
12
+ completed_at: Completato il
13
+ errors:
14
+ messages:
15
+ invalid_date_time: è una data non valida.
16
+
17
+ upload:
18
+ model_name: Allegato
19
+ file_name: Nome file
20
+ size: Dimensioni
21
+
22
+ spree:
23
+ admin:
24
+ shared:
25
+ contents_tab:
26
+ content: Contentuto
27
+
28
+ subnav:
29
+ uploads: Allegati
30
+
31
+ uploads:
32
+ new:
33
+ new_upload: Nuovo allegato
34
+ edit:
35
+ edit_upload: Modifica allegato
36
+ preview: Anteprima
37
+ link: Collegamento
38
+ index:
39
+ listing_uploads: Elenco allegati
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]
@@ -0,0 +1,41 @@
1
+ ru:
2
+
3
+ successfully_created: "%{resource} успешно создан!"
4
+ successfully_removed: "%{resource} успешно удалён!"
5
+ successfully_updated: "%{resource} успешно сохранён!"
6
+
7
+ essentials:
8
+ parsed_with: Форматирование текста
9
+
10
+ activerecord:
11
+ attributes:
12
+ order:
13
+ completed_at: Заказ оформлен
14
+ errors:
15
+ messages:
16
+ invalid_date_time: формат даты неверен.
17
+
18
+ upload:
19
+ model_name: Загрузить
20
+ file_name: Имя файла
21
+ size: Размер
22
+
23
+ spree:
24
+ admin:
25
+ shared:
26
+ contents_tab:
27
+ content: Содержимое
28
+
29
+ subnav:
30
+ uploads: Загруженные файлы
31
+
32
+ uploads:
33
+ new:
34
+ new_upload: Загрузить новый файл
35
+ edit:
36
+ edit_upload: Редактировать файл
37
+ preview: Предварительный просмотр
38
+ link: Ссылка
39
+ index:
40
+ listing_uploads: Список загруженных файлов
41
+ new_upload: Загрузить новый файл
@@ -1,3 +1,3 @@
1
1
  module SpreeEssentials
2
- VERSION = "0.4.0.rc3"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -18,17 +18,15 @@ Gem::Specification.new do |s|
18
18
 
19
19
  s.require_paths = ["lib"]
20
20
 
21
- # Spree
22
21
  s.add_runtime_dependency('spree_core', '~> 1.0.0')
23
22
  s.add_runtime_dependency('rdiscount', '~> 1.6.8')
24
-
25
- # Development
26
- s.add_development_dependency('shoulda', '~> 3.0.0')
27
- s.add_development_dependency('dummier', '~> 0.3.0')
28
- s.add_development_dependency('factory_girl', '~> 2.6.0')
29
- s.add_development_dependency('capybara', '~> 1.1.2')
30
- s.add_development_dependency('sqlite3', '~> 1.3.4')
31
23
 
32
- # s.add_development_dependency('simplecov', '~> 0.6.1')
33
-
24
+ s.add_development_dependency('shoulda', '~> 3.0.0')
25
+ s.add_development_dependency('dummier', '~> 0.3.0')
26
+ s.add_development_dependency('factory_girl', '~> 2.6.0')
27
+ s.add_development_dependency('capybara', '~> 1.1.2')
28
+ s.add_development_dependency('sqlite3', '~> 1.3.4')
29
+ s.add_development_dependency('simplecov', '~> 0.6.1')
30
+ # s.add_development_dependency('turn', '~> 0.9.3')
31
+
34
32
  end
data/test/test_helper.rb CHANGED
@@ -1,8 +1,6 @@
1
1
  begin
2
2
  require "simplecov"
3
- SimpleCov.start do
4
- add_filter "test/"
5
- end
3
+ SimpleCov.start "rails"
6
4
  rescue LoadError => e
7
5
  end
8
6
 
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_essentials
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.rc3
5
- prerelease: 6
4
+ version: 0.4.0
5
+ prerelease:
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-03-07 00:00:00.000000000 Z
12
+ 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: &70328707839000 !ruby/object:Gem::Requirement
16
+ requirement: &70211538537700 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70328707839000
24
+ version_requirements: *70211538537700
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rdiscount
27
- requirement: &70328707838040 !ruby/object:Gem::Requirement
27
+ requirement: &70211538537140 !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: *70328707838040
35
+ version_requirements: *70211538537140
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: shoulda
38
- requirement: &70328707837140 !ruby/object:Gem::Requirement
38
+ requirement: &70211538536560 !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: *70328707837140
46
+ version_requirements: *70211538536560
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: dummier
49
- requirement: &70328707836100 !ruby/object:Gem::Requirement
49
+ requirement: &70211538535980 !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: *70328707836100
57
+ version_requirements: *70211538535980
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: factory_girl
60
- requirement: &70328707835580 !ruby/object:Gem::Requirement
60
+ requirement: &70211538535400 !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: *70328707835580
68
+ version_requirements: *70211538535400
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: capybara
71
- requirement: &70328707835040 !ruby/object:Gem::Requirement
71
+ requirement: &70211538534800 !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: *70328707835040
79
+ version_requirements: *70211538534800
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: sqlite3
82
- requirement: &70328707834520 !ruby/object:Gem::Requirement
82
+ requirement: &70211538533740 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,7 +87,18 @@ dependencies:
87
87
  version: 1.3.4
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70328707834520
90
+ version_requirements: *70211538533740
91
+ - !ruby/object:Gem::Dependency
92
+ name: simplecov
93
+ requirement: &70211538532140 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ~>
97
+ - !ruby/object:Gem::Version
98
+ version: 0.6.1
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: *70211538532140
91
102
  description: Spree Essentials provides a base for several other Spree Commerce extensions.
92
103
  The idea is to provide other extensions with common functionality such as an asset-upload
93
104
  interface, a markdown editor, and a common admin-navigation tab.
@@ -152,6 +163,8 @@ files:
152
163
  - app/views/spree/admin/uploads/new.html.erb
153
164
  - app/views/spree/admin/uploads/picker.html.erb
154
165
  - config/locales/en.yml
166
+ - config/locales/it.yml
167
+ - config/locales/ru.yml
155
168
  - config/routes.rb
156
169
  - db/migrate/20120306185618_add_attachment_file_size_to_assets.rb
157
170
  - lib/generators/spree_essentials/install_generator.rb
@@ -219,16 +232,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
219
232
  version: '0'
220
233
  segments:
221
234
  - 0
222
- hash: -4444010509274802416
235
+ hash: -4076361323675622024
223
236
  required_rubygems_version: !ruby/object:Gem::Requirement
224
237
  none: false
225
238
  requirements:
226
- - - ! '>'
239
+ - - ! '>='
227
240
  - !ruby/object:Gem::Version
228
- version: 1.3.1
241
+ version: '0'
242
+ segments:
243
+ - 0
244
+ hash: -4076361323675622024
229
245
  requirements: []
230
246
  rubyforge_project:
231
- rubygems_version: 1.8.11
247
+ rubygems_version: 1.8.17
232
248
  signing_key:
233
249
  specification_version: 3
234
250
  summary: Spree Essentials provides a base for several other Spree Commerce extensions.