Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract image field into a separate gem #476

Merged
merged 2 commits into from
Apr 21, 2016
Merged

Extract image field into a separate gem #476

merged 2 commits into from
Apr 21, 2016

Conversation

c-lliope
Copy link
Contributor

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.

@c-lliope
Copy link
Contributor Author

@danbee, @mcmire - thoughts?

@c-lliope
Copy link
Contributor Author

c-lliope commented Apr 19, 2016

@jferris mind if I get your eyes? I'm having some trouble figuring out the right strategy to publish this feature.

This repository contains both the administrate gem and the demo application. The demo application uses images, which means that its Gemfile will be dependent on the new administrate-field-image gem.

In turn, the administrate-field-image gem is dependent on the administrate gem in this repository. This creates a little bit of a chicken-and-egg problem for publishing both of those gems.

Here's the best plan I can come up with:

  • Release this branch as a new version of the administrate gem, as version 0.2.0.rc1
  • Make administrate-field-image dependent on "administrate", "0.2.0.rc1", "~> 0.2.0"
  • Release administrate-field-image v 0.0.1
  • Make the demo app's Gemfile dependent on "administrate-field-image", "~> 0.0"
  • Re-push this branch to Github to run CircleCI suite. All of the gems would be available on rubygems.org, so the suite should pass.
  • Update and release this branch as version 0.2.0
  • Merge branch

What do you think? Any changes that you'd make?

I'm also not sure what would happen if we set administrate-field-image dependent on "administrate", "~> 0.2.0.rc1". Do you know how the ~> operator treats release candidate versions?

Thanks for your help!

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.
@c-lliope c-lliope force-pushed the gw-extract-image branch 2 times, most recently from 1fb82f8 to 0e78203 Compare April 21, 2016 00:15
@c-lliope
Copy link
Contributor Author

From http://guides.rubygems.org/patterns/#pessimistic-version-constraint:

Using ~> with prerelease versions will restrict you to prerelease versions only.

Problem:

This repository contains both the administrate gem
and the demo application.
The demo application uses the image field,
which means that its Gemfile will be dependent on the new
administrate-field-image gem.

In turn, the administrate-field-image gem
is dependent on the administrate gem in this repository.
This creates a little bit of a chicken-and-egg problem
for publishing both of those gems.

Solution:

Our release plan is as follows:

- Release this branch as a new version of the administrate gem,
  as version `0.2.0.rc1`
- Make administrate-field-image dependent on
  `"administrate", "0.2.0.rc1", "~> 0.2.0"`
- Release administrate-field-image v `0.0.1`
- Make the demo app's Gemfile dependent on
  `"administrate-field-image", "~> 0.0"`
- Re-push this branch to Github to run CircleCI suite. All of the gems
  would be available on rubygems.org, so the suite should pass.
- Update and release this branch as version `0.2.0`
- Merge branch
@c-lliope c-lliope closed this Apr 21, 2016
@c-lliope c-lliope deleted the gw-extract-image branch April 21, 2016 01:46
@c-lliope c-lliope merged commit 53457a6 into master Apr 21, 2016
@roman-kiselenko roman-kiselenko mentioned this pull request May 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant