ajaxful_rating 3.0.0.beta6 → 3.0.0.beta7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/ajaxful_rating.gemspec +7 -7
- data/lib/axr/stars_builder.rb +2 -2
- metadata +5 -7
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ begin
|
|
6
6
|
|
7
7
|
Jeweler::Tasks.new do |spec|
|
8
8
|
spec.name = "ajaxful_rating"
|
9
|
-
spec.version = "3.0.0.
|
9
|
+
spec.version = "3.0.0.beta7"
|
10
10
|
spec.summary = "Provides a simple way to add rating functionality to your application."
|
11
11
|
spec.description = "Provides a simple way to add rating functionality to your application."
|
12
12
|
spec.homepage = "http://github.com/edgarjs/ajaxful-rating"
|
data/ajaxful_rating.gemspec
CHANGED
@@ -4,13 +4,13 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "3.0.0.
|
7
|
+
s.name = "ajaxful_rating"
|
8
|
+
s.version = "3.0.0.beta7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Edgar J. Suarez", "Denis Odorcic"]
|
12
|
-
s.date =
|
13
|
-
s.description =
|
12
|
+
s.date = "2011-12-18"
|
13
|
+
s.description = "Provides a simple way to add rating functionality to your application."
|
14
14
|
s.email = ["edgar.js@gmail.com", "denis.odorcic@gmail.com"]
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"README.textile"
|
@@ -45,10 +45,10 @@ Gem::Specification.new do |s|
|
|
45
45
|
"test/lib/model_test.rb",
|
46
46
|
"test/test_helper.rb"
|
47
47
|
]
|
48
|
-
s.homepage =
|
48
|
+
s.homepage = "http://github.com/edgarjs/ajaxful-rating"
|
49
49
|
s.require_paths = ["lib"]
|
50
|
-
s.rubygems_version =
|
51
|
-
s.summary =
|
50
|
+
s.rubygems_version = "1.6.2"
|
51
|
+
s.summary = "Provides a simple way to add rating functionality to your application."
|
52
52
|
|
53
53
|
if s.respond_to? :specification_version then
|
54
54
|
s.specification_version = 3
|
data/lib/axr/stars_builder.rb
CHANGED
@@ -71,7 +71,7 @@ module AjaxfulRating # :nodoc:
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def star_tag(value)
|
74
|
-
already_rated = rateable.rated_by?(user, options[:dimension]) if user
|
74
|
+
already_rated = rateable.rated_by?(user, options[:dimension]) if user && !rateable.axr_config(options[:dimension])[:allow_update]
|
75
75
|
css_class = "stars-#{value}"
|
76
76
|
@css_builder.rule(".ajaxful-rating .#{css_class}", {
|
77
77
|
:width => "#{(value / rateable.class.max_stars.to_f) * 100}%",
|
@@ -79,7 +79,7 @@ module AjaxfulRating # :nodoc:
|
|
79
79
|
})
|
80
80
|
|
81
81
|
@template.content_tag(:li) do
|
82
|
-
if !options[:force_static] &&
|
82
|
+
if !options[:force_static] && !already_rated && user && options[:current_user] == user
|
83
83
|
link_star_tag(value, css_class)
|
84
84
|
else
|
85
85
|
@template.content_tag(:span, show_value, :class => css_class, :title => i18n(:current))
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ajaxful_rating
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 62196429
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 3.0.0.
|
11
|
+
- 7
|
12
|
+
version: 3.0.0.beta7
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Edgar J. Suarez
|
@@ -18,8 +18,7 @@ autorequire:
|
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
20
|
|
21
|
-
date: 2011-
|
22
|
-
default_executable:
|
21
|
+
date: 2011-12-18 00:00:00 Z
|
23
22
|
dependencies: []
|
24
23
|
|
25
24
|
description: Provides a simple way to add rating functionality to your application.
|
@@ -61,7 +60,6 @@ files:
|
|
61
60
|
- test/fixtures/users.yml
|
62
61
|
- test/lib/model_test.rb
|
63
62
|
- test/test_helper.rb
|
64
|
-
has_rdoc: true
|
65
63
|
homepage: http://github.com/edgarjs/ajaxful-rating
|
66
64
|
licenses: []
|
67
65
|
|
@@ -93,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
91
|
requirements: []
|
94
92
|
|
95
93
|
rubyforge_project:
|
96
|
-
rubygems_version: 1.
|
94
|
+
rubygems_version: 1.8.10
|
97
95
|
signing_key:
|
98
96
|
specification_version: 3
|
99
97
|
summary: Provides a simple way to add rating functionality to your application.
|