test_gem_task 0.1.3 → 0.1.4
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: b95c225a32e8c0d6e52e21037bc7b416a6270883
|
4
|
+
data.tar.gz: 86a7663052191d2a1d77617ecfc21858ddc8756e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33d2db72261a0435574623e0043ee39e3136296abc3d595a67cc8d2951fda9b66295b4777a66a4c0835120e715efa4e0cc9c206289854b7a6e2526fcda37383a
|
7
|
+
data.tar.gz: f5eaf387ee3292d1d8d9269240d3b31938f95f35391aeea94f74aa809dc3df29145c9c6db0e1f6638035591dacee9148742d23fbefbd6bb4de91c7047966775b
|
@@ -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/#{migration_prefix}.rb"
|
6
17
|
end
|
7
18
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test_gem_task
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Siva subramanian
|
@@ -50,6 +50,7 @@ files:
|
|
50
50
|
- lib/generators/initializer/initializer_generator.rb~
|
51
51
|
- lib/generators/initializer/templates/initializer.rb
|
52
52
|
- lib/generators/initializer/templates/initializer.rb~
|
53
|
+
- lib/generators/initializer/templates/migration_file.rb
|
53
54
|
- lib/test.rb
|
54
55
|
- lib/test.rb~
|
55
56
|
- lib/test_gem_task.rb
|