muvandy 1.1a1 → 1.1.1a1

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/README.md CHANGED
@@ -6,7 +6,7 @@ Client for [Muvandy API](http://muvandy.com)
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- gem 'muvandy'
9
+ gem 'muvandy', '~> 1.1a1'
10
10
 
11
11
  And then execute:
12
12
 
@@ -14,7 +14,7 @@ And then execute:
14
14
 
15
15
  Or install it yourself as:
16
16
 
17
- $ gem install muvandy
17
+ $ gem install muvandy --pre
18
18
 
19
19
  ## To Configure
20
20
 
@@ -39,7 +39,8 @@ Example of using muvandy on a controller.
39
39
  end
40
40
  end
41
41
 
42
- A 'visitor_key' is required. You can use the visitor's IP address, email or any unique identifier for the user in your app.
42
+ A 'visitor_key' is required. By default, we recommend using the visitor's IP address but if you have other information on them their account id or email address make good unique visitor identifiers.
43
+
43
44
  Setting 'collect_muvandy_visitor_indfo' in your before_filter helps muvandy collect the following information from your 'request' & 'params' variables.
44
45
  * referrer
45
46
  * utm_term
@@ -51,13 +52,13 @@ Setting 'collect_muvandy_visitor_indfo' in your before_filter helps muvandy coll
51
52
 
52
53
  ### Views
53
54
 
55
+ Get the value by providing variable key and a fallback text. Fallback text will be displayed if in case muvandy returns an error for the variable.
56
+
54
57
  <%= content_tag "h1", @muvandy.get_variation("Headline-1", "Greetings!") %>
55
58
  <p>
56
59
  <%= @muvandy.get_variation("main-text-1") %>
57
60
  </p>
58
61
 
59
- An optional second parameter for 'get_variations' method can be provided to serve as a default value.
60
-
61
62
  ### Conversions
62
63
 
63
64
  class HomeController < ApplicationController
@@ -25,7 +25,8 @@ module Muvandy
25
25
  (@variable_variations[variable_key].blank?) ? default : @variable_variations[variable_key].html_safe
26
26
  end
27
27
 
28
- def convert!(value=50)
28
+ def convert!(value=nil)
29
+ value = 50 if value.blank?
29
30
  post(:convert, :value => value)
30
31
  end
31
32
 
@@ -117,7 +118,7 @@ module Muvandy
117
118
 
118
119
  def convert(experiment_id, options={})
119
120
  muvandy = Muvandy.new(experiment_id, options.merge(:skip_variations => true))
120
- muvandy.convert!
121
+ muvandy.convert!(options[:value])
121
122
  end
122
123
 
123
124
  end
@@ -1,4 +1,4 @@
1
1
  require "versionomy"
2
2
  module Muvandy
3
- VERSION = Versionomy.create(:major => 1, :minor => 1, :tiny => 0, :release_type => :alpha).to_s
3
+ VERSION = Versionomy.create(:major => 1, :minor => 1, :tiny => 1, :release_type => :alpha).to_s
4
4
  end
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muvandy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1a1
5
- prerelease: 3
4
+ version: 1.1.1a1
5
+ prerelease: 5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Aldwin Ibuna
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-23 00:00:00.000000000 Z
12
+ date: 2012-04-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
16
- requirement: &70230777492660 !ruby/object:Gem::Requirement
16
+ requirement: &70138247604880 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.8'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70230777492660
24
+ version_requirements: *70138247604880
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: versionomy
27
- requirement: &70230777490440 !ruby/object:Gem::Requirement
27
+ requirement: &70138247593860 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 0.4.3
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70230777490440
35
+ version_requirements: *70138247593860
36
36
  description: Client for Muvandy API
37
37
  email:
38
38
  - aibuna@gmail.com