whodat 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.rspec +4 -0
- data/.travis.yml +3 -0
- data/CODE-OF-CONDUCT.md +60 -0
- data/Gemfile +19 -0
- data/Gemfile.lock +173 -0
- data/HOW-TO-CONTRIBUTE.md +19 -0
- data/MIT-LICENSE +20 -0
- data/README.md +99 -0
- data/Rakefile +24 -0
- data/Users +0 -0
- data/Whodat +0 -0
- data/app/assets/config/whodat_manifest.js +2 -0
- data/app/assets/images/whodat/.keep +0 -0
- data/app/assets/images/whodat/example-app-screencap.png +0 -0
- data/app/assets/images/whodat/navbar-pic-readme.png +0 -0
- data/app/assets/images/whodat/whodat-logo-tiny.png +0 -0
- data/app/assets/images/whodat/whodat-logo-wide.png +0 -0
- data/app/assets/images/whodat/whodat-logo.png +0 -0
- data/app/assets/javascripts/whodat/application.js +15 -0
- data/app/assets/javascripts/whodat/dashboard.js +2 -0
- data/app/assets/javascripts/whodat/sessions.js +2 -0
- data/app/assets/javascripts/whodat/users.js +2 -0
- data/app/assets/stylesheets/whodat/application.css +15 -0
- data/app/assets/stylesheets/whodat/dashboard.css +41 -0
- data/app/assets/stylesheets/whodat/navbar.css +45 -0
- data/app/assets/stylesheets/whodat/sessions.css +4 -0
- data/app/assets/stylesheets/whodat/users.css +4 -0
- data/app/controllers/whodat/application_controller.rb +30 -0
- data/app/controllers/whodat/dashboard_controller.rb +19 -0
- data/app/controllers/whodat/sessions_controller.rb +34 -0
- data/app/controllers/whodat/users_controller.rb +29 -0
- data/app/helpers/whodat/application_helper.rb +12 -0
- data/app/helpers/whodat/sessions_helper.rb +19 -0
- data/app/jobs/whodat/application_job.rb +4 -0
- data/app/mailers/whodat/application_mailer.rb +6 -0
- data/app/models/whodat/application_record.rb +5 -0
- data/app/models/whodat/user.rb +15 -0
- data/app/views/layouts/whodat/application.html.erb +23 -0
- data/app/views/whodat/application/_navbar.html.erb +26 -0
- data/app/views/whodat/dashboard/_navbar.html.erb +16 -0
- data/app/views/whodat/dashboard/index.html.erb +14 -0
- data/app/views/whodat/sessions/new.html.erb +29 -0
- data/app/views/whodat/users/create.html.erb +2 -0
- data/app/views/whodat/users/index.html.erb +2 -0
- data/app/views/whodat/users/new.html.erb +34 -0
- data/bin/rails +14 -0
- data/bin/rspec +29 -0
- data/config/routes.rb +15 -0
- data/db/migrate/20180717210347_create_whodat_users.rb +12 -0
- data/lib/tasks/boolean_as_integer.rake +20 -0
- data/lib/tasks/whodat_tasks.rake +4 -0
- data/lib/whodat.rb +23 -0
- data/lib/whodat/engine.rb +5 -0
- data/lib/whodat/version.rb +3 -0
- data/spec/controllers/sessions_controller_spec.rb +71 -0
- data/spec/controllers/users_controller_spec.rb +104 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/config/manifest.js +4 -0
- data/spec/dummy/app/assets/javascripts/application.js +14 -0
- data/spec/dummy/app/assets/javascripts/cable.js +13 -0
- data/spec/dummy/app/assets/javascripts/welcome.js +2 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/assets/stylesheets/welcome.css +100 -0
- data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/welcome_controller.rb +4 -0
- data/spec/dummy/app/jobs/application_job.rb +2 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +17 -0
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/app/views/welcome/index.html.erb +18 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +36 -0
- data/spec/dummy/bin/update +31 -0
- data/spec/dummy/bin/yarn +11 -0
- data/spec/dummy/config.ru +5 -0
- data/spec/dummy/config/application.rb +35 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/cable.yml +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +61 -0
- data/spec/dummy/config/environments/production.rb +98 -0
- data/spec/dummy/config/environments/test.rb +53 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/dummy/config/initializers/assets.rb +14 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/content_security_policy.rb +25 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/routes.rb +23 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +33 -0
- data/spec/dummy/config/puma.rb +34 -0
- data/spec/dummy/config/routes.rb +9 -0
- data/spec/dummy/config/spring.rb +6 -0
- data/spec/dummy/config/storage.yml +34 -0
- data/spec/dummy/db/schema.rb +24 -0
- data/spec/dummy/db/seeds.rb +21 -0
- data/spec/dummy/package.json +5 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/spec/controllers/welcome_controller_spec.rb +12 -0
- data/spec/factories.rb +8 -0
- data/spec/rails_helper.rb +70 -0
- data/spec/spec_helper.rb +108 -0
- data/spec/support/factory_bot.rb +7 -0
- data/whodat-logo-wide.png +0 -0
- data/whodat.gemspec +36 -0
- metadata +3065 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8502c4ff70eab17dba9e4136a48e99baa6c1d9321d37d819a900469a6bc3d401
|
4
|
+
data.tar.gz: c179abf0632e4cb82a61dbbaf3f7a535e4b7f7235d24c92056f433cd8a40f149
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: '08f56f86559b571e87a4b3be629de5eaec730eca72852c95e03b8a07c548139a6188f87aa05b1426f8f3efbfdcc88aedb18c5732177a058e90ad88e4d10a8a22'
|
7
|
+
data.tar.gz: 024102dc4329201cae74cf0fc6893082df33f5233d7146ceb80f140b6f807c45d5a73cabe5c777a55ab4c919c97f57c1ec2636adb4f288e0122db83a771a43f4
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE-OF-CONDUCT.md
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
### Our Pledge
|
2
|
+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
3
|
+
|
4
|
+
### Our Standards
|
5
|
+
Examples of behavior that contributes to creating a positive environment
|
6
|
+
include:
|
7
|
+
|
8
|
+
* Using welcoming and inclusive language
|
9
|
+
* Being respectful of differing viewpoints and experiences
|
10
|
+
* Gracefully accepting constructive criticism
|
11
|
+
* Focusing on what is best for the community
|
12
|
+
* Showing empathy towards other community members
|
13
|
+
|
14
|
+
Examples of unacceptable behavior by participants include:
|
15
|
+
|
16
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
17
|
+
advances
|
18
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
19
|
+
* Public or private harassment
|
20
|
+
* Publishing others' private information, such as a physical or electronic
|
21
|
+
address, without explicit permission
|
22
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
23
|
+
professional setting
|
24
|
+
|
25
|
+
### Our Responsibilities
|
26
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
27
|
+
behavior and are expected to take appropriate and fair corrective action in
|
28
|
+
response to any instances of unacceptable behavior.
|
29
|
+
|
30
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
31
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
32
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
33
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
34
|
+
threatening, offensive, or harmful.
|
35
|
+
|
36
|
+
### Scope
|
37
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
38
|
+
when an individual is representing the project or its community. Examples of
|
39
|
+
representing a project or community include using an official project e-mail
|
40
|
+
address, posting via an official social media account, or acting as an appointed
|
41
|
+
representative at an online or offline event. Representation of a project may be
|
42
|
+
further defined and clarified by project maintainers.
|
43
|
+
|
44
|
+
### Enforcement
|
45
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
46
|
+
reported by contacting the project [administrator](me@barbaraperlik.com). All
|
47
|
+
complaints will be reviewed and investigated and will result in a response that
|
48
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
49
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
50
|
+
Further details of specific enforcement policies may be posted separately.
|
51
|
+
|
52
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
53
|
+
faith may face temporary or permanent repercussions as determined by other
|
54
|
+
members of the project's leadership.
|
55
|
+
|
56
|
+
### Attribution
|
57
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
58
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
59
|
+
|
60
|
+
[homepage]: https://www.contributor-covenant.org
|
data/Gemfile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
3
|
+
|
4
|
+
# Declare your gem's dependencies in whodat.gemspec.
|
5
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
6
|
+
# development dependencies will be added by default to the :development group.
|
7
|
+
gemspec
|
8
|
+
|
9
|
+
# Declare any dependencies that are still in development here instead of in
|
10
|
+
# your gemspec. These might include edge Rails or gems from your path or
|
11
|
+
# Git. Remember to move these dependencies to your gemspec before releasing
|
12
|
+
# your gem to rubygems.org.
|
13
|
+
|
14
|
+
# To use a debugger
|
15
|
+
# gem 'byebug', group: [:development, :test]
|
16
|
+
#
|
17
|
+
|
18
|
+
gem 'jquery'
|
19
|
+
gem 'jquery-rails'
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,173 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
whodat (1.0.0)
|
5
|
+
bcrypt
|
6
|
+
jquery
|
7
|
+
jquery-rails
|
8
|
+
rails (~> 5.2.0)
|
9
|
+
sprockets-rails (~> 2.3.2)
|
10
|
+
turbolinks
|
11
|
+
|
12
|
+
GEM
|
13
|
+
remote: https://rubygems.org/
|
14
|
+
specs:
|
15
|
+
actioncable (5.2.0)
|
16
|
+
actionpack (= 5.2.0)
|
17
|
+
nio4r (~> 2.0)
|
18
|
+
websocket-driver (>= 0.6.1)
|
19
|
+
actionmailer (5.2.0)
|
20
|
+
actionpack (= 5.2.0)
|
21
|
+
actionview (= 5.2.0)
|
22
|
+
activejob (= 5.2.0)
|
23
|
+
mail (~> 2.5, >= 2.5.4)
|
24
|
+
rails-dom-testing (~> 2.0)
|
25
|
+
actionpack (5.2.0)
|
26
|
+
actionview (= 5.2.0)
|
27
|
+
activesupport (= 5.2.0)
|
28
|
+
rack (~> 2.0)
|
29
|
+
rack-test (>= 0.6.3)
|
30
|
+
rails-dom-testing (~> 2.0)
|
31
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
32
|
+
actionview (5.2.0)
|
33
|
+
activesupport (= 5.2.0)
|
34
|
+
builder (~> 3.1)
|
35
|
+
erubi (~> 1.4)
|
36
|
+
rails-dom-testing (~> 2.0)
|
37
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
38
|
+
activejob (5.2.0)
|
39
|
+
activesupport (= 5.2.0)
|
40
|
+
globalid (>= 0.3.6)
|
41
|
+
activemodel (5.2.0)
|
42
|
+
activesupport (= 5.2.0)
|
43
|
+
activerecord (5.2.0)
|
44
|
+
activemodel (= 5.2.0)
|
45
|
+
activesupport (= 5.2.0)
|
46
|
+
arel (>= 9.0)
|
47
|
+
activestorage (5.2.0)
|
48
|
+
actionpack (= 5.2.0)
|
49
|
+
activerecord (= 5.2.0)
|
50
|
+
marcel (~> 0.3.1)
|
51
|
+
activesupport (5.2.0)
|
52
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
53
|
+
i18n (>= 0.7, < 2)
|
54
|
+
minitest (~> 5.1)
|
55
|
+
tzinfo (~> 1.1)
|
56
|
+
arel (9.0.0)
|
57
|
+
bcrypt (3.1.12)
|
58
|
+
builder (3.2.3)
|
59
|
+
concurrent-ruby (1.0.5)
|
60
|
+
crass (1.0.4)
|
61
|
+
diff-lcs (1.3)
|
62
|
+
erubi (1.7.1)
|
63
|
+
factory_bot (4.11.0)
|
64
|
+
activesupport (>= 3.0.0)
|
65
|
+
factory_bot_rails (4.11.0)
|
66
|
+
factory_bot (~> 4.11.0)
|
67
|
+
railties (>= 3.0.0)
|
68
|
+
globalid (0.4.1)
|
69
|
+
activesupport (>= 4.2.0)
|
70
|
+
i18n (1.0.1)
|
71
|
+
concurrent-ruby (~> 1.0)
|
72
|
+
jquery (0.0.1)
|
73
|
+
jquery-rails (4.3.3)
|
74
|
+
rails-dom-testing (>= 1, < 3)
|
75
|
+
railties (>= 4.2.0)
|
76
|
+
thor (>= 0.14, < 2.0)
|
77
|
+
loofah (2.2.2)
|
78
|
+
crass (~> 1.0.2)
|
79
|
+
nokogiri (>= 1.5.9)
|
80
|
+
mail (2.7.0)
|
81
|
+
mini_mime (>= 0.1.1)
|
82
|
+
marcel (0.3.3)
|
83
|
+
mimemagic (~> 0.3.2)
|
84
|
+
method_source (0.9.0)
|
85
|
+
mimemagic (0.3.2)
|
86
|
+
mini_mime (1.0.1)
|
87
|
+
mini_portile2 (2.3.0)
|
88
|
+
minitest (5.11.3)
|
89
|
+
nio4r (2.3.1)
|
90
|
+
nokogiri (1.8.4)
|
91
|
+
mini_portile2 (~> 2.3.0)
|
92
|
+
rack (2.0.5)
|
93
|
+
rack-test (1.0.0)
|
94
|
+
rack (>= 1.0, < 3)
|
95
|
+
rails (5.2.0)
|
96
|
+
actioncable (= 5.2.0)
|
97
|
+
actionmailer (= 5.2.0)
|
98
|
+
actionpack (= 5.2.0)
|
99
|
+
actionview (= 5.2.0)
|
100
|
+
activejob (= 5.2.0)
|
101
|
+
activemodel (= 5.2.0)
|
102
|
+
activerecord (= 5.2.0)
|
103
|
+
activestorage (= 5.2.0)
|
104
|
+
activesupport (= 5.2.0)
|
105
|
+
bundler (>= 1.3.0)
|
106
|
+
railties (= 5.2.0)
|
107
|
+
sprockets-rails (>= 2.0.0)
|
108
|
+
rails-controller-testing (1.0.2)
|
109
|
+
actionpack (~> 5.x, >= 5.0.1)
|
110
|
+
actionview (~> 5.x, >= 5.0.1)
|
111
|
+
activesupport (~> 5.x)
|
112
|
+
rails-dom-testing (2.0.3)
|
113
|
+
activesupport (>= 4.2.0)
|
114
|
+
nokogiri (>= 1.6)
|
115
|
+
rails-html-sanitizer (1.0.4)
|
116
|
+
loofah (~> 2.2, >= 2.2.2)
|
117
|
+
railties (5.2.0)
|
118
|
+
actionpack (= 5.2.0)
|
119
|
+
activesupport (= 5.2.0)
|
120
|
+
method_source
|
121
|
+
rake (>= 0.8.7)
|
122
|
+
thor (>= 0.18.1, < 2.0)
|
123
|
+
rake (12.3.1)
|
124
|
+
rspec-core (3.8.0)
|
125
|
+
rspec-support (~> 3.8.0)
|
126
|
+
rspec-expectations (3.8.1)
|
127
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
128
|
+
rspec-support (~> 3.8.0)
|
129
|
+
rspec-mocks (3.8.0)
|
130
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
131
|
+
rspec-support (~> 3.8.0)
|
132
|
+
rspec-rails (3.8.0)
|
133
|
+
actionpack (>= 3.0)
|
134
|
+
activesupport (>= 3.0)
|
135
|
+
railties (>= 3.0)
|
136
|
+
rspec-core (~> 3.8.0)
|
137
|
+
rspec-expectations (~> 3.8.0)
|
138
|
+
rspec-mocks (~> 3.8.0)
|
139
|
+
rspec-support (~> 3.8.0)
|
140
|
+
rspec-support (3.8.0)
|
141
|
+
sprockets (3.7.2)
|
142
|
+
concurrent-ruby (~> 1.0)
|
143
|
+
rack (> 1, < 3)
|
144
|
+
sprockets-rails (2.3.3)
|
145
|
+
actionpack (>= 3.0)
|
146
|
+
activesupport (>= 3.0)
|
147
|
+
sprockets (>= 2.8, < 4.0)
|
148
|
+
sqlite3 (1.3.13)
|
149
|
+
thor (0.20.0)
|
150
|
+
thread_safe (0.3.6)
|
151
|
+
turbolinks (5.2.0)
|
152
|
+
turbolinks-source (~> 5.2)
|
153
|
+
turbolinks-source (5.2.0)
|
154
|
+
tzinfo (1.2.5)
|
155
|
+
thread_safe (~> 0.1)
|
156
|
+
websocket-driver (0.7.0)
|
157
|
+
websocket-extensions (>= 0.1.0)
|
158
|
+
websocket-extensions (0.1.3)
|
159
|
+
|
160
|
+
PLATFORMS
|
161
|
+
ruby
|
162
|
+
|
163
|
+
DEPENDENCIES
|
164
|
+
factory_bot_rails (~> 4.0)
|
165
|
+
jquery
|
166
|
+
jquery-rails
|
167
|
+
rails-controller-testing
|
168
|
+
rspec-rails (~> 3.5)
|
169
|
+
sqlite3
|
170
|
+
whodat!
|
171
|
+
|
172
|
+
BUNDLED WITH
|
173
|
+
1.16.1
|
@@ -0,0 +1,19 @@
|
|
1
|
+
### How to contribute
|
2
|
+
* Step 1: Find an issue you'd like to work on that hasn't already been claimed (It has been claimed if you see someone else's picture on it and it is assigned to someone else, or if you see someone's comment on the issue page saying they are claiming it). Comment on the issue that you have claimed it and will be working on it. An admin will add you as the assignee.
|
3
|
+
|
4
|
+
* Step 2: Fork the repo Click the "fork" button in the upper right of the Github repo page. A fork is a copy of the repository that allows you to freely explore & experiment without changing the original project. You can learn more about forking a repo in this article.
|
5
|
+
|
6
|
+
* Step 3: Create a branch Checkout a new branch for your issue - this branch can be named anything, but we encourage the format XXX-brief-description-of-feature where XXX is the issue number.
|
7
|
+
|
8
|
+
* Step 4: Follow the instructions in the README to set up your local environment. Feel free to discuss any questions on the issues as needed, and we will get back to you!
|
9
|
+
|
10
|
+
* Step 5: Don't forget to write some tests to verify your code. Commit your changes locally, using descriptive messages and please be sure to note the parts of the app that are affected by this commit.
|
11
|
+
|
12
|
+
* Step 6: Pushing your branch and creating a pull request Make sure the tests pass! Run the current test suite with docker-compose exec rails bundle exec rake test If any tests break, be sure to fix them. Make a final commit if you've made more changes to fix the tests. Then, push your branch up and create a pull request. Please indicate which issue your PR addresses in the title.
|
13
|
+
|
14
|
+
### Did you fix whitespace, format code, or make a purely cosmetic patch?
|
15
|
+
Changes that are cosmetic in nature and do not add anything substantial to the stability, functionality, or testability will generally not be accepted.
|
16
|
+
|
17
|
+
### Do you intend to add a new feature or change an existing one?
|
18
|
+
* Suggest your change by emailing the [administrator](me@barbaraperlik.com) and start writing code.
|
19
|
+
* Do not open an issue on GitHub until you have collected positive feedback about the change. GitHub issues are primarily intended for bug reports and fixes.
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2018 Barbara Perlik
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
![Whodat logo](whodat-logo-wide.png)
|
2
|
+
|
3
|
+
![Travis (.org)](https://travis-ci.org/bperlik/whodat.svg?branch=master) ![Code Climate](https://img.shields.io/codeclimate/maintainability/bperlik/whodat.svg?branch=master) ![Gem](https://img.shields.io/gem/v/:package.svg)
|
4
|
+
|
5
|
+
Whodat - A simple, easy to use, authentication gem for Rails
|
6
|
+
* An MVC solution built on a Rails engine
|
7
|
+
* Uses BCrypt for password encryption
|
8
|
+
* Allows a quick easy user authentication
|
9
|
+
* And reference to current_user, user name and email
|
10
|
+
|
11
|
+
## Intended Use Case
|
12
|
+
Whodat is intended to be used for easy and quick access to user and sessions when developing a rails application. When you don't want a lengthy set up, use Whodat. Add the one line responsive dashboard to whatever view you want. The dashboard has a main app button to return the user to the main app index page.
|
13
|
+
|
14
|
+
![nav bar menu](/app/assets/images/whodat/navbar-pic-readme.png "Whodat Login Dashboard")
|
15
|
+
|
16
|
+
## Example Application
|
17
|
+
|
18
|
+
To see Whodat in use, run Blogger app and test out the Whodat user dashboard.
|
19
|
+
|
20
|
+
|
21
|
+
![Example app](/app/assets/images/whodat/example-app-screencap.png "Example Application")
|
22
|
+
|
23
|
+
|
24
|
+
## Install
|
25
|
+
|
26
|
+
### Add this gem to your application's Gemfile:
|
27
|
+
|
28
|
+
`gem 'whodat'`
|
29
|
+
|
30
|
+
### Install the gem at the command line
|
31
|
+
|
32
|
+
`$ bundle install`
|
33
|
+
|
34
|
+
or just add the gem as a dependency
|
35
|
+
`$ gem install whodat`
|
36
|
+
|
37
|
+
### To add the user dashboard to views in your app
|
38
|
+
|
39
|
+
Add this snippet to the header section of your application view
|
40
|
+
|
41
|
+
`<%= render partial: "whodat/dashboard/navbar", action: "index" %>`
|
42
|
+
|
43
|
+
### To add current_user helper method to your application
|
44
|
+
|
45
|
+
Add this snippet to your main app application controller
|
46
|
+
Then you can use current_user in any controller or view in your app
|
47
|
+
|
48
|
+
```
|
49
|
+
helper_method :current_user
|
50
|
+
def current_user
|
51
|
+
@current_user ||= ::Whodat::User.find(session[:user_id])
|
52
|
+
end
|
53
|
+
```
|
54
|
+
|
55
|
+
### To add user to a class
|
56
|
+
|
57
|
+
Add a migration to add user as reference to your table
|
58
|
+
`rails g AddUserToYourTableName user:references`
|
59
|
+
|
60
|
+
And don't forget to run the migration
|
61
|
+
```
|
62
|
+
rake Whodat:install:migrate
|
63
|
+
rake db:migrate
|
64
|
+
```
|
65
|
+
|
66
|
+
Now you can refer to Whodat user attributes in your views
|
67
|
+
user attributes: id, name, and email
|
68
|
+
|
69
|
+
`<%= @class_instance.user.name %>`
|
70
|
+
|
71
|
+
## How to Help
|
72
|
+
|
73
|
+
### Code of Conduct
|
74
|
+
[Code of Conduct](/CODE-OF-CONDUCT.md)
|
75
|
+
|
76
|
+
### Did you find a bug?
|
77
|
+
|
78
|
+
* Do not open up a GitHub issue if the bug is a dependency security vulnerability.
|
79
|
+
* Ensure the bug was not already reported by searching on GitHub under Issues.
|
80
|
+
* If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a title and clear description, as much relevant information as possible, what was expected, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.
|
81
|
+
|
82
|
+
### Want to contribute?
|
83
|
+
|
84
|
+
[Read How to Contribute](/HOW-TO-CONTRIBUTE.md)
|
85
|
+
|
86
|
+
After forking, cloning, creating your upstream repo and branch..
|
87
|
+
Run the internal "dummy" app to test the engine enter on your command line:
|
88
|
+
|
89
|
+
`bin/rails server -b 127.0.0.1`
|
90
|
+
|
91
|
+
and open your browser to localhost:3000
|
92
|
+
|
93
|
+
### Do you have questions about the source code?
|
94
|
+
Ask any questions about how to use whodat.
|
95
|
+
Thank you for your interest!
|
96
|
+
[Contact the Administrator](me@barbaraperlik.com)
|
97
|
+
|
98
|
+
## License
|
99
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
require 'rspec/core/rake_task'
|
10
|
+
task :default => :spec
|
11
|
+
RSpec::Core::RakeTask.new
|
12
|
+
|
13
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
14
|
+
rdoc.rdoc_dir = 'rdoc'
|
15
|
+
rdoc.title = 'Whodat'
|
16
|
+
rdoc.options << '--line-numbers'
|
17
|
+
rdoc.rdoc_files.include('README.md')
|
18
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
19
|
+
end
|
20
|
+
|
21
|
+
APP_RAKEFILE = File.expand_path("spec/dummy/Rakefile", __dir__)
|
22
|
+
load 'rails/tasks/engine.rake'
|
23
|
+
|
24
|
+
load 'rails/tasks/statistics.rake'
|