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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72562ea09ee116c61c60825290b3858f366cd745
4
- data.tar.gz: b766fa8d42d245694f1d74f98085fda403a9a9a6
3
+ metadata.gz: 45c6ed77480424c62f241e46578f09d03689df0c
4
+ data.tar.gz: 383beb31efebe6ba57abe73e7a6d6097a137428e
5
5
  SHA512:
6
- metadata.gz: 822df6a165994bb83b73ce152a4da0a68d723b44c7f117877267f2e4e65d6021b180f5c90c85c92e247c977aced4bd5331c10c9539a98bdfaaebee7c91743dde
7
- data.tar.gz: 7c309ffe67346c4a108499f23f6eaf457f31680e25c7ab63437baa1219b3271b3492162378bb2f9a8cc4e7f7d82e0311d5d002aa1971f36ca8ad032008ba7484
6
+ metadata.gz: de1048d1f38598eec221c44c3503c86924fd1c1ddb19966142fb744d09e0f0ebc5cff0597f47aa3931e4ab8a04fd0f59654fa61f701ae27acf72881774894010
7
+ data.tar.gz: f76c8207e5c8d5dc83afd0be1c8f3af5fdc6d6db0256985bfc0b26cc670c7d0c3293fede9f837e7d16c03932b078267178a60a78e9a61ba2945ebbbb2b0773bb
@@ -21,17 +21,18 @@ module RailsClone
21
21
 
22
22
  desc 'change_name', 'Change app name'
23
23
  def change_name(from, name)
24
- %w( app/views/layouts/application.html.erb
24
+ subs = {
25
+ [from.classify, name.classify] => %w( app/views/layouts/application.html.erb
25
26
  config/application.rb
26
- app.json )
27
- .each do |file|
28
- gsub_file(file, from.classify) {|match| name.classify }
29
- end
27
+ app.json ),
28
+ [from.underscore, name.underscore] => %w( config/database.yml
29
+ config/initializers/session_store.rb )
30
+ }
30
31
 
31
- %w( config/database.yml
32
- config/initializers/session_store.rb )
33
- .each do |file|
34
- gsub_file(file, from.camelize) {|match| name.camelize }
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
@@ -1,3 +1,3 @@
1
1
  module RailsClone
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_clone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jondot