Module: Softwear

Defined in:
lib/softwear.rb,
lib/softwear/engine.rb,
lib/softwear/version.rb,
lib/softwear/auth/spec.rb,
lib/softwear/auth/model.rb,
lib/softwear/auth/helper.rb,
lib/softwear/auth/controller.rb,
lib/softwear/library/enqueue.rb,
lib/softwear/auth/stubbed_model.rb,
lib/softwear/library/capistrano.rb,
lib/softwear/auth/standard_model.rb,
lib/softwear/auth/belongs_to_user.rb,
app/helpers/softwear/emails_helper.rb,
lib/softwear/library/api_controller.rb,
lib/softwear/auth/token_authentication.rb,
app/helpers/softwear/application_helper.rb,
lib/softwear/library/controller_authentication.rb,
app/controllers/softwear/application_controller.rb,
app/controllers/softwear/concerns/error_catcher.rb,
app/controllers/softwear/error_reports_controller.rb

Defined Under Namespace

Modules: ApplicationHelper, Auth, EmailsHelper, ErrorCatcher, Library Classes: ApplicationController, Engine, ErrorReportsController

Constant Summary collapse

GEMFILE_OPENER =
"# === BEGIN SOFTWEAR LIB GEMS === #"
GEMFILE_CLOSER =
"# === END SOFTWEAR LIB GEMS === #"
COMMON_GEMS =
%(
gem 'rails', '~> 4.2.3'

gem 'mysql2'
gem 'sass-rails'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'bootstrap-sass', '~> 3.2.0'
gem 'activeresource'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'hirb'
gem 'momentjs-rails', '~> 2.9.0'
gem 'bootstrap3-datetimepicker-rails', '4.7.14'
gem 'js-routes'
gem 'inherited_resources'
gem 'devise'
gem 'figaro'
gem 'paranoia', '~> 2.0'
gem 'paperclip'
gem 'kaminari'
gem 'whenever'
gem 'dumpsync', git: 'git://github.com/AnnArborTees/dumpsync.git'
gem 'bootstrap_form'
gem 'acts_as_warnable', git: 'git://github.com/AnnArborTees/acts_as_warnable.git'

group :development do
  gem 'capistrano', '~> 3.2.0'
  gem 'capistrano-rails'
  gem 'capistrano-rvm', github: 'AnnArborTees/rvm'
  gem 'capistrano-bundler', github: 'AnnArborTees/bundler'
  gem 'better_errors', '>= 0.3.2'
  gem 'binding_of_caller'
end

group :development, :test do
  gem 'byebug', platforms: :mri
  gem 'rubinius-debugger', platforms: :rbx
end

group :test do
  gem "rspec-rails", "~> 3.2.0"
  gem 'factory_girl_rails', '>= 4.2.0', require: true
  gem 'capybara', '~> 2.4'
  gem 'capybara-webkit'
  gem 'webmock', require: false
  gem 'rspec-mocks'
  gem 'rspec-retry'
  gem 'email_spec'
  gem 'selenium-webdriver'
  gem 'shoulda-matchers'
end
)
VERSION =
"2.0.3"

Class Method Summary collapse

Class Method Details

.fix_sort_argument_error_on_rubiniusObject



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/softwear.rb', line 76

def self.fix_sort_argument_error_on_rubinius
  # Rubinius calls Enumerator#sort! within Enumerator#sort_by,
  # # and Mail::PartsList calls sort_by within sort!... See the
  # problem?

  if RUBY_ENGINE == 'rbx'
    require 'mail'

    Mail::PartsList.class_eval do
      def map!(&block)
        Mail::PartsList.new(collect(&block))
      end

      def sort!(order = nil)
        return super() if order.nil?

        i = 0
        sorted = self.sort_by do |a|
          [get_order_value(a, order), i += 1]
        end
        self.clear
        sorted.each(&self.method(:<<))
      end
    end
  end
end

.fix_state_machine_around_validationObject



103
104
105
# File 'lib/softwear.rb', line 103

def self.fix_state_machine_around_validation
  StateMachine::Integrations::ActiveModel.instance_eval { public :around_validation }
end