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
Changes from 14 commits
78b0934
0d6e8ed
5bcdf4f
eb23754
5e5bf31
b01331e
f121094
c815775
3fbc89a
6241513
995e9c4
f5305e7
1a62369
194aebb
d8b0499
1d59e94
d1fb5d5
633f84c
8b57b78
08998d2
d6b1caa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Rails 4.1.0 (unreleased) ## | ||
|
||
* First public release |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Copyright (c) 2004-2012 David Heinemeier Hansson | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
= Action View | ||
|
||
|
||
|
||
== Download and installation | ||
|
||
The latest version of Action View can be installed with RubyGems: | ||
|
||
% [sudo] gem install actionview | ||
|
||
Source code can be downloaded as part of the Rails project on GitHub | ||
|
||
* https://github.com/rails/rails/tree/master/actionview | ||
|
||
|
||
== License | ||
|
||
Action View is released under the MIT license: | ||
|
||
* http://www.opensource.org/licenses/MIT | ||
|
||
|
||
== Support | ||
|
||
API documentation is at | ||
|
||
* http://api.rubyonrails.org | ||
|
||
Bug reports and feature requests can be filed with the rest for the Ruby on Rails project here: | ||
|
||
* https://github.com/rails/rails/issues |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
== Running with Rake | ||
|
||
The easiest way to run the unit tests is through Rake. The default task runs | ||
the entire test suite for all classes. For more information, checkout the | ||
full array of rake tasks with "rake -T" | ||
|
||
Rake can be found at http://rake.rubyforge.org | ||
|
||
== Running by hand | ||
|
||
To run a single test suite | ||
|
||
rake test TEST=path/to/test.rb | ||
|
||
which can be further narrowed down to one test: | ||
|
||
rake test TEST=path/to/test.rb TESTOPTS="--name=test_something" | ||
|
||
== Dependency on Active Record and database setup | ||
|
||
Test cases in the test/active_record/ directory depend on having | ||
activerecord and sqlite installed. If Active Record is not in | ||
actionpack/../activerecord directory, or the sqlite rubygem is not installed, | ||
these tests are skipped. | ||
|
||
Other tests are runnable from a fresh copy of actionpack without any configuration. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
require 'rake/testtask' | ||
require 'rake/packagetask' | ||
require 'rubygems/package_task' | ||
|
||
desc "Default Task" | ||
task :default => :test | ||
|
||
# Run the unit tests | ||
|
||
desc "Run all unit tests" | ||
task :test => [:test_action_view, :test_active_record_integration] | ||
|
||
Rake::TestTask.new(:test_action_view) do |t| | ||
t.libs << 'test' | ||
|
||
# make sure we include the tests in alphabetical order as on some systems | ||
# this will not happen automatically and the tests (as a whole) will error | ||
t.test_files = Dir.glob('test/template/**/*_test.rb').sort | ||
|
||
t.warning = true | ||
t.verbose = true | ||
end | ||
|
||
namespace :test do | ||
task :isolated do | ||
ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME')) | ||
Dir.glob("test/{active_record,template}/**/*_test.rb").all? do |file| | ||
sh(ruby, '-Ilib:test', file) | ||
end or raise "Failures" | ||
end | ||
|
||
Rake::TestTask.new(:template) do |t| | ||
t.libs << 'test' | ||
t.pattern = 'test/template/**/*.rb' | ||
end | ||
end | ||
|
||
desc 'ActiveRecord Integration Tests' | ||
Rake::TestTask.new(:test_active_record_integration) do |t| | ||
t.libs << 'test' | ||
t.test_files = Dir.glob("test/activerecord/*_test.rb") | ||
end | ||
|
||
spec = eval(File.read('actionview.gemspec')) | ||
|
||
Gem::PackageTask.new(spec) do |p| | ||
p.gem_spec = spec | ||
end | ||
|
||
desc "Release to gemcutter" | ||
task :release => :package do | ||
require 'rake/gemcutter' | ||
Rake::Gemcutter::Tasks.new(spec).define | ||
Rake::Task['gem:push'].invoke | ||
end | ||
|
||
task :lines do | ||
lines, codelines, total_lines, total_codelines = 0, 0, 0, 0 | ||
|
||
FileList["lib/**/*.rb"].each do |file_name| | ||
next if file_name =~ /vendor/ | ||
File.open(file_name, 'r') do |f| | ||
while line = f.gets | ||
lines += 1 | ||
next if line =~ /^\s*$/ | ||
next if line =~ /^\s*#/ | ||
codelines += 1 | ||
end | ||
end | ||
puts "L: #{sprintf("%4d", lines)}, LOC #{sprintf("%4d", codelines)} | #{file_name}" | ||
|
||
total_lines += lines | ||
total_codelines += codelines | ||
|
||
lines, codelines = 0, 0 | ||
end | ||
|
||
puts "Total: Lines #{total_lines}, LOC #{total_codelines}" | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
version = File.read(File.expand_path("../../RAILS_VERSION", __FILE__)).strip | ||
|
||
Gem::Specification.new do |s| | ||
s.platform = Gem::Platform::RUBY | ||
s.name = 'actionview' | ||
s.version = version | ||
s.summary = 'Rendering framework putting the V in MVC (part of Rails).' | ||
s.description = '' | ||
|
||
s.required_ruby_version = '>= 1.9.3' | ||
|
||
s.license = 'MIT' | ||
|
||
s.author = 'David Heinemeier Hansson' | ||
s.email = 'david@loudthinking.com' | ||
s.homepage = 'http://www.rubyonrails.org' | ||
|
||
s.files = Dir['CHANGELOG.md', 'README.rdoc', 'MIT-LICENSE', 'lib/**/*'] | ||
s.require_path = 'lib' | ||
s.requirements << 'none' | ||
|
||
s.add_dependency 'activesupport', version | ||
s.add_dependency 'activemodel', version | ||
|
||
s.add_dependency 'builder', '~> 3.1.0' | ||
s.add_dependency 'erubis', '~> 2.7.0' | ||
|
||
s.add_development_dependency 'actionpack', version | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
require 'action_dispatch/http/mime_type' | ||
require 'erubis' | ||
|
||
module ActionView | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module ActionPack | ||
# Returns the version of the currently loaded ActionView as a Gem::Version | ||
def self.version | ||
Gem::Version.new "4.0.0.beta1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 4.1.0.beta |
||
end | ||
|
||
module VERSION #:nodoc: | ||
MAJOR, MINOR, TINY, PRE = ActionPack.version.segments | ||
STRING = ActionPack.version.to_s | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not be removed since all changelog files don't use it anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and I think we have to move some entries from the actionpack changelog to here.