rails_clone 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_clone/runner.rb +10 -9
- data/lib/rails_clone/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45c6ed77480424c62f241e46578f09d03689df0c
|
4
|
+
data.tar.gz: 383beb31efebe6ba57abe73e7a6d6097a137428e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de1048d1f38598eec221c44c3503c86924fd1c1ddb19966142fb744d09e0f0ebc5cff0597f47aa3931e4ab8a04fd0f59654fa61f701ae27acf72881774894010
|
7
|
+
data.tar.gz: f76c8207e5c8d5dc83afd0be1c8f3af5fdc6d6db0256985bfc0b26cc670c7d0c3293fede9f837e7d16c03932b078267178a60a78e9a61ba2945ebbbb2b0773bb
|
data/lib/rails_clone/runner.rb
CHANGED
@@ -21,17 +21,18 @@ module RailsClone
|
|
21
21
|
|
22
22
|
desc 'change_name', 'Change app name'
|
23
23
|
def change_name(from, name)
|
24
|
-
|
24
|
+
subs = {
|
25
|
+
[from.classify, name.classify] => %w( app/views/layouts/application.html.erb
|
25
26
|
config/application.rb
|
26
|
-
app.json )
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
app.json ),
|
28
|
+
[from.underscore, name.underscore] => %w( config/database.yml
|
29
|
+
config/initializers/session_store.rb )
|
30
|
+
}
|
30
31
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
32
|
+
subs.each do |(from, name), files|
|
33
|
+
files.each do |file|
|
34
|
+
gsub_file(file, from) {|match| name } if File.exist?(file)
|
35
|
+
end
|
35
36
|
end
|
36
37
|
end
|
37
38
|
end
|
data/lib/rails_clone/version.rb
CHANGED