hashbang 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +4 -4
- data/README.md +26 -1
- data/hashbang.gemspec +3 -3
- metadata +10 -10
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
hashbang (0.0
|
4
|
+
hashbang (1.0.0)
|
5
5
|
headless
|
6
|
-
sunscraper (~> 1.
|
6
|
+
sunscraper (~> 1.2.0.pre1)
|
7
7
|
unicorn
|
8
8
|
|
9
9
|
GEM
|
@@ -11,10 +11,10 @@ GEM
|
|
11
11
|
specs:
|
12
12
|
ffi (1.0.11)
|
13
13
|
headless (0.2.2)
|
14
|
-
kgio (2.7.
|
14
|
+
kgio (2.7.3)
|
15
15
|
rack (1.4.1)
|
16
16
|
raindrops (0.8.0)
|
17
|
-
sunscraper (1.
|
17
|
+
sunscraper (1.2.0.pre1)
|
18
18
|
ffi (>= 1.0.11)
|
19
19
|
unicorn (4.2.0)
|
20
20
|
kgio (~> 2.6)
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ Hashbang uses [Sunscraper](http://github.com/roundlake/sunscraper) and therefore
|
|
11
11
|
|
12
12
|
## Environments are specific
|
13
13
|
|
14
|
-
|
14
|
+
While working with at development environment, this gem will catch all the requests containing `_escaped_fragment_` directly from Rails using middleware and therefore it will just work **(see P.S. below)**. Go to `http://localhost:3000?_escaped_fragment_=test` to make Hashbang load and dump `http://localhost:3000/#!/test` for you.
|
15
15
|
|
16
16
|
Due to security and performance reasons, at the production servers you are supposed to boot this Rack app separately and manually forward all the magic requests to the standalone instance.
|
17
17
|
|
@@ -72,6 +72,31 @@ To help Sunscraper (virtual browser of Hashbang) understand what should be consi
|
|
72
72
|
if (typeof Sunscraper !== "undefined") { Sunscraper.finish() }
|
73
73
|
```
|
74
74
|
|
75
|
+
## Typical production configurations
|
76
|
+
|
77
|
+
### Nginx + Passenger
|
78
|
+
|
79
|
+
This configuration includes usage of `limit_conn_module` of nginx which is not compiled by default. Please setup it according to [official manual](http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html). You can omit `limit_conn` directive but you never should do it since hasbang will always dramaticaly increase your server load. And 5 concurent connections is quite always enough to serve search engine bots.
|
80
|
+
|
81
|
+
```
|
82
|
+
upstream hashbang-dvnts {
|
83
|
+
server localhost:22333;
|
84
|
+
}
|
85
|
+
|
86
|
+
server {
|
87
|
+
listen 22333;
|
88
|
+
server_name localhost;
|
89
|
+
|
90
|
+
location / {
|
91
|
+
limit_conn perserver 5;
|
92
|
+
root /path/to/project/current/hashbang/public;
|
93
|
+
passenger_enabled on;
|
94
|
+
access_log /path/to/project/current/log/hashbang.access.log;
|
95
|
+
error_log /path/to/project/current/log/hashbang.error.log;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
```
|
99
|
+
|
75
100
|
## Memory consumption
|
76
101
|
|
77
102
|
Hashbang will keep one instance of Sunscraper per each Hashbang instance. Sunscraper bundles clear QTWebKit and therefore keeps memory consumption as low as possible for virtual browsers. However it can still be noticeable and therefore you should only increase possible concurency if your resource gets indexed often.
|
data/hashbang.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "hashbang"
|
3
|
-
s.version = "1.0.
|
3
|
+
s.version = "1.0.1"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.summary = "Magic support of Google/Bing/... AJAX search indexing for your Rails apps"
|
6
6
|
s.email = "boris@roundlake.ru"
|
@@ -12,6 +12,6 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
|
14
14
|
s.add_dependency 'headless'
|
15
|
-
s.add_dependency 'sunscraper', '~> 1.
|
16
|
-
s.
|
15
|
+
s.add_dependency 'sunscraper', '~> 1.2.0.pre1'
|
16
|
+
s.add_dependency 'unicorn'
|
17
17
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hashbang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03-
|
12
|
+
date: 2012-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: headless
|
16
|
-
requirement: &
|
16
|
+
requirement: &70125844892140 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,29 +21,29 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70125844892140
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: sunscraper
|
27
|
-
requirement: &
|
27
|
+
requirement: &70125844891520 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 1.
|
32
|
+
version: 1.2.0.pre1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70125844891520
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: unicorn
|
38
|
-
requirement: &
|
38
|
+
requirement: &70125844890880 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '0'
|
44
|
-
type: :
|
44
|
+
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70125844890880
|
47
47
|
description: Hashbang is a tiny Rack proxy serving HTML dumps for your RICH web-applications
|
48
48
|
according to Google AJAX Crawling conventions. Make your Rails AJAX applications
|
49
49
|
indexable in no time.
|