Skip to content
This repository has been archived by the owner on Aug 28, 2022. It is now read-only.

Devel Branch #1

Merged
merged 3 commits into from
Jan 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,21 @@ gem "simple_calendar", "~> 2.0"
gem 'jquery-ui-rails','5.0.5'
gem 'country_select', github: 'alibabajan/country_select'
gem 'paper_trail'
gem 'paper_trail-association_tracking'
gem 'cocoon'
gem "nested_form"
gem 'nested_form_fields'
gem 'momentjs-rails', '~> 2.9', :github => 'derekprior/momentjs-rails'
gem "font-awesome-rails"
gem 'font-awesome-sass', '~> 5.0.6'
gem 'bootstrap-datepicker-rails'
gem 'honeybadger', '~> 4.0'

#Gitlab gem
gem 'execjs'
gem 'therubyracer', :platforms => :ruby

#Devel Gem
gem 'rubocop', require: false
gem 'pronto'
gem 'pronto-rubocop', require: false
gem 'pronto-flay', require: false
78 changes: 72 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ GEM
airbrussh (1.3.1)
sshkit (>= 1.6.1, != 1.7.0)
arel (8.0.0)
ast (2.4.0)
autoprefixer-rails (9.4.3)
execjs
bcrypt (3.1.12)
Expand Down Expand Up @@ -123,21 +124,35 @@ GEM
diff-lcs (1.3)
docile (1.3.1)
erubi (1.8.0)
erubis (2.7.0)
execjs (2.7.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
ffi (1.9.25)
flay (2.12.0)
erubis (~> 2.7.0)
path_expander (~> 1.0)
ruby_parser (~> 3.0)
sexp_processor (~> 4.0)
font-awesome-rails (4.7.0.4)
railties (>= 3.2, < 6.0)
font-awesome-sass (5.0.13)
sassc (>= 1.11)
gitlab (4.8.0)
httparty (>= 0.14.0)
terminal-table (>= 1.5.1)
globalid (0.4.1)
activesupport (>= 4.2.0)
haml (5.0.4)
temple (>= 0.8.0)
tilt
honeybadger (4.1.0)
i18n (1.3.0)
httparty (0.16.3)
mime-types (~> 3.0)
multi_xml (>= 0.5.2)
i18n (1.4.0)
concurrent-ruby (~> 1.0)
i18n_data (0.7.0)
jaro_winkler (1.5.1)
jbuilder (2.8.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
Expand Down Expand Up @@ -171,36 +186,62 @@ GEM
mail (2.7.1)
mini_mime (>= 0.1.1)
method_source (0.9.2)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2018.0812)
mini_mime (1.0.1)
mini_portile2 (2.4.0)
minitest (5.11.3)
multi_json (1.13.1)
multi_xml (0.6.0)
multipart-post (2.0.0)
nested_form (0.3.2)
nested_form_fields (0.8.2)
coffee-rails (>= 3.2.1)
jquery-rails
rails (>= 3.2.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (5.0.2)
net-ssh (5.1.0)
nio4r (2.3.1)
nokogiri (1.9.1)
mini_portile2 (~> 2.4.0)
octokit (4.13.0)
sawyer (~> 0.8.0, >= 0.5.3)
orm_adapter (0.5.0)
paper_trail (10.1.0)
activerecord (>= 4.2, < 6.0)
request_store (~> 1.1)
paper_trail-association_tracking (1.1.0)
parallel (1.12.1)
parser (2.5.3.0)
ast (~> 2.4.0)
path_expander (1.0.3)
pdf-core (0.7.0)
pdf-writer (1.1.8)
color (>= 1.4.0)
transaction-simple (~> 1.3)
pdfkit (0.8.2)
pg (0.21.0)
powerpack (0.1.2)
prawn (2.2.2)
pdf-core (~> 0.7.0)
ttfunk (~> 1.5)
prawn-table (0.2.2)
prawn (>= 1.3.0, < 3.0.0)
pronto (0.9.5)
gitlab (~> 4.0, >= 4.0.0)
httparty (>= 0.13.7)
octokit (~> 4.7, >= 4.7.0)
rainbow (~> 2.1)
rugged (~> 0.24, >= 0.23.0)
thor (~> 0.19.0)
pronto-flay (0.9.0)
flay (~> 2.8)
pronto (~> 0.9.0)
pronto-rubocop (0.9.1)
pronto (~> 0.9.0)
rubocop (~> 0.50, >= 0.49.1)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
Expand Down Expand Up @@ -248,6 +289,8 @@ GEM
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (2.2.2)
rake
rake (12.3.2)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
Expand Down Expand Up @@ -281,8 +324,20 @@ GEM
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
rubocop (0.62.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.4.0)
ruby-progressbar (1.10.0)
ruby_dep (1.5.0)
ruby_parser (3.12.0)
sexp_processor (~> 4.9)
rubyzip (1.2.2)
rugged (0.27.7)
sass (3.7.2)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
Expand All @@ -297,9 +352,13 @@ GEM
sassc (2.0.0)
ffi (~> 1.9.6)
rake
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
selenium-webdriver (3.141.0)
childprocess (~> 0.5)
rubyzip (~> 1.2, >= 1.2.2)
sexp_processor (4.11.0)
simple_calendar (2.3.0)
rails (>= 3.0)
simple_form (4.1.0)
Expand Down Expand Up @@ -327,10 +386,12 @@ GEM
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
temple (0.8.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
thor (0.20.3)
thor (0.19.4)
thread_safe (0.3.6)
tilt (2.0.9)
transaction-simple (1.4.0.2)
Expand All @@ -342,6 +403,7 @@ GEM
thread_safe (~> 0.1)
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.4.1)
url (0.3.2)
warden (1.2.8)
rack (>= 2.0.6)
Expand Down Expand Up @@ -379,7 +441,6 @@ DEPENDENCIES
execjs
font-awesome-rails
font-awesome-sass (~> 5.0.6)
honeybadger (~> 4.0)
jbuilder (~> 2.5)
jquery-rails
jquery-ui-rails (= 5.0.5)
Expand All @@ -388,17 +449,22 @@ DEPENDENCIES
nested_form
nested_form_fields
paper_trail
paper_trail-association_tracking
pdf-writer
pdfkit
pg (~> 0.2)
prawn
pronto
pronto-flay
pronto-rubocop
pry
puma (~> 3.7)
rails (~> 5.1.4)
rails_admin (~> 1.2)
receipts
render_anywhere
rspec-rails (~> 3.7)
rubocop
sass-rails (~> 5.0)
selenium-webdriver
simple_calendar (~> 2.0)
Expand All @@ -418,4 +484,4 @@ RUBY VERSION
ruby 2.4.4p296

BUNDLED WITH
1.16.4
1.17.3
2 changes: 1 addition & 1 deletion app/models/cvm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Cvm < ApplicationRecord

has_many :experiences, :inverse_of => :cvm, dependent: :destroy

accepts_nested_attributes_for :educations, :experiences
accepts_nested_attributes_for :educations, :experiences, allow_destroy: true

validates :fname, :lname, :street, :district,:country, :land,
:mobile, :email, :website, :skill, :interest,
Expand Down
4 changes: 2 additions & 2 deletions app/models/experience.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
class Experience < ApplicationRecord

belongs_to :cvm
belongs_to :cvm, optional: true

validates :company, :position, :jobdetail, :startdate, presence: true

has_many :projects, dependent: :destroy

accepts_nested_attributes_for :projects
accepts_nested_attributes_for :projects, allow_destroy: true


end
31 changes: 31 additions & 0 deletions spec/models/experience_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
require 'rails_helper'

RSpec.describe Experience, type: :model do
# pending "add some examples to (or delete) #{__FILE__}"

it "is valid with valid attributes" do
experience1=Experience.new(:company => "XYZ", :position => "Intern", :jobdetail => "learn in rails", :startdate => "01/01/2013")
expect(experience1).to be_valid
end

it "is not valid without valid company" do
company=Experience.new(company: nil)
expect(company).to_not be_valid
end

it "is not valid without position" do
position=Experience.new(position: nil)
expect(position).to_not be_valid
end

it "is not valid without jobdetail" do
jobdetail=Experience.new(jobdetail: nil)
expect(jobdetail).to_not be_valid
end

it "is not valid without job start date" do
startdate=Experience.new(startdate: nil)
expect(startdate).to_not be_valid
end

end
12 changes: 8 additions & 4 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@
# directory. Alternatively, in the individual `*_spec.rb` files, manually
# require only the support files necessary.
#
# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
# Dir[Rails.root.join('spec', 'support', '**', '*.rb')].each { |f| require f }

# Checks for pending migrations and applies them before tests are run.
# If you are not using ActiveRecord, you can remove this line.
ActiveRecord::Migration.maintain_test_schema!

# If you are not using ActiveRecord, you can remove these lines.
begin
ActiveRecord::Migration.maintain_test_schema!
rescue ActiveRecord::PendingMigrationError => e
puts e.to_s.strip
exit 1
end
RSpec.configure do |config|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = "#{::Rails.root}/spec/fixtures"
Expand Down
5 changes: 0 additions & 5 deletions test/application_system_test_case.rb

This file was deleted.

Empty file removed test/controllers/.keep
Empty file.
7 changes: 0 additions & 7 deletions test/controllers/cvms_controller_test.rb

This file was deleted.

7 changes: 0 additions & 7 deletions test/controllers/static_pages_controller_test.rb

This file was deleted.

48 changes: 0 additions & 48 deletions test/controllers/users_controller_test.rb

This file was deleted.

Empty file removed test/fixtures/.keep
Empty file.
Loading