Skip to content

Commit

Permalink
Merge pull request #27 from blocknotes/v1.0.0
Browse files Browse the repository at this point in the history
v1.0.0
  • Loading branch information
blocknotes authored Apr 18, 2022
2 parents f9649bb + 198cf1e commit c3fafdc
Show file tree
Hide file tree
Showing 33 changed files with 2,313 additions and 55 deletions.
1 change: 1 addition & 0 deletions .fasterer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
exclude_paths:
- bin/*
- db/schema.rb
- gemfiles/**/*
- spec/dummy/**/*
- vendor/**/*
42 changes: 42 additions & 0 deletions .github/workflows/specs_rails6.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Specs Rails 6.0

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
ruby: ['2.6', '2.7']
gemfile: ['rails60_activeadmin22', 'rails60_activeadmin']

env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run tests
run: bundle exec rspec --profile

- name: On failure, archive screenshots as artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-failed-screenshots
path: spec/dummy/tmp/screenshots
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
name: Tests
name: Specs Rails 6.1

on:
push:
branches: [develop, master]
branches:
- master
pull_request:
branches: [develop, master]
branches:
- master

jobs:
tests:
Expand All @@ -14,9 +16,13 @@ jobs:
strategy:
matrix:
ruby: ['2.6', '2.7', '3.0']
gemfile: ['rails61_activeadmin29', 'rails61_activeadmin']

env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile

steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Ruby
Expand All @@ -26,9 +32,9 @@ jobs:
bundler-cache: true

- name: Run tests
run: bin/rspec --profile
run: bundle exec rspec --profile

- name: Archive screenshots for failed tests
- name: On failure, archive screenshots as artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/specs_rails7.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Specs Rails 7.0

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
ruby: ['2.7', '3.0']
gemfile: ['rails70_activeadmin']

env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run tests
run: bundle exec rspec --profile

- name: On failure, archive screenshots as artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-failed-screenshots
path: spec/dummy/tmp/screenshots
20 changes: 1 addition & 19 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,7 @@ AllCops:
Exclude:
- bin/*
- db/schema.rb
- gemfiles/**/*
- spec/dummy/**/*
- vendor/**/*
NewCops: enable

Gemspec/RequiredRubyVersion:
Enabled: false

Naming/FileName:
Enabled: false

Layout/LineLength:
Enabled: true
Max: 120

Style/HashEachMethods:
Enabled: true

Style/HashTransformKeys:
Enabled: true

Style/HashTransformValues:
Enabled: true
34 changes: 34 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: true

appraise 'rails52-activeadmin20' do
gem 'activeadmin', '~> 2.0.0'
gem 'rails', '~> 5.2.0'
end

appraise 'rails60-activeadmin22' do
gem 'activeadmin', '~> 2.2.0'
gem 'rails', '~> 6.0.0'
gem 'selenium-webdriver', require: false
end

appraise 'rails60-activeadmin' do
gem 'activeadmin'
gem 'rails', '~> 6.0.0'
gem 'selenium-webdriver', require: false
end

appraise 'rails61-activeadmin29' do
gem 'activeadmin', '~> 2.9.0'
gem 'rails', '~> 6.1.0'
end

appraise 'rails61-activeadmin' do
gem 'activeadmin'
gem 'rails', '~> 6.1.0'
end

appraise 'rails70-activeadmin' do
gem 'activeadmin'
gem 'rails', '~> 7.0.0'
gem 'sprockets-rails'
end
28 changes: 13 additions & 15 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,23 @@ source 'https://rubygems.org'
gemspec

group :development, :test do
gem 'activestorage', '~> 6.0'
gem 'puma', '~> 4.3'
gem 'sassc', '~> 2.4'
gem 'sprockets-rails', '~> 3.2'
gem 'sqlite3', '~> 1.4'
gem 'puma'
gem 'sassc'
gem 'sqlite3'

# Testing
gem 'capybara', '~> 3.33'
gem 'rspec_junit_formatter', '~> 0.4'
gem 'rspec-rails', '~> 5.1'
gem 'selenium-webdriver', '~> 3.142'
gem 'capybara'
gem 'cuprite'
gem 'rspec_junit_formatter'
gem 'rspec-rails'

# Linters
gem 'fasterer', '~> 0.9'
gem 'rubocop', '~> 1.25'
gem 'rubocop-packaging', '~> 0.5'
gem 'rubocop-performance', '~> 1.13'
gem 'rubocop-rails', '~> 2.13'
gem 'rubocop-rspec', '~> 2.8'
gem 'fasterer'
gem 'rubocop'
gem 'rubocop-packaging'
gem 'rubocop-performance'
gem 'rubocop-rails'
gem 'rubocop-rspec'

# Tools
gem 'pry-rails'
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2020 Mattia Roccoberton
Copyright (c) 2020-2022 Mattia Roccoberton

MIT License

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
[![gem version](https://badge.fury.io/rb/activeadmin_blaze_theme.svg)](https://badge.fury.io/rb/activeadmin_blaze_theme)
[![gem downloads](https://badgen.net/rubygems/dt/activeadmin_blaze_theme)](https://rubygems.org/gems/activeadmin_blaze_theme)
[![linters](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/linters.yml/badge.svg)](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/linters.yml)
[![specs](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs.yml/badge.svg)](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs.yml)
[![specs Rails 6.0](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs_rails6.0.yml/badge.svg)](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs_rails6.0.yml)
[![specs Rails 6.1](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs_rails6.1.yml/badge.svg)](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs_rails6.1.yml)
[![specs Rails 7.0](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs_rails7.0.yml/badge.svg)](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs_rails7.0.yml)

A theme for Active Admin based on [Blaze CSS](http://blazecss.com) 3.x

Expand Down
9 changes: 8 additions & 1 deletion activeadmin_blaze_theme.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,16 @@ Gem::Specification.new do |spec|
spec.homepage = 'https://github.com/blocknotes/activeadmin_blaze_theme'
spec.license = 'MIT'

spec.required_ruby_version = '>= 2.6.0'

spec.metadata['homepage_uri'] = spec.homepage
spec.metadata['source_code_uri'] = spec.homepage
spec.metadata['rubygems_mfa_required'] = 'true'

spec.files = Dir["{app,lib}/**/*", 'LICENSE.txt', 'README.md', 'index.js', 'package.json']
spec.require_paths = ['lib']
spec.metadata = { "rubygems_mfa_required" => "true" }

spec.add_runtime_dependency 'activeadmin', '~> 2.0'

spec.add_development_dependency 'appraisal', '~> 2.4'
end
2 changes: 2 additions & 0 deletions app/assets/stylesheets/activeadmin_blaze_theme/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ body.active_admin {
}
.ui-datepicker {
> .ui-datepicker-header {
background-color: $bg-header;
background-image: none;
border-bottom: 0 none;
border-radius: 0;
height: auto;
Expand Down
29 changes: 29 additions & 0 deletions bin/appraisal
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'appraisal' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

bundle_binstub = File.expand_path("../bundle", __FILE__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("appraisal", "appraisal")
19 changes: 19 additions & 0 deletions extra/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Development

## Releases

```sh
# Update version.rb with the new version
# Update the gemfiles:
bin/appraisal
```

## Testing

```sh
# Running specs using a specific configuration:
bin/appraisal rails60-activeadmin22 rspec
# Using latest activeadmin version:
bin/appraisal rails60-activeadmin rspec
# See gemfiles for more configurations
```
25 changes: 25 additions & 0 deletions gemfiles/rails52_activeadmin20.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activeadmin", "~> 2.0.0"
gem "rails", "~> 5.2.0"

group :development, :test do
gem "puma"
gem "sassc"
gem "sqlite3"
gem "capybara"
gem "cuprite"
gem "rspec_junit_formatter"
gem "rspec-rails"
gem "fasterer"
gem "rubocop"
gem "rubocop-packaging"
gem "rubocop-performance"
gem "rubocop-rails"
gem "rubocop-rspec"
gem "pry-rails"
end

gemspec path: "../"
Loading

0 comments on commit c3fafdc

Please sign in to comment.