jobshop 0.0.11 → 0.0.12

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d5c12cb279c829150853275c704e3370afe0331b
4
- data.tar.gz: 2b2cb429d021f6723b09874b9f7cf52e6c787b2a
3
+ metadata.gz: 73e3ef6bd1abb23225e93a793bc1ac0869dfd8cb
4
+ data.tar.gz: 9c0287d10551a3632b9743d5989e2a803829b163
5
5
  SHA512:
6
- metadata.gz: cb6a26a02cab86b8b810bda1bb8d387c556a9b0d8f7c142a7e06fccf1432402ca17c69d7e87c009b9b8d8d50e46bae3f10c29265bf27ab369dc419eb3b66a125
7
- data.tar.gz: 9b0d72723d6f8a4ead1504eb5ded6b11f392269dac948ece33eaf818f42a7567e995e0d4a61aa74d6c1a87f522e0ab2db41faa5dea34c877f56f74621fe75063
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 Status](https://coveralls.io/repos/github/jobshop/jobshop/badge.svg?branch=master)](https://coveralls.io/github/jobshop/jobshop?branch=master)
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 {
@@ -1,5 +1,6 @@
1
1
  body.sessions-new,
2
- body.static-index {
2
+ body.lookups-show,
3
+ body.registrations-new {
3
4
  header {
4
5
  @extend .mdl-color--white;
5
6
  @extend .mdl-color-text--black;
@@ -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
@@ -6,6 +6,8 @@ module Jobshop
6
6
 
7
7
  skip_before_action :authenticate_user!
8
8
 
9
+ layout "jobshop/unauthenticated"
10
+
9
11
  def new
10
12
  @registration = ::Jobshop::Registration.new(params)
11
13
  end
@@ -1,11 +1,7 @@
1
1
  module Jobshop
2
2
  module ApplicationHelper
3
3
  def body_class
4
- @body_class ||= if params.has_key?(:page)
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
- %div(class="registration-layout")
2
- %main
3
- %div#register
4
- = form_for @registration, builder: Jobshop::Builder, url: team_registration_path(@registration.team) do |f|
5
- .mdl-card__title
6
- %object.logo{ type: "image/svg+xml", data: image_path("jobshop/logo.svg") }
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
- %h4
9
- Get started with
10
- %br>
11
- %strong Jobshop
12
- .mdl-card__supporting-text
13
- = hidden_field_tag(:registration_token, params[:registration_token])
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
- - if @registration.errors.present?
16
- %p.error try again
16
+ - if @registration.errors.present?
17
+ %p.error try again
17
18
 
18
- = f.fields_for(@registration.team) do |team_f|
19
- %div= team_f.text_field(:name)
19
+ = f.fields_for(@registration.team) do |team_f|
20
+ %div= team_f.text_field(:name)
20
21
 
21
- = f.fields_for(@registration.user) do |user_f|
22
- %div= user_f.email_field(:email)
23
- %div= user_f.password_field(:password)
24
- %div= user_f.password_field(:password_confirmation)
25
- %div= f.button "Next &#187;".html_safe, class: "btn waves-effect waves-light"
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 &#187;".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
- # config.warden do |manager|
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
- # end
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"
@@ -0,0 +1,11 @@
1
+ module Jobshop
2
+ class FailureApp < Devise::FailureApp
3
+ def redirect_url
4
+ Jobshop::Engine.routes.url_helpers.teams_lookup_url(host: "localhost", port: "3000")
5
+ end
6
+
7
+ def respond
8
+ http_auth? ? http_auth : redirect
9
+ end
10
+ end
11
+ end
@@ -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
- copy_file "secrets.yml.tt", "config/secrets.yml"
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
- SECRETS_YML_TT_URI = URI.parse("https://raw.githubusercontent.com/jobshop/jobshop/master/lib/jobshop/templates/secrets.yml.tt")
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.9"
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
- create_file "config/secrets.yml" do
10
- Net::HTTP.start(SECRETS_YML_TT_URI.host,
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 => "/")
@@ -19,4 +19,4 @@ test:
19
19
  # Do not keep production secrets in the repository,
20
20
  # instead read values from the environment.
21
21
  production:
22
- secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
22
+ secret_key_base: <%%= ENV["SECRET_KEY_BASE"] %>
@@ -6,7 +6,7 @@ module Jobshop
6
6
  module VERSION
7
7
  MAJOR = 0
8
8
  MINOR = 0
9
- TINY = 11
9
+ TINY = 12
10
10
  PRE = nil
11
11
 
12
12
  CODE_NAME = "bump it up".freeze
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.11
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-10 00:00:00.000000000 Z
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: coveralls
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.8'
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.8'
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/shared/_unauthenticated_layout.html.haml
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.tt
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