statsmix 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
data/lib/statsmix.rb CHANGED
@@ -415,9 +415,7 @@ class StatsMix
415
415
  end
416
416
 
417
417
  def self.urlencode(str)
418
- str.gsub(/[^a-zA-Z0-9_\{\}:, \"\.\-]/n) {|s|
419
- sprintf('%%%02x', s[0])
420
- }
418
+ URI.encode(str, /[^a-zA-Z0-9_\{\}:, \"\.\-]/n)
421
419
  end
422
420
 
423
421
  def self.check_meta
data/statsmix.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{statsmix}
8
- s.version = "0.2.3"
8
+ s.version = "0.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tom Markiewicz", "Derek Scruggs"]
12
- s.date = %q{2011-12-07}
12
+ s.date = %q{2012-03-05}
13
13
  s.description = %q{A Ruby gem for the StatsMix API - http://www.statsmix.com/developers}
14
14
  s.email = ["tmarkiewicz@gmail.com", "me@derekscruggs.com"]
15
15
  s.extra_rdoc_files = [
@@ -55,5 +55,16 @@ class TestStatsmix < Test::Unit::TestCase
55
55
  assert !StatsMix.error
56
56
  puts result
57
57
  end
58
+
59
+ should "accept URLs in the meta" do
60
+ StatsMix.api_key = '59f08613db2691f28afe'
61
+ StatsMix.format = 'json'
62
+ result = StatsMix.track('Ruby Gem Testing', 1, {"meta"=>{"url"=>"http://ernesto-jimenez.com/"}})
63
+ if StatsMix.error
64
+ raise "Error in gem: #{StatsMix.error}"
65
+ end
66
+ assert !StatsMix.error
67
+ puts result
68
+ end
58
69
 
59
70
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statsmix
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 3
10
- version: 0.2.3
9
+ - 4
10
+ version: 0.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tom Markiewicz
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-12-07 00:00:00 -07:00
19
+ date: 2012-03-05 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency