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 +5 -0
- data/MIT-LICENSE +1 -1
- data/README.md +15 -14
- data/lib/generators/tkh_illustrations/{install/install_generator.rb → create_migration/create_migration_generator.rb} +1 -1
- data/lib/generators/tkh_illustrations/{install → create_migration}/templates/create_illustrations.rb +0 -0
- data/lib/generators/tkh_illustrations/create_or_update_locales/create_or_update_locales_generator.rb +16 -0
- data/lib/generators/tkh_illustrations/create_or_update_locales/templates/en.yml +8 -0
- data/lib/generators/tkh_illustrations/create_or_update_locales/templates/es.yml +7 -0
- data/lib/generators/tkh_illustrations/create_or_update_locales/templates/fr.yml +7 -0
- data/lib/tasks/tkh_illustrations_tasks.rake +7 -4
- data/lib/tkh_illustrations/version.rb +1 -1
- metadata +10 -6
data/CHANGELOG.md
CHANGED
data/MIT-LICENSE
CHANGED
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
|
-
$
|
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!
|
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
|
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"
|
data/lib/generators/tkh_illustrations/{install → create_migration}/templates/create_illustrations.rb
RENAMED
File without changes
|
data/lib/generators/tkh_illustrations/create_or_update_locales/create_or_update_locales_generator.rb
ADDED
@@ -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
|
@@ -1,4 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
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
|
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.
|
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-
|
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/
|
127
|
-
- lib/generators/tkh_illustrations/
|
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: -
|
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: -
|
192
|
+
hash: -3432498490499045948
|
189
193
|
requirements: []
|
190
194
|
rubyforge_project:
|
191
195
|
rubygems_version: 1.8.23
|