jordi / find_by_sql_file

Enhancement to ActiveRecord::Base#find_by_sql to use external SQL files

This URL has Read+Write access

find_by_sql_file / find_by_sql_file.gemspec
100644 53 lines (48 sloc) 1.892 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Gem::Specification.new do |s|
  s.name = 'find_by_sql_file'
  s.version = '0.9.5'
  s.date = '2008-10-06'
 
  s.author = 'Jordi Bunster'
  s.email = 'jordi@bunster.org'
  s.homepage = 'http://github.com/jordi/find_by_sql_file'
 
  s.summary = "Extension to ActiveRecord's find_by_sql to use SQL files"
  s.description = %{ This ActiveRecord extension lets you pass a symbol to
ActiveRecord::Base#find_by_sql, which refers to a query
file saved under app/queries/. Variable replacement
and ERB are available, and comments and indentation are
stripped. }.strip!.gsub! /\s+/, ' '
 
  s.test_files = %w[
test
test/database.yml
test/find_by_sql_file_test.rb
test/mock_rails_root
test/mock_rails_root/app
test/mock_rails_root/app/queries
test/mock_rails_root/app/queries/articles
test/mock_rails_root/app/queries/articles/all.sql
test/mock_rails_root/app/queries/articles/count_all.sql
test/mock_rails_root/app/queries/articles/last_updated.sql
test/mock_rails_root/app/queries/articles/with_erb_fields.sql
test/mock_rails_root/app/queries/articles/with_variables.sql
test/schema.rb
test/test_helper.rb
]
 
  s.files = %w[ MIT-LICENSE
README.markdown
Rakefile
WHATSNEW
find_by_sql_file.gemspec
init.rb
install.rb
lib
lib/bunster
lib/bunster/erb_jacket.rb
lib/bunster/find_by_sql_file.rb
lib/find_by_sql_file.rb
lib/jordi-find_by_sql_file.rb
rails
rails/init.rb ]
 
  s.has_rdoc = true
  s.extra_rdoc_files = %w[ README.markdown ]
  s.rdoc_options = %w[ --main README.markdown ]
end