dev_log_in 0.0.3 → 0.0.4
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 +28 -0
- data/app/controllers/dev_log_in_controller.rb +1 -1
- data/lib/dev_log_in/version.rb +1 -1
- metadata +44 -65
- data/README.textile +0 -18
    
        data/README.md
    ADDED
    
    | @@ -0,0 +1,28 @@ | |
| 1 | 
            +
            # Dev Log in
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            Rails gem that helps you to log in and easily switch between multiple users in development env (without configuration).
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            # Usage
         | 
| 6 | 
            +
            Go to http://myproject.local/dev/log_in/john to log in as john (if a user with email "john@*.*" exists in DB)
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            or
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            ```
         | 
| 11 | 
            +
            /dev/log_in/ivan for "ivan@*.*"
         | 
| 12 | 
            +
            /dev/log_in/admin for "admin@*.*"
         | 
| 13 | 
            +
            ```
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            # Installation
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            Just add to your Gemfile:
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            ```ruby
         | 
| 20 | 
            +
            gem 'dev_log_in'
         | 
| 21 | 
            +
            ```
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            # Configuration
         | 
| 24 | 
            +
             | 
| 25 | 
            +
            Not needed!
         | 
| 26 | 
            +
             | 
| 27 | 
            +
            Copyright © 2012 divineforest, evrone.com
         | 
| 28 | 
            +
            This project rocks and uses MIT-LICENSE.
         | 
| @@ -2,7 +2,7 @@ class DevLogInController < ApplicationController | |
| 2 2 |  | 
| 3 3 | 
             
              def log_in
         | 
| 4 4 | 
             
                if Rails.env.development? || Rails.env.test?
         | 
| 5 | 
            -
                  user = User.where([ | 
| 5 | 
            +
                  user = User.where(User.arel_table[:email].matches("#{params[:login]}@%")).first!
         | 
| 6 6 | 
             
                  sign_in_and_redirect(user)
         | 
| 7 7 | 
             
                else
         | 
| 8 8 | 
             
                  raise "Works only in development or test env"
         | 
    
        data/lib/dev_log_in/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,69 +1,52 @@ | |
| 1 | 
            -
            --- !ruby/object:Gem::Specification | 
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: dev_log_in
         | 
| 3 | 
            -
            version: !ruby/object:Gem::Version | 
| 4 | 
            -
               | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 0.0.4
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 | 
            -
              segments: 
         | 
| 7 | 
            -
              - 0
         | 
| 8 | 
            -
              - 0
         | 
| 9 | 
            -
              - 3
         | 
| 10 | 
            -
              version: 0.0.3
         | 
| 11 6 | 
             
            platform: ruby
         | 
| 12 | 
            -
            authors: | 
| 7 | 
            +
            authors:
         | 
| 13 8 | 
             
            - divineforest
         | 
| 14 9 | 
             
            autorequire: 
         | 
| 15 10 | 
             
            bindir: bin
         | 
| 16 11 | 
             
            cert_chain: []
         | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
              version_requirements: &id001 !ruby/object:Gem::Requirement 
         | 
| 12 | 
            +
            date: 2012-07-24 00:00:00.000000000 Z
         | 
| 13 | 
            +
            dependencies:
         | 
| 14 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 15 | 
            +
              name: rails
         | 
| 16 | 
            +
              requirement: &2157018180 !ruby/object:Gem::Requirement
         | 
| 23 17 | 
             
                none: false
         | 
| 24 | 
            -
                requirements: | 
| 25 | 
            -
                - -  | 
| 26 | 
            -
                  - !ruby/object:Gem::Version | 
| 27 | 
            -
                    hash: 7
         | 
| 28 | 
            -
                    segments: 
         | 
| 29 | 
            -
                    - 3
         | 
| 30 | 
            -
                    - 0
         | 
| 31 | 
            -
                    - 0
         | 
| 18 | 
            +
                requirements:
         | 
| 19 | 
            +
                - - ! '>='
         | 
| 20 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 32 21 | 
             
                    version: 3.0.0
         | 
| 33 | 
            -
              prerelease: false
         | 
| 34 22 | 
             
              type: :runtime
         | 
| 35 | 
            -
              requirement: *id001
         | 
| 36 | 
            -
              name: rails
         | 
| 37 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 38 | 
            -
              version_requirements: &id002 !ruby/object:Gem::Requirement 
         | 
| 39 | 
            -
                none: false
         | 
| 40 | 
            -
                requirements: 
         | 
| 41 | 
            -
                - - ">="
         | 
| 42 | 
            -
                  - !ruby/object:Gem::Version 
         | 
| 43 | 
            -
                    hash: 3
         | 
| 44 | 
            -
                    segments: 
         | 
| 45 | 
            -
                    - 0
         | 
| 46 | 
            -
                    version: "0"
         | 
| 47 23 | 
             
              prerelease: false
         | 
| 48 | 
            -
               | 
| 49 | 
            -
             | 
| 24 | 
            +
              version_requirements: *2157018180
         | 
| 25 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 50 26 | 
             
              name: sqlite3
         | 
| 51 | 
            -
             | 
| 27 | 
            +
              requirement: &2157017460 !ruby/object:Gem::Requirement
         | 
| 28 | 
            +
                none: false
         | 
| 29 | 
            +
                requirements:
         | 
| 30 | 
            +
                - - ! '>='
         | 
| 31 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 32 | 
            +
                    version: '0'
         | 
| 33 | 
            +
              type: :development
         | 
| 34 | 
            +
              prerelease: false
         | 
| 35 | 
            +
              version_requirements: *2157017460
         | 
| 36 | 
            +
            description: Log in by typing myproject.local/dev/log_in/john or myproject.local/dev/log_in/admin
         | 
| 37 | 
            +
              to easily switch between users in development env
         | 
| 52 38 | 
             
            email: 
         | 
| 53 39 | 
             
            executables: []
         | 
| 54 | 
            -
             | 
| 55 40 | 
             
            extensions: []
         | 
| 56 | 
            -
             | 
| 57 41 | 
             
            extra_rdoc_files: []
         | 
| 58 | 
            -
             | 
| 59 | 
            -
            files: 
         | 
| 42 | 
            +
            files:
         | 
| 60 43 | 
             
            - app/controllers/dev_log_in_controller.rb
         | 
| 61 44 | 
             
            - config/routes.rb
         | 
| 62 45 | 
             
            - lib/dev_log_in/version.rb
         | 
| 63 46 | 
             
            - lib/dev_log_in.rb
         | 
| 64 47 | 
             
            - MIT-LICENSE
         | 
| 65 48 | 
             
            - Rakefile
         | 
| 66 | 
            -
            - README. | 
| 49 | 
            +
            - README.md
         | 
| 67 50 | 
             
            - test/dev_log_in_test.rb
         | 
| 68 51 | 
             
            - test/dummy/app/assets/javascripts/application.js
         | 
| 69 52 | 
             
            - test/dummy/app/assets/stylesheets/application.css
         | 
| @@ -93,41 +76,37 @@ files: | |
| 93 76 | 
             
            - test/dummy/Rakefile
         | 
| 94 77 | 
             
            - test/dummy/script/rails
         | 
| 95 78 | 
             
            - test/test_helper.rb
         | 
| 96 | 
            -
            has_rdoc: true
         | 
| 97 79 | 
             
            homepage: http://github.com/divineforest/dev_log_in
         | 
| 98 80 | 
             
            licenses: []
         | 
| 99 | 
            -
             | 
| 100 81 | 
             
            post_install_message: 
         | 
| 101 82 | 
             
            rdoc_options: []
         | 
| 102 | 
            -
             | 
| 103 | 
            -
            require_paths: 
         | 
| 83 | 
            +
            require_paths:
         | 
| 104 84 | 
             
            - lib
         | 
| 105 | 
            -
            required_ruby_version: !ruby/object:Gem::Requirement | 
| 85 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 106 86 | 
             
              none: false
         | 
| 107 | 
            -
              requirements: | 
| 108 | 
            -
              - -  | 
| 109 | 
            -
                - !ruby/object:Gem::Version | 
| 110 | 
            -
                   | 
| 111 | 
            -
                  segments: | 
| 87 | 
            +
              requirements:
         | 
| 88 | 
            +
              - - ! '>='
         | 
| 89 | 
            +
                - !ruby/object:Gem::Version
         | 
| 90 | 
            +
                  version: '0'
         | 
| 91 | 
            +
                  segments:
         | 
| 112 92 | 
             
                  - 0
         | 
| 113 | 
            -
                   | 
| 114 | 
            -
            required_rubygems_version: !ruby/object:Gem::Requirement | 
| 93 | 
            +
                  hash: 1967676665812020243
         | 
| 94 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 115 95 | 
             
              none: false
         | 
| 116 | 
            -
              requirements: | 
| 117 | 
            -
              - -  | 
| 118 | 
            -
                - !ruby/object:Gem::Version | 
| 119 | 
            -
                   | 
| 120 | 
            -
                  segments: | 
| 96 | 
            +
              requirements:
         | 
| 97 | 
            +
              - - ! '>='
         | 
| 98 | 
            +
                - !ruby/object:Gem::Version
         | 
| 99 | 
            +
                  version: '0'
         | 
| 100 | 
            +
                  segments:
         | 
| 121 101 | 
             
                  - 0
         | 
| 122 | 
            -
                   | 
| 102 | 
            +
                  hash: 1967676665812020243
         | 
| 123 103 | 
             
            requirements: []
         | 
| 124 | 
            -
             | 
| 125 104 | 
             
            rubyforge_project: 
         | 
| 126 | 
            -
            rubygems_version: 1. | 
| 105 | 
            +
            rubygems_version: 1.8.10
         | 
| 127 106 | 
             
            signing_key: 
         | 
| 128 107 | 
             
            specification_version: 3
         | 
| 129 108 | 
             
            summary: Type /dev/log_in/john in browser to log in as john (in env.development?)
         | 
| 130 | 
            -
            test_files: | 
| 109 | 
            +
            test_files:
         | 
| 131 110 | 
             
            - test/dev_log_in_test.rb
         | 
| 132 111 | 
             
            - test/dummy/app/assets/javascripts/application.js
         | 
| 133 112 | 
             
            - test/dummy/app/assets/stylesheets/application.css
         | 
    
        data/README.textile
    DELETED
    
    | @@ -1,18 +0,0 @@ | |
| 1 | 
            -
            h1. Usage
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            http://myproject.local/dev/log_in/john to log in as john (if User with email "john@****.**" exists in DB)
         | 
| 4 | 
            -
             | 
| 5 | 
            -
            /dev/log_in/ivan for "ivan@****.**" or
         | 
| 6 | 
            -
            /dev/log_in/admin for "admin@****.**" or
         | 
| 7 | 
            -
             | 
| 8 | 
            -
            h1. Why?
         | 
| 9 | 
            -
             | 
| 10 | 
            -
            Helps you to log in and easily switch between multiple users in development env.
         | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
            h1. Installation
         | 
| 14 | 
            -
             | 
| 15 | 
            -
            gem 'dev_log_in'
         | 
| 16 | 
            -
             | 
| 17 | 
            -
            Copyright (c) 2011 divineforest, evrone
         | 
| 18 | 
            -
            This project rocks and uses MIT-LICENSE.
         |