fiona 0.0.5 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.9
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fiona"
8
- s.version = "0.0.5"
8
+ s.version = "0.0.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Chad Remesch"]
@@ -30,6 +30,8 @@ Gem::Specification.new do |s|
30
30
  "lib/generators/fiona/USAGE",
31
31
  "lib/generators/fiona/fiona_generator.rb",
32
32
  "lib/generators/fiona/templates/create_fiona_tables.rb",
33
+ "lib/generators/fiona/templates/settings_initializer.rb",
34
+ "lib/generators/fiona/templates/settings_template.rb",
33
35
  "lib/template.rb",
34
36
  "lib/template_attribute.rb",
35
37
  "spec/spec_helper.rb",
@@ -5,4 +5,7 @@ Example:
5
5
  rails generate fiona
6
6
 
7
7
  This will create:
8
+ app/templates/application_template.rb
9
+ app/templates/settings_template.rb
10
+ config/initializers/settings.rb
8
11
  db/migrate/create_fiona_tables.rb
@@ -9,4 +9,12 @@ class FionaGenerator < Rails::Generators::Base
9
9
  def create_migration
10
10
  migration_template 'create_fiona_tables.rb', 'db/migrate/create_fiona_tables.rb'
11
11
  end
12
+
13
+ def create_initializer
14
+ copy_file 'settings_initializer.rb', 'config/initializers/settings.rb'
15
+ end
16
+
17
+ def create_templates
18
+ copy_file 'settings_template.rb', 'app/templates/settings_template.rb'
19
+ end
12
20
  end
@@ -0,0 +1,7 @@
1
+ # defaults = {
2
+ # app_name: 'My Awesome Rails App'
3
+ # }
4
+ #
5
+ # S = SettingsTemplate.find_or_initialize_by_key('settings')
6
+ # S.default_attributes = defaults
7
+ # S.save!
@@ -0,0 +1,2 @@
1
+ class SettingsTemplate < Template
2
+ end
@@ -1,4 +1,5 @@
1
1
  class Template < ActiveRecord::Base
2
+
2
3
  has_many :raw_attributes, :class_name => 'TemplateAttribute', :dependent => :destroy
3
4
 
4
5
  after_save :save_attributes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fiona
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-12-20 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &70318901733500 !ruby/object:Gem::Requirement
16
+ requirement: &70154956904260 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70318901733500
24
+ version_requirements: *70154956904260
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70318901732620 !ruby/object:Gem::Requirement
27
+ requirement: &70154956901980 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.3.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70318901732620
35
+ version_requirements: *70154956901980
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &70318901723420 !ruby/object:Gem::Requirement
38
+ requirement: &70154956899720 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.0.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70318901723420
46
+ version_requirements: *70154956899720
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jeweler
49
- requirement: &70318901722780 !ruby/object:Gem::Requirement
49
+ requirement: &70154956896880 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.6.4
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70318901722780
57
+ version_requirements: *70154956896880
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rcov
60
- requirement: &70318901722100 !ruby/object:Gem::Requirement
60
+ requirement: &70154956894440 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70318901722100
68
+ version_requirements: *70154956894440
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rdoc
71
- requirement: &70318901721520 !ruby/object:Gem::Requirement
71
+ requirement: &70154956892240 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70318901721520
79
+ version_requirements: *70154956892240
80
80
  description: Easily store and use template data with Rails.
81
81
  email: chad@remesch.com
82
82
  executables: []
@@ -98,6 +98,8 @@ files:
98
98
  - lib/generators/fiona/USAGE
99
99
  - lib/generators/fiona/fiona_generator.rb
100
100
  - lib/generators/fiona/templates/create_fiona_tables.rb
101
+ - lib/generators/fiona/templates/settings_initializer.rb
102
+ - lib/generators/fiona/templates/settings_template.rb
101
103
  - lib/template.rb
102
104
  - lib/template_attribute.rb
103
105
  - spec/spec_helper.rb
@@ -118,7 +120,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
120
  version: '0'
119
121
  segments:
120
122
  - 0
121
- hash: -1829553723956385784
123
+ hash: 3628875406415562831
122
124
  required_rubygems_version: !ruby/object:Gem::Requirement
123
125
  none: false
124
126
  requirements: