amee-data-persistence 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.1
1
+ 2.0.2
@@ -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.1"
8
+ s.version = "2.0.2"
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-29}
12
+ s.date = %q{2011-09-30}
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 = [
@@ -3,6 +3,9 @@ require 'rails/generators/active_record'
3
3
 
4
4
  class PersistenceGenerator < Rails::Generators::Base
5
5
 
6
+ # Get method from command line - default is metadata
7
+ argument :method, :type => :string, :desc => "The storage method to use; everything, metadata, or outputs", :default => 'metadata'
8
+
6
9
  include Rails::Generators::Migration
7
10
 
8
11
  desc "Generates a migration for the AMEE Organisation models"
@@ -21,21 +24,14 @@ class PersistenceGenerator < Rails::Generators::Base
21
24
  end
22
25
 
23
26
  def manifest
24
- record do |m|
25
-
26
- ########################################
27
- # persistence level configuration file #
28
- ########################################
29
-
30
- # Get method from command line - default is metadata
31
- method = args[0] || 'metadata'
32
- # Make sure there is a config directory
33
- m.directory File.join("config")
34
- # Create persistence.yml file
35
- m.template File.join("config","persistence.yml.erb"),
36
- File.join("config","persistence.yml"),
37
- :assigns => {:method => method}
38
-
39
- end
27
+ ########################################
28
+ # persistence level configuration file #
29
+ ########################################
30
+
31
+ # Create persistence.yml file
32
+ template File.join("config","persistence.yml.erb"),
33
+ File.join("config","persistence.yml"),
34
+ :assigns => {:method => self.method}
35
+
40
36
  end
41
37
  end
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: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 1
10
- version: 2.0.1
9
+ - 2
10
+ version: 2.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Hetherington
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2011-09-29 00:00:00 +01:00
21
+ date: 2011-09-30 00:00:00 +01:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency