mywowarmory-ruby 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.9
1
+ 0.1.10
data/lib/mywowarmory.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require 'httparty'
2
3
  require 'ostruct'
3
4
  require 'open-uri'
@@ -6,7 +7,8 @@ require 'multi_json'
6
7
 
7
8
  class MyWoWArmory
8
9
  include HTTParty
9
- base_uri 'www.mywowarmory.com'
10
+ # base_uri 'www.mywowarmory.com'
11
+ base_uri 'localhost'
10
12
 
11
13
  # def initialize(username,password,options={})
12
14
  # @auth = {:username => username, :password => password}
@@ -15,8 +17,9 @@ class MyWoWArmory
15
17
  def get_profile(country,realm,character_name,options={})
16
18
  # options.merge!({:basic_auth => @auth})
17
19
 
18
- # Hack to get the character_name encode once
19
- name = URI::encode(URI::decode(character_name))
20
+ # detect the input as URL encoded or not by finding "%NN" character
21
+ name = character_name.match(/%[0-9A-F]{2}/i) ? character_name : URI::encode(character_name)
22
+ # name = URI::encode(URI::decode(character_name))
20
23
 
21
24
  # Check the realm
22
25
  # realm_response = HTTParty.get("http://#{country}.battle.net/api/wow/realm/status", :query => {:realms => URI.encode(realm)} ).parsed_response
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{mywowarmory-ruby}
8
- s.version = "0.1.9"
7
+ s.name = "mywowarmory-ruby"
8
+ s.version = "0.1.10"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Benjamin Wong"]
12
- s.date = %q{2011-10-02}
13
- s.description = %q{This library uses HTTParty to provide simple, reliable access to the MyWoWArmory API. Good for building reporting scripts and simple apps. Note that this library does not support the complete MyWoWArmory API at this time. See Features/Issues below for details. }
14
- s.email = %q{tkwong@railsant.com}
12
+ s.date = "2012-01-09"
13
+ s.description = "This library uses HTTParty to provide simple, reliable access to the MyWoWArmory API. Good for building reporting scripts and simple apps. Note that this library does not support the complete MyWoWArmory API at this time. See Features/Issues below for details. "
14
+ s.email = "tkwong@railsant.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE.txt",
17
17
  "README.rdoc"
@@ -29,14 +29,13 @@ Gem::Specification.new do |s|
29
29
  "test/helper.rb",
30
30
  "test/test_mywowarmory.rb"
31
31
  ]
32
- s.homepage = %q{http://github.com/railsant/mywowarmory}
32
+ s.homepage = "http://github.com/railsant/mywowarmory"
33
33
  s.licenses = ["MIT"]
34
34
  s.require_paths = ["lib"]
35
- s.rubygems_version = %q{1.3.7}
36
- s.summary = %q{Ruby wrapper around the MyWoWArmory API http://www.mywowarmory.com/api}
35
+ s.rubygems_version = "1.8.10"
36
+ s.summary = "Ruby wrapper around the MyWoWArmory API http://www.mywowarmory.com/api"
37
37
 
38
38
  if s.respond_to? :specification_version then
39
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
40
39
  s.specification_version = 3
41
40
 
42
41
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -1,191 +1,148 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mywowarmory-ruby
3
- version: !ruby/object:Gem::Version
4
- hash: 9
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 1
9
- - 9
10
- version: 0.1.9
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.10
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Benjamin Wong
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-10-02 00:00:00 +08:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- prerelease: false
23
- type: :runtime
12
+ date: 2012-01-09 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
24
15
  name: httparty
25
- version_requirements: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70321382625460 !ruby/object:Gem::Requirement
26
17
  none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 0
33
- version: "0"
34
- requirement: *id001
35
- - !ruby/object:Gem::Dependency
36
- prerelease: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
37
22
  type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70321382625460
25
+ - !ruby/object:Gem::Dependency
38
26
  name: wow_community_api
39
- version_requirements: &id002 !ruby/object:Gem::Requirement
27
+ requirement: &70321382601580 !ruby/object:Gem::Requirement
40
28
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 0
47
- version: "0"
48
- requirement: *id002
49
- - !ruby/object:Gem::Dependency
50
- prerelease: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
51
33
  type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70321382601580
36
+ - !ruby/object:Gem::Dependency
52
37
  name: multi_json
53
- version_requirements: &id003 !ruby/object:Gem::Requirement
38
+ requirement: &70321382599720 !ruby/object:Gem::Requirement
54
39
  none: false
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- hash: 3
59
- segments:
60
- - 0
61
- version: "0"
62
- requirement: *id003
63
- - !ruby/object:Gem::Dependency
64
- prerelease: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
65
44
  type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70321382599720
47
+ - !ruby/object:Gem::Dependency
66
48
  name: yajl-ruby
67
- version_requirements: &id004 !ruby/object:Gem::Requirement
49
+ requirement: &70321382596720 !ruby/object:Gem::Requirement
68
50
  none: false
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- hash: 3
73
- segments:
74
- - 0
75
- version: "0"
76
- requirement: *id004
77
- - !ruby/object:Gem::Dependency
78
- prerelease: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
79
55
  type: :runtime
56
+ prerelease: false
57
+ version_requirements: *70321382596720
58
+ - !ruby/object:Gem::Dependency
80
59
  name: json
81
- version_requirements: &id005 !ruby/object:Gem::Requirement
60
+ requirement: &70321382593900 !ruby/object:Gem::Requirement
82
61
  none: false
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- hash: 3
87
- segments:
88
- - 0
89
- version: "0"
90
- requirement: *id005
91
- - !ruby/object:Gem::Dependency
92
- prerelease: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
93
66
  type: :runtime
67
+ prerelease: false
68
+ version_requirements: *70321382593900
69
+ - !ruby/object:Gem::Dependency
94
70
  name: json_pure
95
- version_requirements: &id006 !ruby/object:Gem::Requirement
71
+ requirement: &70321382590560 !ruby/object:Gem::Requirement
96
72
  none: false
97
- requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- hash: 3
101
- segments:
102
- - 0
103
- version: "0"
104
- requirement: *id006
105
- - !ruby/object:Gem::Dependency
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :runtime
106
78
  prerelease: false
107
- type: :development
79
+ version_requirements: *70321382590560
80
+ - !ruby/object:Gem::Dependency
108
81
  name: shoulda
109
- version_requirements: &id007 !ruby/object:Gem::Requirement
82
+ requirement: &70321382589680 !ruby/object:Gem::Requirement
110
83
  none: false
111
- requirements:
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- hash: 3
115
- segments:
116
- - 0
117
- version: "0"
118
- requirement: *id007
119
- - !ruby/object:Gem::Dependency
120
- prerelease: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
121
88
  type: :development
89
+ prerelease: false
90
+ version_requirements: *70321382589680
91
+ - !ruby/object:Gem::Dependency
122
92
  name: bundler
123
- version_requirements: &id008 !ruby/object:Gem::Requirement
93
+ requirement: &70321382588560 !ruby/object:Gem::Requirement
124
94
  none: false
125
- requirements:
95
+ requirements:
126
96
  - - ~>
127
- - !ruby/object:Gem::Version
128
- hash: 23
129
- segments:
130
- - 1
131
- - 0
132
- - 0
97
+ - !ruby/object:Gem::Version
133
98
  version: 1.0.0
134
- requirement: *id008
135
- - !ruby/object:Gem::Dependency
136
- prerelease: false
137
99
  type: :development
100
+ prerelease: false
101
+ version_requirements: *70321382588560
102
+ - !ruby/object:Gem::Dependency
138
103
  name: jeweler
139
- version_requirements: &id009 !ruby/object:Gem::Requirement
104
+ requirement: &70321382587720 !ruby/object:Gem::Requirement
140
105
  none: false
141
- requirements:
106
+ requirements:
142
107
  - - ~>
143
- - !ruby/object:Gem::Version
144
- hash: 7
145
- segments:
146
- - 1
147
- - 6
148
- - 4
108
+ - !ruby/object:Gem::Version
149
109
  version: 1.6.4
150
- requirement: *id009
151
- - !ruby/object:Gem::Dependency
152
- prerelease: false
153
110
  type: :development
111
+ prerelease: false
112
+ version_requirements: *70321382587720
113
+ - !ruby/object:Gem::Dependency
154
114
  name: rcov
155
- version_requirements: &id010 !ruby/object:Gem::Requirement
115
+ requirement: &70321382583680 !ruby/object:Gem::Requirement
156
116
  none: false
157
- requirements:
158
- - - ">="
159
- - !ruby/object:Gem::Version
160
- hash: 3
161
- segments:
162
- - 0
163
- version: "0"
164
- requirement: *id010
165
- - !ruby/object:Gem::Dependency
166
- prerelease: false
117
+ requirements:
118
+ - - ! '>='
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
167
121
  type: :development
122
+ prerelease: false
123
+ version_requirements: *70321382583680
124
+ - !ruby/object:Gem::Dependency
168
125
  name: rdoc
169
- version_requirements: &id011 !ruby/object:Gem::Requirement
126
+ requirement: &70321382582980 !ruby/object:Gem::Requirement
170
127
  none: false
171
- requirements:
172
- - - ">="
173
- - !ruby/object:Gem::Version
174
- hash: 3
175
- segments:
176
- - 0
177
- version: "0"
178
- requirement: *id011
179
- description: "This library uses HTTParty to provide simple, reliable access to the MyWoWArmory API. Good for building reporting scripts and simple apps. Note that this library does not support the complete MyWoWArmory API at this time. See Features/Issues below for details. "
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: *70321382582980
135
+ description: ! 'This library uses HTTParty to provide simple, reliable access to the
136
+ MyWoWArmory API. Good for building reporting scripts and simple apps. Note that
137
+ this library does not support the complete MyWoWArmory API at this time. See Features/Issues
138
+ below for details. '
180
139
  email: tkwong@railsant.com
181
140
  executables: []
182
-
183
141
  extensions: []
184
-
185
- extra_rdoc_files:
142
+ extra_rdoc_files:
186
143
  - LICENSE.txt
187
144
  - README.rdoc
188
- files:
145
+ files:
189
146
  - .document
190
147
  - Gemfile
191
148
  - Gemfile.lock
@@ -197,39 +154,32 @@ files:
197
154
  - mywowarmory-ruby.gemspec
198
155
  - test/helper.rb
199
156
  - test/test_mywowarmory.rb
200
- has_rdoc: true
201
157
  homepage: http://github.com/railsant/mywowarmory
202
- licenses:
158
+ licenses:
203
159
  - MIT
204
160
  post_install_message:
205
161
  rdoc_options: []
206
-
207
- require_paths:
162
+ require_paths:
208
163
  - lib
209
- required_ruby_version: !ruby/object:Gem::Requirement
164
+ required_ruby_version: !ruby/object:Gem::Requirement
210
165
  none: false
211
- requirements:
212
- - - ">="
213
- - !ruby/object:Gem::Version
214
- hash: 3
215
- segments:
166
+ requirements:
167
+ - - ! '>='
168
+ - !ruby/object:Gem::Version
169
+ version: '0'
170
+ segments:
216
171
  - 0
217
- version: "0"
218
- required_rubygems_version: !ruby/object:Gem::Requirement
172
+ hash: 1783994818129930127
173
+ required_rubygems_version: !ruby/object:Gem::Requirement
219
174
  none: false
220
- requirements:
221
- - - ">="
222
- - !ruby/object:Gem::Version
223
- hash: 3
224
- segments:
225
- - 0
226
- version: "0"
175
+ requirements:
176
+ - - ! '>='
177
+ - !ruby/object:Gem::Version
178
+ version: '0'
227
179
  requirements: []
228
-
229
180
  rubyforge_project:
230
- rubygems_version: 1.3.7
181
+ rubygems_version: 1.8.10
231
182
  signing_key:
232
183
  specification_version: 3
233
184
  summary: Ruby wrapper around the MyWoWArmory API http://www.mywowarmory.com/api
234
185
  test_files: []
235
-