radiospieler 2012.09.13 → 2013.04.01
Sign up to get free protection for your applications and to get access to all the features.
- data/.sparkleshare +1 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +31 -16
- data/lib/extensions/http.rb +12 -7
- metadata +21 -34
data/.sparkleshare
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
e33db71d1e6a8404dc4e1408f865bae5605032a7
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,17 +1,28 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
addressable (2.
|
4
|
+
addressable (2.3.3)
|
5
5
|
archive-tar-minitar (0.5.2)
|
6
6
|
columnize (0.3.6)
|
7
|
-
crack (0.3.
|
7
|
+
crack (0.3.2)
|
8
|
+
expectation (0.3.1)
|
8
9
|
htmlentities (4.3.1)
|
10
|
+
json (1.7.7)
|
9
11
|
linecache19 (0.5.12)
|
10
12
|
ruby_core_source (>= 0.1.4)
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
13
|
+
micro_sql (0.4.1)
|
14
|
+
pg
|
15
|
+
sqlite3
|
16
|
+
multi_json (1.7.2)
|
17
|
+
nokogiri (1.5.9)
|
18
|
+
pg (0.15.0)
|
19
|
+
psych (1.3.4)
|
20
|
+
rake (10.0.4)
|
21
|
+
rdoc (4.0.1)
|
22
|
+
json (~> 1.4)
|
23
|
+
redis (3.0.3)
|
24
|
+
redis-namespace (1.2.1)
|
25
|
+
redis (~> 3.0.0)
|
15
26
|
ruby-debug-base19 (0.11.25)
|
16
27
|
columnize (>= 0.3.1)
|
17
28
|
linecache19 (>= 0.5.11)
|
@@ -22,19 +33,22 @@ GEM
|
|
22
33
|
ruby-debug-base19 (>= 0.11.19)
|
23
34
|
ruby_core_source (0.1.5)
|
24
35
|
archive-tar-minitar (>= 0.5.2)
|
25
|
-
simple_cache_rs (0.
|
26
|
-
|
36
|
+
simple_cache_rs (0.11.1)
|
37
|
+
expectation
|
38
|
+
micro_sql
|
39
|
+
redis
|
40
|
+
redis-namespace
|
27
41
|
simple_cov (0.2.0)
|
28
|
-
simplecov (0.
|
42
|
+
simplecov (0.7.1)
|
29
43
|
multi_json (~> 1.0)
|
30
|
-
simplecov-html (~> 0.
|
31
|
-
simplecov-html (0.
|
32
|
-
sqlite3 (1.3.
|
33
|
-
test-unit (2.5.
|
34
|
-
vcr (2.
|
35
|
-
webmock (1.
|
44
|
+
simplecov-html (~> 0.7.1)
|
45
|
+
simplecov-html (0.7.1)
|
46
|
+
sqlite3 (1.3.7)
|
47
|
+
test-unit (2.5.4)
|
48
|
+
vcr (2.4.0)
|
49
|
+
webmock (1.11.0)
|
36
50
|
addressable (>= 2.2.7)
|
37
|
-
crack (>= 0.
|
51
|
+
crack (>= 0.3.2)
|
38
52
|
|
39
53
|
PLATFORMS
|
40
54
|
ruby
|
@@ -46,6 +60,7 @@ DEPENDENCIES
|
|
46
60
|
nokogiri
|
47
61
|
psych
|
48
62
|
rake
|
63
|
+
rdoc
|
49
64
|
ruby-debug19
|
50
65
|
simple_cache_rs
|
51
66
|
simple_cov
|
data/lib/extensions/http.rb
CHANGED
@@ -29,22 +29,27 @@ module Http
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def get(url, max_age = nil)
|
32
|
-
|
33
|
-
reencode body, (headers["content-type"] || []).join(";")
|
32
|
+
get_body(url, max_age, :text)
|
34
33
|
end
|
35
34
|
|
36
35
|
def get_binary(url, max_age = nil)
|
37
|
-
|
38
|
-
body
|
36
|
+
get_body(url, max_age, :binary)
|
39
37
|
end
|
40
38
|
|
41
|
-
def
|
39
|
+
def get_body(url, max_age, mode)
|
42
40
|
max_age ||= MaxAge.for(url)
|
43
41
|
|
44
42
|
App.logger.benchmark("[GET] #{url}", :minimum => 20) do
|
45
|
-
SimpleCache.cached("
|
43
|
+
SimpleCache.cached("g-#{url}", max_age) do
|
46
44
|
App.logger.debug "[GET] #{url}"
|
47
|
-
get_body_and_headers_(url)
|
45
|
+
body, headers = get_body_and_headers_(url)
|
46
|
+
|
47
|
+
if mode == :text
|
48
|
+
content_types = (headers["content-type"] || []).join(";")
|
49
|
+
body = reencode body, content_types
|
50
|
+
end
|
51
|
+
|
52
|
+
body
|
48
53
|
end
|
49
54
|
end
|
50
55
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiospieler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2013.04.01
|
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:
|
12
|
+
date: 2013-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70196555697160 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,15 +21,21 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: *70196555697160
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rdoc
|
27
|
+
requirement: &70196555694940 !ruby/object:Gem::Requirement
|
25
28
|
none: false
|
26
29
|
requirements:
|
27
30
|
- - ! '>='
|
28
31
|
- !ruby/object:Gem::Version
|
29
32
|
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70196555694940
|
30
36
|
- !ruby/object:Gem::Dependency
|
31
37
|
name: htmlentities
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirement: &70196555692220 !ruby/object:Gem::Requirement
|
33
39
|
none: false
|
34
40
|
requirements:
|
35
41
|
- - ! '>='
|
@@ -37,15 +43,10 @@ dependencies:
|
|
37
43
|
version: '0'
|
38
44
|
type: :runtime
|
39
45
|
prerelease: false
|
40
|
-
version_requirements:
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
46
|
+
version_requirements: *70196555692220
|
46
47
|
- !ruby/object:Gem::Dependency
|
47
48
|
name: simple_cache_rs
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
+
requirement: &70196555690100 !ruby/object:Gem::Requirement
|
49
50
|
none: false
|
50
51
|
requirements:
|
51
52
|
- - ! '>='
|
@@ -53,15 +54,10 @@ dependencies:
|
|
53
54
|
version: '0'
|
54
55
|
type: :runtime
|
55
56
|
prerelease: false
|
56
|
-
version_requirements:
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
57
|
+
version_requirements: *70196555690100
|
62
58
|
- !ruby/object:Gem::Dependency
|
63
59
|
name: nokogiri
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirement: &70196555688980 !ruby/object:Gem::Requirement
|
65
61
|
none: false
|
66
62
|
requirements:
|
67
63
|
- - ! '>='
|
@@ -69,15 +65,10 @@ dependencies:
|
|
69
65
|
version: '0'
|
70
66
|
type: :runtime
|
71
67
|
prerelease: false
|
72
|
-
version_requirements:
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ! '>='
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
68
|
+
version_requirements: *70196555688980
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: addressable
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirement: &70196555687780 !ruby/object:Gem::Requirement
|
81
72
|
none: false
|
82
73
|
requirements:
|
83
74
|
- - ! '>='
|
@@ -85,12 +76,7 @@ dependencies:
|
|
85
76
|
version: '0'
|
86
77
|
type: :runtime
|
87
78
|
prerelease: false
|
88
|
-
version_requirements:
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ! '>='
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '0'
|
79
|
+
version_requirements: *70196555687780
|
94
80
|
description: Some basics that your application could benefit from.
|
95
81
|
email:
|
96
82
|
- eno@open-lab.org
|
@@ -102,6 +88,7 @@ extra_rdoc_files:
|
|
102
88
|
files:
|
103
89
|
- .document
|
104
90
|
- .gitignore
|
91
|
+
- .sparkleshare
|
105
92
|
- Gemfile
|
106
93
|
- Gemfile.lock
|
107
94
|
- LICENSE.txt
|
@@ -158,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
158
145
|
version: '0'
|
159
146
|
segments:
|
160
147
|
- 0
|
161
|
-
hash: -
|
148
|
+
hash: -1174214088660306060
|
162
149
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
150
|
none: false
|
164
151
|
requirements:
|
@@ -167,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
154
|
version: '0'
|
168
155
|
requirements: []
|
169
156
|
rubyforge_project:
|
170
|
-
rubygems_version: 1.8.
|
157
|
+
rubygems_version: 1.8.10
|
171
158
|
signing_key:
|
172
159
|
specification_version: 3
|
173
160
|
summary: Some basics that your application could benefit from.
|