Skip to content

Commit

Permalink
Extract image field into a separate gem
Browse files Browse the repository at this point in the history
Feature:

**When I** have a custom field type that I want to share with others,
**I want to** reference an official template for a field gem
**so I can** more easily package my field for sharing.

Implementation:

Create a template for field plugins
by extracting the image field into its own gem.

This is a breaking change with an easy fix -
anybody who uses Image fields
will need to add `gem "administrate-field-image"` to their `Gemfile`.

The source for the image field gem is up at
https://github.com/graysonwright/administrate-field-image.
  • Loading branch information
c-lliope committed Apr 21, 2016
1 parent 30c8b0a commit 12843ef
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 82 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@

### Upcoming Release

* [#476] [CHANGE] Extract `Administrate::Field::Image` into its own gem.
Users who have image fields in their dashboards
should add to their `Gemfile`:
```ruby
gem "administrate-field-image"
```

### 0.1.5 (April 1, 2016)

* [master] [BUGFIX] Protect from CSRF attacks [CVE-2016-3098]
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ruby "2.2.3"

gemspec

gem "administrate-field-image", path: "../administrate-field-image"
gem "delayed_job_active_record"
gem "high_voltage"
gem "markdown-rails"
Expand Down
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
PATH
remote: ../administrate-field-image
specs:
administrate-field-image (0.0.1)
administrate (~> 0.1.3)
rails (~> 4.2)

PATH
remote: .
specs:
Expand Down Expand Up @@ -280,6 +287,7 @@ PLATFORMS

DEPENDENCIES
administrate!
administrate-field-image!
ammeter
appraisal
awesome_print
Expand Down
23 changes: 0 additions & 23 deletions app/views/fields/image/_form.html.erb

This file was deleted.

18 changes: 0 additions & 18 deletions app/views/fields/image/_index.html.erb

This file was deleted.

18 changes: 0 additions & 18 deletions app/views/fields/image/_show.html.erb

This file was deleted.

1 change: 0 additions & 1 deletion docs/customizing_dashboards.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ specify, including:
- `Field::Email`
- `Field::HasMany`
- `Field::HasOne`
- `Field::Image`
- `Field::Number`
- `Field::Polymorphic`
- `Field::Select`
Expand Down
8 changes: 0 additions & 8 deletions lib/administrate/field/image.rb

This file was deleted.

14 changes: 0 additions & 14 deletions spec/lib/fields/image_spec.rb

This file was deleted.

0 comments on commit 12843ef

Please sign in to comment.