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
| @addresses = [] | |
| 10000.times do | |
| @addresses.push Faker::Internet::ip_v4_address | |
| end | |
| @addresses == @addresses.uniq # => true |
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
| rake db:drop db:create && script/dbconsole < db/dump/postgresql && rake db:migrate |
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
| psql imeducate_staging -a -f db/dump/partial_export_old_site.sql -U imeducate -h localhost |
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 'spec_helper' | |
| describe AvatarUploader do | |
| let(:avatar_uploader) { AvatarUploader.new(outing, :avatar) } | |
| let(:location) { Factory.build(:location, :id => 123) } | |
| let(:user) { Factory.build(:user, :id => 103) } | |
| let(:outing) { Factory.build(:outing, :id => 101, :image_token => 'image_token') } |
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
| # Speeds up testing Carrier Wave by turning off uneccessary processing | |
| if Rails.env.test? | |
| CarrierWave.configure do |config| | |
| config.storage = :file | |
| config.enable_processing = false | |
| config.root = Rails.root.join('spec', 'support', 'uploads') | |
| 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
| require 'factory_girl' | |
| Dir[Rails.root.join("spec/factories/**/*.rb")].each {|f| require f} | |
| seed_file = Rails.root.join('db', 'seed.yml') | |
| objects = YAML::load_file(seed_file) | |
| # Create a member login for development and staging | |
| if Rails.env.development? || Rails.env.staging? | |
| [Address, Member, Admin].each do |model| | |
| name = model.to_s.pluralize.underscore |
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 'factory_girl' | |
| Dir[Rails.root.join("spec/factories/**/*.rb")].each {|f| require f} | |
| seed_file = Rails.root.join('db', 'seed.yml') | |
| objects = YAML::load_file(seed_file) | |
| # Create a member login for development and staging | |
| if Rails.env.development? || Rails.env.staging? | |
| [Address, Member, Admin].each do |model| | |
| name = model.to_s.pluralize.underscore |
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
| context 'geo finding' do | |
| before :all do | |
| @location_one = Factory.build(:location, :lat => 42.000000, :lng => 0.000000) | |
| @location_two = Factory.create(:location, :lat => 42.000000, :lng => 0.050000) # 4.14km's from location one | |
| @location_three = Factory.create(:location, :lat => 42.000000, :lng => 0.100000) # 8.29km's from location one | |
| end | |
| after :all do | |
| Location.delete_all |
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
| TFG-MV-iMac:imeducate mario$ cap production deploy:check | |
| * == Currently executing `production' | |
| * == Currently executing `defaults:check_variables' | |
| * == Currently executing `stages:ensure' | |
| * == Currently executing `deploy:check' | |
| * == Currently executing `defaults:check' | |
| * == Currently executing `defaults:fix_linked_permissions' | |
| * == Currently executing `rvm:check_shell' | |
| * executing "true" | |
| * establishing connection to gateway `"prowl.thefrontiergroup.net.au"' |
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
| source 'http://rubygems.org' | |
| gem 'has_face' |