tkh_illustrations 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -16,7 +16,17 @@ And then execute:
|
|
16
16
|
|
17
17
|
$ bundle
|
18
18
|
|
19
|
-
|
19
|
+
Import migration
|
20
|
+
|
21
|
+
$ rails g tkh_illustrations:install
|
22
|
+
|
23
|
+
Run the migration
|
24
|
+
|
25
|
+
$ rake db:migrate
|
26
|
+
|
27
|
+
And then of course restart your server! Typically:
|
28
|
+
|
29
|
+
$ rails s
|
20
30
|
|
21
31
|
Your dev machine and production server must have imagemagick installed.
|
22
32
|
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'rails/generators/migration'
|
2
|
+
|
3
|
+
module TkhIllustrations
|
4
|
+
module Generators
|
5
|
+
class InstallGenerator < ::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 illustration migration'
|
20
|
+
migration_template "create_illustrations.rb", "db/migrate/create_illustrations.rb"
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
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.3
|
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-
|
12
|
+
date: 2012-07-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -123,6 +123,8 @@ 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
128
|
- lib/tasks/tkh_illustrations_tasks.rake
|
127
129
|
- lib/tkh_illustrations/version.rb
|
128
130
|
- lib/tkh_illustrations.rb
|
@@ -174,7 +176,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
174
176
|
version: '0'
|
175
177
|
segments:
|
176
178
|
- 0
|
177
|
-
hash:
|
179
|
+
hash: 1564260776884740944
|
178
180
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
181
|
none: false
|
180
182
|
requirements:
|
@@ -183,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
185
|
version: '0'
|
184
186
|
segments:
|
185
187
|
- 0
|
186
|
-
hash:
|
188
|
+
hash: 1564260776884740944
|
187
189
|
requirements: []
|
188
190
|
rubyforge_project:
|
189
191
|
rubygems_version: 1.8.23
|