go_jobs 0.1.0 → 0.1.2

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: dedce39325c1fa1ba425f6272ce3165680fcb350
4
- data.tar.gz: d04b5d9f7a0f9ac6af415900b8c0b453473a4ba1
3
+ metadata.gz: 792dd6eda9d9c3a94e0a5a552f377f4fb524f304
4
+ data.tar.gz: 4a1a67565c83ca2e46b1ce09c1710ea92ddbd323
5
5
  SHA512:
6
- metadata.gz: 0ff420e6304424f061d2a44066e83a339af928d4ab01e51290e31071e8ed3180fa21f3b980d49eb9aa774dbca81c7670c9febf97c11937f6e29b99c580ab2dd2
7
- data.tar.gz: 553f73603331137d5a706e1d50bc5dd4f41fa7dbee604a27b709d2cf8a4a10f66d8a3b1ec9079e3d0de0926b31fcc89b4ff087e6ef615c5cf9678a6a7e897deb
6
+ metadata.gz: f054598f468e7bef36e73cce9d201a79eb93c0a3e2c44fe9f3bdd2f73205c48afe8c87c23964f8aaf866c49c7e09d7d4b1c43539c34cd798781df60dd7f1e665
7
+ data.tar.gz: 1c98560b28653f5782af4a6156ded03c97207ae7b0ece7ea2576ed98a6ee75a381b1288038cab9ab32f90f9c3f9a4e77025c77ba1a4e57ae42d3e1d9066f8b9f
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,80 @@
1
+ body {
2
+ background-color: #fff;
3
+ color: #333;
4
+ margin: 33px;
5
+ }
6
+
7
+ body, p, ol, ul, td {
8
+ font-family: verdana, arial, helvetica, sans-serif;
9
+ font-size: 13px;
10
+ line-height: 18px;
11
+ }
12
+
13
+ pre {
14
+ background-color: #eee;
15
+ padding: 10px;
16
+ font-size: 11px;
17
+ }
18
+
19
+ a {
20
+ color: #000;
21
+ }
22
+
23
+ a:visited {
24
+ color: #666;
25
+ }
26
+
27
+ a:hover {
28
+ color: #fff;
29
+ background-color: #000;
30
+ }
31
+
32
+ th {
33
+ padding-bottom: 5px;
34
+ }
35
+
36
+ td {
37
+ padding: 0 5px 7px;
38
+ }
39
+
40
+ div.field,
41
+ div.actions {
42
+ margin-bottom: 10px;
43
+ }
44
+
45
+ #notice {
46
+ color: green;
47
+ }
48
+
49
+ .field_with_errors {
50
+ padding: 2px;
51
+ background-color: red;
52
+ display: table;
53
+ }
54
+
55
+ #error_explanation {
56
+ width: 450px;
57
+ border: 2px solid red;
58
+ padding: 7px 7px 0;
59
+ margin-bottom: 20px;
60
+ background-color: #f0f0f0;
61
+ }
62
+
63
+ #error_explanation h2 {
64
+ text-align: left;
65
+ font-weight: bold;
66
+ padding: 5px 5px 5px 15px;
67
+ font-size: 12px;
68
+ margin: -7px -7px 0;
69
+ background-color: #c00;
70
+ color: #fff;
71
+ }
72
+
73
+ #error_explanation ul li {
74
+ font-size: 12px;
75
+ list-style: square;
76
+ }
77
+
78
+ label {
79
+ display: block;
80
+ }
@@ -0,0 +1,66 @@
1
+ module Jobs
2
+ class JobsController < ApplicationController
3
+ before_action :set_jobs_job, only: [:show, :edit, :update, :destroy]
4
+ before_action :authenticate_user!, except: %i(index show)
5
+ load_and_authorize_resource except: %i(index show create),param_method: :jobs_job_params
6
+ # GET /jobs/jobs
7
+ def index
8
+ if current_user and current_user.admin?
9
+ @jobs_jobs = Job.all.order(expiration_date: :desc).page params[:page]
10
+ else
11
+ @jobs_jobs = Job.where(user_id:current_user.id).order(expiration_date: :desc).page params[:page]
12
+ end
13
+
14
+ end
15
+
16
+ # GET /jobs/jobs/1
17
+ def show
18
+ end
19
+
20
+ # GET /jobs/jobs/new
21
+ def new
22
+ @jobs_job = Job.new
23
+ end
24
+
25
+ # GET /jobs/jobs/1/edit
26
+ def edit
27
+ end
28
+
29
+ # POST /jobs/jobs
30
+ def create
31
+ @jobs_job = Job.new(jobs_job_params)
32
+ @jobs_job.user_id = current_user.id
33
+ if @jobs_job.save
34
+ redirect_to @jobs_job, notice: 'Job was successfully created.'
35
+ else
36
+ render :new
37
+ end
38
+ end
39
+
40
+ # PATCH/PUT /jobs/jobs/1
41
+ def update
42
+ if @jobs_job.update(jobs_job_params)
43
+ redirect_to @jobs_job, notice: 'Job was successfully updated.'
44
+ else
45
+ render :edit
46
+ end
47
+ end
48
+
49
+ # DELETE /jobs/jobs/1
50
+ def destroy
51
+ @jobs_job.destroy
52
+ redirect_to jobs_jobs_url, notice: 'Job was successfully destroyed.'
53
+ end
54
+
55
+ private
56
+ # Use callbacks to share common setup or constraints between actions.
57
+ def set_jobs_job
58
+ @jobs_job = Job.find(params[:id])
59
+ end
60
+
61
+ # Only allow a trusted parameter "white list" through.
62
+ def jobs_job_params
63
+ params.require(:jobs_job).permit(:title, :location, :job_type, :week_hours, :description, :company_name, :company_url, :user_id, :positions, :sallary_low, :sallary_high, :contact_email, :expiration_date, :acess_count, :status)
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,27 @@
1
+ module Jobs
2
+ class JobDecorator < Draper::Decorator
3
+ delegate_all
4
+
5
+ def link_to_show
6
+ h.link_to h.jobs_job_path(id: self.id),
7
+ class: 'btn btn-info btn-sm',
8
+ title: 'Visualizar',
9
+ style: 'color: #FFF; float: none;' do
10
+ h.content_tag :span, class: 'fa fa-search' do
11
+ end
12
+ end
13
+ end
14
+
15
+
16
+ def link_to_edit
17
+ h.link_to h.edit_jobs_job_path(id: self.id),
18
+ class: 'btn btn-warning btn-sm',
19
+ title: 'Alterar',
20
+ style: 'color: #FFF; float: none;' do
21
+ h.content_tag :span, class: 'fa fa-pencil' do
22
+ end
23
+ end
24
+ end
25
+
26
+ end
27
+ end
@@ -0,0 +1,2 @@
1
+ module Jobs::JobsHelper
2
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -0,0 +1,15 @@
1
+ module Jobs
2
+ class Job < ApplicationRecord
3
+ belongs_to :user
4
+ validates_presence_of :job_type
5
+ validates :company_url, :url => true
6
+ validates_format_of :contact_email,:with => Devise::email_regexp
7
+ JOB_TYPES = {
8
+ 1=> 'CLT',
9
+ 2=> 'PJ',
10
+ 3=> 'HOME-OFFICE'
11
+ }.freeze
12
+
13
+
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ module Jobs
2
+ def self.table_name_prefix
3
+ 'jobs_'
4
+ end
5
+ end
@@ -0,0 +1,22 @@
1
+ <% collection.each do |resource| %>
2
+ <tr id="<%= dom_id(resource) %>">
3
+ <td><%= resource.title %></td>
4
+ <td><%= resource.location %></td>
5
+ <td><%= resource.job_type %></td>
6
+ <td><%= resource.week_hours %></td>
7
+ <td><%= resource.company_name %></td>
8
+ <td><%= resource.positions %></td>
9
+ <td><%= resource.sallary_low %></td>
10
+ <td><%= resource.sallary_high %></td>
11
+ <td><%= resource.contact_email %></td>
12
+ <td><%= converte_date(resource.expiration_date) %></td>
13
+ <td><%= active_inactive(resource.status) %></td>
14
+ <td class="text-center">
15
+ <% if current_user %>
16
+ <%= resource.decorate.link_to_show %>
17
+ <%= resource.decorate.link_to_edit %>
18
+ <% end %>
19
+ </td>
20
+ </td>
21
+ </tr>
22
+ <% end %>
@@ -0,0 +1,23 @@
1
+ <%= simple_form_for @jobs_job, class: "form-horizontal" do |form| %>
2
+ <%= form.error_notification %>
3
+ <%= form.input :title, id: :jobs_job_title %>
4
+ <%= form.input :location, id: :jobs_job_location %>
5
+ <%= form.input :job_type, :collection => Jobs::Job::JOB_TYPES.sort.map {|k, v| [v, k]}, :include_blank => false %>
6
+ <%= form.input :week_hours, id: :jobs_job_week_hours %>
7
+ <%= form.input :description, id: :jobs_job_description %>
8
+ <%= form.input :company_name, id: :jobs_job_company_name %>
9
+ <%= form.input :company_url, id: :jobs_job_company_url %>
10
+ <%= form.input :positions, id: :jobs_job_positions %>
11
+
12
+ <%= form.input :sallary_low, id: :jobs_job_sallary_low %>
13
+ <%= form.input :sallary_high, id: :jobs_job_sallary_high %>
14
+ <%= form.input :contact_email, id: :jobs_job_contact_email %>
15
+ <%= form.input :expiration_date, id: :jobs_job_expiration_date %>
16
+ <% if current_user and current_user.admin? %>
17
+ <%= form.input :status, id: :jobs_job_status %>
18
+ <% end %>
19
+
20
+ <div class="actions">
21
+ <%= form.submit %>
22
+ </div>
23
+ <% end %>
@@ -0,0 +1,4 @@
1
+ <div class="paging_simple_numbers">
2
+ <%= paginate collection %>
3
+ </div>
4
+
@@ -0,0 +1,26 @@
1
+ <%= provide :page_title, t('jobs_jobs.edit.title') %>
2
+ <%= provide :breadcrumb do %>
3
+ <li><%= link_to t('jobs_jobs.edit.title'), jobs_jobs_path %></li>
4
+ <li><%=t ('jobs_jobs.edit.header') %></li>
5
+ <% end %>
6
+
7
+ <main id="main-container" style="min-height: 530px;">
8
+ <div class="content bg-gray-lighter">
9
+ <div class="row items-push">
10
+ <div class="col-sm-7">
11
+ <h1 class="page-heading">
12
+ <%= t('jobs_jobs.edit.title') %>
13
+ </h1>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ <div class="content">
18
+ <div class="block">
19
+ <div class="block-content">
20
+ <%= render 'form', jobs_job: @jobs_job %>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ </main>
25
+
26
+
@@ -0,0 +1,52 @@
1
+ <%= provide :page_title, I18n.t('jobs_jobs.index.header') %>
2
+ <%= provide :breadcrumb do %>
3
+ <li><%= I18n.t('activerecord.models.jobs_jobs.other') %></li>
4
+ <% end %>
5
+
6
+ <main id="main-container" style="min-height: 530px;">
7
+ <div class="content bg-gray-lighter">
8
+ <div class="row items-push">
9
+ <div class="col-sm-7">
10
+ <h1 class="page-heading">
11
+ <%= t('jobs_jobs.index.title') %>
12
+ </h1>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ <div class="content">
17
+ <div class="block">
18
+ <div class="block-header text-right">
19
+ <h3 class="block-title">
20
+ </h3>
21
+ <span >
22
+ <%= link_to I18n.t('jobs_jobs.new.header'), new_jobs_job_path, class: 'btn btn-sm btn-square btn-success' %>
23
+ </span>
24
+ </div>
25
+ <div class="block-content">
26
+ <table class="table table-striped">
27
+ <thead>
28
+ <tr>
29
+ <th><%=t 'activerecord.attributes.jobs_job.title' %></th>
30
+ <th><%=t 'activerecord.attributes.jobs_job.location' %></th>
31
+ <th><%=t 'activerecord.attributes.jobs_job.job_type' %></th>
32
+ <th><%=t 'activerecord.attributes.jobs_job.week_hours' %></th>
33
+ <th><%=t 'activerecord.attributes.jobs_job.company_name' %></th>
34
+ <th><%=t 'activerecord.attributes.jobs_job.positions' %></th>
35
+ <th><%=t 'activerecord.attributes.jobs_job.sallary_low' %></th>
36
+ <th><%=t 'activerecord.attributes.jobs_job.sallary_high' %></th>
37
+ <th><%=t 'activerecord.attributes.jobs_job.contact_email' %></th>
38
+ <th><%=t 'activerecord.attributes.jobs_job.expiration_date' %></th>
39
+ <th><%=t 'activerecord.attributes.jobs_job.status' %></th>
40
+ <th class="text-center" style="width: 150px;"><%=t 'misc.actions' %></th>
41
+ </tr>
42
+ </thead>
43
+ <tbody id='blog_posts'>
44
+ <%= render 'collection', collection: @jobs_jobs %>
45
+ </tbody>
46
+ </table>
47
+ <%=render 'pagination',collection: @jobs_jobs%>
48
+
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </main>
@@ -0,0 +1,26 @@
1
+
2
+ <%= provide :page_title,t('jobs_jobs.new.header') %>
3
+ <%= provide :breadcrumb do %>
4
+ <li><%= link_to t('jobs_jobs.new.header'), jobs_jobs_path %></li>
5
+ <li><%=t 'jobs_jobs.new.header' %></li>
6
+ <% end %>
7
+
8
+ <main id="main-container" style="min-height: 530px;">
9
+ <div class="content bg-gray-lighter">
10
+ <div class="row items-push">
11
+ <div class="col-sm-7">
12
+ <h1 class="page-heading">
13
+ <%= t('jobs_jobs.new.header') %>
14
+ </h1>
15
+ </div>
16
+ </div>
17
+ </div>
18
+ <div class="content">
19
+ <div class="block">
20
+ <div class="block-content">
21
+ <%= render 'form', jobs_job: @jobs_job %>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </main>
26
+
@@ -0,0 +1,126 @@
1
+ <%= provide :page_title, I18n.t('blog_posts.show.header', resource: @jobs_job.try(:id)) %>
2
+ <%= provide :breadcrumb do %>
3
+ <li><%= link_to I18n.t('activerecord.models.blog_posts.other'), jobs_jobs_path %></li>
4
+ <li><%= link_to @jobs_job.try(:id), @jobs_job %></li>
5
+ <li><%= I18n.t('blog_posts.show.header', resource: @jobs_job.try(:id)) %></li>
6
+ <% end %>
7
+
8
+ <main id="main-container" style="min-height: 530px;">
9
+ <div class="content bg-gray-lighter">
10
+ <div class="row items-push">
11
+ <div class="col-sm-7">
12
+ <h1 class="page-heading">
13
+ <%= t('jobs_jobs.show.title') %>
14
+ </h1>
15
+ </div>
16
+ </div>
17
+ </div>
18
+ <div class="content">
19
+ <div class="block">
20
+ <div class="block-header text-right">
21
+ <h3 class="block-title">
22
+ </h3>
23
+ <span>
24
+ <%= link_to t('jobs_jobs.new.header'), new_jobs_job_path, class: 'btn btn-sm btn-square btn-success' %>
25
+ </span>
26
+ </div>
27
+ <div class="block-content">
28
+ <div class="row">
29
+
30
+ <div class="col-sm-12">
31
+ <table class="table table-striped">
32
+ <thead>
33
+ </thead>
34
+ <tbody>
35
+ <tr>
36
+ <td><strong><%= t 'activerecord.attributes.jobs_job.title' %>:</strong></td>
37
+ <td><%= @jobs_job.title %></td>
38
+ </tr>
39
+
40
+ <tr>
41
+ <td><strong><%= t 'activerecord.attributes.jobs_job.location' %>:</strong></td>
42
+ <td><%= @jobs_job.location %></td>
43
+ </tr>
44
+
45
+ <tr>
46
+ <td><strong><%= t 'activerecord.attributes.jobs_job.job_type' %>:</strong></td>
47
+ <td><%= @jobs_job.job_type %></td>
48
+ </tr>
49
+
50
+ <tr>
51
+ <td><strong><%= t 'activerecord.attributes.jobs_job.week_hours' %>:</strong></td>
52
+ <td><%= @jobs_job.week_hours %></td>
53
+ </tr>
54
+
55
+ <tr>
56
+ <td><strong><%= t 'activerecord.attributes.jobs_job.description' %>:</strong></td>
57
+ <td><%= @jobs_job.description %></td>
58
+ </tr>
59
+
60
+ <tr>
61
+ <td><strong><%= t 'activerecord.attributes.jobs_job.company_name' %>:</strong></td>
62
+ <td><%= @jobs_job.company_name %></td>
63
+ </tr>
64
+
65
+ <tr>
66
+ <td><strong><%= t 'activerecord.attributes.jobs_job.company_url' %>:</strong></td>
67
+ <td><%= @jobs_job.company_url %></td>
68
+ </tr>
69
+
70
+ <tr>
71
+ <td><strong><%= t 'activerecord.attributes.jobs_job.user_id' %>:</strong></td>
72
+ <td><%= @jobs_job.user.decorate.name %></td>
73
+ </tr>
74
+
75
+ <tr>
76
+ <td><strong><%= t 'activerecord.attributes.jobs_job.positions' %>:</strong></td>
77
+ <td><%= @jobs_job.positions %></td>
78
+ </tr>
79
+
80
+ <tr>
81
+ <td><strong><%= t 'activerecord.attributes.jobs_job.sallary_low' %>:</strong></td>
82
+ <td><%= @jobs_job.sallary_low %></td>
83
+ </tr>
84
+
85
+ <tr>
86
+ <td><strong><%= t 'activerecord.attributes.jobs_job.sallary_high' %>:</strong></td>
87
+ <td><%= @jobs_job.sallary_high %></td>
88
+ </tr>
89
+
90
+ <tr>
91
+ <td><strong><%= t 'activerecord.attributes.jobs_job.contact_email' %>:</strong></td>
92
+ <td><%= @jobs_job.contact_email %></td>
93
+ </tr>
94
+
95
+ <tr>
96
+ <td><strong><%= t 'activerecord.attributes.jobs_job.expiration_date' %>:</strong></td>
97
+ <td><%= @jobs_job.expiration_date %></td>
98
+ </tr>
99
+
100
+ <tr>
101
+ <td><strong><%= t 'activerecord.attributes.jobs_job.acess_count' %>:</strong></td>
102
+ <td><%= @jobs_job.acess_count %></td>
103
+ </tr>
104
+
105
+ <tr>
106
+ <td><strong><%= t 'activerecord.attributes.jobs_job.status' %>:</strong></td>
107
+ <td><%= @jobs_job.status %></td>
108
+ </tr>
109
+
110
+ </tbody>
111
+ </table>
112
+ </div>
113
+ </div>
114
+ <div class="row">
115
+
116
+ <div class="col-sm-4 ">
117
+ <%= link_to I18n.t('misc.action.back'), jobs_jobs_path, class: 'btn btn-default' %>
118
+ <%= link_to I18n.t('misc.action.edit'), edit_jobs_job_path(@jobs_job), class: 'btn btn-warning' %>
119
+ <%= link_to I18n.t('misc.action.destroy'), jobs_job_path(@jobs_job), method: :destroy, data: {confirm: I18n.t('jobs_job.show.remover')}, class: 'btn btn-danger' %>
120
+ </div>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ </div>
125
+ </main>
126
+
@@ -0,0 +1,31 @@
1
+ #sqlite: &sqlite
2
+ #adapter: sqlite3
3
+ #database: db/<%= ENV['RAILS_ENV'] %>.sqlite3
4
+
5
+ #mysql: &mysql
6
+ #adapter: mysql2
7
+ #username: root
8
+ #password:
9
+ #database: invoicer_<%= ENV['RAILS_ENV'] %>
10
+
11
+ postgresql: &postgresql
12
+ adapter: postgresql
13
+ username: postgres
14
+ password:
15
+ database: invoicer_<%= ENV['RAILS_ENV'] %>
16
+ min_messages: ERROR
17
+
18
+ defaults: &defaults
19
+ pool: 5
20
+ timeout: 5000
21
+ host: localhost
22
+ <<: *<%= ENV['DB'] || "sqlite" %>
23
+
24
+ development:
25
+ <<: *defaults
26
+
27
+ test:
28
+ <<: *defaults
29
+
30
+ production:
31
+ <<: *defaults
@@ -0,0 +1,7 @@
1
+ en:
2
+ blog_posts:
3
+ index:
4
+ title: 'Posts'
5
+ blog_post:
6
+ new:
7
+ header: 'New post'
@@ -0,0 +1,39 @@
1
+ pt-BR:
2
+ activerecord:
3
+ models:
4
+ jobs_job:
5
+ one: "Vaga de Emprego"
6
+ other: "Vagas de Empregos"
7
+ explain: "Vaga de Emprego"
8
+
9
+ attributes:
10
+ jobs_job:
11
+ title: Cargo
12
+ location: Cidade
13
+ job_type: Tipo da Vaga
14
+ week_hours: Horas Semanais
15
+ company_name: Nome da Empresa
16
+ description: Descrição do Cargo
17
+ positions: Vagas
18
+ company_url: Site Empresa
19
+ user_id: Responsavel pelo Cadastro
20
+ sallary_low: Mínimo Faixa Salarial
21
+ sallary_high: Máximo Faixa Salarial
22
+ contact_email: Email de Contato
23
+ expiration_date: Data de Expiração
24
+ acess_count: Quantidade de Acessos
25
+ status: Status
26
+ created_at: Criado em
27
+ updated_at: Atualizado em
28
+ jobs_jobs:
29
+ index:
30
+ title: 'Vagas de Emprego'
31
+ header: 'Novo post'
32
+ new:
33
+ header: 'Nova Vaga de Emprego'
34
+ show:
35
+ title: Vaga de Emprego
36
+ edit:
37
+ title: Editando vaga de emprego
38
+
39
+
data/config/routes.rb CHANGED
@@ -1,2 +1,5 @@
1
1
  Rails.application.routes.draw do
2
+ namespace :jobs do
3
+ resources :jobs
4
+ end
2
5
  end
@@ -0,0 +1,24 @@
1
+ class CreateJobsJobs < ActiveRecord::Migration[5.1]
2
+ def change
3
+ create_table :jobs_jobs do |t|
4
+ t.string :title, null: false
5
+ t.string :location
6
+ t.integer :job_type, null: false
7
+ t.integer :week_hours
8
+ t.text :description, null: false
9
+ t.string :company_name
10
+ t.string :company_url
11
+ t.references :user, index: true, foreign_key: true, null: false
12
+ t.integer :positions, default: 1, null: false
13
+ t.integer :sallary_low
14
+ t.integer :sallary_high
15
+ t.string :contact_email
16
+ t.datetime :expiration_date
17
+ t.datetime :published_at
18
+ t.integer :acess_count, default: 0
19
+ t.integer :status, default: false, null: false
20
+
21
+ t.timestamps
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,5 @@
1
+ class AterColumnTypeJobs < ActiveRecord::Migration[5.1]
2
+ def change
3
+ remove_column :jobs_jobs, :status, :integer
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddColumnJobsJobsStatus < ActiveRecord::Migration[5.1]
2
+ def change
3
+ add_column :jobs_jobs, :status, :boolean,default: false, null: false
4
+ end
5
+ end
@@ -1,4 +1,21 @@
1
1
  module GoJobs
2
2
  class Engine < ::Rails::Engine
3
+ initializer :append_migrations do |app|
4
+ # This prevents migrations from being loaded twice from the inside of the
5
+ # gem itself (dummy test app)
6
+ if app.root.to_s !~ /#{root}/
7
+ config.paths['db/migrate'].expanded.each do |migration_path|
8
+ app.config.paths['db/migrate'] << migration_path
9
+ end
10
+ end
11
+ end
12
+
13
+ config.i18n.default_locale = :'pt-BR'
14
+ config.autoload_paths += %W(#{config.root}/lib)
15
+ config.time_zone = 'Brasilia'
16
+ config.i18n.load_path += Dir[config.root.join('config', 'locales','**', '*.{rb,yml}').to_s]
17
+ config.encoding = "utf-8"
18
+
19
+
3
20
  end
4
21
  end
@@ -1,3 +1,3 @@
1
1
  module GoJobs
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: go_jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - João Carlos Ottobboni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-17 00:00:00.000000000 Z
11
+ date: 2017-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: draper
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: sqlite3
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  description: Jobs engine
70
56
  email:
71
57
  - jcottobboni@gmail.com
@@ -77,7 +63,29 @@ files:
77
63
  - README.md
78
64
  - Rakefile
79
65
  - app/assets/config/go_jobs_manifest.js
66
+ - app/assets/javascripts/jobs/jobs.js
67
+ - app/assets/stylesheets/jobs/jobs.css
68
+ - app/assets/stylesheets/scaffold.css
69
+ - app/controllers/jobs/jobs_controller.rb
70
+ - app/decorator/jobs/job_decorator.rb
71
+ - app/helpers/jobs/jobs_helper.rb
72
+ - app/models/application_record.rb
73
+ - app/models/jobs.rb
74
+ - app/models/jobs/job.rb
75
+ - app/views/jobs/jobs/_collection.html.erb
76
+ - app/views/jobs/jobs/_form.html.erb
77
+ - app/views/jobs/jobs/_pagination.html.erb
78
+ - app/views/jobs/jobs/edit.html.erb
79
+ - app/views/jobs/jobs/index.html.erb
80
+ - app/views/jobs/jobs/new.html.erb
81
+ - app/views/jobs/jobs/show.html.erb
82
+ - config/database.travis.yml
83
+ - config/locales/go_jobs/en.yml
84
+ - config/locales/go_jobs/pt-BR.yml
80
85
  - config/routes.rb
86
+ - db/migrate/20171019010055_create_jobs_jobs.rb
87
+ - db/migrate/20171020005851_ater_column_type_jobs.rb
88
+ - db/migrate/20171020013256_add_column_jobs_jobs_status.rb
81
89
  - lib/go_jobs.rb
82
90
  - lib/go_jobs/engine.rb
83
91
  - lib/go_jobs/version.rb