submitter 0.0.4 → 0.0.5
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 +4 -4
- data/lib/submitter/version.rb +1 -1
- metadata +1 -5
- data/lib/submitter/controllers/job_applications_controller.rb +0 -119
- data/lib/submitter/controllers/jobs_controller.rb +0 -83
- data/lib/submitter/generators/install/install_generator.rb +0 -0
- data/lib/submitter/generators/install/tamplates/create_applications_and_jobs.rb +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b469cc534cc83de1845a408e709e28370a9cef6e
|
4
|
+
data.tar.gz: 808519bc574218eb05678df90a325a09de9e558c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4bafd2c752dcf3571711ecf19b663126d0f81293db4c1d9429a6d30084e0a7b52207e8387f36d0fa51f87ffd8b8bbbacf392693be7a38976a5bf3b98b39bee0
|
7
|
+
data.tar.gz: 8cd53925301d03fdef4490a3b0dbd130175d5fe89c29a439967fbc8fe50abf6c78f65763a399ac4b87df84748e4da303c24da8202dab498f691807bce469e845
|
data/lib/submitter/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: submitter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ori Wininger
|
@@ -51,10 +51,6 @@ files:
|
|
51
51
|
- README.md
|
52
52
|
- Rakefile
|
53
53
|
- lib/submitter.rb
|
54
|
-
- lib/submitter/controllers/job_applications_controller.rb
|
55
|
-
- lib/submitter/controllers/jobs_controller.rb
|
56
|
-
- lib/submitter/generators/install/install_generator.rb
|
57
|
-
- lib/submitter/generators/install/tamplates/create_applications_and_jobs.rb
|
58
54
|
- lib/submitter/version.rb
|
59
55
|
- submitter.gemspec
|
60
56
|
homepage: http://www.github.com/oriwininger/submitter
|
@@ -1,119 +0,0 @@
|
|
1
|
-
class JobApplicationsController < ApplicationController
|
2
|
-
|
3
|
-
# http_basic_authenticate_with name: "fiverr", password: "G0FiveRR", only: :index
|
4
|
-
|
5
|
-
|
6
|
-
def delete
|
7
|
-
@application = JobApplication.find(params[:id])
|
8
|
-
@application.destroy
|
9
|
-
|
10
|
-
respond_to do |format|
|
11
|
-
format.html { redirect_to job_applications_path }
|
12
|
-
format.json { head :no_content }
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def hide
|
17
|
-
@application = JobApplication.find(params[:id])
|
18
|
-
@application.status = 'hide'
|
19
|
-
@application.save!
|
20
|
-
redirect_to root_path
|
21
|
-
end
|
22
|
-
|
23
|
-
def approve
|
24
|
-
@application = JobApplication.find(params[:id])
|
25
|
-
@application.status = 'approved'
|
26
|
-
@application.save!
|
27
|
-
redirect_to root_path
|
28
|
-
end
|
29
|
-
# GET /applications
|
30
|
-
# GET /applications.json
|
31
|
-
def index
|
32
|
-
Graylog.notify!('my message')
|
33
|
-
@applications = JobApplication.all
|
34
|
-
@jobs = Job.all
|
35
|
-
#respond_to do |format|
|
36
|
-
#format.html # index.html.erb
|
37
|
-
#format.json { render json: @applications }
|
38
|
-
#end
|
39
|
-
end
|
40
|
-
|
41
|
-
# GET /applications/1
|
42
|
-
# GET /applications/1.json
|
43
|
-
def show
|
44
|
-
@application = JobApplication.find(params[:id])
|
45
|
-
|
46
|
-
respond_to do |format|
|
47
|
-
format.html # show.html.erb
|
48
|
-
format.json { render json: @application }
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
|
53
|
-
# GET /applications/new
|
54
|
-
# GET /applications/new.json
|
55
|
-
def new
|
56
|
-
@job = Job.find_by_parameter(params["jobapp"])
|
57
|
-
if @job.nil?
|
58
|
-
redirect_to 'http://www.fiverr.com/jobs'
|
59
|
-
else
|
60
|
-
@action = :new
|
61
|
-
@application = JobApplication.new
|
62
|
-
@company = User.find_by_company(params[:company_id])
|
63
|
-
respond_to do |format|
|
64
|
-
format.html # new.html.erb
|
65
|
-
format.json { render json: @application }
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
# GET /applications/1/edit
|
71
|
-
def edit
|
72
|
-
@application = JobApplication.find(params[:id])
|
73
|
-
end
|
74
|
-
|
75
|
-
# POST /applications
|
76
|
-
# POST /applications.json
|
77
|
-
def create
|
78
|
-
job_application = JobApplication.new(params[:JobApplication])
|
79
|
-
@job = Job.find_by_parameter(params[:jobapp])
|
80
|
-
job_application.job = @job.name
|
81
|
-
job_application.location = @job.job_location
|
82
|
-
job_application.status = :pending
|
83
|
-
# application.status = :pending
|
84
|
-
job_application.save!
|
85
|
-
#binding.pry
|
86
|
-
redirect_to 'http://www.fiverr.com'
|
87
|
-
# else
|
88
|
-
# @application = JobApplication.new(params[:job_application])
|
89
|
-
# render action: "new"
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
# PUT /applications/1
|
94
|
-
# PUT /applications/1.json
|
95
|
-
def update
|
96
|
-
@application = JobApplication.find(params[:id])
|
97
|
-
|
98
|
-
respond_to do |format|
|
99
|
-
if @application.update_attributes(params[:application])
|
100
|
-
format.html { redirect_to @application, notice: 'Application was successfully updated.' }
|
101
|
-
format.json { head :no_content }
|
102
|
-
else
|
103
|
-
format.html { render action: "edit" }
|
104
|
-
format.json { render json: @application.errors, status: :unprocessable_entity }
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
|
-
# DELETE /applications/1
|
110
|
-
# DELETE /applications/1.json
|
111
|
-
def destroy
|
112
|
-
@application = JobApplication.find(params[:id])
|
113
|
-
@application.destroy
|
114
|
-
|
115
|
-
respond_to do |format|
|
116
|
-
format.html { redirect_to job_applications_path }
|
117
|
-
format.json { head :no_content }
|
118
|
-
end
|
119
|
-
end
|
@@ -1,83 +0,0 @@
|
|
1
|
-
class JobsController < ApplicationController
|
2
|
-
# GET /jobs
|
3
|
-
# GET /jobs.json
|
4
|
-
def index
|
5
|
-
@jobs = Job.all
|
6
|
-
|
7
|
-
respond_to do |format|
|
8
|
-
format.html # index.html.erb
|
9
|
-
format.json { render json: @jobs }
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
# GET /jobs/1
|
14
|
-
# GET /jobs/1.json
|
15
|
-
def show
|
16
|
-
@job = Job.find(params[:id])
|
17
|
-
|
18
|
-
respond_to do |format|
|
19
|
-
format.html # show.html.erb
|
20
|
-
format.json { render json: @job }
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
# GET /jobs/new
|
25
|
-
# GET /jobs/new.json
|
26
|
-
def new
|
27
|
-
@job = Job.new
|
28
|
-
|
29
|
-
respond_to do |format|
|
30
|
-
format.html # new.html.erb
|
31
|
-
format.json { render json: @job }
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# GET /jobs/1/edit
|
36
|
-
def edit
|
37
|
-
@job = Job.find(params[:id])
|
38
|
-
end
|
39
|
-
|
40
|
-
# POST /jobs
|
41
|
-
# POST /jobs.json
|
42
|
-
def create
|
43
|
-
@job = Job.new(params[:job])
|
44
|
-
@job.parameter = Digest::MD5.hexdigest(@job.name + @job.job_location)
|
45
|
-
respond_to do |format|
|
46
|
-
if @job.save
|
47
|
-
format.html { redirect_to @job, notice: 'Job was successfully created.' }
|
48
|
-
format.json { render json: @job, status: :created, location: @job }
|
49
|
-
else
|
50
|
-
format.html { render action: "new" }
|
51
|
-
format.json { render json: @job.errors, status: :unprocessable_entity }
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
# PUT /jobs/1
|
57
|
-
# PUT /jobs/1.json
|
58
|
-
def update
|
59
|
-
@job = Job.find(params[:id])
|
60
|
-
|
61
|
-
respond_to do |format|
|
62
|
-
if @job.update_attributes(params[:job])
|
63
|
-
format.html { redirect_to @job, notice: 'Job was successfully updated.' }
|
64
|
-
format.json { head :no_content }
|
65
|
-
else
|
66
|
-
format.html { render action: "edit" }
|
67
|
-
format.json { render json: @job.errors, status: :unprocessable_entity }
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
# DELETE /jobs/1
|
73
|
-
# DELETE /jobs/1.json
|
74
|
-
def destroy
|
75
|
-
@job = Job.find(params[:id])
|
76
|
-
@job.destroy
|
77
|
-
|
78
|
-
respond_to do |format|
|
79
|
-
format.html { redirect_to job_applications_path }
|
80
|
-
format.json { head :no_content }
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
File without changes
|
@@ -1,29 +0,0 @@
|
|
1
|
-
class CreateApplicationsAndJobs < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :job_applications do |t|
|
4
|
-
t.string :name
|
5
|
-
t.string :status
|
6
|
-
t.string :portfolio
|
7
|
-
t.string :email
|
8
|
-
t.string :phone
|
9
|
-
t.string :location
|
10
|
-
|
11
|
-
t.timestamps
|
12
|
-
end
|
13
|
-
|
14
|
-
create_table :jobs do |t|
|
15
|
-
t.string :location
|
16
|
-
t.boolean :portfolio
|
17
|
-
t.string :title
|
18
|
-
t.string :token
|
19
|
-
|
20
|
-
t.timestamps
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
def self.down
|
26
|
-
drop_table :job_applications
|
27
|
-
drop_table :jobs
|
28
|
-
end
|
29
|
-
end
|