spree_reviews_rating 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -9,7 +9,7 @@ Basic Installation
9
9
 
10
10
  1. Add the following to your Gemfile
11
11
  <pre>
12
- gem 'spree_reviews_rating', '~> 1.0.0'
12
+ gem 'spree_reviews_rating', '~> 1.0.2'
13
13
  </pre>
14
14
  2. Run `bundle install`
15
15
  3. To copy and apply migrations run:
@@ -2,6 +2,8 @@ module Spree
2
2
  class Review < ActiveRecord::Base
3
3
  belongs_to :product
4
4
  belongs_to :user
5
+
6
+ attr_accessible :name, :rating, :review, :approved
5
7
 
6
8
  validates_presence_of :name, :review
7
9
  validates_numericality_of :rating, :if => Proc.new {|r| !r.rating.blank?}
@@ -11,8 +13,6 @@ module Spree
11
13
  scope :approved, lambda {|*args| {:conditions => ["(? = ?) or (approved = ?)", Spree::Config[:include_unapproved_reviews], true, true ]}}
12
14
 
13
15
  scope :oldest_first, :order => "created_at asc"
14
- scope :preview, :limit => Spree::Config[:preview_size], :order => "created_at desc"
15
- attr_accessible :rating, :review, :name
16
-
16
+ scope :preview, :limit => Spree::Config[:preview_size], :order => "created_at desc"
17
17
  end
18
18
  end
@@ -1,6 +1,6 @@
1
1
  class CreateReviews < ActiveRecord::Migration
2
2
  def change
3
- create_table :spree_reviews do |t|
3
+ create_table :reviews do |t|
4
4
  t.string :name, :location
5
5
  t.decimal :rating
6
6
  t.text :review
metadata CHANGED
@@ -1,103 +1,102 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: spree_reviews_rating
3
- version: !ruby/object:Gem::Version
4
- hash: 21
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.2
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- - 1
10
- version: 1.0.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Damiano Giacomello
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-04-05 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-07-09 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: spree_core
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
32
22
  type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: spree_auth
36
23
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: spree_auth
32
+ requirement: !ruby/object:Gem::Requirement
38
33
  none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
46
38
  type: :runtime
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: formtastic
50
39
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: formtastic
48
+ requirement: !ruby/object:Gem::Requirement
52
49
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 0
59
- version: "0"
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
60
54
  type: :runtime
61
- version_requirements: *id003
62
- - !ruby/object:Gem::Dependency
63
- name: paperclip
64
55
  prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
66
57
  none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: 27
71
- segments:
72
- - 2
73
- - 5
74
- - 0
75
- version: 2.5.0
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: paperclip
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
76
70
  type: :runtime
77
- version_requirements: *id004
78
- - !ruby/object:Gem::Dependency
79
- name: rspec-rails
80
71
  prerelease: false
81
- requirement: &id005 !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
82
73
  none: false
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- hash: 3
87
- segments:
88
- - 0
89
- version: "0"
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: rspec-rails
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
90
86
  type: :development
91
- version_requirements: *id005
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
92
94
  description:
93
95
  email: damiano.giacomello@diginess.it
94
96
  executables: []
95
-
96
97
  extensions: []
97
-
98
98
  extra_rdoc_files: []
99
-
100
- files:
99
+ files:
101
100
  - README.md
102
101
  - lib/generators/spree_reviews_rating/install/install_generator.rb
103
102
  - lib/spree_reviews_rating/engine.rb
@@ -172,46 +171,35 @@ files:
172
171
  - app/views/spree/shared/_single_rating.html.erb
173
172
  - db/migrate/20081020220724_create_reviews.rb
174
173
  - db/migrate/20110406083603_add_rating_to_products.rb
175
- - db/migrate/20120123141326_recalculate_ratings.rb
176
174
  - db/migrate/20120323165848_reviews_rating_namespace.rb
175
+ - db/migrate/20120723141326_recalculate_ratings.rb
177
176
  - config/initializers/constants.rb
178
177
  - config/locales/en.yml
179
178
  - config/locales/it.yml
180
179
  - config/routes.rb
181
180
  homepage:
182
181
  licenses: []
183
-
184
182
  post_install_message:
185
183
  rdoc_options: []
186
-
187
- require_paths:
184
+ require_paths:
188
185
  - lib
189
- required_ruby_version: !ruby/object:Gem::Requirement
186
+ required_ruby_version: !ruby/object:Gem::Requirement
190
187
  none: false
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- hash: 57
195
- segments:
196
- - 1
197
- - 8
198
- - 7
188
+ requirements:
189
+ - - ! '>='
190
+ - !ruby/object:Gem::Version
199
191
  version: 1.8.7
200
- required_rubygems_version: !ruby/object:Gem::Requirement
192
+ required_rubygems_version: !ruby/object:Gem::Requirement
201
193
  none: false
202
- requirements:
203
- - - ">="
204
- - !ruby/object:Gem::Version
205
- hash: 3
206
- segments:
207
- - 0
208
- version: "0"
209
- requirements:
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ requirements:
210
199
  - none
211
200
  rubyforge_project:
212
- rubygems_version: 1.8.21
201
+ rubygems_version: 1.8.22
213
202
  signing_key:
214
203
  specification_version: 3
215
204
  summary: Basic review and ratings facility for Spree
216
205
  test_files: []
217
-