easy_ab 0.0.2 → 0.0.3
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/CHANGELOG.md +2 -0
- data/README.md +31 -10
- data/easy_ab.gemspec +1 -1
- data/lib/easy_ab/helpers.rb +1 -1
- data/lib/easy_ab/version.rb +1 -1
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 1c7eddf36ea57f8a4c34fa66755ad8d93a55aeca
         | 
| 4 | 
            +
              data.tar.gz: e25036d29777b725fdc401bd5315fadeee044523
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: afcc1ccfa3b319b894223e85997107dc1df50fbd2ba57fb70b7c1d0bb9d0886889c46a8e00694a4eb535923e116b1dfa2bc4564f4aa1bc7f375e120739ffc56e
         | 
| 7 | 
            +
              data.tar.gz: 78e202157604d52dd71f90a3aab4905c32ab70bc4cfc4f19042568336350897c6d10138c1226df3e1c5923113ffda7d2a84a9ecf4c9e6855f84afe7f8b8ce400
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -2,7 +2,7 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            Easy, flexible A/B testing tool for Rails.
         | 
| 4 4 |  | 
| 5 | 
            -
            * Design for web
         | 
| 5 | 
            +
            * Design for web.
         | 
| 6 6 | 
             
            * Use your database to keep users' testing info to seamlessly handle the transition from guest to signed in user. You don't need to prepare extra stack like Redis or something else.
         | 
| 7 7 | 
             
            * Grouping your users to your predefined variants with very easy and flexible way:
         | 
| 8 8 | 
             
              * Random with equal weightings.
         | 
| @@ -32,14 +32,7 @@ Easy, flexible A/B testing tool for Rails. | |
| 32 32 | 
             
            * No DSL, just setup your rules with pure Ruby (and Rails) :)
         | 
| 33 33 |  | 
| 34 34 | 
             
            # Notice
         | 
| 35 | 
            -
            Easy AB is under development.  | 
| 36 | 
            -
             | 
| 37 | 
            -
            # Why Easy AB?
         | 
| 38 | 
            -
            ## Comparisons
         | 
| 39 | 
            -
            ### Split
         | 
| 40 | 
            -
            ### Field Test
         | 
| 41 | 
            -
            ### Flipper
         | 
| 42 | 
            -
            ### ...
         | 
| 35 | 
            +
            Easy AB is under development and is in beta phase. Be sure to test before integrating with your production app.
         | 
| 43 36 |  | 
| 44 37 | 
             
            # Installation & Setup
         | 
| 45 38 |  | 
| @@ -128,6 +121,29 @@ Keep in mind that `ab_test()` helper always returns String. You have to handle t | |
| 128 121 | 
             
            @extra_vip_duration = ab_test(:extra_vip_duration).to_i.days
         | 
| 129 122 | 
             
            ```
         | 
| 130 123 |  | 
| 124 | 
            +
            You can dump experiment data of current user to analytics services (Mixpanel, Google Analytics, etc.) by `all_participated_experiments`
         | 
| 125 | 
            +
             | 
| 126 | 
            +
            ```erb
         | 
| 127 | 
            +
            # In your view
         | 
| 128 | 
            +
            <script type="text/javascript">
         | 
| 129 | 
            +
              mixpanel.track("My Event", {
         | 
| 130 | 
            +
                <% all_participated_experiments.each do |experiment, variant| %>
         | 
| 131 | 
            +
                  "<%= experiment %>": "<%= variant %>",
         | 
| 132 | 
            +
                <% end %>
         | 
| 133 | 
            +
              })
         | 
| 134 | 
            +
            </script>
         | 
| 135 | 
            +
            ```
         | 
| 136 | 
            +
             | 
| 137 | 
            +
            The return format of `all_participated_experiments`
         | 
| 138 | 
            +
             | 
| 139 | 
            +
            ```ruby
         | 
| 140 | 
            +
            {
         | 
| 141 | 
            +
              'experiment 1' => 'variant 1',
         | 
| 142 | 
            +
              'experiment 2' => 'variant 2',
         | 
| 143 | 
            +
              ...
         | 
| 144 | 
            +
            }
         | 
| 145 | 
            +
            ```
         | 
| 146 | 
            +
             | 
| 131 147 | 
             
            # Others
         | 
| 132 148 | 
             
            ## Type of experiments
         | 
| 133 149 | 
             
            Both String and Symbol are valid when defining experiment or passing to `ab_test`.
         | 
| @@ -168,4 +184,9 @@ end | |
| 168 184 |  | 
| 169 185 | 
             
            # In view/controller
         | 
| 170 186 | 
             
            ab_test(:button_color).class # => String
         | 
| 171 | 
            -
            ```
         | 
| 187 | 
            +
            ```
         | 
| 188 | 
            +
             | 
| 189 | 
            +
            # Todo
         | 
| 190 | 
            +
            * Add comparisons with existing A/B testing gems
         | 
| 191 | 
            +
            * Convertion rate
         | 
| 192 | 
            +
            * Test code
         | 
    
        data/easy_ab.gemspec
    CHANGED
    
    | @@ -5,7 +5,7 @@ require 'easy_ab/version' | |
| 5 5 | 
             
            Gem::Specification.new do |s|
         | 
| 6 6 | 
             
              s.name        = 'easy_ab'
         | 
| 7 7 | 
             
              s.version     = EasyAb::VERSION
         | 
| 8 | 
            -
              s.summary     = ' | 
| 8 | 
            +
              s.summary     = 'Easy, flexible A/B testing and feature toggle for Rails'
         | 
| 9 9 | 
             
              s.authors     = ['Gary Chu']
         | 
| 10 10 | 
             
              s.email       = 'icarus4.chu@gmail.com'
         | 
| 11 11 | 
             
              s.files       = `git ls-files -z`.split("\x0").reject do |f|
         | 
    
        data/lib/easy_ab/helpers.rb
    CHANGED
    
    | @@ -32,7 +32,7 @@ module EasyAb | |
| 32 32 | 
             
                #   'experiment 2' => 'variant 2',
         | 
| 33 33 | 
             
                #   ...
         | 
| 34 34 | 
             
                # }
         | 
| 35 | 
            -
                def  | 
| 35 | 
            +
                def all_participated_experiments(options = {})
         | 
| 36 36 | 
             
                  user_recognition = find_ab_test_user_recognition(options)
         | 
| 37 37 | 
             
                  groupings = if user_recognition[:id]
         | 
| 38 38 | 
             
                                EasyAb::Grouping.where("user_id = ? OR cookie = ?", user_recognition[:id], user_recognition[:cookie])
         | 
    
        data/lib/easy_ab/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: easy_ab
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Gary Chu
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2017-08- | 
| 11 | 
            +
            date: 2017-08-08 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies: []
         | 
| 13 13 | 
             
            description: 
         | 
| 14 14 | 
             
            email: icarus4.chu@gmail.com
         | 
| @@ -57,6 +57,6 @@ rubyforge_project: | |
| 57 57 | 
             
            rubygems_version: 2.6.12
         | 
| 58 58 | 
             
            signing_key: 
         | 
| 59 59 | 
             
            specification_version: 4
         | 
| 60 | 
            -
            summary:  | 
| 60 | 
            +
            summary: Easy, flexible A/B testing and feature toggle for Rails
         | 
| 61 61 | 
             
            test_files: []
         | 
| 62 62 | 
             
            has_rdoc: 
         |