tkh_content 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/CHANGELOG.md +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +62 -0
  4. data/Rakefile +38 -0
  5. data/app/controllers/pages_controller.rb +49 -0
  6. data/app/models/page.rb +22 -0
  7. data/app/views/pages/_form.html.erb +15 -0
  8. data/app/views/pages/edit.html.erb +2 -0
  9. data/app/views/pages/index.html.erb +28 -0
  10. data/app/views/pages/new.html.erb +2 -0
  11. data/app/views/pages/show.html.erb +4 -0
  12. data/app/views/shared/_admin_sidebar.html.erb +6 -0
  13. data/config/routes.rb +5 -0
  14. data/lib/generators/tkh_content/create_migration/create_migration_generator.rb +25 -0
  15. data/lib/generators/tkh_content/create_migration/templates/create_pages.rb +21 -0
  16. data/lib/generators/tkh_content/create_or_update_locales/create_or_update_locales_generator.rb +14 -0
  17. data/lib/generators/tkh_content/create_or_update_locales/templates/en.yml +34 -0
  18. data/lib/generators/tkh_content/create_or_update_locales/templates/es.yml +29 -0
  19. data/lib/generators/tkh_content/create_or_update_locales/templates/fr.yml +206 -0
  20. data/lib/tasks/tkh_content_tasks.rake +7 -0
  21. data/lib/tkh_content/version.rb +3 -0
  22. data/lib/tkh_content.rb +9 -0
  23. data/test/dummy/README.rdoc +261 -0
  24. data/test/dummy/Rakefile +7 -0
  25. data/test/dummy/app/assets/javascripts/application.js +15 -0
  26. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  27. data/test/dummy/app/controllers/application_controller.rb +3 -0
  28. data/test/dummy/app/helpers/application_helper.rb +2 -0
  29. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  30. data/test/dummy/config/application.rb +59 -0
  31. data/test/dummy/config/boot.rb +10 -0
  32. data/test/dummy/config/database.yml +25 -0
  33. data/test/dummy/config/environment.rb +5 -0
  34. data/test/dummy/config/environments/development.rb +37 -0
  35. data/test/dummy/config/environments/production.rb +67 -0
  36. data/test/dummy/config/environments/test.rb +37 -0
  37. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  38. data/test/dummy/config/initializers/inflections.rb +15 -0
  39. data/test/dummy/config/initializers/mime_types.rb +5 -0
  40. data/test/dummy/config/initializers/secret_token.rb +7 -0
  41. data/test/dummy/config/initializers/session_store.rb +8 -0
  42. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  43. data/test/dummy/config/locales/en.yml +5 -0
  44. data/test/dummy/config/routes.rb +58 -0
  45. data/test/dummy/config.ru +4 -0
  46. data/test/dummy/public/404.html +26 -0
  47. data/test/dummy/public/422.html +26 -0
  48. data/test/dummy/public/500.html +25 -0
  49. data/test/dummy/public/favicon.ico +0 -0
  50. data/test/dummy/script/rails +6 -0
  51. data/test/test_helper.rb +15 -0
  52. data/test/tkh_content_test.rb +7 -0
  53. metadata +213 -0
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # TKH Content
2
+
3
+
4
+
5
+ ## 0.0.1
6
+
7
+ * Initial release
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2012 | Ten Thousand Hours - Swami Atma
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # TKH Content
2
+
3
+ This Rails engine puts the C in CMS. It provides the pages and the blog section.
4
+
5
+ Primarily developed for Ten Thousand Hours but we are happy to share if anybody finds it useful.
6
+
7
+ It's still embryonic but many improvements to come. The blog is not in yet.
8
+
9
+
10
+
11
+ ## Pre-requisites
12
+
13
+
14
+ The following things are needed:
15
+
16
+ * Ruby 1.9.2 or later
17
+
18
+
19
+ ## Installation
20
+
21
+ Add this line to your application's Gemfile:
22
+
23
+ gem 'tkh_content', '~> 0.0'
24
+
25
+ Then execute:
26
+
27
+ $ bundle
28
+
29
+ Import migration
30
+
31
+ $ rake tkh_content:install
32
+
33
+ Run the migration
34
+
35
+ $ rake db:migrate
36
+
37
+ And then of course restart your server!
38
+
39
+ $ rails s
40
+
41
+
42
+ ## Usage
43
+
44
+
45
+ The section is located at:
46
+
47
+ /pages
48
+
49
+ ... and it should work out of the box
50
+
51
+
52
+ ## Contributing
53
+
54
+ Pull requests for new features and bug fixes are welcome.
55
+
56
+ 1. Fork it
57
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
58
+ 3. Create your failing tests based on the Test Unit framework.
59
+ 4. Create your code which makes the tests pass.
60
+ 5. Commit your changes (`git commit -am 'Added some feature'`)
61
+ 6. Push to the branch (`git push origin my-new-feature`)
62
+ 7. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require 'bundler/setup'
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+ begin
8
+ require 'rdoc/task'
9
+ rescue LoadError
10
+ require 'rdoc/rdoc'
11
+ require 'rake/rdoctask'
12
+ RDoc::Task = Rake::RDocTask
13
+ end
14
+
15
+ RDoc::Task.new(:rdoc) do |rdoc|
16
+ rdoc.rdoc_dir = 'rdoc'
17
+ rdoc.title = 'TkhContent'
18
+ rdoc.options << '--line-numbers'
19
+ rdoc.rdoc_files.include('README.rdoc')
20
+ rdoc.rdoc_files.include('lib/**/*.rb')
21
+ end
22
+
23
+
24
+
25
+
26
+ Bundler::GemHelper.install_tasks
27
+
28
+ require 'rake/testtask'
29
+
30
+ Rake::TestTask.new(:test) do |t|
31
+ t.libs << 'lib'
32
+ t.libs << 'test'
33
+ t.pattern = 'test/**/*_test.rb'
34
+ t.verbose = false
35
+ end
36
+
37
+
38
+ task :default => :test
@@ -0,0 +1,49 @@
1
+ class PagesController < ApplicationController
2
+
3
+ before_filter :authenticate, :except => 'show'
4
+ before_filter :authenticate_with_admin, :except => 'show'
5
+
6
+ def index
7
+ @pages = Page.by_recent
8
+ render layout: 'admin'
9
+ end
10
+
11
+ def show
12
+ @page = Page.find(params[:id])
13
+ end
14
+
15
+ def new
16
+ @page = Page.new
17
+ render layout: 'admin'
18
+ end
19
+
20
+ def edit
21
+ @page = Page.find(params[:id])
22
+ render layout: 'admin'
23
+ end
24
+
25
+ def create
26
+ @page = Page.new(params[:page])
27
+ if @page.save
28
+ redirect_to @page, notice: t('pages.create.notice')
29
+ else
30
+ render action: "new", warning: t('pages.create.warning'), layout: 'admin'
31
+ end
32
+ end
33
+
34
+ def update
35
+ @page = Page.find(params[:id])
36
+ if @page.update_attributes(params[:page])
37
+ redirect_to @page, notice: t('pages.update.notice')
38
+ else
39
+ render action: "edit", warning: t('pages.update.warning'), layout: 'admin'
40
+ end
41
+ end
42
+
43
+ def destroy
44
+ @page = Page.find(params[:id])
45
+ @page.destroy
46
+ redirect_to pages_url, notice: t('pages.destroy.notice')
47
+ end
48
+
49
+ end
@@ -0,0 +1,22 @@
1
+ # this is needed for now to make mass assignment security compatible with the translation of globalize3
2
+ Globalize::ActiveRecord::Translation.class_eval do
3
+ attr_accessible :locale
4
+ end
5
+
6
+ class Page < ActiveRecord::Base
7
+
8
+ attr_accessible :body, :description, :title, :blog_post
9
+
10
+ validates_presence_of :title
11
+ validates_presence_of :description
12
+ validates_presence_of :body
13
+
14
+ translates :title, :description, :body
15
+
16
+ def to_param
17
+ title ? "#{id}-#{title.to_url}" : id
18
+ end
19
+
20
+ scope :by_recent, :order => 'updated_at desc'
21
+
22
+ end
@@ -0,0 +1,15 @@
1
+ <%= simple_form_for @page, :html => { class: 'form-horizontal' } do |f| %>
2
+ <%= f.error_notification %>
3
+
4
+ <div class="form-inputs">
5
+ <%= f.input :title %><br /><br />
6
+ <%= f.input :for_blog %><br /><br />
7
+ <%= f.input :description, :input_html => { :rows => 5 } %><br /><br />
8
+ <%= f.input :body, :input_html => { :rows => 30 } %>
9
+ </div>
10
+
11
+ <div class="form-actions">
12
+ <%= f.submit, :class => 'btn btn-primary' %>
13
+ </div>
14
+
15
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <%= render 'form' %>
2
+ <%= render 'shared/admin_sidebar' %>
@@ -0,0 +1,28 @@
1
+ <h1>Listing Pages</h1>
2
+
3
+ <table class='table table-striped'>
4
+ <thead>
5
+ <tr>
6
+ <th><%= t 'activerecord.attributes.pages.title' %></th>
7
+ <th><%= t 'activerecord.attributes.pages.description' %></th>
8
+ <th><%= t 'activerecord.attributes.pages.for_blog' %>?</th>
9
+ <th>Actions</th>
10
+ </tr>
11
+ </thead>
12
+
13
+ <tbody>
14
+ <% @pages.each do |page| %>
15
+ <tr>
16
+ <td><%= link_to page.title, page_path(page) %></td>
17
+ <td><%= truncate page.description, length: 55, separator: ' ...' %></td>
18
+ <td><%= page.for_blog? ? '✓' : 'X' %></td>
19
+ <td><%= link_to t('edit'), page, class: 'btn btn-mini' %>
20
+ <%= link_to t('delete'), page, method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-mini btn-danger' %></td>
21
+ </tr>
22
+ <% end %>
23
+ </tbody>
24
+ </table>
25
+
26
+ <%= link_to t('pages.create_new').capitalize, new_page_path, class: 'btn btn-primary' %>
27
+
28
+ <%= render 'shared/admin_sidebar' %>
@@ -0,0 +1,2 @@
1
+ <%= render 'form' %>
2
+ <%= render 'shared/admin_sidebar' %>
@@ -0,0 +1,4 @@
1
+ <% @meta_title = @page.title %>
2
+ <% @meta_description = @page.description %>
3
+
4
+ <%= raw @page.body %>
@@ -0,0 +1,6 @@
1
+ <% content_for :admin_sidebar do %>
2
+ <h2><%= t 'sections'.capitalize %></h2>
3
+ <ul>
4
+ <li><%= link_to t 'pages', pages_path %></li>
5
+ </ul>
6
+ <% end %>
data/config/routes.rb ADDED
@@ -0,0 +1,5 @@
1
+ Rails.application.routes.draw do
2
+ scope "(:locale)", locale: /#{I18n.available_locales.join("|")}/ do
3
+ resources :pages
4
+ end
5
+ end
@@ -0,0 +1,25 @@
1
+ require 'rails/generators/migration'
2
+
3
+ module TkhContent
4
+ module Generators
5
+ class CreateMigrationGenerator < ::Rails::Generators::Base
6
+ include Rails::Generators::Migration
7
+ source_root File.expand_path('../templates', __FILE__)
8
+ desc "add the migration"
9
+ def self.next_migration_number(path)
10
+ unless @prev_migration_nr
11
+ @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
12
+ else
13
+ @prev_migration_nr += 1
14
+ end
15
+ @prev_migration_nr.to_s
16
+ end
17
+
18
+ def copy_migrations
19
+ puts 'creating user migration'
20
+ migration_template "create_pages.rb", "db/migrate/create_pages.rb"
21
+ end
22
+
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,21 @@
1
+ class CreatePages < ActiveRecord::Migration
2
+
3
+ def self.up
4
+ create_table :pages do |t|
5
+ t.string :title
6
+ t.text :description
7
+ t.text :body
8
+ t.boolean :for_blog, default: false
9
+ t.datetime :published_at
10
+ t.timestamps
11
+ end
12
+ add_index :pages, :published_at
13
+ Page.create_translation_table! :title => :string, :description => :text, :body => :text
14
+ end
15
+
16
+ def self.down
17
+ drop_table :pages
18
+ Page.drop_translation_table!
19
+ remove_index :pages, :published_at
20
+ end
21
+ end
@@ -0,0 +1,14 @@
1
+ module TkhContent
2
+ module Generators
3
+ class CreateOrUpdateLocalesGenerator < ::Rails::Generators::Base
4
+ source_root File.expand_path('../templates', __FILE__)
5
+ desc "copying latest version of locale files"
6
+ def copy_locales
7
+ puts 'creating locale files'
8
+ I18n.available_locales.each do |l|
9
+ copy_file "#{l.to_s}.yml", "config/locales/tkh_content.#{l.to_s}.yml"
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,34 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ date:
6
+ formats:
7
+ simple_date: "%B %d"
8
+ time:
9
+ formats:
10
+ informal: "at %H:%M"
11
+ default: "%a. %b. %d, '%y at %H:%M"
12
+ just_time: "%I:%M %p"
13
+ long: "%A %d %B %Y at %H:%M"
14
+ # custom sections - the obove is provided by rails
15
+ language_name: English
16
+
17
+ are_you_sure: 'are you sure?'
18
+ delete: 'delete'
19
+ edit: 'edit'
20
+ pages: 'pages'
21
+ sections: 'sections'
22
+
23
+ pages:
24
+ create_new: 'create new page'
25
+ create:
26
+ notice: 'The page was successfully created.'
27
+ warning: 'There was a problem saving the page'
28
+ update:
29
+ notice: 'The page was successfully updated.'
30
+ warning: 'There was a problem saving the page'
31
+ destroy:
32
+ notice: 'The page was deleted'
33
+
34
+
@@ -0,0 +1,29 @@
1
+ es:
2
+ language_name: "Español"
3
+
4
+ are_you_sure: '¿estás seguro?'
5
+ delete: 'borrar'
6
+ edit: 'editar'
7
+ pages: 'paginas'
8
+ sections: 'secciones'
9
+
10
+ activerecord:
11
+ attributes:
12
+ pages:
13
+ title: "título"
14
+ description: "descripción"
15
+ body: "parte principal"
16
+ para el blog: 'contraseña'
17
+
18
+ pages:
19
+ create_new: 'crear una nueva página'
20
+ create:
21
+ notice: 'La página se ha creado correctamente'
22
+ warning: 'Hubo un problema al guardar la página'
23
+ update:
24
+ notice: 'La página se ha actualizado correctamente'
25
+ warning: 'Hubo un problema al guardar la página'
26
+ destroy:
27
+ notice: 'la página se ha eliminado'
28
+
29
+
@@ -0,0 +1,206 @@
1
+ fr:
2
+ date:
3
+ formats:
4
+ short: "%e %b"
5
+ long: "%e %B %Y"
6
+ only_day: "%e"
7
+ simple_date: "%d %B"
8
+ day_names: [dimanche, lundi, mardi, mercredi, jeudi, vendredi, samedi]
9
+ abbr_day_names: [dim, lun, mar, mer, jeu, ven, sam]
10
+ month_names: [~, janvier, février, mars, avril, mai, juin, juillet, août, septembre, octobre, novembre, décembre]
11
+ abbr_month_names: [~, jan., fév., mar., avr., mai, juin, juil., août, sept., oct., nov., déc.]
12
+ order:
13
+ - :day
14
+ - :month
15
+ - :year
16
+ time:
17
+ formats:
18
+ informal: "à %H:%M"
19
+ default: "%a. %d %b %Y à %H:%M"
20
+ short: "%d %b %H:%M"
21
+ long: "%A %d %B %Y à %H:%M"
22
+ just_time: "%H:%M"
23
+
24
+ am: 'am'
25
+ pm: 'pm'
26
+
27
+ datetime:
28
+ distance_in_words:
29
+ half_a_minute: "une demi-minute"
30
+ less_than_x_seconds:
31
+ zero: "moins d'une seconde"
32
+ one: "moins d'une seconde"
33
+ other: "moins de %{count} secondes"
34
+ x_seconds:
35
+ one: "1 seconde"
36
+ other: "%{count} secondes"
37
+ less_than_x_minutes:
38
+ zero: "moins d'une minute"
39
+ one: "moins d'une minute"
40
+ other: "moins de %{count} minutes"
41
+ x_minutes:
42
+ one: "1 minute"
43
+ other: "%{count} minutes"
44
+ about_x_hours:
45
+ one: "environ une heure"
46
+ other: "environ %{count} heures"
47
+ x_days:
48
+ one: "1 jour"
49
+ other: "%{count} jours"
50
+ about_x_months:
51
+ one: "environ un mois"
52
+ other: "environ %{count} mois"
53
+ x_months:
54
+ one: "1 mois"
55
+ other: "%{count} mois"
56
+ about_x_years:
57
+ one: "environ un an"
58
+ other: "environ %{count} ans"
59
+ over_x_years:
60
+ one: "plus d'un an"
61
+ other: "plus de %{count} ans"
62
+ almost_x_years:
63
+ one: "presqu'un an"
64
+ other: "presque %{count} ans"
65
+ prompts:
66
+ year: "Année"
67
+ month: "Mois"
68
+ day: "Jour"
69
+ hour: "Heure"
70
+ minute: "Minute"
71
+ second: "Seconde"
72
+
73
+ number:
74
+ format:
75
+ separator: ","
76
+ delimiter: " "
77
+ precision: 3
78
+ significant: false
79
+ strip_insignificant_zeros: false
80
+ currency:
81
+ format:
82
+ format: "%n %u"
83
+ unit: "€"
84
+ separator: ","
85
+ delimiter: " "
86
+ precision: 2
87
+ significant: false
88
+ strip_insignificant_zeros: false
89
+ percentage:
90
+ format:
91
+ delimiter: ""
92
+ precision:
93
+ format:
94
+ delimiter: ""
95
+ human:
96
+ format:
97
+ delimiter: ""
98
+ precision: 2
99
+ significant: true
100
+ strip_insignificant_zeros: true
101
+ storage_units:
102
+ format: "%n %u"
103
+ units:
104
+ byte:
105
+ one: "octet"
106
+ other: "octets"
107
+ kb: "ko"
108
+ mb: "Mo"
109
+ gb: "Go"
110
+ tb: "To"
111
+ decimal_units:
112
+ format: "%n %u"
113
+ units:
114
+ unit: ""
115
+ thousand: "millier"
116
+ million: "million"
117
+ billion: "milliard"
118
+ trillion: "billion"
119
+ quadrillion: "million de milliards"
120
+
121
+ support:
122
+ array:
123
+ words_connector: ", "
124
+ two_words_connector: " et "
125
+ last_word_connector: " et "
126
+ select:
127
+ prompt: "Veuillez sélectionner"
128
+
129
+ helpers:
130
+ select:
131
+ prompt: "Veuillez sélectionner"
132
+ submit:
133
+ create: "Créer un %{model}"
134
+ update: "Modifier ce %{model}"
135
+ submit: "Enregistrer ce %{model}"
136
+
137
+ attributes:
138
+ created_at: "Créé le"
139
+ updated_at: "Modifié le"
140
+
141
+ errors:
142
+ format: "Le %{attribute} %{message}"
143
+ messages: &errors_messages
144
+ inclusion: "n'est pas inclus(e) dans la liste"
145
+ exclusion: "n'est pas disponible"
146
+ invalid: "n'est pas valide"
147
+ confirmation: "ne concorde pas avec la confirmation"
148
+ accepted: "doit être accepté(e)"
149
+ empty: "doit être rempli(e)"
150
+ blank: "doit être rempli(e)"
151
+ too_long: "est trop long (pas plus de %{count} caractères)"
152
+ too_short: "est trop court (au moins %{count} caractères)"
153
+ wrong_length: "ne fait pas la bonne longueur (doit comporter %{count} caractères)"
154
+ not_a_number: "n'est pas un nombre"
155
+ not_an_integer: "doit être un nombre entier"
156
+ greater_than: "doit être supérieur à %{count}"
157
+ greater_than_or_equal_to: "doit être supérieur ou égal à %{count}"
158
+ equal_to: "doit être égal à %{count}"
159
+ less_than: "doit être inférieur à %{count}"
160
+ less_than_or_equal_to: "doit être inférieur ou égal à %{count}"
161
+ odd: "doit être impair"
162
+ even: "doit être pair"
163
+ template: &errors_template
164
+ header:
165
+ one: "Impossible d'enregistrer ce %{model} : 1 erreur"
166
+ other: "Impossible d'enregistrer ce %{model} : %{count} erreurs"
167
+ body: "Veuillez vérifier les champs suivants : "
168
+
169
+ activerecord:
170
+ errors:
171
+ messages:
172
+ taken: "n'est pas disponible"
173
+ record_invalid: "La validation a échoué : %{errors}"
174
+ <<: *errors_messages
175
+ template:
176
+ <<: *errors_template
177
+ full_messages:
178
+ format: "%{attribute} %{message}"
179
+
180
+ # custom sections - the obove is provided by rails
181
+ language_name: Français
182
+
183
+ are_you_sure: 'êtes vous sûr ?'
184
+ delete: 'supprimer'
185
+ edit: 'modifier'
186
+ pages: 'pages'
187
+ sections: 'sections'
188
+
189
+ activerecord:
190
+ attributes:
191
+ pages:
192
+ title: "titre"
193
+ description: "description"
194
+ body: "texte principal"
195
+ para el blog: 'pour le blog'
196
+
197
+ pages:
198
+ create_new: 'créer une nouvelle page'
199
+ create:
200
+ notice: 'La page a été créée.'
201
+ warning: "Il y'a eu un problem et la page n'a pas été sauvegardée"
202
+ update:
203
+ notice: 'Les changements de cette page ont été sauvegardés'
204
+ warning: "Il y'a eu un problem et les changements de cette page n'ont pas été sauvegardés"
205
+ destroy:
206
+ notice: 'La page a été supprimée'
@@ -0,0 +1,7 @@
1
+ namespace :tkh_content do
2
+ desc "Create migrations and locale files"
3
+ task :install do
4
+ system 'rails g tkh_content:create_migration'
5
+ system 'rails g tkh_content:create_or_update_locales'
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ module TkhContent
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,9 @@
1
+ require "tkh_content/version"
2
+ require 'simple_form'
3
+ require 'stringex'
4
+ require 'globalize3'
5
+
6
+ module TkhContent
7
+ class Engine < ::Rails::Engine
8
+ end
9
+ end