Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move file configuration to file usage #703

Merged
merged 1 commit into from
Feb 7, 2017
Merged

Conversation

tf
Copy link
Member

@tf tf commented Feb 7, 2017

Ensure that editing a file configuration cannot change already
published entries.

  • Move configuration column to file_usages table

  • Split Revision#files scope into find_files and find_file
    methods and return UsedFile decorators which take the
    configuration from a file usage.

  • Move FileUsagesController actions to FilesController and make it
    act like a facade that hides the concept of file usages, always
    working with the usages from the entry draft.

  • Ensure file usages for nested files are created on file reuse.

  • Ensure file usages for nested files are deleted together with the
    parent's files file usage.

  • Get complete list of entry files after making a reuse request inside
    the editor. Ensure file types are associated correctly when files
    are added via FilesCollection#set.

Ensure that editing a file configuration cannot change already
published entries.

* Move `configuration` column to `file_usages` table

* Split `Revision#files` scope into `find_files` and `find_file`
  methods and return `UsedFile` decorators which take the
  configuration from a file usage.

* Move `FileUsagesController` actions to `FilesController` and make it
  act like a facade that hides the concept of file usages, always
  working with the usages from the entry draft.

* Ensure file usages for nested files are created on file reuse.

* Ensure file usages for nested files are deleted together with the
  parent's files file usage.

* Get complete list of entry files after making a reuse request inside
  the editor. Ensure file types are associated correctly when files
  are added via `FilesCollection#set`.
@tf tf added this to the v0.12 milestone Feb 7, 2017
@@ -29,9 +29,9 @@ def file_duration(file)
end

def files_json_seeds(entry)
inner = Pageflow.config.file_types.map do |file_type, result|
inner = Pageflow.config.file_types.map do |file_type|

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer {...} over do...end for multi-line chained blocks.

@coveralls
Copy link

coveralls commented Feb 7, 2017

Coverage Status

Coverage decreased (-0.01%) to 99.123% when pulling 07442b7 on tf:file-usage-config into ce06bc9 on codevise:master.

@tf tf merged commit 69390ad into codevise:master Feb 7, 2017
@tf tf deleted the file-usage-config branch February 7, 2017 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants