Dependencies update and use adapter's url_name instaid of the given name for index lookup for consistent url and index path locations

This commit is contained in:
2018-08-29 11:34:45 -05:00
parent 1428d0ce1b
commit bc636294c6
8 changed files with 79 additions and 84 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ group :development, :test do
gem 'paperclip', '~> 5.3'
gem 'dunlop-core', gitlab: 'benja-2/dunlop-core', branch: 'master'
#gem 'dunlop-core', path: '~/development/rails/components/dunlop-core'
gem 'factory_girl_rails'
gem 'factory_bot_rails'
gem 'active_model_serializers'
gem 'database_cleaner'
end
+71 -74
View File
@@ -1,6 +1,6 @@
GIT
remote: https://gitlab.com/benja-2/dunlop-core.git
revision: 2ab9ad0b61aa5cd14528fc00a41de20532cb4f26
revision: 064ab4fa280d3dc79bc9671891e46b5b72e06fac
branch: master
specs:
dunlop-core (1.4.0)
@@ -38,30 +38,30 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.0)
actionpack (= 5.2.0)
actioncable (5.2.1)
actionpack (= 5.2.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.0)
actionpack (= 5.2.0)
actionview (= 5.2.0)
activejob (= 5.2.0)
actionmailer (5.2.1)
actionpack (= 5.2.1)
actionview (= 5.2.1)
activejob (= 5.2.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.0)
actionview (= 5.2.0)
activesupport (= 5.2.0)
actionpack (5.2.1)
actionview (= 5.2.1)
activesupport (= 5.2.1)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.0)
activesupport (= 5.2.0)
actionview (5.2.1)
activesupport (= 5.2.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
active_attr (0.11.0)
active_attr (0.12.0)
activemodel (>= 3.0.2, < 6.0)
activesupport (>= 3.0.2, < 6.0)
active_model_serializers (0.10.7)
@@ -69,20 +69,20 @@ GEM
activemodel (>= 4.1, < 6)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (5.2.0)
activesupport (= 5.2.0)
activejob (5.2.1)
activesupport (= 5.2.1)
globalid (>= 0.3.6)
activemodel (5.2.0)
activesupport (= 5.2.0)
activerecord (5.2.0)
activemodel (= 5.2.0)
activesupport (= 5.2.0)
activemodel (5.2.1)
activesupport (= 5.2.1)
activerecord (5.2.1)
activemodel (= 5.2.1)
activesupport (= 5.2.1)
arel (>= 9.0)
activestorage (5.2.0)
actionpack (= 5.2.0)
activerecord (= 5.2.0)
activestorage (5.2.1)
actionpack (= 5.2.1)
activerecord (= 5.2.1)
marcel (~> 0.3.1)
activesupport (5.2.0)
activesupport (5.2.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
@@ -93,7 +93,7 @@ GEM
bcrypt (3.1.12)
builder (3.2.3)
cancancan (2.2.0)
capybara (3.2.1)
capybara (3.6.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
@@ -129,17 +129,17 @@ GEM
activesupport (>= 4.0, < 6)
execjs (2.7.0)
facets (3.1.0)
factory_girl (4.9.0)
factory_bot (4.11.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.9.0)
factory_girl (~> 4.9.0)
factory_bot_rails (4.11.0)
factory_bot (~> 4.11.0)
railties (>= 3.0.0)
ffi (1.9.25)
font-awesome-rails (4.7.0.4)
railties (>= 3.2, < 6.0)
globalid (0.4.1)
activesupport (>= 4.2.0)
i18n (1.0.1)
i18n (1.1.0)
concurrent-ruby (~> 1.0)
js-routes (1.4.4)
railties (>= 3.2)
@@ -166,17 +166,17 @@ GEM
mimemagic (~> 0.3.2)
memoist (0.16.0)
method_source (0.9.0)
mime-types (3.1)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mime-types-data (3.2018.0812)
mimemagic (0.3.2)
mini_mime (1.0.0)
mini_mime (1.0.1)
mini_portile2 (2.3.0)
minitest (5.11.3)
momentjs-rails (2.20.1)
railties (>= 3.1)
nio4r (2.3.1)
nokogiri (1.8.2)
nokogiri (1.8.4)
mini_portile2 (~> 2.3.0)
orm_adapter (0.5.0)
paperclip (5.3.0)
@@ -187,8 +187,6 @@ GEM
terrapin (~> 0.6.0)
pickadate-rails (3.5.5.0)
railties (>= 3.1.0)
polyamorous (1.3.3)
activerecord (>= 3.0)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
@@ -197,42 +195,41 @@ GEM
yard (~> 0.9.11)
pry-rails (0.3.6)
pry (>= 0.10.4)
public_suffix (3.0.2)
public_suffix (3.0.3)
rack (2.0.5)
rack-cors (1.0.2)
rack-test (1.0.0)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.0)
actioncable (= 5.2.0)
actionmailer (= 5.2.0)
actionpack (= 5.2.0)
actionview (= 5.2.0)
activejob (= 5.2.0)
activemodel (= 5.2.0)
activerecord (= 5.2.0)
activestorage (= 5.2.0)
activesupport (= 5.2.0)
rails (5.2.1)
actioncable (= 5.2.1)
actionmailer (= 5.2.1)
actionpack (= 5.2.1)
actionview (= 5.2.1)
activejob (= 5.2.1)
activemodel (= 5.2.1)
activerecord (= 5.2.1)
activestorage (= 5.2.1)
activesupport (= 5.2.1)
bundler (>= 1.3.0)
railties (= 5.2.0)
railties (= 5.2.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.2.0)
actionpack (= 5.2.0)
activesupport (= 5.2.0)
railties (5.2.1)
actionpack (= 5.2.1)
activesupport (= 5.2.1)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
thor (>= 0.19.0, < 2.0)
rake (12.3.1)
ransack (1.8.8)
actionpack (>= 3.0)
activerecord (>= 3.0)
activesupport (>= 3.0)
ransack (2.0.1)
actionpack (>= 5.0)
activerecord (>= 5.0)
activesupport (>= 5.0)
i18n
polyamorous (~> 1.3.2)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
@@ -246,24 +243,24 @@ GEM
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-rails (3.7.2)
rspec-support (~> 3.8.0)
rspec-rails (3.8.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.1)
sass (3.5.6)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
sass (3.5.7)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
@@ -288,7 +285,7 @@ GEM
activesupport (>= 4.2)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
sprockets (3.7.1)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
@@ -318,7 +315,7 @@ GEM
websocket-extensions (0.1.3)
xpath (3.1.0)
nokogiri (~> 1.8)
yard (0.9.14)
yard (0.9.16)
PLATFORMS
ruby
@@ -331,7 +328,7 @@ DEPENDENCIES
database_cleaner
dunlop-core!
dunlop-ember!
factory_girl_rails
factory_bot_rails
kaminari
paperclip (~> 5.3)
pry-doc
@@ -344,4 +341,4 @@ DEPENDENCIES
sqlite3
BUNDLED WITH
1.16.2
1.16.3
@@ -8,8 +8,8 @@ module Dunlop
def ember_path
app_globals = {}
if adapter_name = params[:adapter].to_s.scan(/\w+/).first.presence
app_index = Rails.root.join("public/adapters/#{adapter_name}/app/index.html")
return render text: 'unauthorized, no adapter engine', status: 403 unless adapter = Panda.adapters[adapter_name]
app_index = Rails.root.join("public/adapters/#{adapter.url_name}/app/index.html")
#app_globals = adapter.settings # load through request instead. More stable then changing environments
unless Rails.application.config.try(:loose_ember_app_authorization)
return render text: 'unauthorized, no adapter engine', status: 403 unless current_user.admin? or authorize!(:read, adapter.engine)
-2
View File
@@ -23,7 +23,5 @@ Gem::Specification.new do |s|
s.add_dependency "active_model_serializers"
s.add_development_dependency "sqlite3"
s.add_development_dependency 'rspec-rails'
s.add_development_dependency 'capybara'
s.add_development_dependency 'factory_girl_rails'
end
+1 -1
View File
@@ -1,4 +1,4 @@
FactoryGirl.define do
FactoryBot.define do
factory :comment do
user_id 1
post_id 1
+1 -1
View File
@@ -1,4 +1,4 @@
FactoryGirl.define do
FactoryBot.define do
factory :post do
sequence(:title) {|i| "post-#{i}"}
sequence(:body) {|i| "post-body-#{i}"}
+1 -1
View File
@@ -1,4 +1,4 @@
FactoryGirl.define do
FactoryBot.define do
factory :user do
sequence(:email) { |i| "user#{i}@example.com" }
password 'secret'
+3 -3
View File
@@ -19,7 +19,7 @@ ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
# in spec/support/ and its subdirectories.
Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
Dir[File.join(ENGINE_RAILS_ROOT, "spec/factories/**/*.rb")].each {|f| require f }
#FactoryGirl.definition_file_paths = [File.join(ENGINE_RAILS_ROOT, "spec/factories/**/*.rb")] # not needed here
#FactoryBot.definition_file_paths = [File.join(ENGINE_RAILS_ROOT, "spec/factories/**/*.rb")] # not needed here
Dir.glob("spec/acceptance/steps/**/*steps.rb") { |f| load f, true }
# Add additional requires below this line. Rails is not loaded until this point!
@@ -53,7 +53,7 @@ RSpec.configure do |config|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = "#{::Rails.root}/spec/fixtures"
config.expect_with(:rspec) { |c| c.syntax = [:should, :expect] }
config.include FactoryGirl::Syntax::Methods
config.include FactoryBot::Syntax::Methods
config.include Rspec::Dunlop::GeneralHelpers
config.include Rspec::Dunlop::FeatureHelpers, type: :feature
config.include Devise::Test::ControllerHelpers, type: :controller
@@ -64,7 +64,7 @@ RSpec.configure do |config|
# instead of true.
config.use_transactional_fixtures = false
config.before :suite do
#FactoryGirl.reload # to add the adapter factories
#FactoryBot.reload # to add the adapter factories
#DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.clean_with(:truncation)
Dunlop::NestedLogger.options[:yaml_options][:line_width] = 2000