galakei 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/lib/galakei/request.rb +1 -1
- data/lib/galakei/version.rb +1 -1
- data/spec/galakei/request_spec.rb +23 -18
- metadata +52 -88
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/lib/galakei/request.rb
CHANGED
data/lib/galakei/version.rb
CHANGED
@@ -3,66 +3,71 @@ require 'spec_helper'
|
|
3
3
|
%w[docomo au softbank].each do |carrier|
|
4
4
|
shared_examples_for "non-#{carrier} devices" do
|
5
5
|
it("should not be #{carrier}?") do
|
6
|
-
|
6
|
+
should_not send("be_#{carrier}")
|
7
7
|
end
|
8
8
|
end
|
9
9
|
shared_examples_for "#{carrier} devices" do
|
10
10
|
it("should be #{carrier}?") do
|
11
|
-
|
11
|
+
should send("be_#{carrier}")
|
12
12
|
end
|
13
|
-
it("should be galakei") {
|
13
|
+
it("should be galakei") { should be_galakei }
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
17
|
describe Galakei::Request do
|
18
18
|
describe "from Firefox" do
|
19
|
-
|
19
|
+
subject { Rack::Request.new(env_for_firefox) }
|
20
20
|
it_should_behave_like "non-au devices"
|
21
21
|
it_should_behave_like "non-docomo devices"
|
22
22
|
it_should_behave_like "non-softbank devices"
|
23
|
-
it("should not be galakei") {
|
24
|
-
it {
|
23
|
+
it("should not be galakei") { should_not be_galakei }
|
24
|
+
it { subject.galakei_uid.should be_nil }
|
25
25
|
end
|
26
26
|
|
27
27
|
describe "from Docomo SH-06A" do
|
28
|
-
|
28
|
+
subject { Rack::Request.new(env_for_docomo_1_0) }
|
29
29
|
it_should_behave_like "docomo devices"
|
30
30
|
it_should_behave_like "non-au devices"
|
31
31
|
it_should_behave_like "non-softbank devices"
|
32
|
-
it {
|
32
|
+
it { subject.galakei_uid.should == "0000002" }
|
33
33
|
end
|
34
34
|
|
35
35
|
describe "from AU W51SH" do
|
36
|
-
|
36
|
+
subject { Rack::Request.new(env_for_au_6_2) }
|
37
37
|
it_should_behave_like "non-docomo devices"
|
38
38
|
it_should_behave_like "non-softbank devices"
|
39
39
|
it_should_behave_like "au devices"
|
40
|
-
it("should be browser 6") {
|
41
|
-
it {
|
40
|
+
it("should be browser 6") { should be_au_browser_6 }
|
41
|
+
it { subject.galakei_uid.should == "1234567890_ve.ezweb.ne.jp" }
|
42
42
|
end
|
43
43
|
|
44
44
|
describe "from AU W54SH" do
|
45
|
-
|
45
|
+
subject { Rack::Request.new(env_for_au_7_2) }
|
46
46
|
it_should_behave_like "non-docomo devices"
|
47
47
|
it_should_behave_like "non-softbank devices"
|
48
48
|
it_should_behave_like "au devices"
|
49
|
-
it("should not be browser 6") {
|
50
|
-
it {
|
49
|
+
it("should not be browser 6") { should_not be_au_browser_6 }
|
50
|
+
it { subject.galakei_uid.should == "1234567890_ve.ezweb.ne.jp" }
|
51
51
|
end
|
52
52
|
|
53
53
|
describe "from Vodafone" do
|
54
|
-
|
54
|
+
subject { Rack::Request.new(env_for_vodafone) }
|
55
55
|
it_should_behave_like "non-au devices"
|
56
56
|
it_should_behave_like "non-docomo devices"
|
57
57
|
it_should_behave_like "softbank devices"
|
58
|
-
it {
|
58
|
+
it { subject.galakei_uid.should == "11111111msimmsim" }
|
59
59
|
end
|
60
60
|
|
61
61
|
describe "from Softbank 709SC" do
|
62
|
-
|
62
|
+
subject { Rack::Request.new(env_for_softbank) }
|
63
63
|
it_should_behave_like "non-au devices"
|
64
64
|
it_should_behave_like "non-docomo devices"
|
65
65
|
it_should_behave_like "softbank devices"
|
66
|
-
it {
|
66
|
+
it { subject.galakei_uid.should == "11111111msimmsim" }
|
67
|
+
end
|
68
|
+
|
69
|
+
describe "from Docomo HT-03A (android)" do
|
70
|
+
subject { Rack::Request.new("HTTP_USER_AGENT" => "Mozilla/5.0 (Linux; U; Android 1.6; ja-jp; Docomo HT-03A Build/DRD08) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1") }
|
71
|
+
it { should_not be_docomo }
|
67
72
|
end
|
68
73
|
end
|
metadata
CHANGED
@@ -1,94 +1,69 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: galakei
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 8
|
9
|
-
- 0
|
10
|
-
version: 0.8.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.8.1
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Paul McMahon
|
14
9
|
- Michael Reinsch
|
15
10
|
- Yuki Akamatsu
|
16
11
|
autorequire:
|
17
12
|
bindir: bin
|
18
13
|
cert_chain: []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
dependencies:
|
23
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
date: 2011-08-18 00:00:00.000000000Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
24
17
|
name: actionpack
|
25
|
-
|
26
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirement: &2157357860 !ruby/object:Gem::Requirement
|
27
19
|
none: false
|
28
|
-
requirements:
|
29
|
-
- -
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
hash: 1
|
32
|
-
segments:
|
33
|
-
- 3
|
34
|
-
- 0
|
35
|
-
- 3
|
20
|
+
requirements:
|
21
|
+
- - ! '>='
|
22
|
+
- !ruby/object:Gem::Version
|
36
23
|
version: 3.0.3
|
37
24
|
type: :runtime
|
38
|
-
version_requirements: *id001
|
39
|
-
- !ruby/object:Gem::Dependency
|
40
|
-
name: rack
|
41
25
|
prerelease: false
|
42
|
-
|
26
|
+
version_requirements: *2157357860
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rack
|
29
|
+
requirement: &2157357160 !ruby/object:Gem::Requirement
|
43
30
|
none: false
|
44
|
-
requirements:
|
45
|
-
- -
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
hash: 29
|
48
|
-
segments:
|
49
|
-
- 1
|
50
|
-
- 2
|
51
|
-
- 1
|
31
|
+
requirements:
|
32
|
+
- - ! '>='
|
33
|
+
- !ruby/object:Gem::Version
|
52
34
|
version: 1.2.1
|
53
35
|
type: :runtime
|
54
|
-
version_requirements: *id002
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: css_parser
|
57
36
|
prerelease: false
|
58
|
-
|
37
|
+
version_requirements: *2157357160
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: css_parser
|
40
|
+
requirement: &2157356640 !ruby/object:Gem::Requirement
|
59
41
|
none: false
|
60
|
-
requirements:
|
61
|
-
- -
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
|
64
|
-
segments:
|
65
|
-
- 0
|
66
|
-
version: "0"
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
67
46
|
type: :runtime
|
68
|
-
version_requirements: *id003
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: nokogiri
|
71
47
|
prerelease: false
|
72
|
-
|
48
|
+
version_requirements: *2157356640
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: nokogiri
|
51
|
+
requirement: &2157351660 !ruby/object:Gem::Requirement
|
73
52
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
78
|
-
segments:
|
79
|
-
- 0
|
80
|
-
version: "0"
|
53
|
+
requirements:
|
54
|
+
- - ! '>='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
81
57
|
type: :runtime
|
82
|
-
|
83
|
-
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: *2157351660
|
60
|
+
description: Japanese feature phones (a.k.a., keitai, galakei) have a number of restrictions
|
61
|
+
over normal web browsers. This library adds support for them
|
84
62
|
email: info@mobalean.com
|
85
63
|
executables: []
|
86
|
-
|
87
64
|
extensions: []
|
88
|
-
|
89
65
|
extra_rdoc_files: []
|
90
|
-
|
91
|
-
files:
|
66
|
+
files:
|
92
67
|
- .gitignore
|
93
68
|
- Gemfile
|
94
69
|
- Gemfile.lock
|
@@ -149,39 +124,28 @@ files:
|
|
149
124
|
- spec/galakei/request_spec.rb
|
150
125
|
- spec/galakei/spacer_spec.rb
|
151
126
|
- spec/spec_helper.rb
|
152
|
-
has_rdoc: true
|
153
127
|
homepage: http://www.mobalean.com
|
154
128
|
licenses: []
|
155
|
-
|
156
129
|
post_install_message:
|
157
130
|
rdoc_options: []
|
158
|
-
|
159
|
-
require_paths:
|
131
|
+
require_paths:
|
160
132
|
- lib
|
161
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
133
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
162
134
|
none: false
|
163
|
-
requirements:
|
164
|
-
- -
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
|
167
|
-
|
168
|
-
- 0
|
169
|
-
version: "0"
|
170
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ! '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
140
|
none: false
|
172
|
-
requirements:
|
173
|
-
- -
|
174
|
-
- !ruby/object:Gem::Version
|
175
|
-
|
176
|
-
segments:
|
177
|
-
- 0
|
178
|
-
version: "0"
|
141
|
+
requirements:
|
142
|
+
- - ! '>='
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
179
145
|
requirements: []
|
180
|
-
|
181
146
|
rubyforge_project: galakei
|
182
|
-
rubygems_version: 1.
|
147
|
+
rubygems_version: 1.8.6
|
183
148
|
signing_key:
|
184
149
|
specification_version: 3
|
185
150
|
summary: Japanese feature phones support
|
186
151
|
test_files: []
|
187
|
-
|