Permalink
Browse files

update specs, rspec, ruby, rails

  • Loading branch information...
jvdp committed Nov 21, 2018
1 parent bccac73 commit 818c0cb44ee26d46a395401856fb487d55fae94a
Showing with 34 additions and 30 deletions.
  1. +4 −7 .travis.yml
  2. +2 −0 Gemfile
  3. +1 −1 attachments/db/migrate/20121222172513_create_attachments.rb
  4. +1 −1 attachments/lib/brightcontent/attachments/attachable.rb
  5. +1 −1 attachments/spec/dummy/config/application.rb
  6. +1 −1 attachments/spec/dummy/db/migrate/20121206225720_create_blogs.rb
  7. +1 −0 attachments/spec/spec_helper.rb
  8. +2 −1 core/brightcontent-core.gemspec
  9. +1 −1 core/db/migrate/20121206121725_create_brightcontent_admin_users.rb
  10. +1 −1 core/spec/dummy/config/application.rb
  11. +1 −1 core/spec/dummy/db/migrate/20121206225720_create_blogs.rb
  12. +1 −1 core/spec/dummy/db/migrate/20121223131824_add_featured_to_blog.rb
  13. +1 −1 core/spec/dummy/db/migrate/20130720211920_create_comments.rb
  14. +1 −1 core/spec/dummy/db/migrate/20140512085432_add_author_id_to_blogs.rb
  15. +1 −1 core/spec/dummy/db/migrate/20140512090832_create_authors.rb
  16. +1 −1 core/spec/dummy/db/migrate/20150219130156_add_active_to_blogs.rb
  17. +1 −1 core/spec/dummy/db/migrate/20160623142310_create_grouped_blogs.rb
  18. +1 −0 core/spec/helpers/brightcontent/translation_helper_spec.rb
  19. +3 −3 core/spec/lib/brightcontent/resources_spec.rb
  20. +1 −0 core/spec/spec_helper.rb
  21. +1 −1 gemfiles/{rails-5.0.x.gemfile → rails-5.2.x.gemfile}
  22. +1 −1 pages/db/migrate/20121207132810_create_brightcontent_pages.rb
  23. +1 −1 pages/spec/dummy/app/controllers/pages_controller.rb
  24. +1 −1 pages/spec/dummy/config/application.rb
  25. +2 −2 pages/spec/lib/brightcontent/pages/path_constraint_spec.rb
  26. +1 −0 pages/spec/spec_helper.rb
@@ -3,18 +3,15 @@ env:
- GEM=attachments BUNDLE_WITHOUT=pages
- GEM=pages
rvm:
- 2.1.10
- 2.2.5
- 2.3.1
- 2.3.8
- 2.4.5
- 2.5.3
gemfile:
- gemfiles/rails-4.2.x.gemfile
- gemfiles/rails-5.0.x.gemfile
- gemfiles/rails-5.2.x.gemfile
before_script:
- cd $GEM
script:
- bundle exec rake db:migrate spec RAILS_ENV=test
matrix:
exclude:
- rvm: 2.1.10
gemfile: gemfiles/rails-5.0.x.gemfile
fast_finish: true
@@ -1,5 +1,7 @@
source "http://rubygems.org"

gem "rake", "< 11.0"

gemspec
gemspec name: "brightcontent-core", path: "core"
gemspec name: "brightcontent-attachments", path: "attachments"
@@ -1,4 +1,4 @@
class CreateAttachments < ActiveRecord::Migration
class CreateAttachments < ActiveRecord::Migration[4.2]
def up
create_table :brightcontent_attachments do |t|
t.integer :attachable_id
@@ -5,7 +5,7 @@ module Attachable

included do
add_brightcontent_column :attachments
has_many :attachments, as: :attachable, dependent: :destroy, class_name: Brightcontent::Attachment, inverse_of: :attachable
has_many :attachments, as: :attachable, dependent: :destroy, class_name: "Brightcontent::Attachment", inverse_of: :attachable
end

def attachment
@@ -47,7 +47,7 @@ class Application < Rails::Application
config.assets.enabled = true

# config.i18n.enforce_available_locales = true
config.active_record.raise_in_transactional_callbacks = true
# config.active_record.raise_in_transactional_callbacks = true

# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
@@ -1,4 +1,4 @@
class CreateBlogs < ActiveRecord::Migration
class CreateBlogs < ActiveRecord::Migration[4.2]
def change
create_table :blogs do |t|
t.string :name
@@ -2,6 +2,7 @@
ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../')

require File.expand_path("../dummy/config/environment.rb", __FILE__)
require 'rspec/its'
require 'rspec/rails'
require 'capybara/rspec'
require 'factory_girl_rails'
@@ -30,7 +30,8 @@ Gem::Specification.new do |s|

s.add_development_dependency "rake"
s.add_development_dependency "sqlite3"
s.add_development_dependency "rspec", "~> 2.14.1"
s.add_development_dependency "rspec"
s.add_development_dependency "rspec-its"
s.add_development_dependency "rspec-rails"
s.add_development_dependency "capybara"
s.add_development_dependency "launchy"
@@ -1,4 +1,4 @@
class CreateBrightcontentAdminUsers < ActiveRecord::Migration
class CreateBrightcontentAdminUsers < ActiveRecord::Migration[4.2]
def up
create_table :brightcontent_admin_users do |t|
t.string :email
@@ -47,7 +47,7 @@ class Application < Rails::Application
config.assets.enabled = true

# config.i18n.enforce_available_locales = true
config.active_record.raise_in_transactional_callbacks = true
# config.active_record.raise_in_transactional_callbacks = true

# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
@@ -1,4 +1,4 @@
class CreateBlogs < ActiveRecord::Migration
class CreateBlogs < ActiveRecord::Migration[4.2]
def change
create_table :blogs do |t|
t.string :name
@@ -1,4 +1,4 @@
class AddFeaturedToBlog < ActiveRecord::Migration
class AddFeaturedToBlog < ActiveRecord::Migration[4.2]
def change
add_column :blogs, :featured, :boolean
end
@@ -1,4 +1,4 @@
class CreateComments < ActiveRecord::Migration
class CreateComments < ActiveRecord::Migration[4.2]
def change
create_table :comments do |t|
t.text :text
@@ -1,4 +1,4 @@
class AddAuthorIdToBlogs < ActiveRecord::Migration
class AddAuthorIdToBlogs < ActiveRecord::Migration[4.2]
def change
add_reference :blogs, :author
end
@@ -1,4 +1,4 @@
class CreateAuthors < ActiveRecord::Migration
class CreateAuthors < ActiveRecord::Migration[4.2]
def change
create_table :authors do |t|
t.string :name
@@ -1,4 +1,4 @@
class AddActiveToBlogs < ActiveRecord::Migration
class AddActiveToBlogs < ActiveRecord::Migration[4.2]
def change
add_column :blogs, :active, :boolean, default: true
end
@@ -1,4 +1,4 @@
class CreateGroupedBlogs < ActiveRecord::Migration
class CreateGroupedBlogs < ActiveRecord::Migration[4.2]
def change
create_table :grouped_blogs do |t|
t.string :name
@@ -1,4 +1,5 @@
require 'spec_helper'
include Brightcontent::TranslationHelper

describe Brightcontent::TranslationHelper do
let(:string) { "thing" }
@@ -24,7 +24,7 @@ module Brightcontent
end

it 'does have any exta menu items' do
expect(resources.extra_menu?).to be_true
expect(resources.extra_menu?).to eq true
end
end

@@ -42,7 +42,7 @@ module Brightcontent
end

it 'does not have any exta menu items' do
expect(resources.extra_menu?).to be_false
expect(resources.extra_menu?).to eq false
end
end

@@ -60,7 +60,7 @@ module Brightcontent
end

it 'does not have any exta menu items' do
expect(resources.extra_menu?).to be_false
expect(resources.extra_menu?).to eq false
end
end
end
@@ -2,6 +2,7 @@
ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../')

require File.expand_path("../dummy/config/environment.rb", __FILE__)
require 'rspec/its'
require 'rspec/rails'
require 'capybara/rspec'
require 'factory_girl_rails'
@@ -1,6 +1,6 @@
source "https://rubygems.org"

gem "rails", "~> 5.0.0"
gem "rails", "~> 5.2.0"

gemspec name: "brightcontent-core", path: "../core", group: :core
gemspec name: "brightcontent-attachments", path: "../attachments", group: :attachments
@@ -1,4 +1,4 @@
class CreateBrightcontentPages < ActiveRecord::Migration
class CreateBrightcontentPages < ActiveRecord::Migration[4.2]
def change
create_table :brightcontent_pages do |t|
t.string :name
@@ -3,6 +3,6 @@ def index
end

def show
render text: current_page.name
render plain: current_page.name
end
end
@@ -47,7 +47,7 @@ class Application < Rails::Application
config.assets.enabled = true

# config.i18n.enforce_available_locales = true
config.active_record.raise_in_transactional_callbacks = true
# config.active_record.raise_in_transactional_callbacks = true

# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
@@ -18,11 +18,11 @@ module Pages

it 'returns true if path is existing' do
request = double(:request, path: '/existing')
expect(subject.matches?(request)).to be_true
expect(subject.matches?(request)).to eq true
end
it 'returns false if path is non-existing' do
request = double(:request, path: '/nonexisting')
expect(subject.matches?(request)).to be_false
expect(subject.matches?(request)).to eq false
end
end
end
@@ -2,6 +2,7 @@
ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../')

require File.expand_path("../dummy/config/environment.rb", __FILE__)
require 'rspec/its'
require 'rspec/rails'
require 'capybara/rspec'
require 'factory_girl_rails'

0 comments on commit 818c0cb

Please sign in to comment.