Hi Ruben, thanks for acts_as_opengraph! We've been using it for gively.com, which is running on Rails 3.1.
I noticed some deprecation warnings originating in acts_as_opengraph. Specifically, class_inheritable_attribute and its related methods are due to be removed in a future version of Rails, and replacing them with class_attribute is recommended. I've made a small patch for acts_as_opengraph to do just that.
(Note that this patch will break compatibility with Rails versions below 3.0 - I'm not sure if that is important to you; if it is, we can probably use a respond_to? check to keep that compatibility.)
I wanted to make sure this didn't break anything, so I tried running the unit test suite, but along the way I found some problems:
the gemspec didn't declare its dependency on rails, so the unit tests didn't load it
GENERATED_META_TAGS in the test suite was not escaping URL characters as the helper does, so the test that compares those strings was failing
there was a typo in one of the property names
I fixed those, and I also added a rake/testtask so you can just run bundle exec rake test from the command line.
Hi Ruben, thanks for acts_as_opengraph! We've been using it for gively.com, which is running on Rails 3.1.
I noticed some deprecation warnings originating in acts_as_opengraph. Specifically,
class_inheritable_attribute
and its related methods are due to be removed in a future version of Rails, and replacing them withclass_attribute
is recommended. I've made a small patch for acts_as_opengraph to do just that.(Note that this patch will break compatibility with Rails versions below 3.0 - I'm not sure if that is important to you; if it is, we can probably use a
respond_to?
check to keep that compatibility.)I wanted to make sure this didn't break anything, so I tried running the unit test suite, but along the way I found some problems:
GENERATED_META_TAGS
in the test suite was not escaping URL characters as the helper does, so the test that compares those strings was failingI fixed those, and I also added a rake/testtask so you can just run
bundle exec rake test
from the command line.