studio54 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. data/Gemfile +31 -0
  2. data/Gemfile.lock +68 -0
  3. data/LICENSE +25 -0
  4. data/README.md +0 -0
  5. data/Rakefile +56 -0
  6. data/VERSION +5 -0
  7. data/app/controllers/users_controller.rb +29 -0
  8. data/app/models/post.rb +4 -0
  9. data/app/models/user.rb +46 -0
  10. data/bare/Gemfile +31 -0
  11. data/bare/Rakefile +28 -0
  12. data/bare/config.ru +9 -0
  13. data/bare/config/app_tie.rb +12 -0
  14. data/bare/config/db.rb +20 -0
  15. data/bare/config/db_connect.rb +19 -0
  16. data/bare/config/environment.rb +17 -0
  17. data/bare/config/sinatra.rb +36 -0
  18. data/bare/config/studio54_tie.rb +2 -0
  19. data/bare/dance.rb +11 -0
  20. data/bare/lib/after_filters.rb +7 -0
  21. data/bare/lib/before_filters.rb +7 -0
  22. data/bare/lib/helpers.rb +5 -0
  23. data/bare/public/index.rhtml +1 -0
  24. data/bare/public/layout.rhtml +12 -0
  25. data/bare/static/css/base.css +86 -0
  26. data/bare/static/css/yui_reset.css +30 -0
  27. data/bare/test/helpers.rb +8 -0
  28. data/bare/test/suite.rb +13 -0
  29. data/bin/studio54 +65 -0
  30. data/config.ru +9 -0
  31. data/config/app_tie.rb +8 -0
  32. data/config/db.rb +20 -0
  33. data/config/db_connect.rb +19 -0
  34. data/config/environment.rb +17 -0
  35. data/config/sinatra.rb +36 -0
  36. data/dance.rb +80 -0
  37. data/ideas +0 -0
  38. data/lib/after_filters.rb +7 -0
  39. data/lib/base.rb +29 -0
  40. data/lib/before_filters.rb +30 -0
  41. data/lib/helpers.rb +24 -0
  42. data/lib/lazy_controller.rb +87 -0
  43. data/lib/lazy_record.rb +395 -0
  44. data/lib/partials.rb +19 -0
  45. data/lib/studio54.rb +14 -0
  46. data/lib/vendor.rb +23 -0
  47. data/public/_partial_test.rhtml +4 -0
  48. data/public/all.rhtml +7 -0
  49. data/public/form.rhtml +11 -0
  50. data/public/index.rhtml +6 -0
  51. data/public/layout.rhtml +15 -0
  52. data/public/partial_test.rhtml +6 -0
  53. data/public/test_find_by.rhtml +4 -0
  54. data/rack/cache/body/ec/b48431757330e446c58d88e317574ef0eca2e9 +0 -0
  55. data/rack/cache/meta/25/3a7a342a66b79119b7b8cb34bda89978f9e606 +0 -0
  56. data/rack/cache/meta/c1/34c9b7112c7d884220d6ee9a8e43ec69d2ea6e +0 -0
  57. data/static/css/base.css +86 -0
  58. data/static/css/yui_reset.css +30 -0
  59. data/static/hello.html +1 -0
  60. data/studio54.gemspec +25 -0
  61. data/tags +149 -0
  62. data/test/email.rb +8 -0
  63. data/test/environment.rb +28 -0
  64. data/test/helpers.rb +8 -0
  65. data/test/integration/index_test.rb +41 -0
  66. data/test/integration/partial_test.rb +50 -0
  67. data/test/mail/email_test.rb +14 -0
  68. data/test/rack/helpers.rb +23 -0
  69. data/test/suite.rb +8 -0
  70. data/test/unit/associations_test.rb +33 -0
  71. data/test/unit/callbacks_test.rb +16 -0
  72. data/test/unit/database_test.rb +73 -0
  73. data/test/unit/model_introspection_test.rb +44 -0
  74. data/test/unit/serialization_test.rb +19 -0
  75. data/test/unit/validations_test.rb +73 -0
  76. metadata +165 -0
@@ -0,0 +1,19 @@
1
+ # https://gist.github.com/119874
2
+ module Sinatra::Partials
3
+ def partial(template, *args)
4
+ template_array = template.to_s.split('/')
5
+ template = template_array[0..-2].join('/') + "/_#{template_array[-1]}"
6
+ options = args.last.is_a?(Hash) ? args.pop : {}
7
+ options.merge!(:layout => false)
8
+ locals = options[:locals] || {}
9
+ if collection = options.delete(:collection) then
10
+ collection.inject([]) do |buffer, member|
11
+ buffer << erb(:"#{template}", options.merge(:layout =>
12
+ false, :locals => {template_array[-1].to_sym => member}.merge(locals)))
13
+ end.join("\n")
14
+ else
15
+ erb(:"#{template}", options)
16
+ end
17
+ end
18
+ end
19
+
@@ -0,0 +1,14 @@
1
+ require_relative 'vendor'
2
+
3
+ module Studio54
4
+ # require all studio54 library files along with the current
5
+ # project's config files
6
+ lib = File.join(File.expand_path(File.dirname(__FILE__)), '..', 'lib')
7
+ ['l/base', 'c/sinatra', 'l/lazy_record', 'l/lazy_controller', 'c/db',
8
+ 'c/db_connect', 'l/before_filters', 'l/after_filters',
9
+ 'l/helpers'].each do |f|
10
+ require File.join(lib, f[2..-1]) if f[0] == 'l'
11
+ require File.join(CONFIGDIR, f[2..-1]) if f[0] == 'c'
12
+ end
13
+ end
14
+
@@ -0,0 +1,23 @@
1
+ require "sinatra/base"
2
+ require "rack/cache"
3
+ require "rack-flash"
4
+ require "active_support/core_ext/array"
5
+ require "active_support/core_ext/class"
6
+ require "active_support/core_ext/enumerable"
7
+ require "active_support/core_ext/hash"
8
+ require "active_support/core_ext/integer"
9
+ require "active_support/core_ext/kernel"
10
+ require "active_support/core_ext/module"
11
+ require "active_support/core_ext/object"
12
+ require "active_support/core_ext/proc"
13
+ require "active_support/core_ext/range"
14
+ require "active_support/core_ext/string/behavior"
15
+ require "active_support/core_ext/string/filters"
16
+ require "active_support/core_ext/string/inflections"
17
+ require "active_support/callbacks"
18
+
19
+ require "active_model"
20
+ require "dbi"
21
+
22
+ require_relative 'partials'
23
+
@@ -0,0 +1,4 @@
1
+ <% @partial_content.each do |c| %>
2
+ <p>I am <%= c %> years old</p>
3
+ <% end %>
4
+
@@ -0,0 +1,7 @@
1
+ <h1>All Users</h1>
2
+ <%= flash[:notice] if flash[:notice].present? %>
3
+ <br />
4
+ <% @users.each do |user| %>
5
+ <p><%= user.name %> is <%= user.age %> years old</p>
6
+ <% end %>
7
+
@@ -0,0 +1,11 @@
1
+ <% unless flash[:error].blank? %>
2
+ <% flash[:error].each do |k,v| %>
3
+ <%= k.to_s + " #{v}<br />" %>
4
+ <% end %>
5
+ <% end %>
6
+ <form method="post" action="/create_user">
7
+ Name:<input type="text" name="user[name]" /><br />
8
+ Age:<input type="text" name="user[age]" /><br />
9
+ <input type="submit" value="create" />
10
+ </form>
11
+
@@ -0,0 +1,6 @@
1
+ <h1>Hello world</h1>
2
+ <%= flash[:notice] if flash[:notice].present? %>
3
+ <br />
4
+ <a href="hello.html">Go to hello</a><br />
5
+ <p>Hello <%= @user.name %></p>
6
+
@@ -0,0 +1,15 @@
1
+ <html>
2
+ <head>
3
+ <!--
4
+ -<link rel="stylesheet" type="text/css" href="/css/yui_reset.css" />
5
+ -<link rel="stylesheet" type="text/css" href="/css/base.css" />
6
+ -->
7
+ </head>
8
+ <body>
9
+ <title>Site</title>
10
+ <div id="container">
11
+ <%= yield %>
12
+ </div>
13
+ </body>
14
+ </html>
15
+
@@ -0,0 +1,6 @@
1
+ <h1>Partial Test</h1>
2
+ <% @content.each do |c| %>
3
+ <p>I am <%= c %> years old</p>
4
+ <% end %>
5
+ <%= partial :partial_test %>
6
+
@@ -0,0 +1,4 @@
1
+ <h1>Hello world</h1>
2
+ <a href="hello.html">Go to hello</a><br />
3
+ <%= @user.name %>
4
+
@@ -0,0 +1,86 @@
1
+ /* base.css, part of YUI's CSS Foundation */
2
+ h1 {
3
+ /*18px via YUI Fonts CSS foundation*/
4
+ font-size:138.5%;
5
+ }
6
+ h2 {
7
+ /*16px via YUI Fonts CSS foundation*/
8
+ font-size:123.1%;
9
+ }
10
+ h3 {
11
+ /*14px via YUI Fonts CSS foundation*/
12
+ font-size:108%;
13
+ }
14
+ h1,h2,h3 {
15
+ /* top & bottom margin based on font size */
16
+ margin:1em 0;
17
+ }
18
+ h1,h2,h3,h4,h5,h6,strong {
19
+ /*bringing boldness back to headers and the strong element*/
20
+ font-weight:bold;
21
+ }
22
+ abbr,acronym {
23
+ /*indicating to users that more info is available */
24
+ border-bottom:1px dotted #000;
25
+ cursor:help;
26
+ }
27
+ em {
28
+ /*bringing italics back to the em element*/
29
+ font-style:italic;
30
+ }
31
+ blockquote,ul,ol,dl {
32
+ /*giving blockquotes and lists room to breath*/
33
+ margin:1em;
34
+ }
35
+ ol,ul,dl {
36
+ /*bringing lists on to the page with breathing room */
37
+ margin-left:2em;
38
+ }
39
+ ol li {
40
+ /*giving OL's LIs generated numbers*/
41
+ list-style: decimal outside;
42
+ }
43
+ ul li {
44
+ /*giving UL's LIs generated disc markers*/
45
+ list-style: disc outside;
46
+ }
47
+ dl dd {
48
+ /*giving UL's LIs generated numbers*/
49
+ margin-left:1em;
50
+ }
51
+ th,td {
52
+ /*borders and padding to make the table readable*/
53
+ border:1px solid #000;
54
+ padding:.5em;
55
+ }
56
+ th {
57
+ /*distinguishing table headers from data cells*/
58
+ font-weight:bold;
59
+ text-align:center;
60
+ }
61
+ caption {
62
+ /*coordinated marking to match cell's padding*/
63
+ margin-bottom:.5em;
64
+ /*centered so it doesn't blend in to other content*/
65
+ text-align:center;
66
+ }
67
+ p,fieldset,table {
68
+ /*so things don't run into each other*/
69
+ margin-bottom:1em;
70
+ }
71
+
72
+ /* my own styles */
73
+ body {
74
+ font-size:1.25em;
75
+ line-height:1.7;
76
+ margin-left:.5em;
77
+ margin-right:.5em;
78
+ margin-bottom:.5em;
79
+ margin-top:.5em;
80
+ }
81
+
82
+ h1 {
83
+ margin-bottom:.5em;
84
+ margin-top:.5em;
85
+ }
86
+
@@ -0,0 +1,30 @@
1
+ body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
2
+ margin:0;
3
+ padding:0;
4
+ }
5
+ table {
6
+ border-collapse:collapse;
7
+ border-spacing:0;
8
+ }
9
+ fieldset,img {
10
+ border:0;
11
+ }
12
+ address,caption,cite,code,dfn,em,strong,th,var {
13
+ font-style:normal;
14
+ font-weight:normal;
15
+ }
16
+ ol,ul {
17
+ list-style:none;
18
+ }
19
+ caption,th {
20
+ text-align:left;
21
+ }
22
+ h1,h2,h3,h4,h5,h6 {
23
+ font-size:100%;
24
+ font-weight:normal;
25
+ }
26
+ q:before,q:after {
27
+ content:'';
28
+ }
29
+ abbr,acronym { border:0;
30
+ }
@@ -0,0 +1 @@
1
+ <h2>omg it works</h2>
@@ -0,0 +1,25 @@
1
+ load File.join(File.expand_path(File.dirname(__FILE__)), 'VERSION')
2
+
3
+ require 'rake'
4
+
5
+ summary = 'Sinatra meets rails, falls in love, and dances through the night.'
6
+ files = FileList['**/*'].to_a
7
+
8
+ Gem::Specification.new do |s|
9
+ s.name = 'studio54'
10
+ s.version = Studio54::VERSION * '.'
11
+ s.date = Time.now.to_s[0...10]
12
+ s.authors = ['Luke Gruber']
13
+ s.email = 'luke.gru@gmail.com'
14
+ s.summary = summary
15
+ s.description = summary
16
+ s.bindir = 'bin'
17
+ s.files = files
18
+ s.add_dependency 'rack'
19
+ s.add_dependency 'rack-cache'
20
+ s.add_dependency 'rack-flash'
21
+ s.add_dependency 'sinatra'
22
+ s.executables << 'studio54'
23
+ s.license = 'MIT'
24
+ s.required_ruby_version = '>= 1.9.1'
25
+ end
data/tags ADDED
@@ -0,0 +1,149 @@
1
+ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
2
+ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
3
+ !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
4
+ !_TAG_PROGRAM_NAME Exuberant Ctags //
5
+ !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
6
+ !_TAG_PROGRAM_VERSION 5.8 //
7
+ Array lib/lazy_record.rb /^class Array$/;" c
8
+ AssociationTest test/unit/associations_test.rb /^class AssociationTest < MiniTest::Unit::TestCase$/;" c
9
+ Base lib/base.rb /^ class Base$/;" c class:Studio54
10
+ CallbackTest test/unit/callbacks_test.rb /^class CallbackTest < MiniTest::Unit::TestCase$/;" c
11
+ Config config/environment.rb /^ module Config$/;" m class:Studio54
12
+ Config config/options.rb /^ module Config$/;" m class:Studio54
13
+ Dancefloor bare/lib/before_filters.rb /^ class Dancefloor$/;" c class:Studio54
14
+ Dancefloor lib/after_filters.rb /^ class Dancefloor$/;" c class:Studio54
15
+ Dancefloor lib/before_filters.rb /^ class Dancefloor$/;" c class:Studio54
16
+ Dancefloor test/helpers.rb /^ class Dancefloor$/;" c class:Studio54
17
+ DatabaseTest test/unit/database_test.rb /^class DatabaseTest < MiniTest::Unit::TestCase$/;" c
18
+ Db bare/config/db.rb /^ class Db$/;" c class:Studio54
19
+ Db config/db.rb /^ class Db$/;" c class:Studio54
20
+ Environment config/environment.rb /^ module Environment$/;" m class:Studio54.Config
21
+ IndexPageTest test/first.rb /^class IndexPageTest < MiniTest::Unit::TestCase$/;" c
22
+ IndexPageTest test/integration/index_test.rb /^class IndexPageTest < MiniTest::Unit::TestCase$/;" c
23
+ IndexPageTest test/unit/associations.rb /^class IndexPageTest < MiniTest::Unit::TestCase$/;" c
24
+ LazyController lib/lazy_controller.rb /^class LazyController < Studio54::Base$/;" c
25
+ LazyRecord lib/lazy_record.rb /^class LazyRecord < Studio54::Base$/;" c
26
+ MailTest test/mail/email_test.rb /^class MailTest < MiniTest::Unit::TestCase$/;" c
27
+ MockResponse test/rack/helpers.rb /^ class MockResponse$/;" c class:Rack
28
+ ModelIntrospectionTest test/unit/model_introspection_test.rb /^class ModelIntrospectionTest < MiniTest::Unit::TestCase$/;" c
29
+ PartialTest test/integration/partial_test.rb /^class PartialTest < MiniTest::Unit::TestCase$/;" c
30
+ Post app/models/post.rb /^class Post < LazyRecord$/;" c
31
+ Rack test/rack/helpers.rb /^module Rack$/;" m
32
+ Response lib/helpers.rb /^ class Response$/;" c class:Sinatra
33
+ Routable lib/lazy_controller.rb /^ module Routable$/;" m
34
+ SerializeTest test/unit/serialization_test.rb /^class SerializeTest < MiniTest::Unit::TestCase$/;" c
35
+ Sinatra lib/helpers.rb /^module Sinatra$/;" m
36
+ Sinatra lib/partials.rb /^module Sinatra::Partials$/;" m
37
+ Studio54 bare/config/app_tie.rb /^module Studio54$/;" m
38
+ Studio54 bare/config/db.rb /^module Studio54$/;" m
39
+ Studio54 bare/config/db_connect.rb /^module Studio54$/;" m
40
+ Studio54 bare/dance.rb /^class Studio54::Dancefloor$/;" c
41
+ Studio54 bare/lib/before_filters.rb /^module Studio54$/;" m
42
+ Studio54 bare/lib/helpers.rb /^class Studio54::Dancefloor$/;" c
43
+ Studio54 config/app_tie.rb /^module Studio54$/;" m
44
+ Studio54 config/db.rb /^module Studio54$/;" m
45
+ Studio54 config/db_connect.rb /^module Studio54$/;" m
46
+ Studio54 config/environment.rb /^module Studio54$/;" m
47
+ Studio54 config/options.rb /^module Studio54$/;" m
48
+ Studio54 config/sinatra.rb /^class Studio54::Dancefloor < Sinatra::Base$/;" c
49
+ Studio54 dance.rb /^class Studio54::Dancefloor$/;" c
50
+ Studio54 lib/after_filters.rb /^module Studio54$/;" m
51
+ Studio54 lib/base.rb /^module Studio54$/;" m
52
+ Studio54 lib/before_filters.rb /^module Studio54$/;" m
53
+ Studio54 lib/helpers.rb /^class Studio54::Dancefloor$/;" c
54
+ Studio54 lib/studio54.rb /^module Studio54$/;" m
55
+ Studio54 test/email.rb /^module Studio54$/;" m
56
+ Studio54 test/environment.rb /^module Studio54$/;" m
57
+ Studio54 test/helpers.rb /^module Studio54$/;" m
58
+ Studio54 test/suite.rb /^module Studio54$/;" m
59
+ User app/models/user.rb /^class User < LazyRecord$/;" c
60
+ UsersController app/controllers/users_controller.rb /^class UsersController < LazyController$/;" c
61
+ ValidationTest test/unit/validations_test.rb /^class ValidationTest < MiniTest::Unit::TestCase$/;" c
62
+ age_greater_than_18 app/models/user.rb /^ def age_greater_than_18$/;" f class:User
63
+ all app/controllers/users_controller.rb /^ def all$/;" f class:UsersController
64
+ all lib/lazy_record.rb /^ def self.all$/;" F
65
+ all_attributes lib/lazy_record.rb /^ def self.all_attributes$/;" F class:LazyRecord
66
+ app test/first.rb /^ def app$/;" f class:IndexPageTest
67
+ app test/integration/index_test.rb /^ def app$/;" f class:IndexPageTest
68
+ app test/integration/partial_test.rb /^ def app$/;" f class:PartialTest
69
+ app test/mail/email_test.rb /^ def app$/;" f class:MailTest
70
+ app test/unit/associations.rb /^ def app$/;" f class:IndexPageTest
71
+ app test/unit/associations_test.rb /^ def app$/;" f class:AssociationTest
72
+ app test/unit/callbacks_test.rb /^ def app$/;" f class:CallbackTest
73
+ app test/unit/database_test.rb /^ def app$/;" f class:DatabaseTest
74
+ app test/unit/model_introspection_test.rb /^ def app$/;" f class:ModelIntrospectionTest
75
+ app test/unit/serialization_test.rb /^ def app$/;" f class:SerializeTest
76
+ app test/unit/validations_test.rb /^ def app$/;" f class:ValidationTest
77
+ app_class_eval lib/lazy_controller.rb /^ def app_class_eval(&block)$/;" f class:LazyController
78
+ app_instance_eval lib/lazy_controller.rb /^ def app_instance_eval(&block)$/;" f class:LazyController
79
+ assoc_table_name lib/lazy_record.rb /^ def self.assoc_table_name=( tblname=self.name.tableize )$/;" F
80
+ attr_primary lib/lazy_record.rb /^ def self.attr_primary(*fields)$/;" F
81
+ attributes lib/lazy_record.rb /^ def attributes(options={})$/;" f
82
+ attributes lib/lazy_record.rb /^ def self.attributes$/;" F class:LazyRecord
83
+ belongs_to lib/lazy_record.rb /^ def self.belongs_to *models$/;" F
84
+ belongs_to_attributes lib/lazy_record.rb /^ def self.belongs_to_attributes$/;" F class:LazyRecord
85
+ build_associated lib/lazy_record.rb /^ def build_associated tbl$/;" f
86
+ build_associated lib/lazy_record.rb /^ def build_associated tbl$/;" f class:Array
87
+ build_from lib/lazy_record.rb /^ def self.build_from(resultset, options={})$/;" F
88
+ build_from_params! lib/lazy_record.rb /^ def build_from_params!(params)$/;" f
89
+ content_length test/rack/helpers.rb /^ def content_length$/;" f class:Rack.MockResponse
90
+ content_type test/rack/helpers.rb /^ def content_type$/;" f class:Rack.MockResponse
91
+ controller lib/lazy_controller.rb /^ def controller(c_name, c_action, params={})$/;" f class:Routable
92
+ create app/controllers/users_controller.rb /^ def create(params)$/;" f class:UsersController
93
+ db_try lib/lazy_record.rb /^ def self.db_try$/;" F
94
+ destroy lib/lazy_record.rb /^ def destroy(options={})$/;" f
95
+ drink app/models/user.rb /^ def drink$/;" f class:User
96
+ find lib/lazy_record.rb /^ def self.find(id)$/;" F
97
+ find_by app/controllers/users_controller.rb /^ def find_by$/;" f class:UsersController
98
+ find_by lib/lazy_record.rb /^ def self.find_by(hash, options={})$/;" F
99
+ has_many lib/lazy_record.rb /^ def self.has_many model, options={}$/;" F class:LazyRecord
100
+ html? test/rack/helpers.rb /^ def html?$/;" f class:Rack.MockResponse
101
+ included lib/lazy_controller.rb /^ def self.included(base)$/;" F class:Routable
102
+ index app/controllers/users_controller.rb /^ def index$/;" f class:UsersController
103
+ inherited lib/lazy_controller.rb /^ def inherited(base)$/;" f class:LazyController
104
+ inherited lib/lazy_record.rb /^ def self.inherited(base)$/;" F class:LazyRecord
105
+ initialize lib/lazy_record.rb /^ def initialize(params=nil)$/;" f class:LazyRecord
106
+ method_missing lib/lazy_record.rb /^ def method_missing(method, *args, &block)$/;" f
107
+ name_not_blank app/models/user.rb /^ def name_not_blank$/;" f class:User
108
+ nested_attributes lib/lazy_record.rb /^ def self.nested_attributes$/;" F class:LazyRecord
109
+ new app/controllers/users_controller.rb /^ def new$/;" f class:UsersController
110
+ partial lib/partials.rb /^ def partial(template, *args)$/;" f class:Sinatra
111
+ save app/models/user.rb /^ def save$/;" f class:User
112
+ save lib/lazy_record.rb /^ def save$/;" f
113
+ send lib/helpers.rb /^ def send(status=200)$/;" f class:Sinatra.Response
114
+ set_content_length! lib/helpers.rb /^ def set_content_length!$/;" f class:Sinatra.Response
115
+ tbl_attr_accessor lib/lazy_record.rb /^ def self.tbl_attr_accessor *fields$/;" F class:LazyRecord
116
+ test_blank_user test/unit/validations_test.rb /^ def test_blank_user$/;" f class:ValidationTest
117
+ test_build_user_from_params test/unit/database_test.rb /^ def test_build_user_from_params$/;" f class:DatabaseTest
118
+ test_callbacks_working test/integration/index_test.rb /^ def test_callbacks_working$/;" f class:IndexPageTest
119
+ test_composite_primary_key test/unit/model_introspection_test.rb /^ def test_composite_primary_key$/;" f class:ModelIntrospectionTest
120
+ test_custom_tbl_name test/unit/model_introspection_test.rb /^ def test_custom_tbl_name$/;" f class:ModelIntrospectionTest
121
+ test_default_tbl_name test/unit/model_introspection_test.rb /^ def test_default_tbl_name$/;" f class:ModelIntrospectionTest
122
+ test_dynamic_find test/unit/database_test.rb /^ def test_dynamic_find$/;" f class:DatabaseTest
123
+ test_empty_resultset test/unit/database_test.rb /^ def test_empty_resultset$/;" f class:DatabaseTest
124
+ test_find_all_from_tbl test/unit/database_test.rb /^ def test_find_all_from_tbl$/;" f class:DatabaseTest
125
+ test_find_by_conjunction_AND test/unit/database_test.rb /^ def test_find_by_conjunction_AND$/;" f class:DatabaseTest
126
+ test_find_by_conjunction_OR test/unit/database_test.rb /^ def test_find_by_conjunction_OR$/;" f class:DatabaseTest
127
+ test_flash_is_set test/integration/index_test.rb /^ def test_flash_is_set$/;" f class:IndexPageTest
128
+ test_format_email test/unit/validations_test.rb /^ def test_format_email$/;" f class:ValidationTest
129
+ test_has_many_without_reciprocation test/unit/associations.rb /^ def test_has_many_without_reciprocation$/;" f class:IndexPageTest
130
+ test_has_many_without_reciprocation test/unit/associations_test.rb /^ def test_has_many_without_reciprocation$/;" f class:AssociationTest
131
+ test_index_response test/integration/index_test.rb /^ def test_index_response$/;" f class:IndexPageTest
132
+ test_invalid_save test/unit/database_test.rb /^ def test_invalid_save$/;" f class:DatabaseTest
133
+ test_json_rendering test/unit/serialization_test.rb /^ def test_json_rendering$/;" f class:SerializeTest
134
+ test_non_empty_results test/unit/database_test.rb /^ def test_non_empty_results$/;" f class:DatabaseTest
135
+ test_numericality_of_age test/unit/validations_test.rb /^ def test_numericality_of_age$/;" f class:ValidationTest
136
+ test_partial_rendered test/integration/partial_test.rb /^ def test_partial_rendered$/;" f class:PartialTest
137
+ test_presence_validation test/unit/validations_test.rb /^ def test_presence_validation$/;" f class:ValidationTest
138
+ test_reciprocal_association test/unit/associations_test.rb /^ def test_reciprocal_association$/;" f class:AssociationTest
139
+ test_response test/first.rb /^ def test_response$/;" f class:IndexPageTest
140
+ test_resultset lib/lazy_record.rb /^ def self.test_resultset(res)$/;" F
141
+ test_send_email_with_pony test/mail/email_test.rb /^ def test_send_email_with_pony$/;" f class:MailTest
142
+ test_short_named_user test/unit/validations_test.rb /^ def test_short_named_user$/;" f class:ValidationTest
143
+ test_simple_id_find test/unit/database_test.rb /^ def test_simple_id_find$/;" f class:DatabaseTest
144
+ test_single_simple_callback test/unit/callbacks_test.rb /^ def test_single_simple_callback$/;" f class:CallbackTest
145
+ test_tbl_attribute_introspection test/unit/model_introspection_test.rb /^ def test_tbl_attribute_introspection$/;" f class:ModelIntrospectionTest
146
+ test_valid_user test/unit/validations_test.rb /^ def test_valid_user$/;" f class:ValidationTest
147
+ test_xml_rendering test/unit/serialization_test.rb /^ def test_xml_rendering$/;" f class:SerializeTest
148
+ test_young_user test/unit/validations_test.rb /^ def test_young_user$/;" f class:ValidationTest
149
+ update_attributes lib/lazy_record.rb /^ def update_attributes(params, extra_where={})$/;" f
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative "environment"
3
+
4
+ module Studio54
5
+ # test files
6
+ Dir.glob(File.join(ROOTDIR, 'test', 'mail', '*')).each {|f| require f }
7
+ end
8
+
@@ -0,0 +1,28 @@
1
+ require "rack/test"
2
+
3
+ # app
4
+ require File.join(File.expand_path(File.dirname(__FILE__)), '..', 'dance')
5
+ # test helpers
6
+ require_relative 'helpers'
7
+ # rack test helpers
8
+ require 'test/rack/helpers'
9
+
10
+ # minitest is default
11
+ require 'minitest/autorun'
12
+ ###
13
+ # require 'minitest/spec'
14
+ # require 'test/unit'
15
+ # require 'shoulda'
16
+ # require 'rspec'
17
+
18
+ module Studio54
19
+ # require all model files
20
+ Dir.glob(File.join(MODELSDIR, '*' )). each {|f|
21
+ require f
22
+ }
23
+ # require all controller files
24
+ Dir.glob(File.join(CONTROLLERSDIR, '*' )). each {|f|
25
+ require f
26
+ }
27
+ end
28
+