Module: Decidim::Dev
- Includes:
- ActiveSupport::Configurable
- Defined in:
- lib/decidim/dev.rb,
lib/decidim/dev/admin.rb,
lib/decidim/dev/engine.rb,
lib/decidim/dev/railtie.rb,
lib/decidim/dev/version.rb,
lib/decidim/dev/auth_engine.rb,
lib/decidim/dev/admin_engine.rb,
lib/decidim/dev/test/map_server.rb,
lib/decidim/dev/dummy_translator.rb,
app/models/decidim/dev/dummy_resource.rb,
lib/decidim/dev/needs_development_tools.rb,
app/forms/decidim/dev/dummy_resource_form.rb,
app/models/decidim/dev/application_record.rb,
app/events/decidim/dev/dummy_resource_event.rb,
app/models/decidim/dev/nested_dummy_resource.rb,
app/serializers/decidim/dev/dummy_serializer.rb,
app/mailers/decidim/dev/dummy_resource_mailer.rb,
app/commands/decidim/dev/create_dummy_resource.rb,
app/models/decidim/dev/coauthorable_dummy_resource.rb,
app/jobs/decidim/dev/hide_all_created_by_author_job.rb,
app/presenters/decidim/dev/official_author_presenter.rb,
app/controllers/decidim/dev/dummy_resources_controller.rb
Overview
This holds the decidim-dev version.
Defined Under Namespace
Modules: Admin, NeedsDevelopmentTools, Test Classes: AdminEngine, ApplicationRecord, AuthEngine, CoauthorableDummyResource, CreateDummyResource, DummyResource, DummyResourceEvent, DummyResourceForm, DummyResourceMailer, DummyResourcesController, DummySerializer, DummyTranslator, Engine, HideAllCreatedByAuthorJob, NestedDummyResource, OfficialAuthorPresenter, Railtie
Class Method Summary collapse
-
.asset(name) ⇒ Object
Public: Finds an asset.
-
.dummy_app_path ⇒ Object
Public: Get the dummy application path and raises an error if it is not set.
-
.dummy_app_path=(path) ⇒ Object
Public: Sets the dummy application path for testing.
-
.install_tasks ⇒ Object
Public: add rake tasks.
-
.test_file(filename, content_type) ⇒ Object
Public: Returns a file for testing, just like file fields expect it.
- .version ⇒ Object
Class Method Details
.asset(name) ⇒ Object
Public: Finds an asset.
Returns a String with the path for a particular asset.
29 30 31 |
# File 'lib/decidim/dev.rb', line 29 def self.asset(name) File.(File.join(__dir__, "dev", "assets", name)) end |
.dummy_app_path ⇒ Object
Public: Get the dummy application path and raises an error if it is not set.
53 54 55 56 57 58 59 |
# File 'lib/decidim/dev.rb', line 53 def self.dummy_app_path unless @dummy_app_path raise StandardError, "Please, add Decidim::Dev::dummy_app_path = File.expand_path(File.join(\"..\", \"spec\", \"decidim_dummy_app\")) to\n your spec helper with the path to the generated dummy app" end @dummy_app_path end |
.dummy_app_path=(path) ⇒ Object
Public: Sets the dummy application path for testing.
path - A string value defining the path.
48 49 50 |
# File 'lib/decidim/dev.rb', line 48 def self.dummy_app_path=(path) @dummy_app_path = path end |
.install_tasks ⇒ Object
Public: add rake tasks
39 40 41 42 43 |
# File 'lib/decidim/dev.rb', line 39 def self.install_tasks Dir[File.join(__dir__, "../tasks/*.rake")].each do |file| load file end end |
.test_file(filename, content_type) ⇒ Object
Public: Returns a file for testing, just like file fields expect it
34 35 36 |
# File 'lib/decidim/dev.rb', line 34 def self.test_file(filename, content_type) Rack::Test::UploadedFile.new(asset(filename), content_type) end |
.version ⇒ Object
6 7 8 |
# File 'lib/decidim/dev/version.rb', line 6 def self.version "0.29.1" end |