Class: Pinspec::AppProfile

Inherits:
Data
  • Object
show all
Defined in:
lib/pinspec/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attachmentsObject (readonly)

Returns the value of attribute attachments

Returns:

  • (Object)

    the current value of attachments



196
197
198
# File 'lib/pinspec/types.rb', line 196

def attachments
  @attachments
end

#authObject (readonly)

Returns the value of attribute auth

Returns:

  • (Object)

    the current value of auth



196
197
198
# File 'lib/pinspec/types.rb', line 196

def auth
  @auth
end

#authzObject (readonly)

Returns the value of attribute authz

Returns:

  • (Object)

    the current value of authz



196
197
198
# File 'lib/pinspec/types.rb', line 196

def authz
  @authz
end

#db_cleanerObject (readonly)

Returns the value of attribute db_cleaner

Returns:

  • (Object)

    the current value of db_cleaner



196
197
198
# File 'lib/pinspec/types.rb', line 196

def db_cleaner
  @db_cleaner
end

#default_localeObject (readonly)

Returns the value of attribute default_locale

Returns:

  • (Object)

    the current value of default_locale



196
197
198
# File 'lib/pinspec/types.rb', line 196

def default_locale
  @default_locale
end

#default_zoneObject (readonly)

Returns the value of attribute default_zone

Returns:

  • (Object)

    the current value of default_zone



196
197
198
# File 'lib/pinspec/types.rb', line 196

def default_zone
  @default_zone
end

#factoriesObject (readonly)

Returns the value of attribute factories

Returns:

  • (Object)

    the current value of factories



196
197
198
# File 'lib/pinspec/types.rb', line 196

def factories
  @factories
end

#flagsObject (readonly)

Returns the value of attribute flags

Returns:

  • (Object)

    the current value of flags



196
197
198
# File 'lib/pinspec/types.rb', line 196

def flags
  @flags
end

#model_findingsObject (readonly)

Returns the value of attribute model_findings

Returns:

  • (Object)

    the current value of model_findings



196
197
198
# File 'lib/pinspec/types.rb', line 196

def model_findings
  @model_findings
end

#multi_dbObject (readonly)

Returns the value of attribute multi_db

Returns:

  • (Object)

    the current value of multi_db



196
197
198
# File 'lib/pinspec/types.rb', line 196

def multi_db
  @multi_db
end

#notesObject (readonly)

Returns the value of attribute notes

Returns:

  • (Object)

    the current value of notes



196
197
198
# File 'lib/pinspec/types.rb', line 196

def notes
  @notes
end

#queue_adapter_in_testsObject (readonly)

Returns the value of attribute queue_adapter_in_tests

Returns:

  • (Object)

    the current value of queue_adapter_in_tests



196
197
198
# File 'lib/pinspec/types.rb', line 196

def queue_adapter_in_tests
  @queue_adapter_in_tests
end

#rails_floor_okObject (readonly)

Returns the value of attribute rails_floor_ok

Returns:

  • (Object)

    the current value of rails_floor_ok



196
197
198
# File 'lib/pinspec/types.rb', line 196

def rails_floor_ok
  @rails_floor_ok
end

#rails_versionObject (readonly)

Returns the value of attribute rails_version

Returns:

  • (Object)

    the current value of rails_version



196
197
198
# File 'lib/pinspec/types.rb', line 196

def rails_version
  @rails_version
end

#ruby_versionObject (readonly)

Returns the value of attribute ruby_version

Returns:

  • (Object)

    the current value of ruby_version



196
197
198
# File 'lib/pinspec/types.rb', line 196

def ruby_version
  @ruby_version
end

#schemaObject (readonly)

Returns the value of attribute schema

Returns:

  • (Object)

    the current value of schema



196
197
198
# File 'lib/pinspec/types.rb', line 196

def schema
  @schema
end

#soft_deleteObject (readonly)

Returns the value of attribute soft_delete

Returns:

  • (Object)

    the current value of soft_delete



196
197
198
# File 'lib/pinspec/types.rb', line 196

def soft_delete
  @soft_delete
end

#springObject (readonly)

Returns the value of attribute spring

Returns:

  • (Object)

    the current value of spring



196
197
198
# File 'lib/pinspec/types.rb', line 196

def spring
  @spring
end

#tenancyObject (readonly)

Returns the value of attribute tenancy

Returns:

  • (Object)

    the current value of tenancy



196
197
198
# File 'lib/pinspec/types.rb', line 196

def tenancy
  @tenancy
end

#test_stackObject (readonly)

Returns the value of attribute test_stack

Returns:

  • (Object)

    the current value of test_stack



196
197
198
# File 'lib/pinspec/types.rb', line 196

def test_stack
  @test_stack
end

#transactional_fixturesObject (readonly)

Returns the value of attribute transactional_fixtures

Returns:

  • (Object)

    the current value of transactional_fixtures



196
197
198
# File 'lib/pinspec/types.rb', line 196

def transactional_fixtures
  @transactional_fixtures
end

#versioningObject (readonly)

Returns the value of attribute versioning

Returns:

  • (Object)

    the current value of versioning



196
197
198
# File 'lib/pinspec/types.rb', line 196

def versioning
  @versioning
end

Instance Method Details

#after_commit_modelsObject



210
211
212
# File 'lib/pinspec/types.rb', line 210

def after_commit_models
  findings(:after_commit)
end

#findings(kind) ⇒ Object



206
207
208
# File 'lib/pinspec/types.rb', line 206

def findings(kind)
  model_findings.select { |f| f.kind == kind }
end

#isolationObject



218
219
220
221
222
223
224
# File 'lib/pinspec/types.rb', line 218

def isolation
  case db_cleaner
  when :truncation  then :truncation
  when :transaction then :transaction
  else transactional_fixtures == false ? :truncation : :transaction
  end
end

#isolation_sourceObject



226
227
228
229
230
231
# File 'lib/pinspec/types.rb', line 226

def isolation_source
  case db_cleaner
  when :truncation, :transaction then "DatabaseCleaner.strategy = #{db_cleaner.inspect}"
  else "use_transactional_fixtures = #{transactional_fixtures.inspect}"
  end
end

#rails_floor_ok?Boolean

Returns:

  • (Boolean)


214
215
216
# File 'lib/pinspec/types.rb', line 214

def rails_floor_ok?
  rails_floor_ok == true
end

#warningsObject



233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/pinspec/types.rb', line 233

def warnings
  [
    multi_db_warning,
    floor_warning,
    isolation_warning,
    queue_adapter_warning,
    apartment_warning,
    default_scope_warning,
    attachment_warning,
    spring_warning
  ].compact
end