migrant 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,6 +2,7 @@ source :gemcutter
2
2
 
3
3
  gem "rails", ">= 3.0.0"
4
4
  gem "faker"
5
+ gem "term-ansicolor"
5
6
 
6
7
  group :development do
7
8
  gem "thoughtbot-shoulda"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.1
@@ -5,12 +5,20 @@ module DataType
5
5
  {:type => :boolean}
6
6
  end
7
7
 
8
+ def mock
9
+ self.class.default_mock
10
+ end
11
+
8
12
  def self.default_mock
9
13
  true
10
14
  end
11
15
  end
12
16
 
13
- class FalseClass < TrueClass; end;
17
+ class FalseClass < TrueClass
18
+ def self.default_mock
19
+ false
20
+ end
21
+ end
14
22
 
15
23
  # Datetime
16
24
  class Date < Base
@@ -126,11 +126,16 @@ module Migrant
126
126
  self.instance_eval(&block)
127
127
  end
128
128
 
129
+ # Provides a method for dynamically creating fields (i.e. not part of instance_eval)
130
+ def property(*arguments)
131
+ method_missing(*arguments)
132
+ end
133
+
129
134
  def method_missing(*args, &block)
130
135
  field = args.slice!(0)
131
136
  data_type = args.slice!(0) unless args.first.nil? || args.first.respond_to?(:keys)
132
137
 
133
- @binding.add_field(field, data_type, args.extract_options!)
138
+ @binding.add_field(field.to_sym, data_type, args.extract_options!)
134
139
  end
135
140
  end
136
141
  end
data/migrant.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{migrant}
8
- s.version = "1.2.0"
8
+ s.version = "1.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Pascal Houliston"]
12
- s.date = %q{2011-04-23}
12
+ s.date = %q{2011-05-04}
13
13
  s.description = %q{Easier schema management for Rails that compliments your domain model.}
14
14
  s.email = %q{101pascal@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -157,6 +157,7 @@ Gem::Specification.new do |s|
157
157
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
158
158
  s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
159
159
  s.add_runtime_dependency(%q<faker>, [">= 0"])
160
+ s.add_runtime_dependency(%q<term-ansicolor>, [">= 0"])
160
161
  s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
161
162
  s.add_development_dependency(%q<ansi>, [">= 0"])
162
163
  s.add_development_dependency(%q<jeweler>, [">= 0"])
@@ -168,6 +169,7 @@ Gem::Specification.new do |s|
168
169
  else
169
170
  s.add_dependency(%q<rails>, [">= 3.0.0"])
170
171
  s.add_dependency(%q<faker>, [">= 0"])
172
+ s.add_dependency(%q<term-ansicolor>, [">= 0"])
171
173
  s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
172
174
  s.add_dependency(%q<ansi>, [">= 0"])
173
175
  s.add_dependency(%q<jeweler>, [">= 0"])
@@ -180,6 +182,7 @@ Gem::Specification.new do |s|
180
182
  else
181
183
  s.add_dependency(%q<rails>, [">= 3.0.0"])
182
184
  s.add_dependency(%q<faker>, [">= 0"])
185
+ s.add_dependency(%q<term-ansicolor>, [">= 0"])
183
186
  s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
184
187
  s.add_dependency(%q<ansi>, [">= 0"])
185
188
  s.add_dependency(%q<jeweler>, [">= 0"])
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: migrant
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
5
4
  prerelease:
6
- segments:
7
- - 1
8
- - 2
9
- - 0
10
- version: 1.2.0
5
+ version: 1.2.1
11
6
  platform: ruby
12
7
  authors:
13
8
  - Pascal Houliston
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-04-23 00:00:00 +00:00
13
+ date: 2011-05-04 00:00:00 +02:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
@@ -25,14 +20,9 @@ dependencies:
25
20
  requirements:
26
21
  - - ">="
27
22
  - !ruby/object:Gem::Version
28
- hash: 7
29
- segments:
30
- - 3
31
- - 0
32
- - 0
33
23
  version: 3.0.0
34
- prerelease: false
35
24
  type: :runtime
25
+ prerelease: false
36
26
  version_requirements: *id001
37
27
  - !ruby/object:Gem::Dependency
38
28
  name: faker
@@ -41,125 +31,109 @@ dependencies:
41
31
  requirements:
42
32
  - - ">="
43
33
  - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 0
47
34
  version: "0"
48
- prerelease: false
49
35
  type: :runtime
36
+ prerelease: false
50
37
  version_requirements: *id002
51
38
  - !ruby/object:Gem::Dependency
52
- name: thoughtbot-shoulda
39
+ name: term-ansicolor
53
40
  requirement: &id003 !ruby/object:Gem::Requirement
54
41
  none: false
55
42
  requirements:
56
43
  - - ">="
57
44
  - !ruby/object:Gem::Version
58
- hash: 3
59
- segments:
60
- - 0
61
45
  version: "0"
46
+ type: :runtime
62
47
  prerelease: false
63
- type: :development
64
48
  version_requirements: *id003
65
49
  - !ruby/object:Gem::Dependency
66
- name: ansi
50
+ name: thoughtbot-shoulda
67
51
  requirement: &id004 !ruby/object:Gem::Requirement
68
52
  none: false
69
53
  requirements:
70
54
  - - ">="
71
55
  - !ruby/object:Gem::Version
72
- hash: 3
73
- segments:
74
- - 0
75
56
  version: "0"
76
- prerelease: false
77
57
  type: :development
58
+ prerelease: false
78
59
  version_requirements: *id004
79
60
  - !ruby/object:Gem::Dependency
80
- name: jeweler
61
+ name: ansi
81
62
  requirement: &id005 !ruby/object:Gem::Requirement
82
63
  none: false
83
64
  requirements:
84
65
  - - ">="
85
66
  - !ruby/object:Gem::Version
86
- hash: 3
87
- segments:
88
- - 0
89
67
  version: "0"
90
- prerelease: false
91
68
  type: :development
69
+ prerelease: false
92
70
  version_requirements: *id005
93
71
  - !ruby/object:Gem::Dependency
94
- name: turn
72
+ name: jeweler
95
73
  requirement: &id006 !ruby/object:Gem::Requirement
96
74
  none: false
97
75
  requirements:
98
76
  - - ">="
99
77
  - !ruby/object:Gem::Version
100
- hash: 3
101
- segments:
102
- - 0
103
78
  version: "0"
104
- prerelease: false
105
79
  type: :development
80
+ prerelease: false
106
81
  version_requirements: *id006
107
82
  - !ruby/object:Gem::Dependency
108
- name: sqlite3
83
+ name: turn
109
84
  requirement: &id007 !ruby/object:Gem::Requirement
110
85
  none: false
111
86
  requirements:
112
87
  - - ">="
113
88
  - !ruby/object:Gem::Version
114
- hash: 3
115
- segments:
116
- - 0
117
89
  version: "0"
118
- prerelease: false
119
90
  type: :development
91
+ prerelease: false
120
92
  version_requirements: *id007
121
93
  - !ruby/object:Gem::Dependency
122
- name: simplecov
94
+ name: sqlite3
123
95
  requirement: &id008 !ruby/object:Gem::Requirement
124
96
  none: false
125
97
  requirements:
126
98
  - - ">="
127
99
  - !ruby/object:Gem::Version
128
- hash: 3
129
- segments:
130
- - 0
131
100
  version: "0"
132
- prerelease: false
133
101
  type: :development
102
+ prerelease: false
134
103
  version_requirements: *id008
135
104
  - !ruby/object:Gem::Dependency
136
- name: terminal-table
105
+ name: simplecov
137
106
  requirement: &id009 !ruby/object:Gem::Requirement
138
107
  none: false
139
108
  requirements:
140
109
  - - ">="
141
110
  - !ruby/object:Gem::Version
142
- hash: 3
143
- segments:
144
- - 0
145
111
  version: "0"
146
- prerelease: false
147
112
  type: :development
113
+ prerelease: false
148
114
  version_requirements: *id009
149
115
  - !ruby/object:Gem::Dependency
150
- name: term-ansicolor
116
+ name: terminal-table
151
117
  requirement: &id010 !ruby/object:Gem::Requirement
152
118
  none: false
153
119
  requirements:
154
120
  - - ">="
155
121
  - !ruby/object:Gem::Version
156
- hash: 3
157
- segments:
158
- - 0
159
122
  version: "0"
160
- prerelease: false
161
123
  type: :development
124
+ prerelease: false
162
125
  version_requirements: *id010
126
+ - !ruby/object:Gem::Dependency
127
+ name: term-ansicolor
128
+ requirement: &id011 !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: "0"
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: *id011
163
137
  description: Easier schema management for Rails that compliments your domain model.
164
138
  email: 101pascal@gmail.com
165
139
  executables: []
@@ -266,7 +240,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
266
240
  requirements:
267
241
  - - ">="
268
242
  - !ruby/object:Gem::Version
269
- hash: 3
243
+ hash: 921409729
270
244
  segments:
271
245
  - 0
272
246
  version: "0"
@@ -275,9 +249,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
275
249
  requirements:
276
250
  - - ">="
277
251
  - !ruby/object:Gem::Version
278
- hash: 3
279
- segments:
280
- - 0
281
252
  version: "0"
282
253
  requirements: []
283
254