userswitch 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 998d4d5cde4c3ab6b38a232f8c4edf4b89d6526f
4
- data.tar.gz: dedd9b63b638dd8a11b8dc94ddacec3c2791df4f
3
+ metadata.gz: b05181f0222c7708c28c54c0d2197b1fd392fc9c
4
+ data.tar.gz: d92b5c4587dab98a0391e4a531643d7235695f36
5
5
  SHA512:
6
- metadata.gz: 94311c9430258fae1a409abac44d85fc99d1173a19bb6360bd4fd18e03d647fff2bc5b8959d14d72fea8cc59d98cf3ca17312ce286716556d3d82cab7da6b3cb
7
- data.tar.gz: 69a821ab85c4030ce9438c78822c05e2f6bfed3e3734ef968af4e70a61e09279fe4632fcf940007935eb3421f76879b7ce57f8803bcdf3cec01e92728c2de976
6
+ metadata.gz: a244e38afe16741c6a6bfac9f2da3beb818be69b1caaa1aab1a6d5d23394f4ec1c5caa7340aee1f458c6612c628676f5fb487c862b0de05399179824f4d3ff2a
7
+ data.tar.gz: 1155f49246df8027cf7473ebc34f09957aead36629c3d11c0aed753b30d41e3b1b21bf64ef10b182d0cc9ecc85d3d02284468f2bbf5244b7648aca47ec2f17e9
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 matija
3
+ Copyright (c) 2017 Kodius
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,34 +1,32 @@
1
- # Userswitch
1
+ # UserSwitch
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/userswitch.svg)](https://badge.fury.io/rb/userswitch)
4
4
 
5
- Userswitch is a Rails plugin for switching between commonly used roles and users. It's particularly useful for development and staging environments when you often need to switch between various accounts. It saves you from the hassle of logging in or out.
5
+ UserSwitch is a Rails plugin for switching between commonly used roles and users. It's particularly useful for development and staging environments when you often need to switch between various accounts. It saves you from the hassle of logging in or out.
6
+
7
+ ![alt](https://cloud.githubusercontent.com/assets/17185440/24801547/f2cb2c8a-1ba4-11e7-87a6-59911794d6c7.png)
6
8
 
7
9
  ## Example
8
10
 
9
11
  By default, the gem will output a chain of buttons as follows
10
12
 
11
- ![pic1](https://cloud.githubusercontent.com/assets/8150171/24745257/45e699cc-1ab5-11e7-8064-1b978d38b896.png)
12
-
13
13
  By clicking on a button, your Rails app will switch to a different user, that is, your session will change to that of a different account and save you the time you might otherwise spend clicking on logout links and filling in forms to log as a different user.
14
14
 
15
- ![pic2](https://cloud.githubusercontent.com/assets/8150171/24745255/45e4b396-1ab5-11e7-964a-9fd607f3895c.png)
16
-
17
- Different roles can have different colors so as to be more noticeable.
15
+ Different roles have different colors so as to be more noticeable. If we put mulitple "same role" users for testing, we can still see by color coding what role it belongs to.
18
16
 
19
- ![pic3](https://cloud.githubusercontent.com/assets/8150171/24745256/45e4f252-1ab5-11e7-82a7-a7d0a01953d6.png)
17
+ ![alt](https://cloud.githubusercontent.com/assets/17185440/24800120/04b1a614-1b9f-11e7-9584-3392ca40f125.gif)
20
18
 
21
19
  ## Requirements
22
20
  ```ruby
23
- gem "bootstrap"
24
- gem "devise"
21
+ gem 'bootstrap'
22
+ gem 'devise'
25
23
  ```
26
24
 
27
25
  ## How to install
28
26
 
29
27
  Add it to your app's Gemfile and run bundle
30
28
  ```ruby
31
- gem "userswitch"
29
+ gem 'userswitch'
32
30
  ```
33
31
  or install it manually
34
32
  ```ruby
@@ -39,7 +37,7 @@ gem install userswitch
39
37
  Create userswitch.yml inside you config folder with:
40
38
 
41
39
  ```ruby
42
- rake userswitch:create_file
40
+ rake userswitch:install
43
41
  ```
44
42
 
45
43
  Inside of your template/view, you can call users with (showing only users from yours userswitch.yml):
@@ -1,7 +1,7 @@
1
1
  namespace :userswitch do
2
2
  desc 'create yml file'
3
3
 
4
- task :create_file do
4
+ task :install do
5
5
  path = 'config/userswitch.yml'
6
6
  content = "## available colors: [red, dark-blue, light-blue, green, yellow, gray, white]
7
7
  # name of role: color_name(need to be spelled right)
data/lib/userswitch.rb CHANGED
@@ -7,7 +7,7 @@ module Userswitch
7
7
  # if File.directory?('config/userswitch.yml')
8
8
  YAML.load_file('config/userswitch.yml')
9
9
  # else
10
- # raise 'Havent created config/userswitch.yml file try running rake userswitch:create_file'
10
+ # raise 'Havent created config/userswitch.yml file try running rake userswitch:install'
11
11
  # end
12
12
  end
13
13
 
@@ -1,3 +1,3 @@
1
1
  module Userswitch
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
data/userswitch.gemspec CHANGED
@@ -29,7 +29,10 @@ Gem::Specification.new do |spec|
29
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ["lib"]
31
31
 
32
- spec.add_development_dependency "bundler", "~> 1.14"
33
- spec.add_development_dependency "rake", "~> 10.0"
34
- spec.add_development_dependency "rspec", "~> 3.0"
32
+ # s.add_runtime_dependency "rails"
33
+ # s.add_runtime_dependency "devise"
34
+
35
+ spec.add_development_dependency "bundler", "~> 1.14"
36
+ spec.add_development_dependency "rake", "~> 10.0"
37
+ spec.add_development_dependency "rspec", "~> 3.0"
35
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: userswitch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - kodius
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-06 00:00:00.000000000 Z
11
+ date: 2017-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,9 +76,6 @@ files:
76
76
  - lib/userswitch/engine.rb
77
77
  - lib/userswitch/railtie.rb
78
78
  - lib/userswitch/version.rb
79
- - us1.png
80
- - us2.png
81
- - us3.png
82
79
  - userswitch.gemspec
83
80
  homepage: https://github.com/kodius/userswitch
84
81
  licenses:
@@ -101,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
98
  version: '0'
102
99
  requirements: []
103
100
  rubyforge_project:
104
- rubygems_version: 2.4.5.2
101
+ rubygems_version: 2.6.7
105
102
  signing_key:
106
103
  specification_version: 4
107
104
  summary: Userswitch is a Rails plugin for switching between commonly used roles and
data/us1.png DELETED
Binary file
data/us2.png DELETED
Binary file
data/us3.png DELETED
Binary file