trackme 0.0.4 → 0.0.21

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzNmYzIzOTQ1NzU1NzRhN2UwOTU3MmU5ZDA0NWQ1ZWUwNmMzNmU3ZQ==
4
+ YjkwZTMyZmE0ZGI4YWEwN2YyNDNjMDExZGEwZTA5ZmE4NGQzNmUzMg==
5
5
  data.tar.gz: !binary |-
6
- NTNjNTE4MjhiYzZjNmE4ZmY3NDBiZTY4ZmY1YzZjY2Q5ZGJhYTkyNA==
6
+ ZjIwOGI1YWRhMTY1YzRiYmM4OGUxYWQyNzY4NDYyYmUzNjQxNGI2Mg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZWI4OWE0ZWNmZjQ4NDRmN2U3MWU3YThiY2I0OWIzNDBkOGEzZjA2NThmNGI1
10
- NTYyOTczZjlkYjdkMDNkYjJiMjU1ZTkyMDg5MWU0ZjZlZDhjYTc0OTA1MTdl
11
- ZDVlOGYwZWQ0NDBiYzE2NDY4NTRiZmRkMDJkYmEyMGI3MmNmODQ=
9
+ ZmU4MzlkMGNhZTYxZWYwODNmZjdjOWFlYmIwNDhlZjFmNjZmMzIwYWY5NGUx
10
+ MzdmZWYxNDM4ZGFkNGNhN2JhMmJhY2Y2OWM0MWNhMmRjNjIzMDg1ZGIzMTUx
11
+ ODAwNzM3MWY0NjMxMmIzYjVjZDc3OTEyMWI5YTFjNWFhOWE1NTY=
12
12
  data.tar.gz: !binary |-
13
- NjA5NjA1OTVmZTcxZGUyZTYzZjQ4ODY5ZDI0N2JlMDIyYWE0ZjQzYmIzMWQ2
14
- MDUxNTc0YWEzY2E5YjkyZjBiMTQ5Zjc5NDJkYmRhMTNmOWZkYTMwNmEzNzQ1
15
- ODI5NWUyMTQ2MjUwZmU5ZjIyMDFjOGI5OWQ3MWQ0MWRiYmE4ZjA=
13
+ ZjI5NTA4ZDdlNWQ0MTI5ZDNiYTc2NTQ2MWQ5MzU3NGY0NmUzNWNmY2VhMTE5
14
+ MjI5MjNlMmEyNmIyYWMyODY4MDdhOWNiODg5ODVkYzk0YjQ3MTVlMmU0M2Jm
15
+ OWUzMjUyNWFhNzU0NTc5NGI4YzQ5YTY3MGY1NzA0NjdjMDFhY2I=
data/README.md CHANGED
@@ -24,17 +24,14 @@ Once setup, you can track a users activity in the following way:
24
24
  TrackMe events have the following options:
25
25
  + `:actor` (required) - The object that did the event
26
26
  + `:category` (required)- The event category, such as 'Message'
27
- + `:label` (optional)- The label of the event category, such as 'New'
28
- + `:value` (optional)- The value of the event category label, such as 'Hello Bob!'
29
- + `:created_at` (optional)- The date the event occurred, such as '2013-09-29
30
- 12:00:00'
27
+ + `:label` (option)- The label of the event category, such as 'New'
28
+ + `:value` (option)- The value of the event category label, such as 'Hello Bob!'
31
29
 
32
- TrackMe needs the following fields to save events:
30
+ TrackMe requires the following fields to save events:
33
31
  + `actor_id` - Integer
34
32
  + `category` - String
35
33
  + `label` - String
36
34
  + `value` - String
37
- + `created_at` - Date/Time
38
35
 
39
36
  ## Rails Example
40
37
 
data/lib/trackme/event.rb CHANGED
@@ -1,8 +1,5 @@
1
1
  module TrackMe
2
2
  module Event
3
- attr_reader :actor, :category, :label, :value, :created_at
4
- attr_writer :actor, :category, :label, :value, :created_at
5
-
6
3
  def self.included(base)
7
4
  base.extend(ClassMethods)
8
5
  end
@@ -1,3 +1,3 @@
1
1
  module TrackMe
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.21"
3
3
  end
@@ -6,9 +6,24 @@ class Event
6
6
  @category = data[:category]
7
7
  @label = data[:label]
8
8
  @value = data[:value]
9
- @created_at = data[:created_at]
10
9
  end
11
10
 
12
11
  def save
13
12
  end
13
+
14
+ def actor
15
+ @actor
16
+ end
17
+
18
+ def category
19
+ @category
20
+ end
21
+
22
+ def label
23
+ @label
24
+ end
25
+
26
+ def value
27
+ @value
28
+ end
14
29
  end
@@ -14,11 +14,6 @@ describe TrackMe do
14
14
  event = Event.publish(user, data)
15
15
  event.class.should eq(Event)
16
16
  end
17
-
18
- it "can override the create date" do
19
- event = Event.publish(user, { created_at: Time.new(2013) }.merge(data))
20
- event.created_at.should eq(Time.new(2013))
21
- end
22
17
  end
23
18
 
24
19
  describe ".create" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trackme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Dijkstra