hit_counter 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- 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 +2 -1
- data/.simplecov +15 -0
- data/CODE_OF_CONDUCT.md +10 -0
- data/CONTRIBUTING.md +34 -0
- data/Gemfile +4 -2
- data/LICENSE.txt +17 -11
- data/README.md +121 -0
- data/Rakefile +3 -1
- data/SECURITY.md +16 -0
- data/certs/ivanoblomov.pem +25 -0
- data/config/initializers/mime_types.rb +3 -1
- data/config/mongoid.yml +2 -2
- data/hit_counter.gemspec +29 -16
- data/lib/hit_counter.rb +77 -78
- data/lib/version.rb +4 -1
- 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 +97 -72
- data/spec/spec_helper.rb +5 -6
- data.tar.gz.sig +0 -0
- metadata +175 -74
- metadata.gz.sig +0 -0
- data/.ruby-version +0 -1
- data/.travis.yml +0 -4
- data/Gemfile.lock +0 -74
- data/README.rdoc +0 -84
- 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,189 +1,290 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hit_counter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roderick Monje
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
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
|
12
38
|
dependencies:
|
13
39
|
- !ruby/object:Gem::Dependency
|
14
40
|
name: rake
|
15
41
|
requirement: !ruby/object:Gem::Requirement
|
16
42
|
requirements:
|
17
|
-
- -
|
43
|
+
- - ">="
|
18
44
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
45
|
+
version: 12.3.3
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '13.0'
|
20
49
|
type: :development
|
21
50
|
prerelease: false
|
22
51
|
version_requirements: !ruby/object:Gem::Requirement
|
23
52
|
requirements:
|
24
|
-
- -
|
53
|
+
- - ">="
|
25
54
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
55
|
+
version: 12.3.3
|
56
|
+
- - "~>"
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '13.0'
|
27
59
|
- !ruby/object:Gem::Dependency
|
28
60
|
name: rspec
|
29
61
|
requirement: !ruby/object:Gem::Requirement
|
30
62
|
requirements:
|
31
|
-
- -
|
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
|
+
- - "~>"
|
32
92
|
- !ruby/object:Gem::Version
|
33
93
|
version: '0'
|
34
94
|
type: :development
|
35
95
|
prerelease: false
|
36
96
|
version_requirements: !ruby/object:Gem::Requirement
|
37
97
|
requirements:
|
38
|
-
- -
|
98
|
+
- - "~>"
|
39
99
|
- !ruby/object:Gem::Version
|
40
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'
|
41
115
|
- !ruby/object:Gem::Dependency
|
42
116
|
name: simplecov
|
43
117
|
requirement: !ruby/object:Gem::Requirement
|
44
118
|
requirements:
|
45
|
-
- -
|
119
|
+
- - "~>"
|
46
120
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
121
|
+
version: '0.18'
|
48
122
|
type: :development
|
49
123
|
prerelease: false
|
50
124
|
version_requirements: !ruby/object:Gem::Requirement
|
51
125
|
requirements:
|
52
|
-
- -
|
126
|
+
- - "~>"
|
53
127
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
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'
|
55
143
|
- !ruby/object:Gem::Dependency
|
56
144
|
name: addressable
|
57
145
|
requirement: !ruby/object:Gem::Requirement
|
58
146
|
requirements:
|
59
|
-
- -
|
147
|
+
- - "~>"
|
60
148
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
149
|
+
version: '2'
|
62
150
|
type: :runtime
|
63
151
|
prerelease: false
|
64
152
|
version_requirements: !ruby/object:Gem::Requirement
|
65
153
|
requirements:
|
66
|
-
- -
|
154
|
+
- - "~>"
|
67
155
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
156
|
+
version: '2'
|
69
157
|
- !ruby/object:Gem::Dependency
|
70
158
|
name: bson_ext
|
71
159
|
requirement: !ruby/object:Gem::Requirement
|
72
160
|
requirements:
|
73
|
-
- -
|
161
|
+
- - "~>"
|
74
162
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
163
|
+
version: '1'
|
76
164
|
type: :runtime
|
77
165
|
prerelease: false
|
78
166
|
version_requirements: !ruby/object:Gem::Requirement
|
79
167
|
requirements:
|
80
|
-
- -
|
168
|
+
- - "~>"
|
81
169
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
170
|
+
version: '1'
|
83
171
|
- !ruby/object:Gem::Dependency
|
84
172
|
name: mongoid
|
85
173
|
requirement: !ruby/object:Gem::Requirement
|
86
174
|
requirements:
|
87
|
-
- - ~>
|
175
|
+
- - "~>"
|
88
176
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
177
|
+
version: '7'
|
90
178
|
type: :runtime
|
91
179
|
prerelease: false
|
92
180
|
version_requirements: !ruby/object:Gem::Requirement
|
93
181
|
requirements:
|
94
|
-
- - ~>
|
182
|
+
- - "~>"
|
95
183
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
184
|
+
version: '7'
|
97
185
|
- !ruby/object:Gem::Dependency
|
98
186
|
name: rmagick
|
99
187
|
requirement: !ruby/object:Gem::Requirement
|
100
188
|
requirements:
|
101
|
-
- -
|
189
|
+
- - ">="
|
102
190
|
- !ruby/object:Gem::Version
|
103
191
|
version: '2'
|
192
|
+
- - "<"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '5'
|
104
195
|
type: :runtime
|
105
196
|
prerelease: false
|
106
197
|
version_requirements: !ruby/object:Gem::Requirement
|
107
198
|
requirements:
|
108
|
-
- -
|
199
|
+
- - ">="
|
109
200
|
- !ruby/object:Gem::Version
|
110
201
|
version: '2'
|
202
|
+
- - "<"
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
version: '5'
|
111
205
|
description: Why roast this chestnut by that open fire, you ask? Cause thousands and
|
112
206
|
thousands of Internet vets are still using the one we wrote in PHP eons ago and
|
113
207
|
we don't want to be squandering any incidental Google juice, that's why.
|
114
|
-
email:
|
208
|
+
email:
|
115
209
|
executables: []
|
116
210
|
extensions: []
|
117
211
|
extra_rdoc_files: []
|
118
212
|
files:
|
119
|
-
- .document
|
120
|
-
- .
|
121
|
-
- .
|
122
|
-
- .
|
123
|
-
- .
|
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
|
124
225
|
- Gemfile
|
125
|
-
- Gemfile.lock
|
126
226
|
- LICENSE.txt
|
127
|
-
- README.
|
227
|
+
- README.md
|
128
228
|
- Rakefile
|
229
|
+
- SECURITY.md
|
230
|
+
- certs/ivanoblomov.pem
|
129
231
|
- config/initializers/mime_types.rb
|
130
232
|
- config/mongoid.yml
|
131
233
|
- hit_counter.gemspec
|
132
234
|
- lib/hit_counter.rb
|
133
235
|
- lib/version.rb
|
134
|
-
- public/images/digits/celtic/0.
|
135
|
-
- public/images/digits/celtic/1.
|
136
|
-
- public/images/digits/celtic/2.
|
137
|
-
- public/images/digits/celtic/3.
|
138
|
-
- public/images/digits/celtic/4.
|
139
|
-
- public/images/digits/celtic/5.
|
140
|
-
- public/images/digits/celtic/6.
|
141
|
-
- public/images/digits/celtic/7.
|
142
|
-
- public/images/digits/celtic/8.
|
143
|
-
- public/images/digits/celtic/9.
|
144
|
-
- public/images/digits/odometer/0.
|
145
|
-
- public/images/digits/odometer/1.
|
146
|
-
- public/images/digits/odometer/2.
|
147
|
-
- public/images/digits/odometer/3.
|
148
|
-
- public/images/digits/odometer/4.
|
149
|
-
- public/images/digits/odometer/5.
|
150
|
-
- public/images/digits/odometer/6.
|
151
|
-
- public/images/digits/odometer/7.
|
152
|
-
- public/images/digits/odometer/8.
|
153
|
-
- public/images/digits/odometer/9.
|
154
|
-
- public/images/digits/scout/0.
|
155
|
-
- public/images/digits/scout/1.
|
156
|
-
- public/images/digits/scout/2.
|
157
|
-
- public/images/digits/scout/3.
|
158
|
-
- public/images/digits/scout/4.
|
159
|
-
- public/images/digits/scout/5.
|
160
|
-
- public/images/digits/scout/6.
|
161
|
-
- public/images/digits/scout/7.
|
162
|
-
- public/images/digits/scout/8.
|
163
|
-
- public/images/digits/scout/9.
|
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
|
164
266
|
- spec/lib/hit_counter_spec.rb
|
165
267
|
- spec/spec_helper.rb
|
166
|
-
homepage:
|
268
|
+
homepage: https://github.com/ivanoblomov/hit_counter
|
167
269
|
licenses: []
|
168
270
|
metadata: {}
|
169
|
-
post_install_message:
|
271
|
+
post_install_message:
|
170
272
|
rdoc_options: []
|
171
273
|
require_paths:
|
172
274
|
- lib
|
173
275
|
required_ruby_version: !ruby/object:Gem::Requirement
|
174
276
|
requirements:
|
175
|
-
- -
|
277
|
+
- - ">="
|
176
278
|
- !ruby/object:Gem::Version
|
177
|
-
version: '
|
279
|
+
version: '2.5'
|
178
280
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
281
|
requirements:
|
180
|
-
- -
|
282
|
+
- - ">="
|
181
283
|
- !ruby/object:Gem::Version
|
182
284
|
version: '0'
|
183
285
|
requirements: []
|
184
|
-
|
185
|
-
|
186
|
-
signing_key:
|
286
|
+
rubygems_version: 3.1.4
|
287
|
+
signing_key:
|
187
288
|
specification_version: 4
|
188
289
|
summary: Ruby version of that old 90s chestnut, the web-site hit counter.
|
189
290
|
test_files:
|
metadata.gz.sig
ADDED
Binary file
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby-1.9.3-p385
|
data/.travis.yml
DELETED
data/Gemfile.lock
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
hit_counter (0.1.3)
|
5
|
-
addressable
|
6
|
-
bson_ext
|
7
|
-
mongoid (~> 4)
|
8
|
-
rmagick (~> 2)
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: http://rubygems.org/
|
12
|
-
specs:
|
13
|
-
activemodel (4.1.6)
|
14
|
-
activesupport (= 4.1.6)
|
15
|
-
builder (~> 3.1)
|
16
|
-
activesupport (4.1.6)
|
17
|
-
i18n (~> 0.6, >= 0.6.9)
|
18
|
-
json (~> 1.7, >= 1.7.7)
|
19
|
-
minitest (~> 5.1)
|
20
|
-
thread_safe (~> 0.1)
|
21
|
-
tzinfo (~> 1.1)
|
22
|
-
addressable (2.3.6)
|
23
|
-
bson (2.3.0)
|
24
|
-
bson_ext (1.5.1)
|
25
|
-
builder (3.2.2)
|
26
|
-
connection_pool (2.0.0)
|
27
|
-
diff-lcs (1.2.5)
|
28
|
-
docile (1.1.5)
|
29
|
-
i18n (0.6.11)
|
30
|
-
json (1.8.1)
|
31
|
-
minitest (5.4.2)
|
32
|
-
mongoid (4.0.0)
|
33
|
-
activemodel (~> 4.0)
|
34
|
-
moped (~> 2.0.0)
|
35
|
-
origin (~> 2.1)
|
36
|
-
tzinfo (>= 0.3.37)
|
37
|
-
moped (2.0.0)
|
38
|
-
bson (~> 2.2)
|
39
|
-
connection_pool (~> 2.0)
|
40
|
-
optionable (~> 0.2.0)
|
41
|
-
multi_json (1.10.1)
|
42
|
-
optionable (0.2.0)
|
43
|
-
origin (2.1.1)
|
44
|
-
rake (10.3.2)
|
45
|
-
rmagick (2.13.3)
|
46
|
-
rspec (3.1.0)
|
47
|
-
rspec-core (~> 3.1.0)
|
48
|
-
rspec-expectations (~> 3.1.0)
|
49
|
-
rspec-mocks (~> 3.1.0)
|
50
|
-
rspec-core (3.1.4)
|
51
|
-
rspec-support (~> 3.1.0)
|
52
|
-
rspec-expectations (3.1.2)
|
53
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
54
|
-
rspec-support (~> 3.1.0)
|
55
|
-
rspec-mocks (3.1.2)
|
56
|
-
rspec-support (~> 3.1.0)
|
57
|
-
rspec-support (3.1.1)
|
58
|
-
simplecov (0.9.1)
|
59
|
-
docile (~> 1.1.0)
|
60
|
-
multi_json (~> 1.0)
|
61
|
-
simplecov-html (~> 0.8.0)
|
62
|
-
simplecov-html (0.8.0)
|
63
|
-
thread_safe (0.3.4)
|
64
|
-
tzinfo (1.2.2)
|
65
|
-
thread_safe (~> 0.1)
|
66
|
-
|
67
|
-
PLATFORMS
|
68
|
-
ruby
|
69
|
-
|
70
|
-
DEPENDENCIES
|
71
|
-
hit_counter!
|
72
|
-
rake
|
73
|
-
rspec
|
74
|
-
simplecov
|
data/README.rdoc
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
= HitCounter
|
2
|
-
|
3
|
-
{<img src="https://badge.fury.io/rb/hit_counter.svg" alt="Gem Version" />}[http://badge.fury.io/rb/hit_counter]
|
4
|
-
{<img src="https://codeclimate.com/github/ivanoblomov/hit_counter.png" />}[https://codeclimate.com/github/ivanoblomov/hit_counter]
|
5
|
-
{<img src="https://secure.travis-ci.org/ivanoblomov/hit_counter.png"/>}[http://travis-ci.org/ivanoblomov/hit_counter]
|
6
|
-
{<img src="https://gemnasium.com/ivanoblomov/hit_counter.png" alt="Dependency Status" />}[https://gemnasium.com/ivanoblomov/hit_counter]
|
7
|
-
|
8
|
-
Ruby version of that old 90s chestnut, <BLINK>the web-site hit counter</BLINK>.
|
9
|
-
|
10
|
-
== Installation
|
11
|
-
|
12
|
-
1. Install the gem and supporting files.
|
13
|
-
|
14
|
-
+Gemfile+
|
15
|
-
gem 'hit_counter'
|
16
|
-
|
17
|
-
Run:
|
18
|
-
|
19
|
-
bundle
|
20
|
-
rake hit_counter:install
|
21
|
-
|
22
|
-
2. Add a controller action to your app.
|
23
|
-
|
24
|
-
+application_controller.rb+
|
25
|
-
def hit_counter
|
26
|
-
return if params[:url].blank?
|
27
|
-
|
28
|
-
# find or create a hit counter for this URL
|
29
|
-
hc = HitCounter.get params[:url]
|
30
|
-
|
31
|
-
# increase the tally by one
|
32
|
-
hc.increment
|
33
|
-
|
34
|
-
# get the image as a blob and stream it to the browser
|
35
|
-
send_data hc.image(params[:style]).to_blob, :disposition => 'inline', :filename => "#{hc.hits}.png", :type => :png
|
36
|
-
end
|
37
|
-
|
38
|
-
+routes.rb+
|
39
|
-
get 'hit-counter' => 'application#hit_counter' # technically should be POST/PUT, but GET makes integration simpler
|
40
|
-
|
41
|
-
3. Add the hit-counter image tag to your site's HTML:
|
42
|
-
|
43
|
-
<img alt="Hit Counter" border="0" src="/hit-counter?url=http://cnn.com&style=1" />
|
44
|
-
|
45
|
-
== Customizing the Hit-Counter Image
|
46
|
-
|
47
|
-
=== Use an Existing Style
|
48
|
-
|
49
|
-
You can use one of the three included styles by specifying a different +style+ param in the HTML:
|
50
|
-
|
51
|
-
<img alt="Hit Counter" border="0" src="/hit-counter?url=cnn.com&style=1" />
|
52
|
-
|
53
|
-
The included styles are:
|
54
|
-
|
55
|
-
http://github.com/ivanoblomov/hit_counter/raw/master/public/images/digits/odometer/1.gif odometer
|
56
|
-
http://github.com/ivanoblomov/hit_counter/raw/master/public/images/digits/scout/2.gif scout
|
57
|
-
http://github.com/ivanoblomov/hit_counter/raw/master/public/images/digits/celtic/3.gif Celtic
|
58
|
-
|
59
|
-
=== Create Your Own Style
|
60
|
-
|
61
|
-
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+.
|
62
|
-
|
63
|
-
2. In your controller, declare a new +STYLES+ constant and add the folder name to it:
|
64
|
-
|
65
|
-
HitCounter::STYLES = ['odometer', 'scout', 'celtic', '(folder name)']
|
66
|
-
|
67
|
-
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):
|
68
|
-
|
69
|
-
<img alt="Hit Counter" border="0" src="/hit-counter?url=cnn.com&style=4" />
|
70
|
-
|
71
|
-
== Contributing to hit_counter
|
72
|
-
|
73
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
74
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
75
|
-
* Fork the project
|
76
|
-
* Start a feature/bugfix branch
|
77
|
-
* Commit and push until you are happy with your contribution
|
78
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
79
|
-
* 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.
|
80
|
-
|
81
|
-
== Copyright
|
82
|
-
|
83
|
-
Copyright (c) 2011 Roderick Monje. See LICENSE.txt for
|
84
|
-
further details.
|
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
|