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

Feature/improve file attributes #1327

Closed
wants to merge 2 commits into from

Conversation

aledustet
Copy link
Contributor

@aledustet aledustet commented Aug 2, 2019

I am having a hard time on where to locate the method and have access
to the method name and the instance so I can do something like:

file_loader = FileLoader.new()
instance.send(method_name).attach(
  io: file_loader.io, filename: file_loader.filename
)

Why:
This is to add simple support to files on factories. This is the
original [issue](#1282).

What:
It is a common behavior to interact with files when creating factories,
and it is used heavily, as demonstrated with the many examples in the
issue, this is a first draft and I would love to see more use-cases to
add to the acceptance test. For the time being we have at least the base
case added.
@@ -1,3 +1,6 @@
source "https://rubygems.org"

gemspec name: "factory_bot"

gem 'pry'
gem 'activestorage'
Copy link

Choose a reason for hiding this comment

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

Bundler/OrderedGems: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem activestorage should appear before pry.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@@ -1,3 +1,6 @@
source "https://rubygems.org"

gemspec name: "factory_bot"

gem 'pry'
Copy link

Choose a reason for hiding this comment

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

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

- I am having a hard time on where to locate the method and have access
to the method name and the instance so I can do something like:
```ruby
file_loader = FileLoader.new()
instance.send(method_name).attach(
  io: file_loader.io, filename: file_loader.filename
)
```
@aledustet aledustet force-pushed the feature/improve-file-attributes branch from 67c0f64 to f113bc3 Compare August 2, 2019 20:22
@composerinteralia
Copy link
Collaborator

@aledustet what is the status of this draft? Are you still actively working on this, or should we close this for now?

@composerinteralia
Copy link
Collaborator

Going to close this for now since there hasn't been any activity for a while.

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.

2 participants