depository 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/depository/serialize.rb +6 -2
  3. metadata +15 -25
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5f5544e79a8ec24ce14f7619adc39d68783b428d
4
+ data.tar.gz: f95921c591eba7e308d543d1869611174567795e
5
+ SHA512:
6
+ metadata.gz: 0e8435988233ae13145ba6818be070df99cb23a1a02f40428e4e9bb8ff44e557e1b0d370e6de9024f75b8fbad52b7fd8592274ebd734b49c837f39796ba1447d
7
+ data.tar.gz: d8d29b181e068a9820f3cc659eed82ba1230b2040dda87affee229143258a09d5b40d80b12604eb663b6f4a8e0a215e572275ed01fc22150b457692c6a47a762
@@ -43,11 +43,15 @@ module Depository
43
43
  !attrs[column].nil? && opts[:type] == :integer
44
44
  }.each { |column, opts| attrs[column] = attrs[column].to_i }
45
45
 
46
+ columns.select { |column, opts|
47
+ !attrs[column].nil? && opts[:type] == :boolean
48
+ }.each { |column, opts| attrs[column] = attrs[column] ? 1 : 0 }
49
+
46
50
  attrs
47
51
  end
48
52
 
49
53
  def columns
50
- Depository::Database.db.schema(config.db)
54
+ @columns ||= Depository::Database.db.schema(config.db)
51
55
  end
52
56
  end
53
57
 
@@ -89,7 +93,7 @@ module Depository
89
93
  end
90
94
 
91
95
  def columns
92
- Depository::Database.db.schema(config.db)
96
+ @columns ||= Depository::Database.db.schema(config.db)
93
97
  end
94
98
  end
95
99
 
metadata CHANGED
@@ -1,102 +1,93 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: depository
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
5
- prerelease:
4
+ version: 0.1.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Brian Pratt
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-03-28 00:00:00.000000000 Z
11
+ date: 2014-04-04 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: sequel
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
19
  version: '4.7'
22
- - - ! '>='
20
+ - - '>='
23
21
  - !ruby/object:Gem::Version
24
22
  version: 4.7.0
25
23
  type: :runtime
26
24
  prerelease: false
27
25
  version_requirements: !ruby/object:Gem::Requirement
28
- none: false
29
26
  requirements:
30
27
  - - ~>
31
28
  - !ruby/object:Gem::Version
32
29
  version: '4.7'
33
- - - ! '>='
30
+ - - '>='
34
31
  - !ruby/object:Gem::Version
35
32
  version: 4.7.0
36
33
  - !ruby/object:Gem::Dependency
37
34
  name: attr_protected
38
35
  requirement: !ruby/object:Gem::Requirement
39
- none: false
40
36
  requirements:
41
37
  - - ~>
42
38
  - !ruby/object:Gem::Version
43
39
  version: '1.0'
44
- - - ! '>='
40
+ - - '>='
45
41
  - !ruby/object:Gem::Version
46
42
  version: 1.0.0
47
43
  type: :runtime
48
44
  prerelease: false
49
45
  version_requirements: !ruby/object:Gem::Requirement
50
- none: false
51
46
  requirements:
52
47
  - - ~>
53
48
  - !ruby/object:Gem::Version
54
49
  version: '1.0'
55
- - - ! '>='
50
+ - - '>='
56
51
  - !ruby/object:Gem::Version
57
52
  version: 1.0.0
58
53
  - !ruby/object:Gem::Dependency
59
54
  name: rake
60
55
  requirement: !ruby/object:Gem::Requirement
61
- none: false
62
56
  requirements:
63
57
  - - ~>
64
58
  - !ruby/object:Gem::Version
65
59
  version: '10.1'
66
- - - ! '>='
60
+ - - '>='
67
61
  - !ruby/object:Gem::Version
68
62
  version: 10.1.1
69
63
  type: :development
70
64
  prerelease: false
71
65
  version_requirements: !ruby/object:Gem::Requirement
72
- none: false
73
66
  requirements:
74
67
  - - ~>
75
68
  - !ruby/object:Gem::Version
76
69
  version: '10.1'
77
- - - ! '>='
70
+ - - '>='
78
71
  - !ruby/object:Gem::Version
79
72
  version: 10.1.1
80
73
  - !ruby/object:Gem::Dependency
81
74
  name: rspec
82
75
  requirement: !ruby/object:Gem::Requirement
83
- none: false
84
76
  requirements:
85
77
  - - ~>
86
78
  - !ruby/object:Gem::Version
87
79
  version: '2.14'
88
- - - ! '>='
80
+ - - '>='
89
81
  - !ruby/object:Gem::Version
90
82
  version: 2.14.1
91
83
  type: :development
92
84
  prerelease: false
93
85
  version_requirements: !ruby/object:Gem::Requirement
94
- none: false
95
86
  requirements:
96
87
  - - ~>
97
88
  - !ruby/object:Gem::Version
98
89
  version: '2.14'
99
- - - ! '>='
90
+ - - '>='
100
91
  - !ruby/object:Gem::Version
101
92
  version: 2.14.1
102
93
  description: wraps Sequel to provide a non-ORM data-mapping interface
@@ -115,26 +106,25 @@ files:
115
106
  homepage: https://github.com/pratt121/depository
116
107
  licenses:
117
108
  - WTFPL
109
+ metadata: {}
118
110
  post_install_message:
119
111
  rdoc_options: []
120
112
  require_paths:
121
113
  - lib
122
114
  required_ruby_version: !ruby/object:Gem::Requirement
123
- none: false
124
115
  requirements:
125
- - - ! '>='
116
+ - - '>='
126
117
  - !ruby/object:Gem::Version
127
118
  version: '0'
128
119
  required_rubygems_version: !ruby/object:Gem::Requirement
129
- none: false
130
120
  requirements:
131
- - - ! '>='
121
+ - - '>='
132
122
  - !ruby/object:Gem::Version
133
123
  version: '0'
134
124
  requirements: []
135
125
  rubyforge_project:
136
- rubygems_version: 1.8.23.2
126
+ rubygems_version: 2.0.3
137
127
  signing_key:
138
- specification_version: 3
128
+ specification_version: 4
139
129
  summary: simple interface for persistence built on Sequel
140
130
  test_files: []