tkh_illustrations 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # TKH Illustrations
2
2
 
3
3
 
4
+ ## 0.0.6
5
+
6
+ * Refactored migration and locale generators and created an install rake task. Now it's all much more consistent with other tkh gems
7
+ * Localized the illustration model attributes
8
+
4
9
 
5
10
  ## 0.0.5
6
11
 
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2012 YOURNAME
1
+ Copyright 2012 | Ten Thousand Hours - Swami Atma
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -6,6 +6,19 @@ Primarily developed for Ten Thousand Hours but we are happy to share if anybody
6
6
 
7
7
  It's still in its infancy. Many improvements to come.
8
8
 
9
+
10
+ ## Pre-requisites
11
+
12
+
13
+ The following things are needed:
14
+
15
+ * an application controller switch_to_admin_layout method - optional use of the tkh_admin_panel gem
16
+ * the imagemagick library must be installed on your dev machine and production server
17
+ * current_user, authenticate, and authenticate_with_admin methods should be provided by your authentication system. You can use the tkh_authentication gem to that effect
18
+
19
+ That's all
20
+
21
+
9
22
  ## Installation
10
23
 
11
24
  Add this line to your application's Gemfile:
@@ -18,29 +31,17 @@ And then execute:
18
31
 
19
32
  Import migration
20
33
 
21
- $ rails g tkh_illustrations:install
34
+ $ rake tkh_illustrations:install
22
35
 
23
36
  Run the migration
24
37
 
25
38
  $ rake db:migrate
26
39
 
27
- And then of course restart your server! Typically:
40
+ And then of course restart your server!
28
41
 
29
42
  $ rails s
30
43
 
31
44
 
32
- ## Pre-requisites
33
-
34
-
35
- The following things are needed:
36
-
37
- * an application controller switch_to_admin_layout method - optional use of the tkh_admin_panel gem
38
- * the imagemagick library must be installed on your dev machine and production server
39
- * current_user, authenticate, and authenticate_with_admin methods should be provided by your authentication system. You can use the tkh_authentication gem to that effect
40
-
41
- That's all
42
-
43
-
44
45
  ## Usage
45
46
 
46
47
 
@@ -2,7 +2,7 @@ require 'rails/generators/migration'
2
2
 
3
3
  module TkhIllustrations
4
4
  module Generators
5
- class InstallGenerator < ::Rails::Generators::Base
5
+ class CreateMigrationGenerator < ::Rails::Generators::Base
6
6
  include Rails::Generators::Migration
7
7
  source_root File.expand_path('../templates', __FILE__)
8
8
  desc "add the migration"
@@ -0,0 +1,16 @@
1
+ require 'rails/generators/migration'
2
+
3
+ module TkhIllustrations
4
+ module Generators
5
+ class CreateOrUpdateLocalesGenerator < ::Rails::Generators::Base
6
+ source_root File.expand_path('../templates', __FILE__)
7
+ desc "copying latest version of locale files"
8
+ def copy_locales
9
+ puts 'creating locale files'
10
+ I18n.available_locales.each do |l|
11
+ copy_file "#{l.to_s}.yml", "config/locales/tkh_illustrations.#{l.to_s}.yml"
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,8 @@
1
+ en:
2
+
3
+ activerecord:
4
+ attributes:
5
+ illustration:
6
+ image: 'image'
7
+ name: "name"
8
+
@@ -0,0 +1,7 @@
1
+ es:
2
+
3
+ activerecord:
4
+ attributes:
5
+ illustration:
6
+ image: 'imagen'
7
+ name: "nombre"
@@ -0,0 +1,7 @@
1
+ fr:
2
+
3
+ activerecord:
4
+ attributes:
5
+ illustration:
6
+ image: 'image'
7
+ name: "nom"
@@ -1,4 +1,7 @@
1
- # desc "Explaining what the task does"
2
- # task :tkh_illustrations do
3
- # # Task goes here
4
- # end
1
+ namespace :tkh_illustrations do
2
+ desc "Create migration and locale files"
3
+ task :install do
4
+ system 'rails g tkh_illustrations:create_migration'
5
+ system 'rails g tkh_illustrations:create_or_update_locales'
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module TkhIllustrations
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tkh_illustrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-31 00:00:00.000000000 Z
12
+ date: 2012-08-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -123,8 +123,12 @@ files:
123
123
  - app/views/illustrations/new.html.erb
124
124
  - app/views/illustrations/show.html.erb
125
125
  - config/routes.rb
126
- - lib/generators/tkh_illustrations/install/install_generator.rb
127
- - lib/generators/tkh_illustrations/install/templates/create_illustrations.rb
126
+ - lib/generators/tkh_illustrations/create_migration/create_migration_generator.rb
127
+ - lib/generators/tkh_illustrations/create_migration/templates/create_illustrations.rb
128
+ - lib/generators/tkh_illustrations/create_or_update_locales/create_or_update_locales_generator.rb
129
+ - lib/generators/tkh_illustrations/create_or_update_locales/templates/en.yml
130
+ - lib/generators/tkh_illustrations/create_or_update_locales/templates/es.yml
131
+ - lib/generators/tkh_illustrations/create_or_update_locales/templates/fr.yml
128
132
  - lib/tasks/tkh_illustrations_tasks.rake
129
133
  - lib/tkh_illustrations/version.rb
130
134
  - lib/tkh_illustrations.rb
@@ -176,7 +180,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
180
  version: '0'
177
181
  segments:
178
182
  - 0
179
- hash: -3745194236740910045
183
+ hash: -3432498490499045948
180
184
  required_rubygems_version: !ruby/object:Gem::Requirement
181
185
  none: false
182
186
  requirements:
@@ -185,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
189
  version: '0'
186
190
  segments:
187
191
  - 0
188
- hash: -3745194236740910045
192
+ hash: -3432498490499045948
189
193
  requirements: []
190
194
  rubyforge_project:
191
195
  rubygems_version: 1.8.23