amee-data-persistence 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{amee-data-persistence}
8
- s.version = "2.0.2"
8
+ s.version = "2.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Hetherington", "Andrew Berkeley", "James Smith", "George Palmer"]
12
- s.date = %q{2011-09-30}
12
+ s.date = %q{2011-10-13}
13
13
  s.description = %q{Part of the AMEEappkit, this gem provides storage and retrival of data provided by the amee-data-abstraction gem}
14
14
  s.email = %q{help@amee.com}
15
15
  s.extra_rdoc_files = [
@@ -38,6 +38,7 @@ Gem::Specification.new do |s|
38
38
  "lib/generators/persistence/templates/db/migrate/001_create_persistence_tables.rb",
39
39
  "lib/generators/persistence/templates/db/migrate/002_add_unit_columns.rb",
40
40
  "lib/generators/persistence/templates/db/migrate/003_add_value_types.rb",
41
+ "lib/generators/persistence/templates/db/migrate/004_change_term_column_type.rb",
41
42
  "spec/amee/db/calculation_spec.rb",
42
43
  "spec/amee/db/config_spec.rb",
43
44
  "spec/amee/db/persistence_support_spec.rb",
@@ -49,7 +50,7 @@ Gem::Specification.new do |s|
49
50
  s.homepage = %q{http://github.com/AMEE/amee-data-persistence}
50
51
  s.licenses = ["BSD 3-Clause"]
51
52
  s.require_paths = ["lib"]
52
- s.rubygems_version = %q{1.6.2}
53
+ s.rubygems_version = %q{1.4.2}
53
54
  s.summary = %q{Persistent storage of calculations performed against the AMEE API}
54
55
 
55
56
  if s.respond_to? :specification_version then
@@ -21,6 +21,7 @@ class PersistenceGenerator < Rails::Generators::Base
21
21
  migration_template 'db/migrate/001_create_persistence_tables.rb', 'db/migrate/create_persistence_tables'
22
22
  migration_template 'db/migrate/002_add_unit_columns.rb', 'db/migrate/add_unit_columns'
23
23
  migration_template 'db/migrate/003_add_value_types.rb', 'db/migrate/add_value_types'
24
+ migration_template 'db/migrate/004_change_term_column_type.rb', 'db/migrate/change_term_column_type'
24
25
  end
25
26
 
26
27
  def manifest
@@ -0,0 +1,13 @@
1
+ class ChangeTermColumnType < ActiveRecord::Migration
2
+ def self.up
3
+ remove_index :terms, :name => "label_name_calc_id_index"
4
+ change_column :terms, :value, :text
5
+ execute "CREATE INDEX `label_value_calc_id_index` ON `terms` (label, value(20), calculation_id)"
6
+ end
7
+
8
+ def self.down
9
+ remove_index :terms, :name => "label_value_calc_id_index"
10
+ change_column :terms, :value, :string
11
+ add_index "terms", ["label", "value", "calculation_id"], :name => "label_name_calc_id_index"
12
+ end
13
+ end
data/spec/spec_helper.rb CHANGED
@@ -11,7 +11,7 @@ end
11
11
  RAILS_ROOT = '.'
12
12
 
13
13
  DB_CONFIG = YAML.load_file(File.dirname(__FILE__) + '/database.yml')
14
- DB_MIGRATION = File.join(File.dirname(__FILE__), '..','generators','persistence','templates','db','migrate')
14
+ DB_MIGRATION = File.join(File.dirname(__FILE__), '..','lib','generators','persistence','templates','db','migrate')
15
15
 
16
16
  ActiveRecord::Base.logger = Logger.new(File.open('database.log', 'a'))
17
17
  ActiveRecord::Base.establish_connection(DB_CONFIG)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amee-data-persistence
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 2
10
- version: 2.0.2
9
+ - 3
10
+ version: 2.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Hetherington
@@ -18,13 +18,14 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2011-09-30 00:00:00 +01:00
21
+ date: 2011-10-13 00:00:00 +01:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
25
25
  prerelease: false
26
+ name: amee-data-abstraction
26
27
  type: :runtime
27
- requirement: &id001 !ruby/object:Gem::Requirement
28
+ version_requirements: &id001 !ruby/object:Gem::Requirement
28
29
  none: false
29
30
  requirements:
30
31
  - - ~>
@@ -34,12 +35,12 @@ dependencies:
34
35
  - 2
35
36
  - 0
36
37
  version: "2.0"
37
- name: amee-data-abstraction
38
- version_requirements: *id001
38
+ requirement: *id001
39
39
  - !ruby/object:Gem::Dependency
40
40
  prerelease: false
41
+ name: activerecord
41
42
  type: :runtime
42
- requirement: &id002 !ruby/object:Gem::Requirement
43
+ version_requirements: &id002 !ruby/object:Gem::Requirement
43
44
  none: false
44
45
  requirements:
45
46
  - - ~>
@@ -50,12 +51,12 @@ dependencies:
50
51
  - 0
51
52
  - 10
52
53
  version: 3.0.10
53
- name: activerecord
54
- version_requirements: *id002
54
+ requirement: *id002
55
55
  - !ruby/object:Gem::Dependency
56
56
  prerelease: false
57
+ name: bundler
57
58
  type: :development
58
- requirement: &id003 !ruby/object:Gem::Requirement
59
+ version_requirements: &id003 !ruby/object:Gem::Requirement
59
60
  none: false
60
61
  requirements:
61
62
  - - ~>
@@ -66,12 +67,12 @@ dependencies:
66
67
  - 0
67
68
  - 0
68
69
  version: 1.0.0
69
- name: bundler
70
- version_requirements: *id003
70
+ requirement: *id003
71
71
  - !ruby/object:Gem::Dependency
72
72
  prerelease: false
73
+ name: jeweler
73
74
  type: :development
74
- requirement: &id004 !ruby/object:Gem::Requirement
75
+ version_requirements: &id004 !ruby/object:Gem::Requirement
75
76
  none: false
76
77
  requirements:
77
78
  - - ~>
@@ -82,12 +83,12 @@ dependencies:
82
83
  - 6
83
84
  - 4
84
85
  version: 1.6.4
85
- name: jeweler
86
- version_requirements: *id004
86
+ requirement: *id004
87
87
  - !ruby/object:Gem::Dependency
88
88
  prerelease: false
89
+ name: rspec
89
90
  type: :development
90
- requirement: &id005 !ruby/object:Gem::Requirement
91
+ version_requirements: &id005 !ruby/object:Gem::Requirement
91
92
  none: false
92
93
  requirements:
93
94
  - - "="
@@ -98,12 +99,12 @@ dependencies:
98
99
  - 6
99
100
  - 0
100
101
  version: 2.6.0
101
- name: rspec
102
- version_requirements: *id005
102
+ requirement: *id005
103
103
  - !ruby/object:Gem::Dependency
104
104
  prerelease: false
105
+ name: flexmock
105
106
  type: :development
106
- requirement: &id006 !ruby/object:Gem::Requirement
107
+ version_requirements: &id006 !ruby/object:Gem::Requirement
107
108
  none: false
108
109
  requirements:
109
110
  - - ">"
@@ -114,12 +115,12 @@ dependencies:
114
115
  - 8
115
116
  - 6
116
117
  version: 0.8.6
117
- name: flexmock
118
- version_requirements: *id006
118
+ requirement: *id006
119
119
  - !ruby/object:Gem::Dependency
120
120
  prerelease: false
121
+ name: rcov
121
122
  type: :development
122
- requirement: &id007 !ruby/object:Gem::Requirement
123
+ version_requirements: &id007 !ruby/object:Gem::Requirement
123
124
  none: false
124
125
  requirements:
125
126
  - - ">="
@@ -128,12 +129,12 @@ dependencies:
128
129
  segments:
129
130
  - 0
130
131
  version: "0"
131
- name: rcov
132
- version_requirements: *id007
132
+ requirement: *id007
133
133
  - !ruby/object:Gem::Dependency
134
134
  prerelease: false
135
+ name: rdoc
135
136
  type: :development
136
- requirement: &id008 !ruby/object:Gem::Requirement
137
+ version_requirements: &id008 !ruby/object:Gem::Requirement
137
138
  none: false
138
139
  requirements:
139
140
  - - ">="
@@ -142,12 +143,12 @@ dependencies:
142
143
  segments:
143
144
  - 0
144
145
  version: "0"
145
- name: rdoc
146
- version_requirements: *id008
146
+ requirement: *id008
147
147
  - !ruby/object:Gem::Dependency
148
148
  prerelease: false
149
+ name: sqlite3
149
150
  type: :development
150
- requirement: &id009 !ruby/object:Gem::Requirement
151
+ version_requirements: &id009 !ruby/object:Gem::Requirement
151
152
  none: false
152
153
  requirements:
153
154
  - - ">="
@@ -156,8 +157,7 @@ dependencies:
156
157
  segments:
157
158
  - 0
158
159
  version: "0"
159
- name: sqlite3
160
- version_requirements: *id009
160
+ requirement: *id009
161
161
  description: Part of the AMEEappkit, this gem provides storage and retrival of data provided by the amee-data-abstraction gem
162
162
  email: help@amee.com
163
163
  executables: []
@@ -189,6 +189,7 @@ files:
189
189
  - lib/generators/persistence/templates/db/migrate/001_create_persistence_tables.rb
190
190
  - lib/generators/persistence/templates/db/migrate/002_add_unit_columns.rb
191
191
  - lib/generators/persistence/templates/db/migrate/003_add_value_types.rb
192
+ - lib/generators/persistence/templates/db/migrate/004_change_term_column_type.rb
192
193
  - spec/amee/db/calculation_spec.rb
193
194
  - spec/amee/db/config_spec.rb
194
195
  - spec/amee/db/persistence_support_spec.rb
@@ -226,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
227
  requirements: []
227
228
 
228
229
  rubyforge_project:
229
- rubygems_version: 1.6.2
230
+ rubygems_version: 1.4.2
230
231
  signing_key:
231
232
  specification_version: 3
232
233
  summary: Persistent storage of calculations performed against the AMEE API