stay_commerce 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/lib/stay/engine.rb +4 -0
- data/lib/stay/version.rb +1 -1
- data/lib/tasks/install_migrations.rake +9 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c5ab314e339f266f1429159d7820ae496ef342873b2ba4e7df3a0ba7f6c1367
|
4
|
+
data.tar.gz: 1e285b8b0679ba1847f37e3e18cb06d91194420ac3cc2fb4fa7a4850568aed25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1109d91a4be22a4df7a5ffd6c40409f9c8ba5934d770348e19010d3e6bc80aec5a93ecbc854bb11fc4f2f5d1972fbb4885f54814fff23a924ce2273d2689a572
|
7
|
+
data.tar.gz: 66917b37f1c90275912832fe84a7a8e0bb13fb1f842f028a7e6f207e52d2c4624bff8542d93585318953137802bf6218471699e9549cdc58b4620bf99102e9d6
|
data/lib/stay/engine.rb
CHANGED
@@ -12,5 +12,9 @@ module Stay
|
|
12
12
|
initializer 'stay.assets.precompile' do |app|
|
13
13
|
app.config.assets.precompile += %w( stay/application.js stay/application.css )
|
14
14
|
end
|
15
|
+
|
16
|
+
rake_tasks do
|
17
|
+
load File.expand_path('../../lib/tasks/install_migrations.rake', __FILE__)
|
18
|
+
end
|
15
19
|
end
|
16
20
|
end
|
data/lib/stay/version.rb
CHANGED
@@ -1,9 +1,15 @@
|
|
1
1
|
# lib/tasks/install_migrations.rake
|
2
2
|
namespace :stay_commerce do
|
3
|
+
desc "Copy Stay migrations"
|
3
4
|
task :install_migrations => :environment do
|
4
5
|
migrations_path = File.expand_path("../../db/migrate", __FILE__)
|
5
|
-
destination_path =
|
6
|
-
|
7
|
-
|
6
|
+
destination_path = File.expand_path("db/migrate", Rails.root)
|
7
|
+
|
8
|
+
if File.exist?(destination_path)
|
9
|
+
FileUtils.cp_r(migrations_path, destination_path)
|
10
|
+
puts "Migrations copied to #{destination_path}"
|
11
|
+
else
|
12
|
+
puts "Migrations directory not found in #{destination_path}"
|
13
|
+
end
|
8
14
|
end
|
9
15
|
end
|