Skip to content

Commit

Permalink
Merge pull request #2 from n-studio/fix/datetime-picker
Browse files Browse the repository at this point in the history
fix: datetime picker
  • Loading branch information
n-studio authored Feb 4, 2022
2 parents 8900b49 + 3ebedc3 commit 5a0b9b3
Show file tree
Hide file tree
Showing 51 changed files with 2,001 additions and 2,313 deletions.
84 changes: 75 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
---
version: 2.1

orbs:
browser-tools: circleci/browser-tools@1.2.4

commands:
shared_steps:
steps:
- browser-tools/install-chrome
- browser-tools/install-chromedriver

- checkout

# Install bundler
- run: gem install bundler:2.1.4
- run: gem install bundler:2.3.5

# Restore Cached Dependencies
- restore_cache:
Expand Down Expand Up @@ -43,21 +49,28 @@ commands:
- run: bundle exec rake db:setup

# Run the tests
- run: bundle exec rake
- run: bundle exec rspec

# Check vulnerabilities
- run: bundle exec rake bundler:audit

default_job: &default_job
working_directory: ~/administrate
steps:
- shared_steps
# Run the tests against multiple versions of Rails
- run: bundle exec appraisal install
- run: bundle exec appraisal rake

jobs:
ruby-26:
<<: *default_job
steps:
- shared_steps
# Run the tests against the versions of Rails that support Ruby 2.6
- run: bundle exec appraisal install
- run: bundle exec appraisal rails50 rspec
- run: bundle exec appraisal rails51 rspec
- run: bundle exec appraisal rails52 rspec
- run: bundle exec appraisal rails60 rspec
- run: bundle exec appraisal rails61 rspec
docker:
- image: circleci/ruby:2.6.3-node-browsers-legacy
- image: circleci/ruby:2.6.3
environment:
PGHOST: localhost
PGUSER: administrate
Expand All @@ -70,8 +83,18 @@ jobs:

ruby-27:
<<: *default_job
steps:
- shared_steps
# Run the tests against the versions of Rails that support Ruby 2.7
- run: bundle exec appraisal install
- run: bundle exec appraisal rails50 rspec
- run: bundle exec appraisal rails51 rspec
- run: bundle exec appraisal rails52 rspec
- run: bundle exec appraisal rails60 rspec
- run: bundle exec appraisal rails61 rspec
- run: bundle exec appraisal rails70 rspec
docker:
- image: circleci/ruby:2.7-node-browsers-legacy
- image: circleci/ruby:2.7
environment:
PGHOST: localhost
PGUSER: administrate
Expand All @@ -82,9 +105,52 @@ jobs:
POSTGRES_DB: ruby27
POSTGRES_PASSWORD: ""

ruby-30:
<<: *default_job
steps:
- shared_steps
# Run the tests against the versions of Rails that support Ruby 3.0
- run: bundle exec appraisal install
- run: bundle exec appraisal rails60 rspec
- run: bundle exec appraisal rails61 rspec
- run: bundle exec appraisal rails70 rspec
docker:
- image: circleci/ruby:3.0
environment:
PGHOST: localhost
PGUSER: administrate
RAILS_ENV: test
- image: postgres:10.1-alpine
environment:
POSTGRES_USER: administrate
POSTGRES_DB: ruby30
POSTGRES_PASSWORD: ""

ruby-31:
<<: *default_job
steps:
- shared_steps
# Run the tests against the versions of Rails that support Ruby 3.1
- run: bundle exec appraisal install
- run: bundle exec appraisal rails61 rspec
- run: bundle exec appraisal rails70 rspec
docker:
- image: cimg/ruby:3.1-browsers
environment:
PGHOST: localhost
PGUSER: administrate
RAILS_ENV: test
- image: postgres:10.1-alpine
environment:
POSTGRES_USER: administrate
POSTGRES_DB: ruby31
POSTGRES_PASSWORD: ""

workflows:
version: 2
multiple-rubies:
jobs:
- ruby-31
- ruby-30
- ruby-27
- ruby-26
2 changes: 2 additions & 0 deletions .hound.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ ruby:
scss:
enabled: true
config_file: .scss-lint.yml
stylelint:
config_file: .stylelintrc.json
3 changes: 2 additions & 1 deletion .scss-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ scss_files: "lib/assets/stylesheets/**/*.scss"

exclude:
- "lib/assets/stylesheets/reset/**"
- "app/assets/builds/**/*"
- "lib/assets/stylesheets/datetime_picker.scss"
- "lib/assets/stylesheets/datetime_picker/**/*"

severity: warning

Expand Down
9 changes: 9 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "@thoughtbot/stylelint-config",
"ignoreFiles": [
"lib/assets/stylesheets/reset/**",
"lib/assets/stylesheets/datetime_picker.scss",
"lib/assets/stylesheets/datetime_picker/**/*",
"app/assets/builds/**/*"
]
}
4 changes: 4 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ end
appraise "rails61" do
gem "rails", "~> 6.1"
end

appraise "rails70" do
gem "rails", "~> 6.1"
end
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,72 @@

## Changes

### 0.17.0 (January 31, 2022)

This release incorporates nearly a year of minor changes, starts testing
against Ruby 3 and up, plus Rails 7. We've not heard of any incompatibilities
yet, but there are known issues around asset handling ([notably with
sassc][#2091]) that we're working on.

[#2091]: https://github.com/thoughtbot/administrate/issues/2091

The following templates have changed since v0.16.0:

app/views/administrate/application/_collection.html.erb
app/views/administrate/application/_collection_header_actions.html.erb
app/views/administrate/application/_collection_item_actions.html.erb
app/views/administrate/application/_flashes.html.erb
app/views/administrate/application/_form.html.erb
app/views/administrate/application/_icons.html.erb
app/views/administrate/application/_index_header.html.erb
app/views/administrate/application/index.html.erb
app/views/fields/belongs_to/_index.html.erb
app/views/fields/belongs_to/_show.html.erb
app/views/fields/select/_form.html.erb
app/views/fields/time/_index.html.erb
app/views/fields/time/_show.html.erb

If your application overrides any of them, make sure to review your
custom templates to ensure that they remain compatible.

* [BUGFIX] [#2117] Use `camelize` rather than `classify` for the namespace
* [COMPAT] [#2132] Add Rails 7 to tests
* [COMPAT] [#2120] Add Ruby 3.1 to Circle tests
* [COMPAT] [#2118] Handle Selenium "options" deprecation
* [COMPAT] [#2127] Add Ruby 3 to Circle tests
* [COMPAT] [#2126] Drop patch for Rails 4
* [COMPAT] [#2123] Update Bundler to 2.3.5
* [COMPAT] [#2122] Update Ruby version in ".ruby-version"
* [COMPAT] [#2121] Remove "rspec-rails" from gemspec
* [COMPAT] [#2120] Add "webrick" to Gemfile
* [UI] [#2115] Remove inline style from icon svg
* [COMPAT] [#2102] Update browsers used in CI
* [COMPAT] [#2097] Manage Selenium drivers automatically
* [BUGFIX] [#2125] Fix rspec invocation in CircleCI
* [BUGFIX] Typo navigation:back_to_app
* [BUGFIX] [#2108] Hide link if user is not authorized to access resource
* [COMPAT] [#2107] Relax momentjs-rails version constraint
* [UI] [#2105] Add resource/attribute name to table headers
* [COMPAT] [#2074] gemspec: Drop unused directive test_files
* [COMPAT] [#2101] Limit the highest momentjs-rails version to 2.20.1
* [DOCS] [#2046] Remove password field from Extending Administrate
* [FEATURE] [#2029] Add format option to time field
* [FEATURE] [#1998] Reformulate authorization in example app
* [COMPAT] [#2027] Drop support for Ruby `< 2.6`
* [FEATURE] [#2018] Add :include_blank option to Field::Select
* [COMPAT] [#2023] Avoid version not compatible with Ruby 2.5
* [BUGFIX] [#2015] Only call html_safe on flash message that responds to it
* [FEATURE] [#2005] Add params to collection filter
* [UI] [#2013] Fix nav styles for namespaced resources
* [COMPAT] [#2001] Remove shims that force deprecated form of methods
* [COMPAT] [#2008] Fix deprecation warning
* [FEATURE] [#1991] Allow different form attributes for new/update actions
* [BUGFIX] [#2003] Only allow HTTP(S) URLs in example app
* [DOC] [#2002] Create SECURITY.md
* [FEATURE] [#1995] Allow customising redirects after actions
* [UI] [#1996] Opt-out of FLoC: https://amifloced.org/
* [DOC] [#1968] Add a script to list recent changes to templates

### 0.16.0 (May 6, 2021)

This release incorporates a fix for breakages on Rails 6.1.3.2 and 6.0.3.7
Expand Down
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ end

group :test do
gem "ammeter"
gem "capybara", "3.36.0"
gem "capybara"
gem "database_cleaner"
gem "formulaic"
gem "launchy"
gem "selenium-webdriver"
gem "shoulda-matchers"
gem "timecop"
gem "webdrivers"
gem "webmock"
gem "webrick"
gem "xpath", "3.2.0"
end

Expand Down
26 changes: 16 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
administrate (0.16.0)
administrate (0.17.0)
actionpack (>= 5.0)
actionview (>= 5.0)
activerecord (>= 5.0)
Expand Down Expand Up @@ -133,7 +133,7 @@ GEM
activesupport
capybara
i18n
front_matter_parser (1.0.0)
front_matter_parser (1.0.1)
globalid (1.0.0)
activesupport (>= 5.0)
hashdiff (1.0.1)
Expand Down Expand Up @@ -177,16 +177,16 @@ GEM
matrix (0.4.2)
method_source (0.9.2)
mini_mime (1.1.2)
mini_portile2 (2.6.1)
mini_portile2 (2.7.1)
minitest (5.15.0)
multipart-post (2.1.1)
nio4r (2.5.8)
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
nokogiri (1.13.1)
mini_portile2 (~> 2.7.0)
racc (~> 1.4)
parser (3.0.3.2)
ast (~> 2.4.1)
pg (1.2.3)
pg (1.3.1)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
Expand Down Expand Up @@ -281,7 +281,7 @@ GEM
sprockets (>= 3.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
thor (1.1.0)
thor (1.2.1)
tilt (2.0.10)
timecop (0.9.4)
tzinfo (2.0.4)
Expand All @@ -292,6 +292,10 @@ GEM
unicorn (6.1.0)
kgio (~> 2.6)
raindrops (~> 0.7)
webdrivers (5.0.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
webmock (3.14.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
Expand All @@ -304,7 +308,7 @@ GEM
nokogiri (~> 1.8)
yard (0.9.27)
webrick (~> 1.7.0)
zeitwerk (2.5.2)
zeitwerk (2.5.3)

PLATFORMS
ruby
Expand All @@ -317,7 +321,7 @@ DEPENDENCIES
awesome_print
bundler-audit
byebug
capybara (= 3.36.0)
capybara
database_cleaner
dotenv-rails
factory_bot_rails
Expand All @@ -341,9 +345,11 @@ DEPENDENCIES
timecop
uglifier
unicorn
webdrivers
webmock
webrick
xpath (= 3.2.0)
yard

BUNDLED WITH
2.2.24
2.3.5
Loading

0 comments on commit 5a0b9b3

Please sign in to comment.