ballonizer_proxy 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/example/settings_example.json +118 -6
- data/lib/ballonizer_proxy.rb +6 -4
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56ae777ab2e308b8c3fdaf60a336dd8ab320c04b
|
4
|
+
data.tar.gz: 7700abe6eb7ce4b4d91c83a4f6282e6330717141
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf5921e6f1ba275c47ebbcbaa139562d972e9ba04d95b334fef1266a536eac910454033d4302535b1312f22ae109bcbb7b256086d50fea1e0d440ed3c582fab8
|
7
|
+
data.tar.gz: 427731810ffd5192d937461b44d82726de31b7d476f9877dc1df2d8f821c90cb4dccdb39e502111b3584bf376c07a0eac0a670f8162e7d2f1c21b6831cd4db1c
|
@@ -2,19 +2,131 @@
|
|
2
2
|
"proxys_namespace": "/proxys/",
|
3
3
|
"ballonizer_proxys": [
|
4
4
|
{
|
5
|
-
"proxy_path": "/
|
6
|
-
"original_domain": "http://
|
5
|
+
"proxy_path": "/xkcd/pt/",
|
6
|
+
"original_domain": "http://xkcd.com",
|
7
|
+
"original_paths": "/",
|
8
|
+
"img_to_ballonize_css_selector": "#comic img",
|
9
|
+
"database_uri": "sqlite://example/xkcd-pt.db",
|
10
|
+
"create_tables_if_none": true
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"proxy_path": "/kiwiblitz/pt/",
|
14
|
+
"original_domain": "http://www.kiwiblitz.com",
|
15
|
+
"original_paths": "/",
|
16
|
+
"img_to_ballonize_css_selector": "#comic img",
|
17
|
+
"database_uri": "sqlite://example/kiwiblitz-pt.db",
|
18
|
+
"create_tables_if_none": true
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"proxy_path": "/gunnerkrigg/pt/",
|
22
|
+
"original_domain": "http://gunnerkrigg.com",
|
23
|
+
"original_paths": "/",
|
24
|
+
"img_to_ballonize_css_selector": ".comic_image",
|
25
|
+
"database_uri": "sqlite://example/gunnerkrigg-pt.db",
|
26
|
+
"create_tables_if_none": true
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"proxy_path": "/sandraandwoo/pt/",
|
30
|
+
"original_domain": "http://www.sandraandwoo.com/",
|
31
|
+
"original_paths": "/",
|
32
|
+
"img_to_ballonize_css_selector": "#comic img",
|
33
|
+
"database_uri": "sqlite://example/sandraandwoo-pt.db",
|
34
|
+
"create_tables_if_none": true
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"proxy_path": "/girlswithslingshots/pt/",
|
38
|
+
"original_domain": "http://www.girlswithslingshots.com",
|
39
|
+
"original_paths": "/",
|
40
|
+
"img_to_ballonize_css_selector": "#comic",
|
41
|
+
"database_uri": "sqlite://example/gws-pt.db",
|
42
|
+
"create_tables_if_none": true
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"proxy_path": "/questionablecontent/pt/",
|
46
|
+
"original_domain": "http://questionablecontent.net",
|
47
|
+
"original_paths": "/",
|
48
|
+
"img_to_ballonize_css_selector": "#strip",
|
49
|
+
"database_uri": "sqlite://example/qc-pt.db",
|
50
|
+
"create_tables_if_none": true
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"proxy_path": "/bittersweetcandybowl/pt/",
|
54
|
+
"original_domain": "http://www.bittersweetcandybowl.com",
|
55
|
+
"original_paths": "/",
|
56
|
+
"img_to_ballonize_css_selector": "#comicpage img",
|
57
|
+
"database_uri": "sqlite://example/bcb-pt.db",
|
58
|
+
"create_tables_if_none": true
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"proxy_path": "/twogag/pt/",
|
62
|
+
"original_domain": "http://www.twogag.com",
|
7
63
|
"original_paths": "/",
|
8
|
-
"img_to_ballonize_css_selector": "
|
9
|
-
"database_uri": "sqlite://example/
|
64
|
+
"img_to_ballonize_css_selector": "#comic img",
|
65
|
+
"database_uri": "sqlite://example/twogag-pt.db",
|
10
66
|
"create_tables_if_none": true
|
11
67
|
},
|
12
68
|
{
|
13
|
-
"proxy_path": "/xkcd/
|
69
|
+
"proxy_path": "/xkcd/es/",
|
14
70
|
"original_domain": "http://xkcd.com",
|
15
71
|
"original_paths": "/",
|
16
72
|
"img_to_ballonize_css_selector": "#comic img",
|
17
|
-
"database_uri": "sqlite://example/xkcd-
|
73
|
+
"database_uri": "sqlite://example/xkcd-es.db",
|
74
|
+
"create_tables_if_none": true
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"proxy_path": "/kiwiblitz/es/",
|
78
|
+
"original_domain": "http://www.kiwiblitz.com",
|
79
|
+
"original_paths": "/",
|
80
|
+
"img_to_ballonize_css_selector": "#comic img",
|
81
|
+
"database_uri": "sqlite://example/kiwiblitz-es.db",
|
82
|
+
"create_tables_if_none": true
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"proxy_path": "/gunnerkrigg/es/",
|
86
|
+
"original_domain": "http://gunnerkrigg.com",
|
87
|
+
"original_paths": "/",
|
88
|
+
"img_to_ballonize_css_selector": ".comic_image",
|
89
|
+
"database_uri": "sqlite://example/gunnerkrigg-es.db",
|
90
|
+
"create_tables_if_none": true
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"proxy_path": "/sandraandwoo/es/",
|
94
|
+
"original_domain": "http://www.sandraandwoo.com/",
|
95
|
+
"original_paths": "/",
|
96
|
+
"img_to_ballonize_css_selector": "#comic img",
|
97
|
+
"database_uri": "sqlite://example/sandraandwoo-es.db",
|
98
|
+
"create_tables_if_none": true
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"proxy_path": "/girlswithslingshots/es/",
|
102
|
+
"original_domain": "http://www.girlswithslingshots.com",
|
103
|
+
"original_paths": "/",
|
104
|
+
"img_to_ballonize_css_selector": "#comic",
|
105
|
+
"database_uri": "sqlite://example/gws-es.db",
|
106
|
+
"create_tables_if_none": true
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"proxy_path": "/questionablecontent/es/",
|
110
|
+
"original_domain": "http://questionablecontent.net",
|
111
|
+
"original_paths": "/",
|
112
|
+
"img_to_ballonize_css_selector": "#strip",
|
113
|
+
"database_uri": "sqlite://example/qc-es.db",
|
114
|
+
"create_tables_if_none": true
|
115
|
+
},
|
116
|
+
{
|
117
|
+
"proxy_path": "/bittersweetcandybowl/es/",
|
118
|
+
"original_domain": "http://www.bittersweetcandybowl.com",
|
119
|
+
"original_paths": "/",
|
120
|
+
"img_to_ballonize_css_selector": "#comicpage img",
|
121
|
+
"database_uri": "sqlite://example/bcb-es.db",
|
122
|
+
"create_tables_if_none": true
|
123
|
+
},
|
124
|
+
{
|
125
|
+
"proxy_path": "/twogag/es/",
|
126
|
+
"original_domain": "http://www.twogag.com",
|
127
|
+
"original_paths": "/",
|
128
|
+
"img_to_ballonize_css_selector": "#comic img",
|
129
|
+
"database_uri": "sqlite://example/twogag-es.db",
|
18
130
|
"create_tables_if_none": true
|
19
131
|
}
|
20
132
|
]
|
data/lib/ballonizer_proxy.rb
CHANGED
@@ -19,13 +19,13 @@ class BallonizerProxy < PrettyProxy
|
|
19
19
|
attr_reader :ballonizer
|
20
20
|
|
21
21
|
def initialize(proxy_path, original_domain, original_paths, database, settings)
|
22
|
-
super(proxy_path, original_domain, original_paths)
|
22
|
+
super(proxy_path, original_domain, original_paths, true)
|
23
23
|
@ballonizer = Ballonizer.new(database, settings)
|
24
24
|
end
|
25
25
|
|
26
26
|
def sugared_rewrite_response(triplet, requested_to_proxy_env, rewritten_env)
|
27
27
|
status, headers, page = triplet
|
28
|
-
original_url = Rack::Request.new(
|
28
|
+
original_url = Rack::Request.new(rewritten_env).url
|
29
29
|
requested_to_proxy_url = Rack::Request.new(requested_to_proxy_env).url
|
30
30
|
proxy_site = Addressable::URI.parse(requested_to_proxy_url).site
|
31
31
|
|
@@ -130,6 +130,8 @@ class BallonizerProxyGenerator
|
|
130
130
|
form_handler_url: bp_config['proxy_path'] + 'request_handler',
|
131
131
|
add_required_css: true,
|
132
132
|
add_required_js_libs_for_edition: true,
|
133
|
+
add_js_for_edition: true,
|
134
|
+
jquery_no_conflict: true,
|
133
135
|
create_tables_if_none: true,
|
134
136
|
# the paths for assets are made absolute in BallonizerProxy
|
135
137
|
css_asset_path_for_link: ASSET_PATH,
|
@@ -175,7 +177,7 @@ class BallonizerProxyGenerator
|
|
175
177
|
end
|
176
178
|
|
177
179
|
# The proxy namespace can't be assets
|
178
|
-
def self.validate_settings(settings)
|
179
|
-
end
|
180
|
+
# def self.validate_settings(settings)
|
181
|
+
# end
|
180
182
|
end
|
181
183
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ballonizer_proxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrique Becker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ballonizer
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.7.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.7.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pretty_proxy
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1.5'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: sqlite3
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.3'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.3'
|
83
97
|
description: ''
|
84
98
|
email: henriquebecker91@gmail.com
|
85
99
|
executables: []
|