ffxiv-lodestone 0.9.4 → 0.9.5
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/HISTORY +4 -0
- data/README +2 -1
- data/lib/ffxiv-lodestone.rb +17 -15
- data/test/characters/2440978.html +1761 -0
- data/test/searches/ayeron-lifebloom_.html +1296 -0
- data/test/spec.rb +19 -2
- metadata +6 -4
data/test/spec.rb
CHANGED
@@ -19,7 +19,6 @@ describe 'Character.search' do
|
|
19
19
|
should.raise(ArgumentError) { FFXIVLodestone::Character.search() }
|
20
20
|
should.raise(ArgumentError) { FFXIVLodestone::Character.search(:irrelevant_key => 'value') }
|
21
21
|
should.raise(ArgumentError) { FFXIVLodestone::Character.search(:world => 'Figaro') }
|
22
|
-
should.raise(ArgumentError) { FFXIVLodestone::Character.search(:name => 'Ayeron Lifebloom') }
|
23
22
|
should.raise(ArgumentError) { FFXIVLodestone::Character.search(12345) }
|
24
23
|
should.raise(ArgumentError) { FFXIVLodestone::Character.search(:name => 'Ayeron Lifebloom', :world => 'FAKE SERVER NAME') }
|
25
24
|
end
|
@@ -34,6 +33,11 @@ describe 'Character.search' do
|
|
34
33
|
it 'should be empty' do
|
35
34
|
FFXIVLodestone::Character.search(:name => 'ABLOO BLOO UGUU', :world => 'Selbina').should.equal([])
|
36
35
|
end
|
36
|
+
|
37
|
+
it 'should allow no :world' do
|
38
|
+
should.not.raise(ArgumentError) { FFXIVLodestone::Character.search(:name => 'Ayeron Lifebloom')}
|
39
|
+
FFXIVLodestone::Character.search(:name => 'Ayeron Lifebloom').should.equal([{:portrait_thumb_url=>"http://static.finalfantasyxiv.com/csnap/1drdb_ss_14e13bdee6f804fa6b989297ba747306.png?geepsvty", :world=>"Figaro", :name=>"Ayeron Lifebloom", :id=>1502635}])
|
40
|
+
end
|
37
41
|
|
38
42
|
it 'should list characters' do
|
39
43
|
FFXIVLodestone::Character.search(:name => 'Lady', :world => 'Selbina').should.equal(
|
@@ -48,7 +52,6 @@ describe 'Character(invalid)' do
|
|
48
52
|
|
49
53
|
it 'is a bad argument list' do
|
50
54
|
should.raise(ArgumentError) { FFXIVLodestone::Character.new(:id => 1, :name => 'Ayeron Lifebloom', :world => 'Figaro') }
|
51
|
-
should.raise(ArgumentError) { FFXIVLodestone::Character.new(:name => 'Ayeron Lifebloom') }
|
52
55
|
should.raise(ArgumentError) { FFXIVLodestone::Character.new(:world => 'Figaro') }
|
53
56
|
end
|
54
57
|
|
@@ -63,6 +66,7 @@ describe 'Character(invalid)' do
|
|
63
66
|
it 'should actually work' do
|
64
67
|
should.not.raise(ArgumentError) { FFXIVLodestone::Character.new(:id => 1015990) }
|
65
68
|
should.not.raise(ArgumentError) { FFXIVLodestone::Character.new(:name => 'Ayeron Lifebloom', :world => 'Figaro') }
|
69
|
+
should.not.raise(ArgumentError) { FFXIVLodestone::Character.new(:name => 'Ayeron Lifebloom') }
|
66
70
|
end
|
67
71
|
end
|
68
72
|
|
@@ -88,6 +92,19 @@ describe "Character.new(:name => foo, :world => bar)" do
|
|
88
92
|
char.character_id.should.equal 1124548
|
89
93
|
char.starting_city.should.equal 'Limsa Lominsa'
|
90
94
|
char.jobs.thaumaturge.rank.should.equal 29 # pro-tier
|
95
|
+
|
96
|
+
# For the sake of completeness, here's one that started in Ul'dah.
|
97
|
+
char = FFXIVLodestone::Character.new(:id => 2440978)
|
98
|
+
char.name.should.equal 'Warukyure Asura'
|
99
|
+
char.character_id.should.equal 2440978
|
100
|
+
char.world.should.equal 'Trabia'
|
101
|
+
char.starting_city.should.equal "Ul'dah"
|
102
|
+
|
103
|
+
# Worldless!
|
104
|
+
char = FFXIVLodestone::Character.new(:name => 'Ayeron Lifebloom')
|
105
|
+
char.name.should.equal 'Ayeron Lifebloom'
|
106
|
+
char.character_id.should.equal 1502635
|
107
|
+
char.world.should.equal 'Figaro'
|
91
108
|
end
|
92
109
|
end
|
93
110
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffxiv-lodestone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 49
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 5
|
10
|
+
version: 0.9.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- owlmanatt
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-27 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -64,12 +64,14 @@ files:
|
|
64
64
|
- test/searches/lady_12.html
|
65
65
|
- test/searches/abloo-bloo-uguu_12.html
|
66
66
|
- test/searches/lady-simmons_12.html
|
67
|
+
- test/searches/ayeron-lifebloom_.html
|
67
68
|
- test/searches/ryoko-antihaijin_7.html
|
68
69
|
- test/searches/fakey-fakerson_12.html
|
69
70
|
- test/characters/2172370.html
|
70
71
|
- test/characters/1124548.html
|
71
72
|
- test/characters/1502635.html
|
72
73
|
- test/characters/invalid.html
|
74
|
+
- test/characters/2440978.html
|
73
75
|
- test/characters/1015990.html
|
74
76
|
- AUTHORS
|
75
77
|
- HISTORY
|