Rakefile in leap_salesforce-0.2.28 vs Rakefile in leap_salesforce-1.0.0
- old
+ new
@@ -32,5 +32,23 @@
task.doctest_opts = %w[-v]
# task.pattern = 'lib/**/*.rb'
# TODO: Get all examples working in this way
task.pattern = 'lib/leap_salesforce/ext/string.rb'
end
+
+desc 'Task to enter pry terminal and types commands using the standard library code'
+task :pry do
+ require 'pry'
+ Pry.start
+end
+
+desc 'Example of cleaning up data'
+task :remove_contacts do
+ contacts = Contact.where first_name: '!null'
+ puts "Deleting #{contacts.size} contacts"
+ contacts.each do |contact|
+ contact.delete
+ print '.'
+ end
+ contacts = Contact.where first_name: '!null'
+ puts "#{contacts.size} contacts left"
+end