test_gem_task 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c524c6f4b060d74c5c5d2e808319aa678aa8f916
|
4
|
+
data.tar.gz: 0e1d803e69a597200807f67725f734ce4d24c2b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f36aa0ea32a4d25128a575217dd019e49d61cfd84eb0a678663f1d046b8336179fa697f186555cc7ca150fa585ed61b6fc7e28fa722cd8ce341588e8e02ce4e
|
7
|
+
data.tar.gz: dd01a9db1c173a52c6561ce95505374bc9b2f3632d1843d23467556fbcf318cc1de4f25cb47fde78dcc7907f6f9ccfcbc9f873be47712458a16d51db05057592
|
@@ -13,6 +13,6 @@ class InitializerGenerator < Rails::Generators::NamedBase
|
|
13
13
|
if file_name.present?
|
14
14
|
copy_file "initializer.rb", "config/initializers/#{file_name}.rb"
|
15
15
|
end
|
16
|
-
copy_file "migration_file.rb", "db/#{migration_prefix}.rb"
|
16
|
+
copy_file "migration_file.rb", "db/migrate/#{migration_prefix}.rb"
|
17
17
|
end
|
18
18
|
end
|
@@ -2,6 +2,17 @@ class InitializerGenerator < Rails::Generators::NamedBase
|
|
2
2
|
source_root File.expand_path("../templates", __FILE__)
|
3
3
|
|
4
4
|
def copy_initializer_file
|
5
|
-
|
5
|
+
time = Time.now
|
6
|
+
year = time.strftime("%Y")
|
7
|
+
month = time.strftime("%m")
|
8
|
+
date = time.strftime("%d")
|
9
|
+
hour = time.strftime("%H")
|
10
|
+
minutes = time.strftime("%M")
|
11
|
+
seconds = time.strftime("%S")
|
12
|
+
migration_prefix = year + month + date + hour + minutes + seconds + "_create_products"
|
13
|
+
if file_name.present?
|
14
|
+
copy_file "initializer.rb", "config/initializers/#{file_name}.rb"
|
15
|
+
end
|
16
|
+
copy_file "migration_file.rb", "db/migrate/#{migration_prefix}.rb"
|
6
17
|
end
|
7
18
|
end
|