Skip to content

Commit f91181e

Browse files
author
Alex Tharp
authored
Merge pull request #388 from cbdr/semaphore-build-fixes
Spec Fixes + Rails 5 Rough Edges
2 parents 3eaa623 + be92af2 commit f91181e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+407
-450
lines changed

.env.example

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ S3_HOST_ALIAS=
1313
#
1414
SMTP_ADDRESS=
1515
SMTP_PORT=587
16-
SMTP_SENDER_DOMAIN=cbcortex.com
17-
SMTP_SENDER_ADDRESS=noreply@cbcortex.com
16+
SMTP_SENDER_DOMAIN=cortexcms.org
17+
SMTP_SENDER_ADDRESS=noreply@cortexcms.org
1818
SMTP_USERNAME=
1919
SMTP_PASSWORD=
2020
SMTP_STARTTLS=true
@@ -68,6 +68,7 @@ DATABASE_POOL=5
6868
#
6969
REDIS_NAMESPACE=cortex_dev
7070
CACHE_URL=redis://localhost:6379/0/cache
71+
SESSION_STORE_URL=redis://localhost:6379/0/cache
7172

7273
#
7374
# Search

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
*.sassc
4242
.sass-cache
4343
capybara-*.html
44-
.rspec
4544
.powrc
4645
/public/system
4746
/coverage/

.rspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--color
2+
--require spec_helper

Gemfile

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ gem 'rails', '~> 5.0.0'
1313
# Cortex-specific
1414
gem 'cortex-exceptions', '~> 0.0.4'
1515
gem 'cortex-plugins-core', '= 0.4.6'
16-
gem 'cortex-plugins-demo', git: 'git://github.com/cortex-cms/cortex-plugins-demo'
16+
gem 'cortex-plugins-demo', git: 'https://github.com/cortex-cms/cortex-plugins-demo.git'
1717

1818
# API
1919
gem 'grape', '~> 0.17'
@@ -29,14 +29,14 @@ gem 'rolify', '~> 5.1'
2929
gem 'pundit', '~> 1.1'
3030

3131
# Data
32-
gem 'rails-observers', git: 'git://github.com/rails/rails-observers'
33-
gem 'awesome_nested_set', '~> 3.1'
32+
gem 'rails-observers', git: 'https://github.com/rails/rails-observers.git'
33+
gem 'awesome_nested_set', git: 'https://github.com/cortex-cms/awesome_nested_set.git'
3434
gem 'paperclip', '~> 5.1.0'
3535
gem 'paperclip-optimizer', '~> 2.0'
3636
gem 'image_optim_pack', '~> 0.3.0'
3737
gem 'acts-as-taggable-on', '~> 4.0'
3838
gem 'bcrypt', '~> 3.1.11'
39-
gem 'grape-kaminari', git: 'git://github.com/toastercup/grape-kaminari', branch: 'set-only-pagination-headers'
39+
gem 'grape-kaminari', git: 'https://github.com/toastercup/grape-kaminari.git', branch: 'set-only-pagination-headers'
4040
gem 'elasticsearch-model', '~> 0.1'
4141
gem 'elasticsearch-rails', '~> 0.1'
4242
gem 'paranoia', '~> 2.2'
@@ -81,12 +81,10 @@ gem 'bootscale', require: false
8181

8282
# View
8383
gem 'haml', '~> 4.1.0.beta'
84-
gem 'cells', git: 'git://github.com/samstickland/cells', branch: 'collection_fix' # remove explicit 'cells' dependency when collection_fix is merged in. See: https://github.com/apotonick/cells/pull/415
84+
gem 'cells', git: 'https://github.com/samstickland/cells.git', branch: 'collection_fix' # remove explicit 'cells' dependency when collection_fix is merged in. See: https://github.com/apotonick/cells/pull/415
8585
gem 'cells-rails', '~> 0.0.6'
8686
gem 'cells-haml', '~> 0.0.10'
8787
gem 'breadcrumbs_on_rails', '~> 3.0.1'
88-
gem 'jquery-ui-rails', '~> 5.0.5'
89-
gem 'bootstrap-tagsinput-rails', '~> 0.4.2'
9088

9189
# Style
9290
gem 'sass-rails', '~> 5.0'
@@ -95,11 +93,13 @@ gem 'font-awesome-sass', '~> 4.7.0'
9593
gem 'material_design_lite-sass', '~> 1.2.1'
9694

9795
# JavaScript
96+
gem 'gon', '~> 6.1.0'
9897
gem 'turbolinks', '~> 5.0.1'
99-
gem 'jquery-turbolinks', '~> 2.1'
10098
gem 'jquery-rails', '~> 4.2.1'
99+
gem 'jquery-turbolinks', '~> 2.1'
100+
gem 'jquery-ui-rails', '~> 5.0.5'
101101
gem 'ng-rails-csrf', '~> 0.1.0'
102-
gem 'gon', '~> 6.1.0'
102+
gem 'bootstrap-tagsinput-rails', '~> 0.4.2'
103103

104104
group :tasks do
105105
# Parsing
@@ -108,7 +108,7 @@ end
108108

109109
group :test, :development do
110110
# Environment
111-
gem 'dotenv'
111+
gem 'dotenv-rails', :require => 'dotenv/rails-now'
112112

113113
# Cache/Sidekiq
114114
gem 'redis-namespace'
@@ -129,12 +129,15 @@ end
129129

130130
group :test do
131131
# Rspec
132-
gem 'rspec', '~> 3.5'
133132
gem 'rspec-rails', '~> 3.5'
134133
gem 'json_spec', '~> 1.1'
135134
gem 'rspec-sidekiq', '~> 2.2'
136135
gem 'shoulda-matchers', '~> 3.1'
137136

137+
# Coverage
138+
gem 'simplecov', '~> 0.12', require: false
139+
gem 'codeclimate-test-reporter', '~> 0.6', require: false
140+
138141
# Capybara for feature testing, Poltergeist for PhantomJS
139142
gem 'capybara'
140143
gem 'poltergeist'
@@ -152,8 +155,7 @@ group :test do
152155
gem 'guard-jasmine', '~> 2.1'
153156
gem 'jasmine-core', '~> 2.5'
154157

155-
# Etc
156-
gem 'codeclimate-test-reporter', '~> 0.6', require: false
158+
# Data
157159
gem 'elasticsearch-extensions', '~> 0.0.22'
158160
end
159161

Gemfile.lock

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
GIT
2-
remote: git://github.com/cortex-cms/cortex-plugins-demo
2+
remote: https://github.com/cortex-cms/awesome_nested_set.git
3+
revision: d3bad27fa959788e403becc411f6db9d1aac1dfb
4+
specs:
5+
awesome_nested_set (3.1.2)
6+
activerecord (>= 4.0.0, < 5.1)
7+
8+
GIT
9+
remote: https://github.com/cortex-cms/cortex-plugins-demo.git
310
revision: 676926ab244a125a14e8ec6628ef0e46a3ad784b
411
specs:
512
cortex-plugins-demo (1.4.2)
@@ -9,14 +16,14 @@ GIT
916
rails (>= 4)
1017

1118
GIT
12-
remote: git://github.com/rails/rails-observers
19+
remote: https://github.com/rails/rails-observers.git
1320
revision: 3fe157d6cbb5b5e767ded248009fc59443d63fa1
1421
specs:
1522
rails-observers (0.1.3.alpha)
1623
activemodel (>= 4.0, < 5.1)
1724

1825
GIT
19-
remote: git://github.com/samstickland/cells
26+
remote: https://github.com/samstickland/cells.git
2027
revision: e5634e25b472d41913030eb82463b015f429f2ca
2128
branch: collection_fix
2229
specs:
@@ -25,7 +32,7 @@ GIT
2532
uber (>= 0.0.9)
2633

2734
GIT
28-
remote: git://github.com/toastercup/grape-kaminari
35+
remote: https://github.com/toastercup/grape-kaminari.git
2936
revision: 8d3f48e04c35cd6b85d4707a5b7f7356d305bf8c
3037
branch: set-only-pagination-headers
3138
specs:
@@ -87,8 +94,6 @@ GEM
8794
attr_required (1.0.1)
8895
autoprefixer-rails (6.5.3)
8996
execjs
90-
awesome_nested_set (3.1.1)
91-
activerecord (>= 4.0.0, < 5.1)
9297
aws-sdk (2.6.19)
9398
aws-sdk-resources (= 2.6.19)
9499
aws-sdk-core (2.6.19)
@@ -170,6 +175,9 @@ GEM
170175
doorkeeper (4.2.0)
171176
railties (>= 4.2)
172177
dotenv (2.1.1)
178+
dotenv-rails (2.1.1)
179+
dotenv (= 2.1.1)
180+
railties (>= 4.0, < 5.1)
173181
elasticsearch (5.0.0)
174182
elasticsearch-api (= 5.0.0)
175183
elasticsearch-transport (= 5.0.0)
@@ -695,7 +703,7 @@ DEPENDENCIES
695703
acts-as-taggable-on (~> 4.0)
696704
addressable (~> 2.5.0)
697705
angular-rails-templates (~> 1.0.2)
698-
awesome_nested_set (~> 3.1)
706+
awesome_nested_set!
699707
aws-sdk (~> 2.6)
700708
bcrypt (~> 3.1.11)
701709
better_errors
@@ -717,7 +725,7 @@ DEPENDENCIES
717725
database_cleaner (~> 1.5)
718726
devise (~> 4.2.0)
719727
doorkeeper (~> 4.2)
720-
dotenv
728+
dotenv-rails
721729
elasticsearch-extensions (~> 0.0.22)
722730
elasticsearch-model (~> 0.1)
723731
elasticsearch-rails (~> 0.1)
@@ -776,14 +784,14 @@ DEPENDENCIES
776784
redis-namespace
777785
redis-rails (~> 5.0)
778786
rolify (~> 5.1)
779-
rspec (~> 3.5)
780787
rspec-rails (~> 3.5)
781788
rspec-sidekiq (~> 2.2)
782789
rubyzip (~> 1.2.0)
783790
sass-rails (~> 5.0)
784791
shoulda-matchers (~> 3.1)
785792
sidekiq (~> 4.2.5)
786793
sidekiq-failures (~> 0.4.5)
794+
simplecov (~> 0.12)
787795
sinatra (~> 2.0.0.beta)
788796
six (~> 0.2.0)
789797
sprockets (= 3.7.0)
@@ -799,4 +807,4 @@ RUBY VERSION
799807
ruby 2.3.1p112
800808

801809
BUNDLED WITH
802-
1.12.5
810+
1.13.6

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2015 CareerBuilder, LLC
189+
Copyright 2017 CareerBuilder, LLC
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ $ npm install -g bower && bundle exec rake bower:install:development
144144
* Create databases:
145145

146146
```sh
147-
bundle exec rake db:create:all
147+
$ bundle exec rake db:create
148148
```
149149

150150
* Initialize the schema:
@@ -172,7 +172,7 @@ $ bundle exec rails s
172172
$ bundle exec sidekiq -q default -q mailers
173173
```
174174

175-
The admin interface should now be accessible locally on port `3000`. To access Cortex as superadmin, login as `surgeon@cbcortex.com` with password `welcome1`.
175+
The admin interface should now be accessible locally on port `3000`. To access Cortex as superadmin, login as `surgeon@cortexcms.org` with password `welcome1`.
176176

177177
### Deployment
178178

@@ -197,7 +197,8 @@ This will configure various things, such as [dotenv](https://github.com/bkeepers
197197
Initialize the test database:
198198

199199
```sh
200-
$ bundle exec rake db:schema:load db:seed cortex:create_categories cortex:onet:fetch_and_provision cortex:core:db:reseed cortex:rebuild_indexes
200+
$ bundle exec rake db:schema:load db:seed cortex:create_categories cortex:onet:fetch_and_provision cortex:core:db:reseed
201+
$ bundle exec rake cortex:rebuild_indexes
201202
```
202203

203204
To run Ruby and JS specs, utilize:

app/api/v1/resources/posts.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ class Posts < Grape::API
120120

121121
allowed_params = remove_params(::V1::Entities::Post.documentation.keys, :featured_media, :tile_media, :media, :industries, :categories, :is_published) + [:category_ids, :industry_ids, :author_id]
122122

123-
124123
@post = ::Post.new(declared(params, {include_missing: false}, allowed_params))
125124
post.user = params[:user] ? User.find(params[:user]) : current_user
126125
post.save!

app/assets/javascripts/application.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//= require jquery
1+
//= require jquery3
22
// require jquery.turbolinks # temporarily disabled
33
//= require jquery_ujs
44
//= require underscore

app/jobs/application_job.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class ApplicationJob < ActiveJob::Base
2+
end

0 commit comments

Comments
 (0)