Skip to content

Commit

Permalink
Merge b383d35 into cb1ac73
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibuya committed Nov 14, 2021
2 parents cb1ac73 + b383d35 commit 22a5bac
Show file tree
Hide file tree
Showing 97 changed files with 1,629 additions and 305 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,43 @@ jobs:
gemfile: [ gemfiles/rails_6.1.gemfile ]
orm: [ active_record ]
adapter: [ sqlite3 ]
asset: [ webpacker ]
include:
- ruby: 2.5
gemfile: gemfiles/rails_6.0.gemfile
orm: active_record
adapter: sqlite3
asset: webpacker
- ruby: 3.0
gemfile: gemfiles/rails_6.1.gemfile
orm: active_record
adapter: mysql2
asset: webpacker
- ruby: 3.0
gemfile: gemfiles/rails_6.1.gemfile
orm: active_record
adapter: postgresql
asset: webpacker
- ruby: 3.0
gemfile: gemfiles/rails_7.0.gemfile
orm: active_record
adapter: sqlite3
asset: webpacker
- ruby: 2.7
gemfile: gemfiles/rails_6.0.gemfile
orm: mongoid
adapter: sqlite3
asset: webpacker
- ruby: 3.0
gemfile: gemfiles/rails_6.1.gemfile
orm: mongoid
adapter: sqlite3
asset: webpacker
- ruby: jruby
gemfile: gemfiles/rails_6.1.gemfile
orm: mongoid
adapter: sqlite3
asset: webpacker
runs-on: ubuntu-latest
services:
mysql:
Expand All @@ -64,6 +72,7 @@ jobs:
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
CI_ORM: ${{ matrix.orm }}
CI_ASSET: ${{ matrix.asset }}
JRUBY_OPTS: --debug
steps:
- uses: actions/checkout@v2
Expand All @@ -76,17 +85,23 @@ jobs:
env:
MAKE: make --jobs 4
BUNDLE_WITHOUT: development
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Setup application
env:
BUNDLE_GEMFILE: ../../${{ matrix.gemfile }}
CI_DB_ADAPTER: ${{ matrix.adapter }}
RAILS_ENV: test
run: |
yarn install
cd spec/dummy_app
bundle exec rake rails_admin:prepare_ci_env db:create db:migrate
yarn install
cd ../../
- name: Run tests
run: bundle exec rake spec
run: bundle exec rspec
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
continue-on-error: true
Expand Down
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
.bundle
.idea/
.rvmrc
.sass-cache
.yardoc
/.emacs.desktop
/gemfiles/*.lock
/node_modules/*
/rails_admin.gems
/spec/generators/tmp
/spec/lib/tmp
/yarn.lock
Gemfile.lock
Gemfile31.lock
coverage/*
db/*.sqlite3
db/*.sqlite3-journal
Expand All @@ -26,7 +28,4 @@ spec/dummy_app/log/*.log
spec/dummy_app/public/uploads
spec/dummy_app/Gemfile.lock
tmp/**/*
/.emacs.desktop
.idea/*.xml
.sass-cache
nbproject
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--color
--order=random
--profile
--exclude-pattern 'dummy_app/node_modules/rails_admin/**/*_spec.rb'
4 changes: 3 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ inherit_from: .rubocop_todo.yml
AllCops:
Exclude:
- 'gemfiles/*'
- 'node_modules/**/*'
- 'spec/dummy_app/bin/**/*'
- 'spec/dummy_app/db/schema.rb'
- 'spec/dummy_app/tmp/**/*'
- 'vendor/bundle/**/*'
NewCops: disable
SuggestExtensions: false
TargetRubyVersion: 2.5

Gemspec/DateAssignment:
Expand Down Expand Up @@ -109,7 +111,7 @@ Metrics/MethodLength:
Max: 29 # TODO: Lower to 15

Metrics/ModuleLength:
Max: 202 # TODO: Lower to 100
Max: 204 # TODO: Lower to 100

Metrics/ParameterLists:
Max: 8 # TODO: Lower to 4
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ gem 'rails'
gem 'haml'
gem 'devise'
gem 'webrick', '~> 1.7'
gem 'webpacker', require: false

group :active_record do
gem 'paper_trail'
Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/rails_admin/custom/ui.js

This file was deleted.

3 changes: 0 additions & 3 deletions app/assets/javascripts/rails_admin/jquery-ui.js

This file was deleted.

28 changes: 0 additions & 28 deletions app/assets/javascripts/rails_admin/ra.i18n.js

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/javascripts/rails_admin/rails_admin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//= require 'jquery3'
//= require 'rails-ujs'
//= require 'jquery.remotipart'
//= require 'rails_admin/jquery-ui'
//= require 'rails_admin/moment-with-locales'
//= require 'rails_admin/bootstrap-datetimepicker'
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
11 changes: 0 additions & 11 deletions app/assets/stylesheets/rails_admin/custom/mixins.scss

This file was deleted.

13 changes: 0 additions & 13 deletions app/assets/stylesheets/rails_admin/custom/theming.scss

This file was deleted.

15 changes: 0 additions & 15 deletions app/assets/stylesheets/rails_admin/custom/variables.scss

This file was deleted.

8 changes: 6 additions & 2 deletions app/views/layouts/rails_admin/_head.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
%meta{content: "width=device-width, initial-scale=1", name: "viewport; charset=utf-8"}
%meta{content: "NONE,NOARCHIVE", name: "robots"}
= csrf_meta_tag
= stylesheet_link_tag "rails_admin/rails_admin.css", media: :all
= javascript_include_tag "rails_admin/rails_admin.js"
- if RailsAdmin::config.asset_source == :webpacker
= javascript_pack_tag "rails_admin"
= stylesheet_pack_tag "rails_admin"
- else
= stylesheet_link_tag "rails_admin/rails_admin.css", media: :all
= javascript_include_tag "rails_admin/rails_admin.js"
1 change: 1 addition & 0 deletions gemfiles/rails_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ gem "rails", "~> 6.0.0"
gem "haml"
gem "devise", "~> 4.7"
gem "webrick", "~> 1.7"
gem "webpacker", require: false
gem "sassc-rails", "~> 2.1"

group :active_record do
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails_6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ gem "rails", "~> 6.1.0"
gem "haml"
gem "devise", "~> 4.7"
gem "webrick", "~> 1.7"
gem "webpacker", require: false
gem "sassc-rails", "~> 2.1"

group :active_record do
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails_7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ gem "rails", "~> 7.0.0.alpha2"
gem "haml"
gem "devise", "~> 4.7", github: "strobilomyces/devise", branch: "patch-1"
gem "webrick", "~> 1.7"
gem "webpacker", require: false
gem "sassc-rails", "~> 2.1"

group :active_record do
Expand Down
2 changes: 0 additions & 2 deletions lib/rails_admin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,3 @@ def self.yaml_dump(object)
YAML.dump(object)
end
end

require 'rails_admin/bootstrap-sass' unless defined? Bootstrap
49 changes: 0 additions & 49 deletions lib/rails_admin/bootstrap-sass.rb

This file was deleted.

28 changes: 0 additions & 28 deletions lib/rails_admin/bootstrap-sass/compass_functions.rb

This file was deleted.

16 changes: 0 additions & 16 deletions lib/rails_admin/bootstrap-sass/sass_functions.rb

This file was deleted.

4 changes: 4 additions & 0 deletions lib/rails_admin/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ class << self
attr_accessor :navigation_static_links
attr_accessor :navigation_static_label

# Set where RailsAdmin fetches JS/CSS from, defaults to :sprockets
attr_accessor :asset_source

# Finish initialization by executing deferred configuration blocks
def initialize!
@deferred_blocks.each { |block| block.call(self) }
Expand Down Expand Up @@ -317,6 +320,7 @@ def reset
@show_gravatar = true
@navigation_static_links = {}
@navigation_static_label = nil
@asset_source = (defined?(Webpacker) ? :webpacker : :sprockets)
@parent_controller = '::ActionController::Base'
@forgery_protection_settings = {with: :exception}
RailsAdmin::Config::Actions.reset
Expand Down
Loading

0 comments on commit 22a5bac

Please sign in to comment.