analytics-ruby 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.md CHANGED
@@ -1,3 +1,8 @@
1
+ 0.1.3 / 2013-3-19
2
+ ===========
3
+ * Fixing user_id.to_s semantics, reported by [arronmabrey](https://github.com/arronmabrey)
4
+ * Reduced faraday requirements by [arronmabrey](https://github.com/arronmabrey)
5
+
1
6
  0.1.2 / 2013-3-11
2
7
  ===========
3
8
  * Fixing thrown exception on non-initialized tracks thanks to [sbellity](https://github.com/sbellity)
@@ -15,9 +15,9 @@ Gem::Specification.new do |spec|
15
15
  spec.homepage = 'https://github.com/segmentio/analytics-ruby'
16
16
 
17
17
  spec.add_dependency 'faraday', ['>= 0.8', '< 0.10']
18
- spec.add_dependency 'faraday_middleware', ['~> 0.9.0']
18
+ spec.add_dependency 'faraday_middleware', ['>= 0.8', '< 0.10']
19
19
  spec.add_dependency 'multi_json', ['~> 1.0']
20
20
 
21
21
  spec.add_development_dependency('rake')
22
22
  spec.add_development_dependency('rspec')
23
- end
23
+ end
@@ -40,7 +40,7 @@ module AnalyticsRuby
40
40
  check_secret
41
41
 
42
42
  event = options[:event]
43
- user_id = options[:user_id]
43
+ user_id = options[:user_id].to_s
44
44
  properties = options[:properties] || {}
45
45
  timestamp = options[:timestamp] || Time.new
46
46
  context = options[:context] || {}
@@ -73,7 +73,7 @@ module AnalyticsRuby
73
73
 
74
74
  check_secret
75
75
 
76
- user_id = options[:user_id]
76
+ user_id = options[:user_id].to_s
77
77
  traits = options[:traits] || {}
78
78
  timestamp = options[:timestamp] || Time.new
79
79
  context = options[:context] || {}
@@ -116,11 +116,7 @@ module AnalyticsRuby
116
116
  # user_id - String of the user id
117
117
  #
118
118
  def ensure_user(user_id)
119
- message = 'Must supply a non-empty user_id'
120
-
121
- valid = user_id.is_a?(String) && !user_id.empty?
122
-
123
- fail ArgumentError, message unless valid
119
+ fail ArgumentError, 'Must supply a non-empty user_id' if user_id.empty?
124
120
  end
125
121
 
126
122
  # private: Adds contextual information to the call
@@ -1,3 +1,3 @@
1
1
  module AnalyticsRuby
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: analytics-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-13 00:00:00.000000000 Z
12
+ date: 2013-03-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
16
- requirement: &19516920 !ruby/object:Gem::Requirement
16
+ requirement: &5736380 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -24,21 +24,24 @@ dependencies:
24
24
  version: '0.10'
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *19516920
27
+ version_requirements: *5736380
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: faraday_middleware
30
- requirement: &19516040 !ruby/object:Gem::Requirement
30
+ requirement: &5735440 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
- - - ~>
33
+ - - ! '>='
34
+ - !ruby/object:Gem::Version
35
+ version: '0.8'
36
+ - - <
34
37
  - !ruby/object:Gem::Version
35
- version: 0.9.0
38
+ version: '0.10'
36
39
  type: :runtime
37
40
  prerelease: false
38
- version_requirements: *19516040
41
+ version_requirements: *5735440
39
42
  - !ruby/object:Gem::Dependency
40
43
  name: multi_json
41
- requirement: &19515380 !ruby/object:Gem::Requirement
44
+ requirement: &5734560 !ruby/object:Gem::Requirement
42
45
  none: false
43
46
  requirements:
44
47
  - - ~>
@@ -46,10 +49,10 @@ dependencies:
46
49
  version: '1.0'
47
50
  type: :runtime
48
51
  prerelease: false
49
- version_requirements: *19515380
52
+ version_requirements: *5734560
50
53
  - !ruby/object:Gem::Dependency
51
54
  name: rake
52
- requirement: &19514780 !ruby/object:Gem::Requirement
55
+ requirement: &5733920 !ruby/object:Gem::Requirement
53
56
  none: false
54
57
  requirements:
55
58
  - - ! '>='
@@ -57,10 +60,10 @@ dependencies:
57
60
  version: '0'
58
61
  type: :development
59
62
  prerelease: false
60
- version_requirements: *19514780
63
+ version_requirements: *5733920
61
64
  - !ruby/object:Gem::Dependency
62
65
  name: rspec
63
- requirement: &19514080 !ruby/object:Gem::Requirement
66
+ requirement: &5731760 !ruby/object:Gem::Requirement
64
67
  none: false
65
68
  requirements:
66
69
  - - ! '>='
@@ -68,7 +71,7 @@ dependencies:
68
71
  version: '0'
69
72
  type: :development
70
73
  prerelease: false
71
- version_requirements: *19514080
74
+ version_requirements: *5731760
72
75
  description: The Segment.io ruby analytics library
73
76
  email: friends@segment.io
74
77
  executables: []