hobofields 1.0.3 → 1.1.0.pre0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -3,11 +3,7 @@ require 'active_record'
3
3
  ActiveRecord::ActiveRecordError # hack for https://rails.lighthouseapp.com/projects/8994/tickets/2577-when-using-activerecordassociations-outside-of-rails-a-nameerror-is-thrown
4
4
 
5
5
  RUBY = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']).sub(/.*\s.*/m, '"\&"')
6
- if defined?(Bundler)
7
- RUBYDOCTEST = 'bundle exec rubydoctest'
8
- else
9
- RUBYDOCTEST = ENV['RUBYDOCTEST'] || "#{RUBY} -S rubydoctest"
10
- end
6
+ RUBYDOCTEST = ENV['RUBYDOCTEST'] || "#{RUBY} -S rubydoctest"
11
7
 
12
8
  $:.unshift File.join(File.expand_path(File.dirname(__FILE__)), '/../hobofields/lib')
13
9
  $:.unshift File.join(File.expand_path(File.dirname(__FILE__)), '/../hobosupport/lib')
@@ -38,7 +34,10 @@ Jeweler::Tasks.new do |gemspec|
38
34
  gemspec.homepage = "http://hobocentral.net/"
39
35
  gemspec.authors = ["Tom Locke"]
40
36
  gemspec.rubyforge_project = "hobo"
41
- gemspec.add_dependency("rails", [">= 2.2.2", "< 3.0.0"])
37
+ gemspec.add_dependency("rails", [">= 2.2.2"])
42
38
  gemspec.add_dependency("hobosupport", ["= #{HoboFields::VERSION}"])
43
39
  end
44
40
  Jeweler::GemcutterTasks.new
41
+ Jeweler::RubyforgeTasks.new do |rubyforge|
42
+ rubyforge.doc_task = false
43
+ end
@@ -82,7 +82,7 @@ module HoboFields
82
82
  COLUMN_TYPE = :string
83
83
 
84
84
  def initialize(value)
85
- super(self.class.detranslated_values.nil? ? value: (self.class.detranslated_values[value.to_s] || value))
85
+ super(self.class.detranslated_values.nil? ? value : self.class.detranslated_values[value.to_s])
86
86
  end
87
87
 
88
88
  def validate
@@ -60,6 +60,10 @@ module HoboFields
60
60
  def default
61
61
  options[:default]
62
62
  end
63
+
64
+ def comment
65
+ options[:comment]
66
+ end
63
67
 
64
68
  def same_type?(col_spec)
65
69
  t = sql_type
@@ -74,6 +78,16 @@ module HoboFields
74
78
 
75
79
  def different_to?(col_spec)
76
80
  !same_type?(col_spec) ||
81
+ # we should be able to use col_spec.comment, but col_spec has
82
+ # a nil table_name for some strange reason.
83
+ begin
84
+ if model.table_exists?
85
+ col_comment = ActiveRecord::Base.try.column_comment(col_spec.name, model.table_name)
86
+ col_comment != nil && col_comment != comment
87
+ else
88
+ false
89
+ end
90
+ end ||
77
91
  begin
78
92
  check_attributes = [:null, :default]
79
93
  check_attributes += [:precision, :scale] if sql_type == :decimal && !col_spec.is_a?(SQLITE_COLUMN_CLASS) # remove when rails fixes https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2872
@@ -335,6 +335,7 @@ module HoboFields
335
335
  change_spec[:scale] = spec.scale unless spec.scale.nil?
336
336
  change_spec[:null] = spec.null unless spec.null && col.null
337
337
  change_spec[:default] = spec.default unless spec.default.nil? && col.default.nil?
338
+ change_spec[:comment] = spec.comment unless spec.comment.nil? && col.try.comment.nil?
338
339
 
339
340
  changes << "change_column :#{new_table_name}, :#{c}, " +
340
341
  ([":#{spec.sql_type}"] + format_options(change_spec, spec.sql_type, true)).join(", ")
@@ -22,17 +22,13 @@ module HoboFields
22
22
  inheriting_cattr_reader :index_specs => []
23
23
  inheriting_cattr_reader :ignore_indexes => []
24
24
 
25
- # eval avoids the ruby 1.9.2 "super from singleton method ..." error
26
- # see LH#840
27
- eval %(
28
- def self.inherited(klass)
29
- fields do |f|
30
- f.field(inheritance_column, :string)
31
- end
32
- index(inheritance_column)
33
- super
25
+ def self.inherited(klass)
26
+ fields do |f|
27
+ f.field(inheritance_column, :string)
34
28
  end
35
- )
29
+ index(inheritance_column)
30
+ super
31
+ end
36
32
 
37
33
  def self.index(fields, options = {})
38
34
  # don't double-index fields
@@ -87,20 +83,22 @@ module HoboFields
87
83
  def self.belongs_to_with_field_declarations(name, options={}, &block)
88
84
  column_options = {}
89
85
  column_options[:null] = options.delete(:null) if options.has_key?(:null)
86
+ column_options[:comment] = options.delete(:comment) if options.has_key?(:comment)
90
87
 
91
88
  index_options = {}
92
89
  index_options[:name] = options.delete(:index) if options.has_key?(:index)
93
- bt = belongs_to_without_field_declarations(name, options, &block)
94
- refl = reflections[name.to_sym]
95
- fkey = refl.primary_key_name
96
- declare_field(fkey.to_sym, :integer, column_options)
97
- if refl.options[:polymorphic]
98
- declare_polymorphic_type_field(name, column_options)
99
- index(["#{name}_type", fkey], index_options) if index_options[:name]!=false
100
- else
101
- index(fkey, index_options) if index_options[:name]!=false
90
+
91
+ returning belongs_to_without_field_declarations(name, options, &block) do
92
+ refl = reflections[name.to_sym]
93
+ fkey = refl.primary_key_name
94
+ declare_field(fkey.to_sym, :integer, column_options)
95
+ if refl.options[:polymorphic]
96
+ declare_polymorphic_type_field(name, column_options)
97
+ index(["#{name}_type", fkey], index_options) if index_options[:name]!=false
98
+ else
99
+ index(fkey, index_options) if index_options[:name]!=false
100
+ end
102
101
  end
103
- bt
104
102
  end
105
103
  class << self
106
104
  alias_method_chain :belongs_to, :field_declarations
@@ -5,7 +5,7 @@ module HoboFields
5
5
  COLUMN_TYPE = :text
6
6
 
7
7
  def self.declared(model, name, options)
8
- model.serialize name, options.delete(:class) || Object
8
+ model.serialize name, options.delete(:class)
9
9
  end
10
10
 
11
11
  HoboFields.register_type(:serialized, self)
data/lib/hobo_fields.rb CHANGED
@@ -1,10 +1,6 @@
1
1
  require 'hobosupport'
2
2
 
3
- if ActiveSupport::Dependencies.respond_to?(:autoload_paths)
4
- ActiveSupport::Dependencies.autoload_paths |= [ File.dirname(__FILE__)]
5
- else
6
- ActiveSupport::Dependencies.load_paths |= [ File.dirname(__FILE__)]
7
- end
3
+ ActiveSupport::Dependencies.load_paths |= [ File.dirname(__FILE__) ]
8
4
 
9
5
  module Hobo
10
6
  # Empty class to represent the boolean type.
@@ -13,7 +9,7 @@ end
13
9
 
14
10
  module HoboFields
15
11
 
16
- VERSION = "1.0.3"
12
+ VERSION = "1.1.0.pre0"
17
13
 
18
14
  extend self
19
15
 
@@ -68,27 +64,12 @@ module HoboFields
68
64
  end
69
65
 
70
66
 
71
- if Object.instance_method(:initialize).arity!=0
72
- # version for Ruby 1.9.
73
- def can_wrap?(type, val)
74
- col_type = type::COLUMN_TYPE
75
- return false if val.blank? && (col_type == :integer || col_type == :float || col_type == :decimal)
76
- klass = Object.instance_method(:class).bind(val).call # Make sure we get the *real* class
77
- init_method = type.instance_method(:initialize)
78
- [-1,1].include?(init_method.arity) &&
79
- init_method.owner != Object.instance_method(:initialize).owner &&
80
- !@never_wrap_types.any? { |c| klass <= c }
81
- end
82
- else
83
- # Ruby 1.8. 1.8.6 doesn't include Method#owner. 1.8.7 could use
84
- # the 1.9 function, but this one is faster.
85
- def can_wrap?(type, val)
86
- col_type = type::COLUMN_TYPE
87
- return false if val.blank? && (col_type == :integer || col_type == :float || col_type == :decimal)
88
- klass = Object.instance_method(:class).bind(val).call # Make sure we get the *real* class
89
- init_method = type.instance_method(:initialize)
90
- [-1,1].include?(init_method.arity) && !@never_wrap_types.any? { |c| klass <= c }
91
- end
67
+ def can_wrap?(type, val)
68
+ col_type = type::COLUMN_TYPE
69
+ return false if val.blank? && (col_type == :integer || col_type == :float || col_type == :decimal)
70
+ klass = Object.instance_method(:class).bind(val).call # Make sure we get the *real* class
71
+ arity = type.instance_method(:initialize).arity
72
+ (arity == 1 || arity == -1) && !@never_wrap_types.any? { |c| klass <= c }
92
73
  end
93
74
 
94
75
 
@@ -124,11 +105,7 @@ module HoboFields
124
105
  if defined?(::Rails)
125
106
  plugins = Rails.configuration.plugin_loader.new(HoboFields.rails_initializer).plugins
126
107
  ([::Rails.root] + plugins.map(&:directory)).each do |dir|
127
- if ActiveSupport::Dependencies.respond_to?(:autoload_paths)
128
- ActiveSupport::Dependencies.autoload_paths << File.join(dir, 'app', 'rich_types')
129
- else
130
- ActiveSupport::Dependencies.load_paths << File.join(dir, 'app', 'rich_types')
131
- end
108
+ ActiveSupport::Dependencies.load_paths << File.join(dir, 'app', 'rich_types')
132
109
  Dir[File.join(dir, 'app', 'rich_types', '*.rb')].each do |f|
133
110
  # TODO: should we complain if field_types doesn't get a new value? Might be useful to warn people if they're missing a register_type
134
111
  require_dependency f
@@ -169,7 +169,7 @@ In your HoboFields models you can also give type information to "virtual fields"
169
169
 
170
170
  ## Field validations
171
171
 
172
- HoboFields gives you some shorthands for declaring some common validations right in the field declaration. HoboFields also supports all of the options supported by the [Rails column declaration](http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html#method-i-column)
172
+ HoboFields gives you some shorthands for declaring some common validations right in the field declaration
173
173
 
174
174
  ### Required fields
175
175
 
@@ -105,7 +105,6 @@ We'll define a method to make that easier next time
105
105
  >>
106
106
  def migrate(renames={})
107
107
  up, down = HoboFields::MigrationGenerator.run(renames)
108
- puts up
109
108
  ActiveRecord::Migration.class_eval(up)
110
109
  ActiveRecord::Base.send(:subclasses).each { |model| model.reset_column_information }
111
110
  [up, down]
@@ -666,8 +665,70 @@ HoboFields has some support for legacy keys.
666
665
  =>
667
666
  "rename_column :adverts, :id, :advert_id
668
667
 
668
+ >> nuke_model_class(Advert)
669
+ >> nuke_model_class(Ad)
670
+ >> ActiveRecord::Base.connection.execute "drop table `adverts`;"
671
+ {.hidden}
672
+
673
+
674
+ ## Comments
675
+
676
+ Comments can be added to tables and fields with HoboFields.
677
+
678
+ >>
679
+ class Product < ActiveRecord::Base
680
+ fields do
681
+ name :string, :comment => "short name"
682
+ description :string
683
+ end
684
+ end
685
+ >> up, down = HoboFields::MigrationGenerator.run
686
+ >> up
687
+ =>
688
+ 'create_table :products do |t|
689
+ t.string :name, :comment => "short name"
690
+ t.string :description
691
+ end'
692
+ >> migrate
693
+
694
+ These comments will be saved to your schema if you have the [column_comments](http://github.com/bryanlarsen/column_comments) plugin installed. If you do not have this plugin installed, the comments will be available by querying `field_specs`:
695
+
696
+ >> Product.field_specs["name"].comment
697
+ => "short name"
698
+
699
+ The plugin [activerecord-comments](http://github.com/bryanlarsen/activerecord-comments) may be used to get the comments from the database directly. If the plugin is installed, use this instead:
700
+
701
+ Product.column("name").comment
702
+
703
+ Because it will be quite common for people not to have both [column_comments](http://github.com/bryanlarsen/column_comments) and [activerecord-comments](http://github.com/bryanlarsen/activerecord-comments) installed, it is impossible for HoboFields to determine the difference between no previous comment and a previously missing plugin. Therefore, HoboFields will not generate a migration if the only change was to add a comment. HoboFields will generate a migration for a comment change, but only if the plugin is installed.
704
+
705
+ >> require 'activerecord-comments'
706
+
707
+ >> # manually add comment as the column_comments plugin would
708
+ >> Product.connection.execute "alter table `products` modify `name` varchar(255) default null comment 'short name';"
709
+
710
+ >>
711
+ class Product < ActiveRecord::Base
712
+ fields do
713
+ name :string, :comment => "Short namex"
714
+ description :string, :comment => "Long name"
715
+ end
716
+ end
717
+ >> up, down = HoboFields::MigrationGenerator.run
718
+ >> up
719
+ => "change_column :products, :name, :string, :limit => 255, :comment => \"Short namex\""
720
+
721
+
669
722
  Cleanup
723
+ {.hidden}
724
+
725
+ >> nuke_model_class(Product)
726
+ >> ActiveRecord::Base.connection.execute "drop table `products`;"
727
+ {.hidden}
728
+
729
+ Final Cleanup
670
730
  {.hidden}
671
731
 
672
732
  >> system "mysqladmin #{mysql_login} --force drop #{mysql_database} 2> /dev/null"
673
733
  {.hidden}
734
+
@@ -42,7 +42,6 @@ We'll define a method to make that easier next time
42
42
  >>
43
43
  def migrate(renames={})
44
44
  up, down = HoboFields::MigrationGenerator.run(renames)
45
- puts up
46
45
  ActiveRecord::Migration.class_eval(up)
47
46
  ActiveRecord::Base.send(:subclasses).each { |model| model.reset_column_information }
48
47
  [up, down]
@@ -23,9 +23,9 @@ though we don't need it for this test:
23
23
  >> mysql_database = "hobofields_doctest"
24
24
  >> system "mysqladmin #{mysql_login} --force drop #{mysql_database} 2> /dev/null"
25
25
  >> system("mysqladmin #{mysql_login} create #{mysql_database}") or raise "could not create database"
26
- >> ActiveRecord::Base.establish_connection(:adapter => mysql_adapter,
26
+ >> ActiveRecord::Base.establish_connection(:adapter => "mysql",
27
27
  :database => mysql_database,
28
- :host => "localhost", :username => mysql_user, :password => mysql_password)
28
+ :host => "localhost", :user => mysql_user, :password => mysql_password)
29
29
  {.hidden}
30
30
 
31
31
  Some load path manipulation you shouldn't need:
@@ -165,52 +165,8 @@ Provides validation of correct email address format.
165
165
 
166
166
  ### `HoboFields::PasswordString`
167
167
 
168
- `HoboFields::PasswordString` provides a simple `to_html` to prevent
169
- accidental display of a password. It simply returns "`[password
170
- hidden]`". The type is also used to indicate the need for an `<input
171
- type='password'>`
168
+ `HoboFields::PasswordString` provides a simple `to_html` to prevent accidental display of a password. It simply returns "`[password hidden]`". The type is also used to indicate the need for an `<input type='password'>`
172
169
 
173
- ### `HoboFields::Serialized`
174
-
175
- This type lets you store an arbitrary object as serialized text into
176
- the database column. You can optionally pass the :class option to
177
- restrict the column type.
178
-
179
- >>
180
- def migrate(renames={})
181
- up, down = HoboFields::MigrationGenerator.run(renames)
182
- ActiveRecord::Migration.class_eval(up)
183
- ActiveRecord::Base.send(:subclasses).each { |model| model.reset_column_information }
184
- [up, down]
185
- end
186
- {.hidden}
187
-
188
- >>
189
- class Vault1 < ActiveRecord::Base
190
- fields do
191
- content :serialized
192
- end
193
- end
194
-
195
- >> migrate
196
- >> Vault1.create!(:content => {:key => "in Vault"})
197
- >> Vault1.first.content
198
- => {:key => "in Vault"}
199
-
200
- >>
201
- class Vault2 < ActiveRecord::Base
202
- fields do
203
- content :serialized, :class => Hash
204
- end
205
- end
206
-
207
- >> migrate
208
- >> Vault2.create!(:content => {:key => "in Vault"})
209
- >> Vault2.first.content
210
- => {:key => "in Vault"}
211
- >> Vault2.create!(:content => 17) rescue ActiveRecord::SerializationTypeMismatch
212
- >> Vault2.all.size
213
- => 1 # second record not created because of type mismatch
214
170
 
215
171
  ## Enum Strings
216
172
 
@@ -4,7 +4,7 @@ require 'rails_generator'
4
4
  # we get a SystemStackError on JRuby
5
5
  exit(0) if defined? JRUBY_VERSION
6
6
 
7
- require "./#{File.join(File.dirname(__FILE__), 'test_generator_helper.rb')}"
7
+ require File.join(File.dirname(__FILE__), "test_generator_helper.rb")
8
8
 
9
9
  class TestHobofieldModelGenerator < Test::Unit::TestCase
10
10
  include RubiGen::GeneratorTestHelper
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobofields
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
5
- prerelease:
4
+ hash: -1876988165
5
+ prerelease: true
6
6
  segments:
7
7
  - 1
8
+ - 1
8
9
  - 0
9
- - 3
10
- version: 1.0.3
10
+ - pre0
11
+ version: 1.1.0.pre0
11
12
  platform: ruby
12
13
  authors:
13
14
  - Tom Locke
@@ -15,7 +16,7 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2011-02-25 00:00:00 -05:00
19
+ date: 2010-11-12 00:00:00 -05:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
@@ -32,14 +33,6 @@ dependencies:
32
33
  - 2
33
34
  - 2
34
35
  version: 2.2.2
35
- - - <
36
- - !ruby/object:Gem::Version
37
- hash: 7
38
- segments:
39
- - 3
40
- - 0
41
- - 0
42
- version: 3.0.0
43
36
  type: :runtime
44
37
  version_requirements: *id001
45
38
  - !ruby/object:Gem::Dependency
@@ -50,12 +43,13 @@ dependencies:
50
43
  requirements:
51
44
  - - "="
52
45
  - !ruby/object:Gem::Version
53
- hash: 17
46
+ hash: -1876988165
54
47
  segments:
55
48
  - 1
49
+ - 1
56
50
  - 0
57
- - 3
58
- version: 1.0.3
51
+ - pre0
52
+ version: 1.1.0.pre0
59
53
  type: :runtime
60
54
  version_requirements: *id002
61
55
  description:
@@ -71,7 +65,6 @@ files:
71
65
  - LICENSE.txt
72
66
  - README.txt
73
67
  - Rakefile
74
- - hobofields.gemspec
75
68
  - lib/hobo_fields.rb
76
69
  - lib/hobo_fields/email_address.rb
77
70
  - lib/hobo_fields/enum_string.rb
@@ -115,8 +108,8 @@ homepage: http://hobocentral.net/
115
108
  licenses: []
116
109
 
117
110
  post_install_message:
118
- rdoc_options: []
119
-
111
+ rdoc_options:
112
+ - --charset=UTF-8
120
113
  require_paths:
121
114
  - lib
122
115
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -131,16 +124,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
124
  required_rubygems_version: !ruby/object:Gem::Requirement
132
125
  none: false
133
126
  requirements:
134
- - - ">="
127
+ - - ">"
135
128
  - !ruby/object:Gem::Version
136
- hash: 3
129
+ hash: 25
137
130
  segments:
138
- - 0
139
- version: "0"
131
+ - 1
132
+ - 3
133
+ - 1
134
+ version: 1.3.1
140
135
  requirements: []
141
136
 
142
137
  rubyforge_project: hobo
143
- rubygems_version: 1.4.2
138
+ rubygems_version: 1.3.7
144
139
  signing_key:
145
140
  specification_version: 3
146
141
  summary: Rich field types and migration generator for Rails
data/hobofields.gemspec DELETED
@@ -1,80 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{hobofields}
8
- s.version = "1.0.3"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Tom Locke"]
12
- s.date = %q{2011-02-25}
13
- s.email = %q{tom@tomlocke.com}
14
- s.files = [
15
- "CHANGES.txt",
16
- "LICENSE.txt",
17
- "README.txt",
18
- "Rakefile",
19
- "hobofields.gemspec",
20
- "lib/hobo_fields.rb",
21
- "lib/hobo_fields/email_address.rb",
22
- "lib/hobo_fields/enum_string.rb",
23
- "lib/hobo_fields/field_declaration_dsl.rb",
24
- "lib/hobo_fields/field_spec.rb",
25
- "lib/hobo_fields/fields_declaration.rb",
26
- "lib/hobo_fields/html_string.rb",
27
- "lib/hobo_fields/index_spec.rb",
28
- "lib/hobo_fields/lifecycle_state.rb",
29
- "lib/hobo_fields/markdown_string.rb",
30
- "lib/hobo_fields/migration_generator.rb",
31
- "lib/hobo_fields/model_extensions.rb",
32
- "lib/hobo_fields/password_string.rb",
33
- "lib/hobo_fields/raw_html_string.rb",
34
- "lib/hobo_fields/raw_markdown_string.rb",
35
- "lib/hobo_fields/sanitize_html.rb",
36
- "lib/hobo_fields/serialized_object.rb",
37
- "lib/hobo_fields/text.rb",
38
- "lib/hobo_fields/textile_string.rb",
39
- "lib/hobofields.rb",
40
- "rails/init.rb",
41
- "rails_generators/hobo_migration/USAGE",
42
- "rails_generators/hobo_migration/hobo_migration_generator.rb",
43
- "rails_generators/hobo_migration/templates/migration.rb",
44
- "rails_generators/hobofield_model/USAGE",
45
- "rails_generators/hobofield_model/hobofield_model_generator.rb",
46
- "rails_generators/hobofield_model/templates/fixtures.yml.erb",
47
- "rails_generators/hobofield_model/templates/model.rb.erb",
48
- "rails_generators/hobofield_model/templates/test.rb.erb",
49
- "script/destroy",
50
- "script/generate",
51
- "test/hobofields.rdoctest",
52
- "test/hobofields_api.rdoctest",
53
- "test/migration_generator.rdoctest",
54
- "test/migration_generator_primary_key.rdoctest",
55
- "test/rich_types.rdoctest",
56
- "test/test_generator_helper.rb",
57
- "test/test_hobofield_model_generator.rb"
58
- ]
59
- s.homepage = %q{http://hobocentral.net/}
60
- s.require_paths = ["lib"]
61
- s.rubyforge_project = %q{hobo}
62
- s.rubygems_version = %q{1.4.2}
63
- s.summary = %q{Rich field types and migration generator for Rails}
64
-
65
- if s.respond_to? :specification_version then
66
- s.specification_version = 3
67
-
68
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
69
- s.add_runtime_dependency(%q<rails>, [">= 2.2.2", "< 3.0.0"])
70
- s.add_runtime_dependency(%q<hobosupport>, ["= 1.0.3"])
71
- else
72
- s.add_dependency(%q<rails>, [">= 2.2.2", "< 3.0.0"])
73
- s.add_dependency(%q<hobosupport>, ["= 1.0.3"])
74
- end
75
- else
76
- s.add_dependency(%q<rails>, [">= 2.2.2", "< 3.0.0"])
77
- s.add_dependency(%q<hobosupport>, ["= 1.0.3"])
78
- end
79
- end
80
-