scoutmetrics 0.0.3 → 0.1.0
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/scoutmetrics/user.rb +10 -3
- data/scoutmetrics.gemspec +1 -1
- metadata +8 -9
- data/scoutmetrics-0.0.2.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ec98de2c766cc81ef684d26670498c3ac7d09e1
|
4
|
+
data.tar.gz: 4cc8f4ca65d59d34d0786273cb6bb8b2b69f9c28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 517dbcf27e0a392fa37efe550586e22a23b05285ac41918183617164b37eac7fad4c8cb6049d172560f7feb18a35bf7093cdd5984bfe7df277c49b69774ad757
|
7
|
+
data.tar.gz: 2951fa4ef50519e6e74a083556514ddac27b77586df1ae7f4b274c764596303152556a014fd5f6d075c4947661e77a73f3b98cc3b2c58756c2f88ceea93a0953
|
data/lib/scoutmetrics/user.rb
CHANGED
@@ -2,16 +2,23 @@ module ScoutMetrics
|
|
2
2
|
|
3
3
|
class User
|
4
4
|
|
5
|
-
|
5
|
+
attr_accessor :id, :signup_date, :return_date, :active
|
6
6
|
|
7
7
|
# Create a User record with the id passed in for posting to Scout Metrics
|
8
8
|
def self.find(id)
|
9
9
|
new(id: id)
|
10
10
|
end
|
11
11
|
|
12
|
+
def initialize(params)
|
13
|
+
self.id = params[:id]
|
14
|
+
self.signup_date = params[:signup_date]
|
15
|
+
self.return_date = params[:return_date]
|
16
|
+
self.active = params[:active]
|
17
|
+
end
|
18
|
+
|
12
19
|
# Override save method to post the information to Scout Metrics
|
13
20
|
def save
|
14
|
-
post_update(id, { signup_date: signup_date, return_date: return_date, active: active })
|
21
|
+
post_update(id, { signup_date: signup_date, return_date: return_date, active: active })
|
15
22
|
end
|
16
23
|
|
17
24
|
# Posts signup date for this user (if it doesn't exist yet the "AppUser" will be created)
|
@@ -43,7 +50,7 @@ module ScoutMetrics
|
|
43
50
|
|
44
51
|
# @return [Json] Returns a msg for the transaction and the status of the request
|
45
52
|
# @return msg explanation of outcome
|
46
|
-
def
|
53
|
+
def post_update(id, params)
|
47
54
|
ScoutMetrics::Request.new(:put, "/app_users/#{id}", { app_user: params })
|
48
55
|
end
|
49
56
|
|
data/scoutmetrics.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scoutmetrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dosty Everts
|
@@ -14,28 +14,28 @@ dependencies:
|
|
14
14
|
name: http
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.6.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.6.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: http_parser.rb
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.6.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.6.0
|
41
41
|
description: Ruby wrapper for the Scout Metrics API
|
@@ -50,7 +50,6 @@ files:
|
|
50
50
|
- lib/scoutmetrics/engagement.rb
|
51
51
|
- lib/scoutmetrics/request.rb
|
52
52
|
- lib/scoutmetrics/user.rb
|
53
|
-
- scoutmetrics-0.0.2.gem
|
54
53
|
- scoutmetrics.gemspec
|
55
54
|
- vendor/assets/javascripts/scoutmetrics.js
|
56
55
|
homepage: https://github.com/MustWin/scoutmetrics-ruby-gem
|
@@ -63,17 +62,17 @@ require_paths:
|
|
63
62
|
- lib
|
64
63
|
required_ruby_version: !ruby/object:Gem::Requirement
|
65
64
|
requirements:
|
66
|
-
- -
|
65
|
+
- - ">="
|
67
66
|
- !ruby/object:Gem::Version
|
68
67
|
version: '0'
|
69
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
69
|
requirements:
|
71
|
-
- -
|
70
|
+
- - ">="
|
72
71
|
- !ruby/object:Gem::Version
|
73
72
|
version: '0'
|
74
73
|
requirements: []
|
75
74
|
rubyforge_project:
|
76
|
-
rubygems_version: 2.
|
75
|
+
rubygems_version: 2.4.3
|
77
76
|
signing_key:
|
78
77
|
specification_version: 4
|
79
78
|
summary: Ruby wrapper for the Scout Metrics API
|
data/scoutmetrics-0.0.2.gem
DELETED
Binary file
|