hobofields 0.8 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ require 'echoe'
2
+
3
+ Echoe.new('hobofields') do |p|
4
+ p.author = "Tom Locke"
5
+ p.email = "tom@tomlocke.com"
6
+ p.summary = "Rich field types and migration generator for Rails"
7
+ p.url = "http://hobocentral.net/hobofields"
8
+ p.project = "hobo"
9
+
10
+ p.changelog = "CHANGES.txt"
11
+ p.version = "0.8.1"
12
+
13
+ p.dependencies = ['hobosupport >=0.8']
14
+ end
15
+
data/hobofields.gemspec CHANGED
@@ -1,56 +1,130 @@
1
1
 
2
- # Gem::Specification for Hobofields-0.8
2
+ # Gem::Specification for Hobofields-0.8.1
3
3
  # Originally generated by Echoe
4
4
 
5
- Gem::Specification.new do |s|
6
- s.name = %q{hobofields}
7
- s.version = "0.8"
5
+ --- !ruby/object:Gem::Specification
6
+ name: hobofields
7
+ version: !ruby/object:Gem::Version
8
+ version: 0.8.1
9
+ platform: ruby
10
+ authors:
11
+ - Tom Locke
12
+ autorequire:
13
+ bindir: bin
8
14
 
9
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
10
- s.authors = ["Tom Locke"]
11
- s.date = %q{2008-09-03}
12
- s.description = %q{Rich field types and migration generator for Rails}
13
- s.email = %q{tom@tomlocke.com}
14
- s.extra_rdoc_files = ["lib/hobo_fields/email_address.rb", "lib/hobo_fields/enum_string.rb", "lib/hobo_fields/field_declaration_dsl.rb", "lib/hobo_fields/field_spec.rb", "lib/hobo_fields/fields_declaration.rb", "lib/hobo_fields/html_string.rb", "lib/hobo_fields/markdown_string.rb", "lib/hobo_fields/migration_generator.rb", "lib/hobo_fields/model_extensions.rb", "lib/hobo_fields/password_string.rb", "lib/hobo_fields/text.rb", "lib/hobo_fields/textile_string.rb", "lib/hobo_fields.rb", "lib/hobofields.rb", "LICENSE.txt", "README.txt"]
15
- s.files = ["CHANGES.txt", "init.rb", "lib/hobo_fields/email_address.rb", "lib/hobo_fields/enum_string.rb", "lib/hobo_fields/field_declaration_dsl.rb", "lib/hobo_fields/field_spec.rb", "lib/hobo_fields/fields_declaration.rb", "lib/hobo_fields/html_string.rb", "lib/hobo_fields/markdown_string.rb", "lib/hobo_fields/migration_generator.rb", "lib/hobo_fields/model_extensions.rb", "lib/hobo_fields/password_string.rb", "lib/hobo_fields/text.rb", "lib/hobo_fields/textile_string.rb", "lib/hobo_fields.rb", "lib/hobofields.rb", "LICENSE.txt", "Manifest", "rails_generators/hobo_migration/hobo_migration_generator.rb", "rails_generators/hobo_migration/templates/migration.rb", "rails_generators/hobofield_model/hobofield_model_generator.rb", "rails_generators/hobofield_model/templates/fixtures.yml.erb", "rails_generators/hobofield_model/templates/model.rb.erb", "rails_generators/hobofield_model/templates/test.rb.erb", "rails_generators/hobofield_model/USAGE", "README.txt", "script/destroy", "script/generate", "test/hobofields.rdoctest", "test/hobofields_api.rdoctest", "test/migration_generator.rdoctest", "test/rich_types.rdoctest", "test/test_generator_helper.rb", "test/test_hobofield_model_generator.rb", "hobofields.gemspec"]
16
- s.has_rdoc = true
17
- s.homepage = %q{http://hobocentral.net/hobofields}
18
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Hobofields", "--main", "README.txt"]
19
- s.require_paths = ["lib"]
20
- s.rubyforge_project = %q{hobo}
21
- s.rubygems_version = %q{1.2.0}
22
- s.summary = %q{Rich field types and migration generator for Rails}
23
- s.test_files = ["test/test_generator_helper.rb", "test/test_hobofield_model_generator.rb"]
15
+ date: 2008-09-08 00:00:00 +01:00
16
+ default_executable:
17
+ dependencies:
18
+ - !ruby/object:Gem::Dependency
19
+ name: hobosupport
20
+ type: :runtime
21
+ version_requirement:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: "0.8"
27
+ version:
28
+ - !ruby/object:Gem::Dependency
29
+ name: echoe
30
+ type: :development
31
+ version_requirement:
32
+ version_requirements: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: "0"
37
+ version:
38
+ description: Rich field types and migration generator for Rails
39
+ email: tom@tomlocke.com
40
+ executables: []
24
41
 
25
- if s.respond_to? :specification_version then
26
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
27
- s.specification_version = 2
42
+ extensions: []
28
43
 
29
- if current_version >= 3 then
30
- s.add_runtime_dependency(%q<hobosupport>, [">= 0.8"])
31
- else
32
- s.add_dependency(%q<hobosupport>, [">= 0.8"])
33
- end
34
- else
35
- s.add_dependency(%q<hobosupport>, [">= 0.8"])
36
- end
37
- end
44
+ extra_rdoc_files:
45
+ - lib/hobo_fields/email_address.rb
46
+ - lib/hobo_fields/enum_string.rb
47
+ - lib/hobo_fields/field_declaration_dsl.rb
48
+ - lib/hobo_fields/field_spec.rb
49
+ - lib/hobo_fields/fields_declaration.rb
50
+ - lib/hobo_fields/html_string.rb
51
+ - lib/hobo_fields/markdown_string.rb
52
+ - lib/hobo_fields/migration_generator.rb
53
+ - lib/hobo_fields/model_extensions.rb
54
+ - lib/hobo_fields/password_string.rb
55
+ - lib/hobo_fields/text.rb
56
+ - lib/hobo_fields/textile_string.rb
57
+ - lib/hobo_fields.rb
58
+ - lib/hobofields.rb
59
+ - LICENSE.txt
60
+ - README.txt
61
+ files:
62
+ - CHANGES.txt
63
+ - init.rb
64
+ - lib/hobo_fields/email_address.rb
65
+ - lib/hobo_fields/enum_string.rb
66
+ - lib/hobo_fields/field_declaration_dsl.rb
67
+ - lib/hobo_fields/field_spec.rb
68
+ - lib/hobo_fields/fields_declaration.rb
69
+ - lib/hobo_fields/html_string.rb
70
+ - lib/hobo_fields/markdown_string.rb
71
+ - lib/hobo_fields/migration_generator.rb
72
+ - lib/hobo_fields/model_extensions.rb
73
+ - lib/hobo_fields/password_string.rb
74
+ - lib/hobo_fields/text.rb
75
+ - lib/hobo_fields/textile_string.rb
76
+ - lib/hobo_fields.rb
77
+ - lib/hobofields.rb
78
+ - LICENSE.txt
79
+ - Manifest
80
+ - rails_generators/hobo_migration/hobo_migration_generator.rb
81
+ - rails_generators/hobo_migration/templates/migration.rb
82
+ - rails_generators/hobofield_model/hobofield_model_generator.rb
83
+ - rails_generators/hobofield_model/templates/fixtures.yml.erb
84
+ - rails_generators/hobofield_model/templates/model.rb.erb
85
+ - rails_generators/hobofield_model/templates/test.rb.erb
86
+ - rails_generators/hobofield_model/USAGE
87
+ - README.txt
88
+ - script/destroy
89
+ - script/generate
90
+ - test/hobofields.rdoctest
91
+ - test/hobofields_api.rdoctest
92
+ - test/migration_generator.rdoctest
93
+ - test/rich_types.rdoctest
94
+ - test/test_generator_helper.rb
95
+ - test/test_hobofield_model_generator.rb
96
+ - hobofields.gemspec
97
+ - Rakefile
98
+ has_rdoc: true
99
+ homepage: http://hobocentral.net/hobofields
100
+ post_install_message:
101
+ rdoc_options:
102
+ - --line-numbers
103
+ - --inline-source
104
+ - --title
105
+ - Hobofields
106
+ - --main
107
+ - README.txt
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: "0"
115
+ version:
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - "="
119
+ - !ruby/object:Gem::Version
120
+ version: "1.2"
121
+ version:
122
+ requirements: []
38
123
 
39
-
40
- # # Original Rakefile source (requires the Echoe gem):
41
- #
42
- # require 'echoe'
43
- #
44
- # Echoe.new('hobofields') do |p|
45
- # p.author = "Tom Locke"
46
- # p.email = "tom@tomlocke.com"
47
- # p.summary = "Rich field types and migration generator for Rails"
48
- # p.url = "http://hobocentral.net/hobofields"
49
- # p.project = "hobo"
50
- #
51
- # p.changelog = "CHANGES.txt"
52
- # p.version = "0.8"
53
- #
54
- # p.dependencies = ['hobosupport >=0.8']
55
- # end
56
- #
124
+ rubyforge_project: hobo
125
+ rubygems_version: 1.2.0
126
+ specification_version: 2
127
+ summary: Rich field types and migration generator for Rails
128
+ test_files:
129
+ - test/test_generator_helper.rb
130
+ - test/test_hobofield_model_generator.rb
data/lib/hobo_fields.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'hobosupport'
2
2
 
3
- Dependencies.load_paths |= [ File.dirname(__FILE__) ]
3
+ (defined?(ActiveSupport::Dependencies) ? ActiveSupport::Dependencies : Dependencies).load_paths |= [ File.dirname(__FILE__) ]
4
4
 
5
5
  module Hobo
6
6
  # Empty class to represent the boolean type.
@@ -9,7 +9,7 @@ end
9
9
 
10
10
  module HoboFields
11
11
 
12
- VERSION = "0.8"
12
+ VERSION = "0.8.1"
13
13
 
14
14
  extend self
15
15
 
@@ -53,7 +53,7 @@ module HoboFields
53
53
  def self.fix_native_types(types)
54
54
  case connection.class.name
55
55
  when /mysql/i
56
- types[:integer][:limit] = 11
56
+ types[:integer][:limit] ||= 11
57
57
  end
58
58
  types
59
59
  end
@@ -45,7 +45,7 @@ class HoboMigrationGenerator < Rails::Generator::Base
45
45
  record {|m| }
46
46
  else
47
47
  puts "\nMigration filename:", "(you can type spaces instead of '_' -- every little helps)"
48
- migration_name = input("Filename [#@migration_name]:", /^[a-z0-9_ ]/).strip.gsub(' ', '_')
48
+ migration_name = input("Filename [#@migration_name]:", /^[a-z0-9_ ]*$/).strip.gsub(' ', '_')
49
49
  migration_name = @migration_name if migration_name.blank?
50
50
 
51
51
  at_exit { rake_migrate } if action == 'm'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobofields
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.8"
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Locke
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-03 00:00:00 +01:00
12
+ date: 2008-09-08 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -22,6 +22,16 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: "0.8"
24
24
  version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: echoe
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
25
35
  description: Rich field types and migration generator for Rails
26
36
  email: tom@tomlocke.com
27
37
  executables: []
@@ -81,6 +91,7 @@ files:
81
91
  - test/test_generator_helper.rb
82
92
  - test/test_hobofield_model_generator.rb
83
93
  - hobofields.gemspec
94
+ - Rakefile
84
95
  has_rdoc: true
85
96
  homepage: http://hobocentral.net/hobofields
86
97
  post_install_message:
@@ -101,9 +112,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
101
112
  version:
102
113
  required_rubygems_version: !ruby/object:Gem::Requirement
103
114
  requirements:
104
- - - ">="
115
+ - - "="
105
116
  - !ruby/object:Gem::Version
106
- version: "0"
117
+ version: "1.2"
107
118
  version:
108
119
  requirements: []
109
120