intown 0.1.5 → 0.1.6
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.
- checksums.yaml +4 -4
- data/lib/intown/client.rb +5 -3
- data/lib/intown/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2e81011e4343e23cdf85e19ec8c352a8729add6e
|
|
4
|
+
data.tar.gz: c8c83b9ea9f028c9d75b17ab5162ea698a64dc42
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef8e8b84c0c3652048915a74c7df926eaac5fb9949a3d2f928115f72fff22b661de7cbd6e4f62c4861837c191c7219360ed02fef56c374f5ad537d5f9f18d859
|
|
7
|
+
data.tar.gz: 729dd20cb66f45487eaa6e0c82792e8d3c837aad85f304a4ecaa60fdbb49a598c441193a23874ec5b994d30ea78f94b92148da7acfbdf2449db1353d849f6ebf
|
data/lib/intown/client.rb
CHANGED
|
@@ -36,7 +36,7 @@ module Intown
|
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
def process_not_acceptable(response)
|
|
41
41
|
raise Intown::InvalidRequestError, "Bandsintown rejected your request. Please check your input parameters."
|
|
42
42
|
end
|
|
@@ -63,11 +63,13 @@ module Intown
|
|
|
63
63
|
return encode_name(params[:name]) if params[:name]
|
|
64
64
|
raise ArgumentError, "params must contain one of mbid, fbid, or name"
|
|
65
65
|
end
|
|
66
|
-
|
|
66
|
+
|
|
67
67
|
def encode_name(name)
|
|
68
68
|
# periods & slashes cause the API to blow up
|
|
69
69
|
# must double-encode the slash
|
|
70
|
-
|
|
70
|
+
# question marks break the api as well
|
|
71
|
+
sanitized_name = name.gsub(/\?/, "").strip
|
|
72
|
+
URI.encode(sanitized_name).gsub(/\./, "%2E").gsub(/\//, "%252F")
|
|
71
73
|
end
|
|
72
74
|
|
|
73
75
|
def musicbrainz_identifier(mbid)
|
data/lib/intown/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: intown
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Scheirman
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2014-01-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
151
151
|
version: '0'
|
|
152
152
|
requirements: []
|
|
153
153
|
rubyforge_project:
|
|
154
|
-
rubygems_version: 2.0.
|
|
154
|
+
rubygems_version: 2.0.3
|
|
155
155
|
signing_key:
|
|
156
156
|
specification_version: 4
|
|
157
157
|
summary: Supports Bandsintown API version 1.1
|