hit_counter 0.1.3 → 0.1.6
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 +42 -0
- data/.gitignore +2 -1
- data/.simplecov +15 -0
- data/CODE_OF_CONDUCT.md +10 -0
- data/CONTRIBUTING.md +34 -0
- data/Gemfile +14 -2
- data/LICENSE.txt +17 -11
- data/README.md +120 -0
- data/Rakefile +16 -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 +20 -18
- data/lib/hit_counter.rb +86 -90
- data/lib/tasks/install.rake +6 -0
- data/lib/version.rb +5 -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 +103 -71
- data/spec/spec_helper.rb +47 -6
- data.tar.gz.sig +0 -0
- metadata +106 -110
- 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,191 +1,187 @@
|
|
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.6
|
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: 2022-03-01 00:00:00.000000000 Z
|
12
38
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: rake
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ! '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ! '>='
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rspec
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ! '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ! '>='
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: simplecov
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ! '>='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ! '>='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
39
|
- !ruby/object:Gem::Dependency
|
56
40
|
name: addressable
|
57
41
|
requirement: !ruby/object:Gem::Requirement
|
58
42
|
requirements:
|
59
|
-
- -
|
43
|
+
- - "~>"
|
60
44
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
45
|
+
version: '2'
|
62
46
|
type: :runtime
|
63
47
|
prerelease: false
|
64
48
|
version_requirements: !ruby/object:Gem::Requirement
|
65
49
|
requirements:
|
66
|
-
- -
|
50
|
+
- - "~>"
|
67
51
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
52
|
+
version: '2'
|
69
53
|
- !ruby/object:Gem::Dependency
|
70
54
|
name: bson_ext
|
71
55
|
requirement: !ruby/object:Gem::Requirement
|
72
56
|
requirements:
|
73
|
-
- -
|
57
|
+
- - "~>"
|
74
58
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
59
|
+
version: '1'
|
76
60
|
type: :runtime
|
77
61
|
prerelease: false
|
78
62
|
version_requirements: !ruby/object:Gem::Requirement
|
79
63
|
requirements:
|
80
|
-
- -
|
64
|
+
- - "~>"
|
81
65
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
66
|
+
version: '1'
|
83
67
|
- !ruby/object:Gem::Dependency
|
84
68
|
name: mongoid
|
85
69
|
requirement: !ruby/object:Gem::Requirement
|
86
70
|
requirements:
|
87
|
-
- - ~>
|
71
|
+
- - "~>"
|
88
72
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
73
|
+
version: '7'
|
90
74
|
type: :runtime
|
91
75
|
prerelease: false
|
92
76
|
version_requirements: !ruby/object:Gem::Requirement
|
93
77
|
requirements:
|
94
|
-
- - ~>
|
78
|
+
- - "~>"
|
95
79
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
80
|
+
version: '7'
|
97
81
|
- !ruby/object:Gem::Dependency
|
98
82
|
name: rmagick
|
99
83
|
requirement: !ruby/object:Gem::Requirement
|
100
84
|
requirements:
|
101
|
-
- -
|
85
|
+
- - ">="
|
102
86
|
- !ruby/object:Gem::Version
|
103
87
|
version: '2'
|
88
|
+
- - "<"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '5'
|
104
91
|
type: :runtime
|
105
92
|
prerelease: false
|
106
93
|
version_requirements: !ruby/object:Gem::Requirement
|
107
94
|
requirements:
|
108
|
-
- -
|
95
|
+
- - ">="
|
109
96
|
- !ruby/object:Gem::Version
|
110
97
|
version: '2'
|
98
|
+
- - "<"
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '5'
|
111
101
|
description: Why roast this chestnut by that open fire, you ask? Cause thousands and
|
112
102
|
thousands of Internet vets are still using the one we wrote in PHP eons ago and
|
113
103
|
we don't want to be squandering any incidental Google juice, that's why.
|
114
|
-
email:
|
104
|
+
email:
|
115
105
|
executables: []
|
116
106
|
extensions: []
|
117
107
|
extra_rdoc_files: []
|
118
108
|
files:
|
119
|
-
- .document
|
120
|
-
- .
|
121
|
-
- .
|
122
|
-
- .
|
123
|
-
- .
|
109
|
+
- ".document"
|
110
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
111
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
112
|
+
- ".github/ISSUE_TEMPLATE/task.md"
|
113
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
114
|
+
- ".github/dependabot.yml"
|
115
|
+
- ".github/workflows/test.yml"
|
116
|
+
- ".gitignore"
|
117
|
+
- ".rspec"
|
118
|
+
- ".simplecov"
|
119
|
+
- CODE_OF_CONDUCT.md
|
120
|
+
- CONTRIBUTING.md
|
124
121
|
- Gemfile
|
125
|
-
- Gemfile.lock
|
126
122
|
- LICENSE.txt
|
127
|
-
- README.
|
123
|
+
- README.md
|
128
124
|
- Rakefile
|
125
|
+
- SECURITY.md
|
126
|
+
- certs/ivanoblomov.pem
|
129
127
|
- config/initializers/mime_types.rb
|
130
128
|
- config/mongoid.yml
|
131
129
|
- hit_counter.gemspec
|
132
130
|
- lib/hit_counter.rb
|
131
|
+
- lib/tasks/install.rake
|
133
132
|
- 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.
|
133
|
+
- public/images/digits/celtic/0.png
|
134
|
+
- public/images/digits/celtic/1.png
|
135
|
+
- public/images/digits/celtic/2.png
|
136
|
+
- public/images/digits/celtic/3.png
|
137
|
+
- public/images/digits/celtic/4.png
|
138
|
+
- public/images/digits/celtic/5.png
|
139
|
+
- public/images/digits/celtic/6.png
|
140
|
+
- public/images/digits/celtic/7.png
|
141
|
+
- public/images/digits/celtic/8.png
|
142
|
+
- public/images/digits/celtic/9.png
|
143
|
+
- public/images/digits/odometer/0.png
|
144
|
+
- public/images/digits/odometer/1.png
|
145
|
+
- public/images/digits/odometer/2.png
|
146
|
+
- public/images/digits/odometer/3.png
|
147
|
+
- public/images/digits/odometer/4.png
|
148
|
+
- public/images/digits/odometer/5.png
|
149
|
+
- public/images/digits/odometer/6.png
|
150
|
+
- public/images/digits/odometer/7.png
|
151
|
+
- public/images/digits/odometer/8.png
|
152
|
+
- public/images/digits/odometer/9.png
|
153
|
+
- public/images/digits/scout/0.png
|
154
|
+
- public/images/digits/scout/1.png
|
155
|
+
- public/images/digits/scout/2.png
|
156
|
+
- public/images/digits/scout/3.png
|
157
|
+
- public/images/digits/scout/4.png
|
158
|
+
- public/images/digits/scout/5.png
|
159
|
+
- public/images/digits/scout/6.png
|
160
|
+
- public/images/digits/scout/7.png
|
161
|
+
- public/images/digits/scout/8.png
|
162
|
+
- public/images/digits/scout/9.png
|
164
163
|
- spec/lib/hit_counter_spec.rb
|
165
164
|
- spec/spec_helper.rb
|
166
|
-
homepage:
|
165
|
+
homepage: https://github.com/FoveaCentral/hit_counter
|
167
166
|
licenses: []
|
168
167
|
metadata: {}
|
169
|
-
post_install_message:
|
168
|
+
post_install_message:
|
170
169
|
rdoc_options: []
|
171
170
|
require_paths:
|
172
171
|
- lib
|
173
172
|
required_ruby_version: !ruby/object:Gem::Requirement
|
174
173
|
requirements:
|
175
|
-
- -
|
174
|
+
- - ">="
|
176
175
|
- !ruby/object:Gem::Version
|
177
|
-
version: '
|
176
|
+
version: '2.5'
|
178
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
178
|
requirements:
|
180
|
-
- -
|
179
|
+
- - ">="
|
181
180
|
- !ruby/object:Gem::Version
|
182
181
|
version: '0'
|
183
182
|
requirements: []
|
184
|
-
|
185
|
-
|
186
|
-
signing_key:
|
183
|
+
rubygems_version: 3.1.6
|
184
|
+
signing_key:
|
187
185
|
specification_version: 4
|
188
|
-
summary: Ruby version of that old 90s chestnut, the web-site hit counter.
|
189
|
-
test_files:
|
190
|
-
- spec/lib/hit_counter_spec.rb
|
191
|
-
- spec/spec_helper.rb
|
186
|
+
summary: Self-hosted Ruby version of that old 90s chestnut, the web-site hit counter.
|
187
|
+
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
|