hit_counter 0.1.0 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +23 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
- data/.github/ISSUE_TEMPLATE/task.md +21 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +31 -0
- data/.github/dependabot.yml +11 -0
- data/.github/workflows/test.yml +35 -0
- data/.gitignore +8 -0
- data/.simplecov +15 -0
- data/CODE_OF_CONDUCT.md +10 -0
- data/CONTRIBUTING.md +34 -0
- data/Gemfile +3 -13
- data/LICENSE.txt +17 -11
- data/README.md +121 -0
- data/Rakefile +6 -44
- data/SECURITY.md +16 -0
- data/certs/ivanoblomov.pem +25 -0
- data/config/initializers/mime_types.rb +3 -0
- data/config/mongoid.yml +6 -0
- data/hit_counter.gemspec +30 -85
- data/lib/hit_counter.rb +82 -72
- data/lib/version.rb +6 -0
- data/public/images/digits/celtic/0.png +0 -0
- data/public/images/digits/celtic/1.png +0 -0
- data/public/images/digits/celtic/2.png +0 -0
- data/public/images/digits/celtic/3.png +0 -0
- data/public/images/digits/celtic/4.png +0 -0
- data/public/images/digits/celtic/5.png +0 -0
- data/public/images/digits/celtic/6.png +0 -0
- data/public/images/digits/celtic/7.png +0 -0
- data/public/images/digits/celtic/8.png +0 -0
- data/public/images/digits/celtic/9.png +0 -0
- data/public/images/digits/odometer/0.png +0 -0
- data/public/images/digits/odometer/1.png +0 -0
- data/public/images/digits/odometer/2.png +0 -0
- data/public/images/digits/odometer/3.png +0 -0
- data/public/images/digits/odometer/4.png +0 -0
- data/public/images/digits/odometer/5.png +0 -0
- data/public/images/digits/odometer/6.png +0 -0
- data/public/images/digits/odometer/7.png +0 -0
- data/public/images/digits/odometer/8.png +0 -0
- data/public/images/digits/odometer/9.png +0 -0
- data/public/images/digits/scout/0.png +0 -0
- data/public/images/digits/scout/1.png +0 -0
- data/public/images/digits/scout/2.png +0 -0
- data/public/images/digits/scout/3.png +0 -0
- data/public/images/digits/scout/4.png +0 -0
- data/public/images/digits/scout/5.png +0 -0
- data/public/images/digits/scout/6.png +0 -0
- data/public/images/digits/scout/7.png +0 -0
- data/public/images/digits/scout/8.png +0 -0
- data/public/images/digits/scout/9.png +0 -0
- data/spec/lib/hit_counter_spec.rb +104 -70
- data/spec/spec_helper.rb +10 -3
- data.tar.gz.sig +0 -0
- metadata +262 -147
- metadata.gz.sig +0 -0
- data/README.rdoc +0 -82
- data/VERSION +0 -1
- data/public/images/digits/celtic/0.gif +0 -0
- data/public/images/digits/celtic/1.gif +0 -0
- data/public/images/digits/celtic/2.gif +0 -0
- data/public/images/digits/celtic/3.gif +0 -0
- data/public/images/digits/celtic/4.gif +0 -0
- data/public/images/digits/celtic/5.gif +0 -0
- data/public/images/digits/celtic/6.gif +0 -0
- data/public/images/digits/celtic/7.gif +0 -0
- data/public/images/digits/celtic/8.gif +0 -0
- data/public/images/digits/celtic/9.gif +0 -0
- data/public/images/digits/odometer/0.gif +0 -0
- data/public/images/digits/odometer/1.gif +0 -0
- data/public/images/digits/odometer/2.gif +0 -0
- data/public/images/digits/odometer/3.gif +0 -0
- data/public/images/digits/odometer/4.gif +0 -0
- data/public/images/digits/odometer/5.gif +0 -0
- data/public/images/digits/odometer/6.gif +0 -0
- data/public/images/digits/odometer/7.gif +0 -0
- data/public/images/digits/odometer/8.gif +0 -0
- data/public/images/digits/odometer/9.gif +0 -0
- data/public/images/digits/scout/0.gif +0 -0
- data/public/images/digits/scout/1.gif +0 -0
- data/public/images/digits/scout/2.gif +0 -0
- data/public/images/digits/scout/3.gif +0 -0
- data/public/images/digits/scout/4.gif +0 -0
- data/public/images/digits/scout/5.gif +0 -0
- data/public/images/digits/scout/6.gif +0 -0
- data/public/images/digits/scout/7.gif +0 -0
- data/public/images/digits/scout/8.gif +0 -0
- data/public/images/digits/scout/9.gif +0 -0
metadata
CHANGED
@@ -1,177 +1,292 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: hit_counter
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 0
|
10
|
-
version: 0.1.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.4
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Roderick Monje
|
14
|
-
autorequire:
|
8
|
+
autorequire:
|
15
9
|
bindir: bin
|
16
|
-
cert_chain:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIEQDCCAqigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpyb2Qv
|
14
|
+
REM9Zm92ZWFjZW50cmFsL0RDPWNvbTAeFw0yMTExMTUwMzEwMTRaFw0yMjExMTUw
|
15
|
+
MzEwMTRaMCUxIzAhBgNVBAMMGnJvZC9EQz1mb3ZlYWNlbnRyYWwvREM9Y29tMIIB
|
16
|
+
ojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAsMm8RdCTuhYTnbH5a8pesLYn
|
17
|
+
BD7cLPkeNfPWp8ohGVXL3988lRBYHwI/LRhxKXncmwmjYFWjuyR1m3e+EgmpBO3e
|
18
|
+
gCn4G9paWlwvPF+dSBF4pjhPtYBSXMFDfoeUTyHuNCcQOFJUMSAxo1pg9S9KvslC
|
19
|
+
Y1fpstOJtVnUjoeT8BRQAqV0WZuzFhgj74oSoHP/ETEd7Uzw/ST/kKgtNGcxoIYu
|
20
|
+
FEqAfEsqEpV0d6FbExYmVTR12288MaGGrfc6Y/QC1VC6RhEYG8Sn8a3utqkn7y47
|
21
|
+
0J6SROECo5x9TWU0s3HDco06jYb5sV1cGsDYXFpEczxJ9i1YVX2IDvYrpZsSJLzq
|
22
|
+
tfCdJ2jIj4rnMjGMg/kschfDnBKRIt8p7LlDhc0p/m0fYO4JQpWbvCc/F5vmUzpF
|
23
|
+
kRbiNr30dkYqDbfvcdQUWBOa5rSyZOIQiW6kfK9ZbLjBGFeP8pwSNME+yfJsZObS
|
24
|
+
AIiSqYtcP4mMriBLi+x981z1kpjTGZSWOpZrgAELAgMBAAGjezB5MAkGA1UdEwQC
|
25
|
+
MAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQzajljgeoJIjO/4h4X7ve/jYWVSDAf
|
26
|
+
BgNVHREEGDAWgRRyb2RAZm92ZWFjZW50cmFsLmNvbTAfBgNVHRIEGDAWgRRyb2RA
|
27
|
+
Zm92ZWFjZW50cmFsLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAqqybBWM9gIPn8Quj
|
28
|
+
R8L0HPEE/1NjNLrlNG1DhJ8MAbYFA7mo4bWp4kjXwVdw+TMQZfrLjXLgmfiTvzxV
|
29
|
+
cE10liYjCWQNxectkkYmOsCBlEDfOngNKdl3QJ+Y5+SEsqfKYhZXZypn+SwuXx8F
|
30
|
+
LuVPsP7/R6VlrI8WbtPU1oSfM+rmdpUZzDcvmtvy1S+tPfFWalo8tSXPg0gE3Nis
|
31
|
+
UZAwHu8x3v5N7lxtjJa+s9ARkH/BO5Uytz1XrUmUWLQqo9ZJtqbZ/iV9HEWhG+xx
|
32
|
+
lR8SnXcsohvP/eIY2BTyBay0eOb9BwGHmnAVRiiAfLvCftzHtBEBr6jCKESSYDuc
|
33
|
+
bUIRDNLzRjl2KOoNLjKymicWrBdz1roBpy8cFIDzi6ebE45ve/xoZbsGJ3zaLo9T
|
34
|
+
G5iWAeYsmSjJxz7iOZOsx+vPCwMy7j6nWF2CDbaxioGR/hIqNbVBveCCRyjyunD3
|
35
|
+
kvv576EuULmQcLpOKwB3RlxAG7j8JJl4ueqjF+rz7x1lBqEU
|
36
|
+
-----END CERTIFICATE-----
|
37
|
+
date: 2021-11-17 00:00:00.000000000 Z
|
38
|
+
dependencies:
|
39
|
+
- !ruby/object:Gem::Dependency
|
40
|
+
name: rake
|
41
|
+
requirement: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 12.3.3
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '13.0'
|
49
|
+
type: :development
|
22
50
|
prerelease: false
|
23
|
-
|
24
|
-
|
25
|
-
requirements:
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
26
53
|
- - ">="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
version:
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 12.3.3
|
56
|
+
- - "~>"
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '13.0'
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: rspec
|
61
|
+
requirement: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - "~>"
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '3'
|
66
|
+
type: :development
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - "~>"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '3'
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: rubocop
|
75
|
+
requirement: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - "<"
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '1.24'
|
80
|
+
type: :development
|
81
|
+
prerelease: false
|
82
|
+
version_requirements: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - "<"
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '1.24'
|
87
|
+
- !ruby/object:Gem::Dependency
|
88
|
+
name: rubocop-rake
|
89
|
+
requirement: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - "~>"
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
type: :development
|
95
|
+
prerelease: false
|
96
|
+
version_requirements: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - "~>"
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
- !ruby/object:Gem::Dependency
|
102
|
+
name: rubocop-rspec
|
103
|
+
requirement: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - "~>"
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '2'
|
108
|
+
type: :development
|
109
|
+
prerelease: false
|
110
|
+
version_requirements: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - "~>"
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '2'
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
name: simplecov
|
117
|
+
requirement: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - "~>"
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0.18'
|
122
|
+
type: :development
|
123
|
+
prerelease: false
|
124
|
+
version_requirements: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - "~>"
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0.18'
|
129
|
+
- !ruby/object:Gem::Dependency
|
130
|
+
name: simplecov-lcov
|
131
|
+
requirement: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - "~>"
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0.8'
|
136
|
+
type: :development
|
137
|
+
prerelease: false
|
138
|
+
version_requirements: !ruby/object:Gem::Requirement
|
139
|
+
requirements:
|
140
|
+
- - "~>"
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0.8'
|
143
|
+
- !ruby/object:Gem::Dependency
|
144
|
+
name: addressable
|
145
|
+
requirement: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - "~>"
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '2'
|
32
150
|
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: bson_ext
|
36
151
|
prerelease: false
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - "~>"
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '2'
|
157
|
+
- !ruby/object:Gem::Dependency
|
158
|
+
name: bson_ext
|
159
|
+
requirement: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - "~>"
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '1'
|
46
164
|
type: :runtime
|
47
|
-
version_requirements: *id002
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: mongoid
|
50
165
|
prerelease: false
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
166
|
+
version_requirements: !ruby/object:Gem::Requirement
|
167
|
+
requirements:
|
168
|
+
- - "~>"
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: '1'
|
171
|
+
- !ruby/object:Gem::Dependency
|
172
|
+
name: mongoid
|
173
|
+
requirement: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - "~>"
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '7'
|
60
178
|
type: :runtime
|
61
|
-
version_requirements: *id003
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: rmagick
|
64
179
|
prerelease: false
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
180
|
+
version_requirements: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - "~>"
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '7'
|
185
|
+
- !ruby/object:Gem::Dependency
|
186
|
+
name: rmagick
|
187
|
+
requirement: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - ">="
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '2'
|
192
|
+
- - "<"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '5'
|
76
195
|
type: :runtime
|
77
|
-
version_requirements: *id004
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: jeweler
|
80
196
|
prerelease: false
|
81
|
-
|
82
|
-
|
83
|
-
requirements:
|
197
|
+
version_requirements: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
84
199
|
- - ">="
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
version:
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
email:
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '2'
|
202
|
+
- - "<"
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
version: '5'
|
205
|
+
description: Why roast this chestnut by that open fire, you ask? Cause thousands and
|
206
|
+
thousands of Internet vets are still using the one we wrote in PHP eons ago and
|
207
|
+
we don't want to be squandering any incidental Google juice, that's why.
|
208
|
+
email:
|
94
209
|
executables: []
|
95
|
-
|
96
210
|
extensions: []
|
97
|
-
|
98
|
-
|
99
|
-
-
|
100
|
-
-
|
101
|
-
|
102
|
-
- .
|
103
|
-
- .
|
211
|
+
extra_rdoc_files: []
|
212
|
+
files:
|
213
|
+
- ".document"
|
214
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
215
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
216
|
+
- ".github/ISSUE_TEMPLATE/task.md"
|
217
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
218
|
+
- ".github/dependabot.yml"
|
219
|
+
- ".github/workflows/test.yml"
|
220
|
+
- ".gitignore"
|
221
|
+
- ".rspec"
|
222
|
+
- ".simplecov"
|
223
|
+
- CODE_OF_CONDUCT.md
|
224
|
+
- CONTRIBUTING.md
|
104
225
|
- Gemfile
|
105
226
|
- LICENSE.txt
|
106
|
-
- README.
|
227
|
+
- README.md
|
107
228
|
- Rakefile
|
108
|
-
-
|
229
|
+
- SECURITY.md
|
230
|
+
- certs/ivanoblomov.pem
|
231
|
+
- config/initializers/mime_types.rb
|
232
|
+
- config/mongoid.yml
|
109
233
|
- hit_counter.gemspec
|
110
234
|
- lib/hit_counter.rb
|
111
|
-
-
|
112
|
-
- public/images/digits/celtic/
|
113
|
-
- public/images/digits/celtic/
|
114
|
-
- public/images/digits/celtic/
|
115
|
-
- public/images/digits/celtic/
|
116
|
-
- public/images/digits/celtic/
|
117
|
-
- public/images/digits/celtic/
|
118
|
-
- public/images/digits/celtic/
|
119
|
-
- public/images/digits/celtic/
|
120
|
-
- public/images/digits/celtic/
|
121
|
-
- public/images/digits/
|
122
|
-
- public/images/digits/odometer/
|
123
|
-
- public/images/digits/odometer/
|
124
|
-
- public/images/digits/odometer/
|
125
|
-
- public/images/digits/odometer/
|
126
|
-
- public/images/digits/odometer/
|
127
|
-
- public/images/digits/odometer/
|
128
|
-
- public/images/digits/odometer/
|
129
|
-
- public/images/digits/odometer/
|
130
|
-
- public/images/digits/odometer/
|
131
|
-
- public/images/digits/
|
132
|
-
- public/images/digits/scout/
|
133
|
-
- public/images/digits/scout/
|
134
|
-
- public/images/digits/scout/
|
135
|
-
- public/images/digits/scout/
|
136
|
-
- public/images/digits/scout/
|
137
|
-
- public/images/digits/scout/
|
138
|
-
- public/images/digits/scout/
|
139
|
-
- public/images/digits/scout/
|
140
|
-
- public/images/digits/scout/
|
235
|
+
- lib/version.rb
|
236
|
+
- public/images/digits/celtic/0.png
|
237
|
+
- public/images/digits/celtic/1.png
|
238
|
+
- public/images/digits/celtic/2.png
|
239
|
+
- public/images/digits/celtic/3.png
|
240
|
+
- public/images/digits/celtic/4.png
|
241
|
+
- public/images/digits/celtic/5.png
|
242
|
+
- public/images/digits/celtic/6.png
|
243
|
+
- public/images/digits/celtic/7.png
|
244
|
+
- public/images/digits/celtic/8.png
|
245
|
+
- public/images/digits/celtic/9.png
|
246
|
+
- public/images/digits/odometer/0.png
|
247
|
+
- public/images/digits/odometer/1.png
|
248
|
+
- public/images/digits/odometer/2.png
|
249
|
+
- public/images/digits/odometer/3.png
|
250
|
+
- public/images/digits/odometer/4.png
|
251
|
+
- public/images/digits/odometer/5.png
|
252
|
+
- public/images/digits/odometer/6.png
|
253
|
+
- public/images/digits/odometer/7.png
|
254
|
+
- public/images/digits/odometer/8.png
|
255
|
+
- public/images/digits/odometer/9.png
|
256
|
+
- public/images/digits/scout/0.png
|
257
|
+
- public/images/digits/scout/1.png
|
258
|
+
- public/images/digits/scout/2.png
|
259
|
+
- public/images/digits/scout/3.png
|
260
|
+
- public/images/digits/scout/4.png
|
261
|
+
- public/images/digits/scout/5.png
|
262
|
+
- public/images/digits/scout/6.png
|
263
|
+
- public/images/digits/scout/7.png
|
264
|
+
- public/images/digits/scout/8.png
|
265
|
+
- public/images/digits/scout/9.png
|
141
266
|
- spec/lib/hit_counter_spec.rb
|
142
267
|
- spec/spec_helper.rb
|
143
|
-
homepage:
|
144
|
-
licenses:
|
145
|
-
|
146
|
-
post_install_message:
|
268
|
+
homepage: https://github.com/ivanoblomov/hit_counter
|
269
|
+
licenses: []
|
270
|
+
metadata: {}
|
271
|
+
post_install_message:
|
147
272
|
rdoc_options: []
|
148
|
-
|
149
|
-
require_paths:
|
273
|
+
require_paths:
|
150
274
|
- lib
|
151
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
152
|
-
|
153
|
-
requirements:
|
275
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
276
|
+
requirements:
|
154
277
|
- - ">="
|
155
|
-
- !ruby/object:Gem::Version
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
version: "0"
|
160
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
|
-
requirements:
|
278
|
+
- !ruby/object:Gem::Version
|
279
|
+
version: '2.5'
|
280
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
281
|
+
requirements:
|
163
282
|
- - ">="
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
|
166
|
-
segments:
|
167
|
-
- 0
|
168
|
-
version: "0"
|
283
|
+
- !ruby/object:Gem::Version
|
284
|
+
version: '0'
|
169
285
|
requirements: []
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
signing_key:
|
174
|
-
specification_version: 3
|
286
|
+
rubygems_version: 3.1.4
|
287
|
+
signing_key:
|
288
|
+
specification_version: 4
|
175
289
|
summary: Ruby version of that old 90s chestnut, the web-site hit counter.
|
176
|
-
test_files:
|
177
|
-
|
290
|
+
test_files:
|
291
|
+
- spec/lib/hit_counter_spec.rb
|
292
|
+
- spec/spec_helper.rb
|
metadata.gz.sig
ADDED
Binary file
|
data/README.rdoc
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
= hit_counter
|
2
|
-
|
3
|
-
Ruby version of that old 90s chestnut, the web-site hit counter.
|
4
|
-
|
5
|
-
== How to Install
|
6
|
-
|
7
|
-
1. Install the gem and supporting files.
|
8
|
-
|
9
|
-
+Gemfile+:
|
10
|
-
|
11
|
-
gem 'hit_counter'
|
12
|
-
|
13
|
-
Run:
|
14
|
-
|
15
|
-
bundle
|
16
|
-
rake hit_counter:install
|
17
|
-
|
18
|
-
2. Add a controller action to your app.
|
19
|
-
|
20
|
-
+application_controller.rb+:
|
21
|
-
|
22
|
-
def hit_counter
|
23
|
-
return if params[:url].blank?
|
24
|
-
|
25
|
-
# find or create a hit counter for this URL
|
26
|
-
hc = HitCounter.get params[:url]
|
27
|
-
|
28
|
-
# increase the tally by one
|
29
|
-
hc.increment
|
30
|
-
|
31
|
-
# get the image as a blog and stream it to the browser
|
32
|
-
send_data hc.image(params[:style]).to_blob, :disposition => 'inline', :filename => "#{hc.hits}.png", :type => :png
|
33
|
-
end
|
34
|
-
|
35
|
-
+routes.rb+:
|
36
|
-
|
37
|
-
get 'hit-counter' => 'application#hit_counter' # technically should be POST/PUT, but GET makes integration simpler
|
38
|
-
|
39
|
-
3. Add the hit-counter image tag to your site's HTML:
|
40
|
-
|
41
|
-
<img alt="Hit Counter" border="0" src="/hit-counter?url=http://cnn.com&style=1" />
|
42
|
-
|
43
|
-
== How to Customize the Hit-Counter Image
|
44
|
-
|
45
|
-
=== Use an Existing Style
|
46
|
-
|
47
|
-
* You can use one of the three included styles by specifying a different +style+ param in the HTML:
|
48
|
-
|
49
|
-
<img alt="Hit Counter" border="0" src="/hit-counter?url=cnn.com&style=1" />
|
50
|
-
|
51
|
-
The included styles are:
|
52
|
-
|
53
|
-
http://github.com/ivanoblomov/hit_counter/raw/master/public/images/digits/odometer/1.gif odometer
|
54
|
-
http://github.com/ivanoblomov/hit_counter/raw/master/public/images/digits/scout/2.gif scout
|
55
|
-
http://github.com/ivanoblomov/hit_counter/raw/master/public/images/digits/celtic/3.gif Celtic
|
56
|
-
|
57
|
-
=== Create Your Own Style
|
58
|
-
|
59
|
-
1. To add your own style, create a GIF for each of the digits, +0.gif+ through +9.gif+. Save the images in a folder named after your new style in +public/images/digits+.
|
60
|
-
|
61
|
-
2. In your controller, declare a new +STYLES+ constant and add the folder name to it:
|
62
|
-
|
63
|
-
HitCounter::STYLES = ['odometer', 'scout', 'celtic', '(folder name)']
|
64
|
-
|
65
|
-
3. In your HTML, specify the new style with a +style+ param equal to its index in the array plus one (unlike arrays, the +style+ param's index is one-based):
|
66
|
-
|
67
|
-
<img alt="Hit Counter" border="0" src="/hit-counter?url=cnn.com&style=4" />
|
68
|
-
|
69
|
-
== Contributing to hit_counter
|
70
|
-
|
71
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
72
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
73
|
-
* Fork the project
|
74
|
-
* Start a feature/bugfix branch
|
75
|
-
* Commit and push until you are happy with your contribution
|
76
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
77
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
78
|
-
|
79
|
-
== Copyright
|
80
|
-
|
81
|
-
Copyright (c) 2011 Roderick Monje. See LICENSE.txt for
|
82
|
-
further details.
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.1.0
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|