ymdp 0.8.7 → 0.8.8

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.7
1
+ 0.8.8
@@ -13,26 +13,10 @@ window.ABTesting =
13
13
  ABTesting.on = false
14
14
 
15
15
  randomAB: ->
16
- Math.floor(Math.random()*2) ? "a" : "b"
17
-
18
- get: (content_id) ->
19
- url = "ymdp/experiment"
20
-
21
- OIB.get url,
22
- "domain": View.domain
23
- , (response) ->
24
- ABTesting.success(content_id, response)
25
- , (response) ->
26
- ABTesting.error(response)
27
-
28
-
29
- post: (params) ->
30
- params = params || {}
31
- OIB.post "ymdp/view", params, (response) ->
32
- Debug.log("ABTesting.post success", response)
33
- , (response) ->
34
- Debug.error("ABTesting.post error", response)
35
-
16
+ if Math.floor(Math.random()*2)
17
+ "a"
18
+ else
19
+ "b"
36
20
 
37
21
  postView: (experimentId) ->
38
22
  params =
@@ -69,7 +53,7 @@ window.ABTesting =
69
53
 
70
54
  experiment = response.experiment
71
55
 
72
- if typeof(experiment) != 'undefined'
56
+ if experiment
73
57
  content = ABTesting.content(experiment)
74
58
  experimentId = response.experiment.id
75
59
 
@@ -77,8 +61,7 @@ window.ABTesting =
77
61
  ABTesting.replaceContents(content_id, content)
78
62
  else
79
63
  Debug.log("No experiment running")
80
-
81
- YMDP.Init.showAndFinish()
64
+ YMDP.Init.showAndFinish()
82
65
 
83
66
  replaceContents: (content_id, content) ->
84
67
  openmail.Application.filterHTML
@@ -90,3 +73,20 @@ window.ABTesting =
90
73
 
91
74
  content: (experiment) ->
92
75
  experiment["content_" + ABTesting.variable]
76
+
77
+ get: (content_id) ->
78
+ url = "ymdp/experiment"
79
+
80
+ OIB.get url,
81
+ "domain": View.domain
82
+ , (response) ->
83
+ ABTesting.success(content_id, response)
84
+ , (response) ->
85
+ ABTesting.error(response)
86
+
87
+ post: (params) ->
88
+ params = params || {}
89
+ OIB.post "ymdp/view", params, (response) ->
90
+ Debug.log("ABTesting.post success", response)
91
+ , (response) ->
92
+ Debug.error("ABTesting.post error", response)
@@ -52,6 +52,8 @@ window.Debug =
52
52
  "undefined"
53
53
  else if (obj == null)
54
54
  "null"
55
+ else if obj.message
56
+ obj.message
55
57
  else if (obj.inspect)
56
58
  obj.inspect()
57
59
  else
data/ymdp.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ymdp}
8
- s.version = "0.8.7"
8
+ s.version = "0.8.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Isaac Priestley"]
12
- s.date = %q{2011-08-04}
12
+ s.date = %q{2011-10-10}
13
13
  s.description = %q{Framework for developing applications in the Yahoo! Mail Development Platform.}
14
14
  s.email = %q{progressions@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ymdp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 49
4
+ hash: 47
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 8
9
- - 7
10
- version: 0.8.7
9
+ - 8
10
+ version: 0.8.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Isaac Priestley
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-04 00:00:00 -05:00
18
+ date: 2011-10-10 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency