lib/softwear/lib.rb in softwear-lib-0.0.2 vs lib/softwear/lib.rb in softwear-lib-0.0.3
- old
+ new
@@ -1,12 +1,10 @@
require "softwear/lib/version"
require "softwear/lib/spec"
module Softwear
module Lib
- # Your code goes here...
-
def self.common_gems(gemfile)
gemfile.instance_eval do
gem 'softwear-lib'
gem 'rails', '4.2.1'
@@ -56,9 +54,27 @@
gem 'rspec-mocks'
gem 'rspec-retry'
gem 'email_spec'
gem 'selenium-webdriver'
gem 'shoulda-matchers'
+ end
+ end
+ end
+
+ def self.capistrano(context)
+ context.instance_eval do
+ gems_path = fetch(:gems_path) || "#{fetch(:deploy_to)}/shared/bundle/rbx/2.1/gems"
+
+ namespace :deploy do
+
+ desc 'Assure softwear-lib is up to date before deploying'
+ task :softwear_lib do
+ execute "GEM_HOME=#{gems_path} gem install softwear-lib"
+ execute "GEM_HOME=#{gems_path} gem update softwear-lib"
+ end
+
+ before :publishing, :restart
+
end
end
end
def self.fix_sort_argument_error_on_rubinius