Skip to content

Commit

Permalink
Merge pull request #17 from thambley/pr-16
Browse files Browse the repository at this point in the history
Add support for active admin version 2
  • Loading branch information
thambley authored Oct 8, 2019
2 parents 88d41f6 + 21922af commit 929d8d9
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ gem 'spreadsheet', '~> 1.1', '>= 1.1.4'

group :development, :test do
gem 'rails-i18n' # Gives us default i18n for many languages
gem 'sqlite3', '~> 1.3.0'
gem 'yard'
end

group :test do
gem 'codecov', require: false
gem 'cucumber-rails', require: false
gem 'database_cleaner'
gem 'rspec-mocks', '~> 3.7'
gem 'rspec-rails', '~> 3.7'
gem 'simplecov', require: false
gem 'codecov', require: false
end
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,18 @@ BUNDLE_GEMFILE=gemfiles/rails_42.gemfile bundle exec rake setup
BUNDLE_GEMFILE=gemfiles/rails_42.gemfile bundle exec rake
```

### Rails 5.1
### Rails 5.2

```text
bundle install --gemfile=gemfiles/rails_51.gemfile
bundle install --gemfile=gemfiles/rails_52.gemfile
```

```text
BUNDLE_GEMFILE=gemfiles/rails_51.gemfile bundle exec rake setup
BUNDLE_GEMFILE=gemfiles/rails_52.gemfile bundle exec rake setup
```

```text
BUNDLE_GEMFILE=gemfiles/rails_51.gemfile bundle exec rake
BUNDLE_GEMFILE=gemfiles/rails_52.gemfile bundle exec rake
```

[Active Admin]:https://www.activeadmin.info/
Expand Down
5 changes: 3 additions & 2 deletions gemfiles/rails_42.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ ruby_minor_version = RUBY_VERSION.split('.')[1].to_i

eval_gemfile(File.expand_path(File.join('..', 'Gemfile'), __dir__))

gem 'activeadmin', '1.2.1'
gem 'activeadmin', '1.4.3'
gem 'devise', '~> 4.2'
gem 'rails', '4.2.10'
gem 'rails', '4.2.11'
gem 'sqlite3', '~> 1.3.0'
gem 'turbolinks', '~> 5.0.0'
gem 'tzinfo-data'

Expand Down
2 changes: 2 additions & 0 deletions gemfiles/rails_52.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ ruby_minor_version = RUBY_VERSION.split('.')[1].to_i
eval_gemfile(File.expand_path(File.join('..', 'Gemfile'), __dir__))

gem 'activeadmin', '2.4.0'
gem 'bootsnap', require: false
gem 'devise', '~> 4.7'
gem 'rails', ' ~> 5.2'
gem 'sqlite3', '~> 1.4.0'
gem 'turbolinks', '~> 5.2.0'
gem 'tzinfo-data'

Expand Down
3 changes: 3 additions & 0 deletions gemfiles/rails_60.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ ruby_minor_version = RUBY_VERSION.split('.')[1].to_i
eval_gemfile(File.expand_path(File.join('..', 'Gemfile'), __dir__))

gem 'activeadmin', '2.4.0'
gem 'bootsnap', require: false
gem 'devise', '~> 4.7'
gem 'rails', '~> 6'
gem 'sqlite3', '~> 1.4.0'
gem 'turbolinks', '~> 5.2.0'
gem 'tzinfo-data'
gem 'webpacker', '~> 4.x'

group :test do
gem 'shoulda-matchers', '~> 3.1'
Expand Down
4 changes: 2 additions & 2 deletions spec/xls/unit/resource_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
let(:mime) { Mime::Type.lookup_by_extension(:xls) }

let(:filename) do
"#{controller.resource_class.to_s.downcase.pluralize}-#{Time.now.strftime('%Y-%m-%d')}.xls"
"categories-#{Time.now.strftime('%Y-%m-%d')}.xls"
end

it 'generates an xls filename' do
Expand All @@ -15,7 +15,7 @@
request.accept = mime
get :index
disposition = "attachment; filename=\"#{filename}\""
expect(response.headers['Content-Disposition']).to eq(disposition)
expect(response.headers['Content-Disposition']).to start_with(disposition)
expect(response.headers['Content-Transfer-Encoding']).to eq('binary')
end
end
Expand Down

0 comments on commit 929d8d9

Please sign in to comment.