gricer 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +7 -23
- data/app/assets/stylesheets/gricer/fluid.css.scss +1 -1
- data/db/migrate/20110819130712_referer_path_as_text.rb +9 -0
- data/lib/gricer.rb +7 -3
- data/lib/gricer/engine.rb +0 -2
- data/spec/controllers/gricer/base_controller_spec.rb +8 -6
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +5 -5
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +8291 -0
- data/spec/dummy/log/test.log +6815 -0
- data/spec/models/gricer/request_spec.rb +11 -0
- metadata +11 -7
- data/lib/gricer/localization.rb +0 -3
@@ -67,6 +67,17 @@ describe Gricer::Request do
|
|
67
67
|
subject.referer_host.should == 'my.domain'
|
68
68
|
end
|
69
69
|
|
70
|
+
it 'should accept long referer paths' do
|
71
|
+
subject.referer = 'http://my.domain/this/is/a/very/long/path/to/the/page/i/was/referenced/by/and/that/got/tracked/by/gricer/and/should/be/stored/in/a/database/field/to/short/for/storing/the/given/value/as/string/has/only/256/characters/that_should_just_work_fine_and_should_not_create_an_error.html'
|
72
|
+
# Emulate SQL db that truncates to long input like MySQL
|
73
|
+
if limit = Gricer::Request.columns_hash['referer_path'].limit
|
74
|
+
subject.referer_path = subject.referer_path[0, limit]
|
75
|
+
end
|
76
|
+
limit.should be_nil
|
77
|
+
|
78
|
+
subject.referer_path.should == '/this/is/a/very/long/path/to/the/page/i/was/referenced/by/and/that/got/tracked/by/gricer/and/should/be/stored/in/a/database/field/to/short/for/storing/the/given/value/as/string/has/only/256/characters/that_should_just_work_fine_and_should_not_create_an_error.html'
|
79
|
+
end
|
80
|
+
|
70
81
|
end
|
71
82
|
|
72
83
|
context 'Search Engines' do
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: gricer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Sven G. Broenstrup
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-08-
|
13
|
+
date: 2011-08-19 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
requirements:
|
22
22
|
- - ">="
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: 3.1.0.
|
24
|
+
version: 3.1.0.rc
|
25
25
|
type: :runtime
|
26
26
|
version_requirements: *id001
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - ">="
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version:
|
35
|
+
version: 2.2.0
|
36
36
|
type: :runtime
|
37
37
|
version_requirements: *id002
|
38
38
|
- !ruby/object:Gem::Dependency
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: 3.1.0.rc
|
47
47
|
type: :runtime
|
48
48
|
version_requirements: *id003
|
49
49
|
- !ruby/object:Gem::Dependency
|
@@ -95,7 +95,6 @@ files:
|
|
95
95
|
- lib/gricer/active_model/statistics.rb
|
96
96
|
- lib/gricer/config.rb
|
97
97
|
- lib/gricer/engine.rb
|
98
|
-
- lib/gricer/localization.rb
|
99
98
|
- lib/gricer.rb
|
100
99
|
- lib/tasks/gricer_tasks.rake
|
101
100
|
- spec/controllers/gricer/base_controller_spec.rb
|
@@ -131,7 +130,11 @@ files:
|
|
131
130
|
- spec/dummy/config/locales/en.yml
|
132
131
|
- spec/dummy/config/routes.rb
|
133
132
|
- spec/dummy/config.ru
|
133
|
+
- spec/dummy/db/development.sqlite3
|
134
134
|
- spec/dummy/db/schema.rb
|
135
|
+
- spec/dummy/db/test.sqlite3
|
136
|
+
- spec/dummy/log/development.log
|
137
|
+
- spec/dummy/log/test.log
|
135
138
|
- spec/dummy/public/404.html
|
136
139
|
- spec/dummy/public/422.html
|
137
140
|
- spec/dummy/public/500.html
|
@@ -149,6 +152,7 @@ files:
|
|
149
152
|
- spec/routing/sessions_routes_spec.rb
|
150
153
|
- spec/spec_helper.rb
|
151
154
|
- db/migrate/20110629151515_create_visits_tracking.rb
|
155
|
+
- db/migrate/20110819130712_referer_path_as_text.rb
|
152
156
|
- config/locales/en.yml
|
153
157
|
- config/routes.rb
|
154
158
|
- MIT-LICENSE
|
@@ -156,7 +160,7 @@ files:
|
|
156
160
|
- README.rdoc
|
157
161
|
- script/rails
|
158
162
|
has_rdoc: true
|
159
|
-
homepage:
|
163
|
+
homepage: http://gricer.org/
|
160
164
|
licenses: []
|
161
165
|
|
162
166
|
post_install_message:
|
data/lib/gricer/localization.rb
DELETED