star_ratings 0.0.1.alpha → 0.0.1
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/README.md +13 -1
- data/lib/star_ratings/version.rb +1 -1
- data/star_ratings.gemspec +1 -1
- metadata +74 -61
data/README.md
CHANGED
@@ -21,7 +21,12 @@ Or install it yourself as:
|
|
21
21
|
|
22
22
|
This gem displays 5 star rating in a view. once you install this gem, you get a helper method called as "render_stars". All you need to do is pass a number or float inside this method as an argument and it will display the star rating image for you.
|
23
23
|
|
24
|
-
It will also round the rating so if you pass 2.21 as the rating it will display 2 stars.
|
24
|
+
It will also round the rating so if you pass 2.21 as the rating it will display 2 stars.
|
25
|
+
|
26
|
+
<%= render_stars(2.5) %>
|
27
|
+
|
28
|
+
###Override
|
29
|
+
To override the image and css simply add a image or css with name star_ratings.png or star_ratings.css in your app/assets folder.
|
25
30
|
|
26
31
|
|
27
32
|
|
@@ -32,3 +37,10 @@ It will also round the rating so if you pass 2.21 as the rating it will display
|
|
32
37
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
33
38
|
4. Push to the branch (`git push origin my-new-feature`)
|
34
39
|
5. Create new Pull Request
|
40
|
+
|
41
|
+
|
42
|
+
### Todos
|
43
|
+
|
44
|
+
Specs
|
45
|
+
|
46
|
+
:collision: :collision: :collision:
|
data/lib/star_ratings/version.rb
CHANGED
data/star_ratings.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["manishspuri@gmail.com"]
|
11
11
|
spec.summary = %q{A simple engine to display star ratings in rails}
|
12
12
|
spec.description = %q{A simple engine to display star ratings in rails}
|
13
|
-
spec.homepage = ""
|
13
|
+
spec.homepage = "https://github.com/Manik-Ratnas/star_ratings"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
metadata
CHANGED
@@ -1,71 +1,75 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: star_ratings
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Manish Puri
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2014-03-03 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: bundler
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '1.5'
|
22
|
-
type: :development
|
23
22
|
prerelease: false
|
24
|
-
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
24
|
none: false
|
26
|
-
requirements:
|
25
|
+
requirements:
|
27
26
|
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
requirements:
|
35
|
-
- - ! '>='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '0'
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 5
|
29
|
+
segments:
|
30
|
+
- 1
|
31
|
+
- 5
|
32
|
+
version: "1.5"
|
38
33
|
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rake
|
39
37
|
prerelease: false
|
40
|
-
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: rails
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
49
39
|
none: false
|
50
|
-
requirements:
|
51
|
-
- -
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
54
47
|
type: :development
|
48
|
+
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: rails
|
55
51
|
prerelease: false
|
56
|
-
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
53
|
none: false
|
58
|
-
requirements:
|
59
|
-
- -
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 3
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
61
|
+
type: :development
|
62
|
+
version_requirements: *id003
|
62
63
|
description: A simple engine to display star ratings in rails
|
63
|
-
email:
|
64
|
+
email:
|
64
65
|
- manishspuri@gmail.com
|
65
66
|
executables: []
|
67
|
+
|
66
68
|
extensions: []
|
69
|
+
|
67
70
|
extra_rdoc_files: []
|
68
|
-
|
71
|
+
|
72
|
+
files:
|
69
73
|
- .gitignore
|
70
74
|
- Gemfile
|
71
75
|
- LICENSE.txt
|
@@ -77,29 +81,38 @@ files:
|
|
77
81
|
- lib/star_ratings/star_renderer.rb
|
78
82
|
- lib/star_ratings/version.rb
|
79
83
|
- star_ratings.gemspec
|
80
|
-
homepage:
|
81
|
-
licenses:
|
84
|
+
homepage: https://github.com/Manik-Ratnas/star_ratings
|
85
|
+
licenses:
|
82
86
|
- MIT
|
83
87
|
post_install_message:
|
84
88
|
rdoc_options: []
|
85
|
-
|
89
|
+
|
90
|
+
require_paths:
|
86
91
|
- lib
|
87
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
93
|
none: false
|
89
|
-
requirements:
|
90
|
-
- -
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
|
93
|
-
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
hash: 3
|
98
|
+
segments:
|
99
|
+
- 0
|
100
|
+
version: "0"
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
102
|
none: false
|
95
|
-
requirements:
|
96
|
-
- -
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
hash: 3
|
107
|
+
segments:
|
108
|
+
- 0
|
109
|
+
version: "0"
|
99
110
|
requirements: []
|
111
|
+
|
100
112
|
rubyforge_project:
|
101
|
-
rubygems_version: 1.8.
|
113
|
+
rubygems_version: 1.8.17
|
102
114
|
signing_key:
|
103
115
|
specification_version: 3
|
104
116
|
summary: A simple engine to display star ratings in rails
|
105
117
|
test_files: []
|
118
|
+
|