Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Generated by jeweler | ||
# DO NOT EDIT THIS FILE DIRECTLY | ||
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' | ||
# -*- encoding: utf-8 -*- | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "has_enumeration" | ||
s.version = "1.0.2" | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | ||
s.authors = ["Greg Spurrier"] | ||
s.date = "2012-04-06" | ||
s.description = "Extends ActiveRecord with the has_enumeration method allowing a symbolic\nenumeration to be stored in an ActiveRecord attribute. The enumeration is\nspecified as a mapping between symbols and their underlying representation\nin the database. Predicates are provided for each symbol in the enumeration\nand the symbols may be used in finder methods. When using ActiveRecord 3,\nthe symbols may also be used when interacting with the underlying Arel attribute\nfor the enumeration. has_enumeration has been tested with Ruby 1.8.7,\nRuby 1.9.2, JRuby 1.5.5, Rubinius 1.1.0, ActiveRecord 2.3.10, and ActiveRecord\n3.0.3.\n" | ||
s.email = "greg@rujubu.com" | ||
s.extra_rdoc_files = [ | ||
"LICENSE.txt", | ||
"README.md" | ||
] | ||
s.files = [ | ||
"Gemfile", | ||
"HISTORY.txt", | ||
"LICENSE.txt", | ||
"README.md", | ||
"Rakefile", | ||
"TODO.md", | ||
"VERSION", | ||
"all_tests.sh", | ||
"features/arel_attributes.feature", | ||
"features/explicitly_mapped_enumeration.feature", | ||
"features/implicitly_mapped_enumeration.feature", | ||
"features/meta_where_queries.feature", | ||
"features/nonstandard_attribute_enumeration.feature", | ||
"features/step_definitions/has_enumeration_steps.rb", | ||
"features/support/env.rb", | ||
"features/support/explicitly_mapped_model.rb", | ||
"features/support/implicitly_mapped_model.rb", | ||
"features/support/nonstandard_attribute_model.rb", | ||
"install_gemsets.sh", | ||
"lib/has_enumeration.rb", | ||
"lib/has_enumeration/aggregate_conditions_override.rb", | ||
"lib/has_enumeration/arel/table_extensions.rb", | ||
"lib/has_enumeration/arel/table_extensions_arel_one.rb", | ||
"lib/has_enumeration/class_methods.rb", | ||
"spec/has_enumeration/has_enumeration_spec.rb", | ||
"spec/spec_helper.rb" | ||
] | ||
s.homepage = "http://github.com/gregspurrier/has_enumeration" | ||
s.require_paths = ["lib"] | ||
s.rubygems_version = "1.8.19" | ||
s.summary = "Support for symbol-based enumerations in ActiveRecord" | ||
|
||
if s.respond_to? :specification_version then | ||
s.specification_version = 3 | ||
|
||
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then | ||
s.add_runtime_dependency(%q<activerecord>, ["~> 3.2.0"]) | ||
s.add_runtime_dependency(%q<builder>, ["~> 3.0.0"]) | ||
s.add_development_dependency(%q<jeweler>, [">= 0"]) | ||
else | ||
s.add_dependency(%q<activerecord>, ["~> 3.2.0"]) | ||
s.add_dependency(%q<builder>, ["~> 3.0.0"]) | ||
s.add_dependency(%q<jeweler>, [">= 0"]) | ||
end | ||
else | ||
s.add_dependency(%q<activerecord>, ["~> 3.2.0"]) | ||
This comment has been minimized.
Sorry, something went wrong. |
||
s.add_dependency(%q<builder>, ["~> 3.0.0"]) | ||
s.add_dependency(%q<jeweler>, [">= 0"]) | ||
end | ||
end | ||
|
6 comments
on commit 7cae558
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were you adding the gemspec file on purpose for some reason, or was that an oversight? I can't remember whether I had a good reason for not putting it under source control earlier....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I prefer hand-crafting these gemspecs rather than generating them. The only pain point are the file lists, and you can use Dir.glob or something to marshall those. Just my 2 cents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the relative complexity of has_enumeration's Gemfile (environment-specific if/else stuff), it's not generating an accurate gemspec anyway. There's no real way to express conditional dependencies with gemspecs (even if you put conditions into your gemspec file, the gem it generates does not carry over that metadata). Bleh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposal: Fix the gemspec to require ActiveRecord >= 2.3.10 and leave it as is while we figure out what to do about stuff like meta_where. In addition, set up the Gemfile so that it will automatically determine all gem versions except for the ActiveRecord version. This is probably reasonable for development purposes, and we can exercise more control by editing the gemspec when we release a new version of the gem. I'll add a commit to this effect, and you guys can critique.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds reasonable.
I think it also would be reasonable to bump the version number and drop support for older versions of Rails (certainly at least 2.x) rather than trying to keep up all the backward compatibility.
All these AR dependencies need to be ">= 2.3.10" (or whatever the minimum-supported AR is)