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

Extract ActionView to separate directory #11032

Merged
merged 21 commits into from Jun 20, 2013
Merged

Conversation

@lukaszx0
Copy link
Member

@lukaszx0 lukaszx0 commented Jun 20, 2013

Hey,

This is continuation of work done by @drogus. Basically it moves ActionView outside of ActionPack to its own directory. AV still remains dependency on AP, I will be working on this in coming weeks.

However, after discussing it with @drogus, both of us agreed that it would be good to have those commits in master. (they are basically just moving files, not much changes is code itself) because:

  • @kaspth is working on his GSoC Loofah project - it touches ActionView so it will be super hard to solve conflicts either for him or me once one of our branches get merged.
  • It'll be hard for me if somebody will make some changes in master to rebase it.

/cc @pixeltrix @drogus @kaspth

@kaspth
Copy link
Member

@kaspth kaspth commented Jun 20, 2013

Sounds good to me.

@rafaelfranca
Copy link
Member

@rafaelfranca rafaelfranca commented Jun 20, 2013

:shipit:

@lukaszx0
Copy link
Member Author

@lukaszx0 lukaszx0 commented Jun 20, 2013

Cool. Let me fix few small issues from travis.

@@ -0,0 +1,3 @@
## Rails 4.1.0 (unreleased) ##

This comment has been minimized.

@robin850

robin850 Jun 20, 2013
Member

Should not be removed since all changelog files don't use it anymore?

This comment has been minimized.

@rafaelfranca

rafaelfranca Jun 20, 2013
Member

Yes, and I think we have to move some entries from the actionpack changelog to here.

@rafaelfranca
Copy link
Member

@rafaelfranca rafaelfranca commented Jun 20, 2013

An entry on ActionPack CHANGELOG is good too. Maybe we have to review some documentation.

module ActionPack
# Returns the version of the currently loaded ActionView as a Gem::Version
def self.version
Gem::Version.new "4.0.0.beta1"

This comment has been minimized.

@robin850

robin850 Jun 20, 2013
Member

Should be "4.1.0.beta" no? (or at least "4.0.0.rc1")

This comment has been minimized.

@rafaelfranca

rafaelfranca Jun 20, 2013
Member

4.1.0.beta

@@ -0,0 +1 @@
top level partial

This comment has been minimized.

@robin850

robin850 Jun 20, 2013
Member

New line there no? ^^

@robin850
Copy link
Member

@robin850 robin850 commented Jun 20, 2013

Hi,

Very nice pull request! ❤️ Is it intended not to put a new line at the end of some files? If it's not the case, here are the concerned files:

  • actionview/test/fixtures/digestor/messages/show.html.erb
  • actionview/test/fixtures/fun/games/hello_world.erb
  • actionview/test/fixtures/good_customers/_good_customer.html.erb
  • actionview/test/fixtures/shared.html.erb
  • actionview/test/fixtures/test/_changing_priority.html.erb
  • actionview/test/fixtures/test/_changing_priority.json.erb
  • actionview/test/fixtures/test/_counter.html.erb
  • actionview/test/fixtures/test/_customer.erb
  • actionview/test/fixtures/test/_customer_greeting.erb
  • actionview/test/fixtures/test/_customer_with_var.erb
  • actionview/test/fixtures/test/_first_json_partial.json.erb
  • actionview/test/fixtures/test/_partial_only.erb
  • actionview/test/fixtures/test/_raise_indentation.html.erb
  • actionview/test/fixtures/test/_second_json_partial.json.erb
  • actionview/test/fixtures/test/hello.builder
  • actionview/test/fixtures/test/hello/hello.erb
  • actionview/test/fixtures/test/hello_world.erb

If it's intented, sorry for the spam!

Have a nice day.

@lukaszx0
Copy link
Member Author

@lukaszx0 lukaszx0 commented Jun 20, 2013

Thanks @robin850 and @rafaelfranca for review. I've added few commits above addressing your comments and small things that I've found myself.

Regarding the new line at the end of the file - those files are copied as they were before, in actionpack, nothing's been changed there. I guess that adding new line at the end may break some tests? I don't know. Anyway - it's a matter of style and I don't have opinion on that. It's up to core team.

@guilleiguaran
Copy link
Member

@guilleiguaran guilleiguaran commented Jun 20, 2013

Looks great for me 👍

@spastorino can be interested in review this also

@drogus
Copy link
Member

@drogus drogus commented Jun 20, 2013

@rafaelfranca any comments on new lines? I don't care to be honest, so if this is not a concern I will merge. I'm pretty sure that there can be things that need improvement here (like: tests are a bit bloated, AV tests using controllers etc), but I would like to merge it soon to not create extra work for @strzalek, like rebasing this branch every few days. We can iterate later.

@carlosantoniodasilva
Copy link
Member

@carlosantoniodasilva carlosantoniodasilva commented Jun 20, 2013

Changing new lines in those files will likely break tests that check against their output, not expecting the new line at the end. As long as the files were untouched now, I think those changes can be done separately if necessary.

I'm 👍 on moving, this will avoid a lot of possible headache in future work as you guys have described.

@rafaelfranca
Copy link
Member

@rafaelfranca rafaelfranca commented Jun 20, 2013

No problems with new lines :shipit:

@guilleiguaran
Copy link
Member

@guilleiguaran guilleiguaran commented Jun 20, 2013

👍 please don't care about new lines

@rafaelfranca
Copy link
Member

@rafaelfranca rafaelfranca commented Jun 20, 2013

Well, I think these files should not be removed actionpack/test/fixtures/test/malformed/malformed.html.erb~ and all the ~ files

@drogus
Copy link
Member

@drogus drogus commented Jun 20, 2013

Ok, tests are green, so I'm merging :D

@drogus
Copy link
Member

@drogus drogus commented Jun 20, 2013

@rafaelfranca ah, good catch!

@guilleiguaran
Copy link
Member

@guilleiguaran guilleiguaran commented Jun 20, 2013

good catch @rafaelfranca, files with ~ are kept intentionally

@robin850
Copy link
Member

@robin850 robin850 commented Jun 20, 2013

Sorry for the spam with new lines. ^^

2013/6/20 Guillermo Iguaran notifications@github.com

good catch @rafaelfranca https://github.com/rafaelfranca, files with ~are kept intentionally


Reply to this email directly or view it on GitHubhttps://github.com//pull/11032#issuecomment-19778448
.

lukaszx0 added 2 commits Jun 20, 2013
Now if somebody by mistake will remove malformed files test will raise error.
@lukaszx0
Copy link
Member Author

@lukaszx0 lukaszx0 commented Jun 20, 2013

I've restored files and added assert to check if they exist. Next time if @drogus will remove them, he'll be punished by travis ;)

🚢

@@ -376,6 +376,7 @@ def test_render_knows_about_types_registered_when_extensions_are_checked_earlier
def test_render_ignores_templates_with_malformed_template_handlers
ActiveSupport::Deprecation.silence do
%w(malformed malformed.erb malformed.html.erb malformed.en.html.erb).each do |name|
assert File.exists?(File.expand_path("#{FIXTURE_LOAD_PATH}/test/malformed/#{name}~")), "Malformed file (#{name}~) which should be ignored does not exists"

This comment has been minimized.

@guilleiguaran

guilleiguaran Jun 20, 2013
Member

👍

some people had tried to send PRs removing the ~ files, I think this makes clear that the files are intentionally kept

@drogus
Copy link
Member

@drogus drogus commented Jun 20, 2013

Next time if @drogus will remove them, he'll be punished by travis ;)

@drogus
Copy link
Member

@drogus drogus commented Jun 20, 2013

TravisCI approves 😎

drogus added a commit that referenced this pull request Jun 20, 2013
Extract ActionView to separate directory
@drogus drogus merged commit a29f746 into rails:master Jun 20, 2013
1 check passed
1 check passed
default The Travis CI build passed
Details
@lukaszx0
Copy link
Member Author

@lukaszx0 lukaszx0 commented Jun 20, 2013

star-trek---183260

@spastorino
Copy link
Member

@spastorino spastorino commented Jun 24, 2013

👍

@lukaszx0 lukaszx0 mentioned this pull request Jul 10, 2013
6 of 6 tasks complete
@anatol

This comment has been minimized.

Copy link

@anatol anatol commented on actionview/actionview.gemspec in 78b0934 Dec 10, 2013

FYI: builder version 3.2.2 has been released a while ago. It worth updating actionview to this API/dependency.

This comment has been minimized.

Copy link
Member

@lukaszx0 lukaszx0 replied Dec 10, 2013

Thanks! I'll take care of that.

This comment has been minimized.

Copy link
Contributor

@mrbrdo mrbrdo replied Jan 2, 2015

it's still set to ~3.1

This comment has been minimized.

Copy link
Member

@robin850 robin850 replied Jan 2, 2015

@mrbrdo : The dependency has been relaxed so people can either use 3.1 or 3.2 (see #13255)

This comment has been minimized.

Copy link
Contributor

@mrbrdo mrbrdo replied Jan 2, 2015

Oh okay, I thought ~> 3.1 does not allow 3.2. My bad, should have tried first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

10 participants
You can’t perform that action at this time.