jobshop 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -2
- data/app/assets/stylesheets/jobshop/application.scss +0 -7
- data/app/assets/stylesheets/jobshop/static.scss +2 -1
- data/app/controllers/jobshop/application_controller.rb +3 -1
- data/app/controllers/jobshop/teams/lookups_controller.rb +16 -0
- data/app/controllers/jobshop/teams/registrations_controller.rb +2 -0
- data/app/helpers/jobshop/application_helper.rb +1 -5
- data/app/views/devise/sessions/new.html.haml +1 -1
- data/app/views/jobshop/teams/lookups/show.html.haml +16 -0
- data/app/views/jobshop/teams/registrations/new.html.haml +22 -21
- data/config/initializers/devise.rb +4 -2
- data/config/routes.rb +9 -0
- data/lib/jobshop/failure_app.rb +11 -0
- data/lib/jobshop/templates/dummy_template.rb +1 -1
- data/lib/jobshop/templates/quick_install.rb +19 -8
- data/lib/jobshop/templates/{secrets.yml.tt → secrets.yml.erb} +1 -1
- data/lib/jobshop/version.rb +1 -1
- data/lib/jobshop.rb +19 -0
- metadata +9 -7
- data/app/views/jobshop/shared/_unauthenticated_layout.html.haml +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73e3ef6bd1abb23225e93a793bc1ac0869dfd8cb
|
4
|
+
data.tar.gz: 9c0287d10551a3632b9743d5989e2a803829b163
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1193bfb23590c93ebbc071a79b761d7b3e68031023dd42059ae852b2c20ecf8784a8b2f0e45e4b5f17c3ee89529f576c9ea6958f5f2c777546c19ecefe1a4921
|
7
|
+
data.tar.gz: ef0fbfe84a031c85cf1e36316136e301e402b24ef59d785941d3c61f54bd89820eb3076e723cafb15f9f2c0f3730ab6ecb3ddd208acd1246a9b3848a4e6a2757
|
data/README.md
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
# Jobshop
|
2
|
-
_This README is also [available in a friendly, navigable format](http://documentup.com/jobshop/jobshop/)._
|
3
2
|
|
4
3
|
[![Gem Version](https://badge.fury.io/rb/jobshop.svg)](https://badge.fury.io/rb/jobshop)
|
5
4
|
[![Code Climate](https://codeclimate.com/github/jobshop/jobshop/badges/gpa.svg)](https://codeclimate.com/github/jobshop/jobshop)
|
6
5
|
[![Build Status](https://semaphoreci.com/api/v1/frankjmattia/jobshop/branches/master/shields_badge.svg)](https://semaphoreci.com/frankjmattia/jobshop)
|
7
|
-
[![Coverage
|
6
|
+
[![Test Coverage](https://codeclimate.com/github/jobshop/jobshop/badges/coverage.svg)](https://codeclimate.com/github/jobshop/jobshop/coverage)
|
8
7
|
|
9
8
|
Real-time production tracking and process evaluation in the cloud - or under your own roof.
|
10
9
|
|
@@ -13,12 +13,6 @@ html, body {
|
|
13
13
|
html { height: 100% }
|
14
14
|
body { min-height: 100%; }
|
15
15
|
|
16
|
-
.session-layout,
|
17
|
-
.registration-layout {
|
18
|
-
@extend .mdl-layout;
|
19
|
-
}
|
20
|
-
|
21
|
-
|
22
16
|
main {
|
23
17
|
display: flex;
|
24
18
|
justify-content: center;
|
@@ -56,7 +50,6 @@ main {
|
|
56
50
|
|
57
51
|
.mdl-card__title {
|
58
52
|
align-items: center;
|
59
|
-
height: 200px;
|
60
53
|
justify-content: space-around;
|
61
54
|
|
62
55
|
h4 {
|
@@ -12,9 +12,11 @@ module Jobshop
|
|
12
12
|
# after_action :verify_policy_scoped, :only => :index
|
13
13
|
|
14
14
|
def layout_for_application
|
15
|
-
if devise_controller? && controller_name == "sessions"
|
15
|
+
if devise_controller? && controller_name == "sessions" ||
|
16
|
+
controller_path == "jobshop/teams/lookups"
|
16
17
|
"jobshop/unauthenticated"
|
17
18
|
else
|
19
|
+
|
18
20
|
"jobshop/application"
|
19
21
|
end
|
20
22
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_dependency "jobshop/application_controller"
|
2
|
+
|
3
|
+
module Jobshop
|
4
|
+
class Teams::LookupsController < ApplicationController
|
5
|
+
skip_before_action :authenticate_user!
|
6
|
+
|
7
|
+
def show
|
8
|
+
@lookup = Jobshop::User.new
|
9
|
+
end
|
10
|
+
|
11
|
+
def create
|
12
|
+
# noop
|
13
|
+
redirect_to new_user_session_path
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -1,11 +1,7 @@
|
|
1
1
|
module Jobshop
|
2
2
|
module ApplicationHelper
|
3
3
|
def body_class
|
4
|
-
@body_class ||=
|
5
|
-
"static-#{params[:page]}"
|
6
|
-
elsif controller_name == "sessions"
|
7
|
-
"sessions-#{action_name}"
|
8
|
-
end
|
4
|
+
@body_class ||= "#{controller_name}-#{action_name}"
|
9
5
|
end
|
10
6
|
end
|
11
7
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
%div.mdl-cell.mdl-cell--12-col
|
4
4
|
%div#sign-in.mdl-card
|
5
5
|
= form_for(resource, builder: Jobshop::Builder, as: resource_name, url: session_path(resource_name)) do |f|
|
6
|
-
.mdl-card__title
|
6
|
+
.mdl-card__title(style="height: 200px;")
|
7
7
|
%object.logo{ type: "image/svg+xml", data: image_path("jobshop/logo.svg") }
|
8
8
|
|
9
9
|
.mdl-card__supporting-text
|
@@ -0,0 +1,16 @@
|
|
1
|
+
%main.mdl-layout__content
|
2
|
+
%div.mdl-grid
|
3
|
+
%div.mdl-cell.mdl-cell--12-col
|
4
|
+
%div#sign-in.mdl-card
|
5
|
+
= form_for @lookup, builder: Jobshop::Builder, url: teams_lookup_path do |f|
|
6
|
+
.mdl-card__title
|
7
|
+
%h4
|
8
|
+
Can't find your team?
|
9
|
+
|
10
|
+
.mdl-card__supporting-text
|
11
|
+
%p
|
12
|
+
Enter your email address and we'll send you the link.
|
13
|
+
%div= f.email_field(:email)
|
14
|
+
|
15
|
+
.mdl-card__actions
|
16
|
+
%div= f.button "Send the link to my email!", class: "mdl-js-ripple-effect"
|
@@ -1,26 +1,27 @@
|
|
1
|
-
%
|
2
|
-
%
|
3
|
-
%div
|
4
|
-
|
5
|
-
.
|
6
|
-
|
1
|
+
%main.mdl-layout__content
|
2
|
+
%div.mdl-grid
|
3
|
+
%div.mdl-cell.mdl-cell--12-col
|
4
|
+
%div#register.mdl-card
|
5
|
+
= form_for @registration, builder: Jobshop::Builder, url: team_registration_path(@registration.team) do |f|
|
6
|
+
.mdl-card__title
|
7
|
+
%object.logo{ type: "image/svg+xml", data: image_path("jobshop/logo.svg") }
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
%h4
|
10
|
+
Get started with
|
11
|
+
%br>
|
12
|
+
%strong Jobshop
|
13
|
+
.mdl-card__supporting-text
|
14
|
+
= hidden_field_tag(:registration_token, params[:registration_token])
|
14
15
|
|
15
|
-
|
16
|
-
|
16
|
+
- if @registration.errors.present?
|
17
|
+
%p.error try again
|
17
18
|
|
18
|
-
|
19
|
-
|
19
|
+
= f.fields_for(@registration.team) do |team_f|
|
20
|
+
%div= team_f.text_field(:name)
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
= f.fields_for(@registration.user) do |user_f|
|
23
|
+
%div= user_f.email_field(:email)
|
24
|
+
%div= user_f.password_field(:password)
|
25
|
+
%div= user_f.password_field(:password_confirmation)
|
26
|
+
%div= f.button "Next »".html_safe, class: "btn waves-effect waves-light"
|
26
27
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "jobshop/failure_app"
|
1
2
|
# Use this hook to configure devise mailer, warden hooks and so forth.
|
2
3
|
# Many of these configuration options can be set straight in your model.
|
3
4
|
Devise.setup do |config|
|
@@ -254,10 +255,11 @@ Devise.setup do |config|
|
|
254
255
|
# If you want to use other strategies, that are not supported by Devise, or
|
255
256
|
# change the failure app, you can configure them inside the config.warden block.
|
256
257
|
#
|
257
|
-
|
258
|
+
config.warden do |manager|
|
259
|
+
manager.failure_app = Jobshop::FailureApp
|
258
260
|
# manager.intercept_401 = false
|
259
261
|
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
260
|
-
|
262
|
+
end
|
261
263
|
|
262
264
|
# ==> Mountable engine configurations
|
263
265
|
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
data/config/routes.rb
CHANGED
@@ -1,11 +1,20 @@
|
|
1
1
|
Jobshop::Engine.routes.draw do
|
2
|
+
default_url_options(Jobshop.configuration.default_url_options)
|
3
|
+
|
2
4
|
devise_for :users, class_name: "Jobshop::User", module: :devise
|
3
5
|
|
6
|
+
|
4
7
|
resources :teams, only: [ ] do
|
8
|
+
collection do
|
9
|
+
resource :lookup, only: [ :show, :create ], module: "teams",
|
10
|
+
as: "teams_lookup"
|
11
|
+
end
|
12
|
+
|
5
13
|
resource :registration, only: [ :new, :create ],
|
6
14
|
controller: "teams/registrations"
|
7
15
|
end
|
8
16
|
|
17
|
+
|
9
18
|
get "/about" => redirect("https://jobshop.io"), as: :about
|
10
19
|
|
11
20
|
root to: "dashboards#show"
|
@@ -10,7 +10,7 @@ copy_file "boot.rb.tt", "config/boot.rb"
|
|
10
10
|
# The generated config/secrets.yml file uses hardcoded values for
|
11
11
|
# test/development environments. Generate secrets pragmatically.
|
12
12
|
remove_file "config/secrets.yml"
|
13
|
-
|
13
|
+
template "secrets.yml.erb", "config/secrets.yml"
|
14
14
|
|
15
15
|
# Comment out username, password from production group.
|
16
16
|
gsub_file "config/database.yml",
|
@@ -1,17 +1,28 @@
|
|
1
|
-
|
1
|
+
SECRETS_YML_URI = URI.parse("https://raw.githubusercontent.com/jobshop/jobshop/master/lib/jobshop/templates/secrets.yml.erb")
|
2
|
+
|
3
|
+
require "tempfile"
|
4
|
+
require "net/http"
|
2
5
|
|
3
6
|
# Add jobshop to the application `Gemfile`.
|
4
|
-
gem "jobshop", "~> 0.0.
|
7
|
+
gem "jobshop", "~> 0.0.11"
|
8
|
+
|
9
|
+
#require "pry"; binding.pry
|
10
|
+
template_body = Net::HTTP.start(SECRETS_YML_URI.host,
|
11
|
+
SECRETS_YML_URI.port,
|
12
|
+
use_ssl: true) do |http|
|
13
|
+
http.request(Net::HTTP::Get.new(SECRETS_YML_URI))
|
14
|
+
end.body
|
15
|
+
|
16
|
+
secrets_tempfile = Tempfile.new(["secrets", ".yml.erb"])
|
17
|
+
puts secrets_tempfile.path
|
18
|
+
secrets_tempfile.write(template_body)
|
19
|
+
secrets_tempfile.close
|
5
20
|
|
6
21
|
# The generated config/secrets.yml file uses hardcoded values for
|
7
22
|
# test/development environments. Generate secrets pragmatically.
|
8
23
|
remove_file "config/secrets.yml"
|
9
|
-
|
10
|
-
|
11
|
-
SECRETS_YML_TT_URI.port, use_ssl: true) do |http|
|
12
|
-
http.request(Net::HTTP::Get.new(SECRETS_YML_TT_URI))
|
13
|
-
end.body
|
14
|
-
end
|
24
|
+
template secrets_tempfile.path, "config/secrets.yml"
|
25
|
+
secrets_tempfile.unlink
|
15
26
|
|
16
27
|
after_bundle do
|
17
28
|
route %Q(mount Jobshop::Engine => "/")
|
data/lib/jobshop/version.rb
CHANGED
data/lib/jobshop.rb
CHANGED
@@ -1,4 +1,23 @@
|
|
1
1
|
require "jobshop/engine"
|
2
2
|
|
3
3
|
module Jobshop
|
4
|
+
class << self
|
5
|
+
attr_writer :configuration
|
6
|
+
|
7
|
+
def configuration
|
8
|
+
@configuration ||= Configuration.new
|
9
|
+
end
|
10
|
+
|
11
|
+
def configure
|
12
|
+
yield(configuration)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
class Configuration
|
17
|
+
attr_writer :host
|
18
|
+
|
19
|
+
def default_url_options
|
20
|
+
{}
|
21
|
+
end
|
22
|
+
end
|
4
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jobshop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank J. Mattia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coffee-rails
|
@@ -177,19 +177,19 @@ dependencies:
|
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: '2.6'
|
179
179
|
- !ruby/object:Gem::Dependency
|
180
|
-
name:
|
180
|
+
name: codeclimate-test-reporter
|
181
181
|
requirement: !ruby/object:Gem::Requirement
|
182
182
|
requirements:
|
183
183
|
- - "~>"
|
184
184
|
- !ruby/object:Gem::Version
|
185
|
-
version: '0.
|
185
|
+
version: '0.6'
|
186
186
|
type: :development
|
187
187
|
prerelease: false
|
188
188
|
version_requirements: !ruby/object:Gem::Requirement
|
189
189
|
requirements:
|
190
190
|
- - "~>"
|
191
191
|
- !ruby/object:Gem::Version
|
192
|
-
version: '0.
|
192
|
+
version: '0.6'
|
193
193
|
- !ruby/object:Gem::Dependency
|
194
194
|
name: factory_girl_rails
|
195
195
|
requirement: !ruby/object:Gem::Requirement
|
@@ -309,6 +309,7 @@ files:
|
|
309
309
|
- app/controllers/concerns/registration_token_validation.rb
|
310
310
|
- app/controllers/jobshop/application_controller.rb
|
311
311
|
- app/controllers/jobshop/dashboards_controller.rb
|
312
|
+
- app/controllers/jobshop/teams/lookups_controller.rb
|
312
313
|
- app/controllers/jobshop/teams/registrations_controller.rb
|
313
314
|
- app/controllers/jobshop/teams_controller.rb
|
314
315
|
- app/helpers/jobshop/application_helper.rb
|
@@ -333,7 +334,7 @@ files:
|
|
333
334
|
- app/views/devise/shared/_links.html.haml
|
334
335
|
- app/views/devise/unlocks/new.html.haml
|
335
336
|
- app/views/jobshop/dashboards/show.html.haml
|
336
|
-
- app/views/jobshop/
|
337
|
+
- app/views/jobshop/teams/lookups/show.html.haml
|
337
338
|
- app/views/jobshop/teams/registrations/new.html.haml
|
338
339
|
- app/views/layouts/jobshop/application.html.haml
|
339
340
|
- app/views/layouts/jobshop/unauthenticated.html.haml
|
@@ -359,11 +360,12 @@ files:
|
|
359
360
|
- lib/jobshop.rb
|
360
361
|
- lib/jobshop/dummy_app.rb
|
361
362
|
- lib/jobshop/engine.rb
|
363
|
+
- lib/jobshop/failure_app.rb
|
362
364
|
- lib/jobshop/support/memo_attr.rb
|
363
365
|
- lib/jobshop/templates/boot.rb.tt
|
364
366
|
- lib/jobshop/templates/dummy_template.rb
|
365
367
|
- lib/jobshop/templates/quick_install.rb
|
366
|
-
- lib/jobshop/templates/secrets.yml.
|
368
|
+
- lib/jobshop/templates/secrets.yml.erb
|
367
369
|
- lib/jobshop/version.rb
|
368
370
|
- lib/tasks/jobshop_tasks.rake
|
369
371
|
homepage: https://jobshop.io
|
@@ -1,13 +0,0 @@
|
|
1
|
-
%div.mdl-layout.mdl-js-layout.mdl-layout--fixed-header
|
2
|
-
%header.mdl-layout__header.mdl-layout__header--waterfall
|
3
|
-
%div.mdl-layout__header-row
|
4
|
-
%a.mdl-layout-title(href="#{jobshop.root_path}") Jobshop
|
5
|
-
%div.mdl-layout-spacer
|
6
|
-
%div.static-navigation-container
|
7
|
-
%nav.mdl-navigation
|
8
|
-
%a.mdl-navigation__link{ href: jobshop.about_path }
|
9
|
-
About
|
10
|
-
%a.mdl-navigation__link.mdl-color-text--pink{ href: jobshop.new_user_session_path }
|
11
|
-
Sign In
|
12
|
-
|
13
|
-
= yield
|