dmapper 0.1 → 0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
metadata CHANGED
@@ -1,46 +1,27 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: dmapper
3
- version: !ruby/object:Gem::Version
4
- hash: 9
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.2'
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- version: "0.1"
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Daniel Durante
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-07-02 00:00:00 -04:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: data_mapper
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
32
- type: :runtime
33
- version_requirements: *id001
12
+ date: 2011-07-04 00:00:00.000000000Z
13
+ dependencies: []
34
14
  description: Create models easily for DataMapper using the command line.
35
15
  email: officedebo@gmail.com
36
- executables:
16
+ executables:
37
17
  - dmap
38
18
  extensions: []
39
-
40
19
  extra_rdoc_files: []
41
-
42
- files:
20
+ files:
43
21
  - bin/dmap
22
+ - lib/dmap/associations/belongs_to.rb
23
+ - lib/dmap/associations/core.rb
24
+ - lib/dmap/associations/hasn.rb
44
25
  - lib/dmap/core.rb
45
26
  - lib/dmap/new.rb
46
27
  - lib/dmap/properties/boolean.rb
@@ -51,55 +32,46 @@ files:
51
32
  - lib/dmap/properties/misc.rb
52
33
  - lib/dmap/properties/serial.rb
53
34
  - lib/dmap/properties/string.rb
54
- - lib/dmap/properties.rb
55
35
  - lib/dmap/validations/absence.rb
36
+ - lib/dmap/validations/access.rb
56
37
  - lib/dmap/validations/confirmation.rb
57
38
  - lib/dmap/validations/core.rb
58
39
  - lib/dmap/validations/format.rb
59
40
  - lib/dmap/validations/length.rb
60
41
  - lib/dmap/validations/method.rb
42
+ - lib/dmap/validations/misc.rb
61
43
  - lib/dmap/validations/presence.rb
62
44
  - lib/dmap/validations/primitive.rb
63
45
  - lib/dmap/validations/uniqueness.rb
64
46
  - lib/dmap/validations/within.rb
65
47
  - lib/dmap.rb
48
+ - lib/support/ordered_hash.rb
49
+ - CHANGELOG
66
50
  - COPYING
67
51
  - README.rdoc
68
- has_rdoc: true
69
52
  homepage: https://github.com/durango/dmap
70
- licenses:
53
+ licenses:
71
54
  - MIT
72
55
  post_install_message:
73
56
  rdoc_options: []
74
-
75
- require_paths:
57
+ require_paths:
76
58
  - lib
77
- required_ruby_version: !ruby/object:Gem::Requirement
59
+ required_ruby_version: !ruby/object:Gem::Requirement
78
60
  none: false
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- hash: 3
83
- segments:
84
- - 0
85
- version: "0"
86
- required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ! '>='
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
66
  none: false
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- hash: 23
92
- segments:
93
- - 1
94
- - 3
95
- - 6
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
96
70
  version: 1.3.6
97
71
  requirements: []
98
-
99
72
  rubyforge_project:
100
- rubygems_version: 1.6.2
73
+ rubygems_version: 1.8.5
101
74
  signing_key:
102
75
  specification_version: 3
103
76
  summary: Generators for DataMapper
104
77
  test_files: []
105
-
@@ -1,36 +0,0 @@
1
- module DMap
2
- module Properties
3
- attr_accessor :list
4
- class << self
5
-
6
- def required(value)
7
- value.is_a?(Boolean)
8
- end
9
-
10
- def valid?(klass)
11
- begin
12
- # Don't need if I need to do the sub() thing anymore...
13
- self.const_get(klass.capitalize.sub('Datetime', 'DateTime')).is_a?(Class)
14
- rescue
15
- false
16
- end
17
- end
18
-
19
- def list
20
- @list ||= Hash[]
21
- end
22
-
23
- def add(table, property=nil, value=nil, bucket=nil)
24
- list[table] = {} if list[table].nil?
25
- unless property.nil?
26
- list[table][property] = {} if list[table][property].nil?
27
- if bucket.nil?
28
- list[table].store property, value unless value.nil?
29
- else
30
- list[table][property][bucket] = value
31
- end
32
- end
33
- end
34
- end
35
- end
36
- end