This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'faker' | |
| define_models do | |
| model Site do | |
| 20.times do | |
| # Fairly sure this isn't the right Faker syntax but oh well | |
| stub :title => Faker::Company::Name | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DIR=/(.*)\.(.*)/ | |
| Dir.entries(Dir.pwd).each do |e| | |
| next unless e.match(/[a-z]/) | |
| puts 'moving ' + e + ' to ' + e.gsub(DIR, '\1') | |
| `mkdir #{e.gsub(DIR, '\1')}` | |
| `mv #{e} #{e.gsub(/(.*)\.(.*)/, '\1')}/` | |
| end | |
NewerOlder