lolita 3.3.5 → 3.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/lolita/PIE-custom.htc +87 -87
- data/app/assets/stylesheets/lolita/PIE.htc +81 -81
- data/app/assets/stylesheets/lolita/application.css +6 -6
- data/app/assets/stylesheets/lolita/default.css.erb +169 -169
- data/app/assets/stylesheets/lolita/jquery-ui-1.8.16.lolita.css.erb +567 -567
- data/app/controllers/lolita/info_controller.rb +4 -5
- data/app/helpers/components/lolita/configuration/list_component.rb +10 -10
- data/app/views/components/lolita/configuration/column/_first.html.haml +1 -1
- data/app/views/components/lolita/configuration/column/header/_first.html.haml +1 -1
- data/app/views/components/lolita/configuration/column/header/_sort.html.haml +6 -6
- data/app/views/components/lolita/configuration/columns/header/_display.html.haml +5 -5
- data/app/views/components/lolita/configuration/field/array/checkbox/_display.html.haml +7 -7
- data/app/views/components/lolita/configuration/search/_display.html.haml +2 -2
- data/app/views/kaminari/lolita/_first_page.html.erb +11 -11
- data/app/views/kaminari/lolita/_gap.html.erb +8 -8
- data/app/views/kaminari/lolita/_last_page.html.erb +11 -11
- data/app/views/kaminari/lolita/_next_page.html.erb +11 -11
- data/app/views/kaminari/lolita/_page.html.erb +12 -12
- data/app/views/kaminari/lolita/_paginator.html.erb +23 -23
- data/app/views/kaminari/lolita/_prev_page.html.erb +11 -11
- data/app/views/lolita/info/index.html.erb +232 -232
- data/lib/lolita/adapter/field_helper.rb +18 -18
- data/lib/lolita/configuration/field/big_decimal.rb +12 -12
- data/lib/lolita/configuration/field/boolean.rb +12 -12
- data/lib/lolita/configuration/field/date.rb +12 -12
- data/lib/lolita/configuration/field/hidden.rb +12 -12
- data/lib/lolita/configuration/field/integer.rb +11 -11
- data/lib/lolita/configuration/field/string.rb +16 -16
- data/lib/lolita/configuration/field/time.rb +13 -13
- data/lib/lolita/configuration/field_set.rb +25 -25
- data/lib/lolita/configuration/nested_form.rb +104 -104
- data/lib/lolita/configuration/search.rb +104 -104
- data/lib/lolita/dbi/base.rb +56 -56
- data/lib/lolita/hooks/named_hook.rb +125 -125
- data/lib/lolita/lazy_loader.rb +54 -54
- data/lib/lolita/navigation/tree.rb +132 -132
- data/lib/lolita/ruby_ext/accessors.rb +26 -26
- data/lib/lolita/search/simple.rb +75 -75
- data/lib/lolita/support/formatter/rails.rb +56 -56
- data/lib/lolita/support/formatter.rb +62 -62
- data/lib/lolita/test/matchers.rb +77 -77
- data/lib/lolita/version.rb +1 -1
- data/lib/lolita.rb +2 -2
- data/spec/builder_spec.rb +120 -120
- data/spec/rails_app/app/controllers/application_controller.rb +3 -3
- data/spec/rails_app/app/helpers/application_helper.rb +3 -3
- data/spec/rails_app/app/mongoid/address.rb +7 -7
- data/spec/rails_app/app/mongoid/comment.rb +5 -5
- data/spec/rails_app/app/mongoid/preference.rb +5 -5
- data/spec/rails_app/app/mongoid/profile.rb +13 -13
- data/spec/rails_app/app/mongoid/tag.rb +3 -3
- data/spec/rails_app/app/views/components/lolita/configuration/list/_body_cell.html.erb +1 -1
- data/spec/rails_app/config/environment.rb +5 -5
- data/spec/rails_app/config/environments/production.rb +37 -37
- data/spec/rails_app/config/environments/test.rb +37 -37
- data/spec/rails_app/config/initializers/backtrace_silencers.rb +7 -7
- data/spec/rails_app/config/initializers/inflections.rb +2 -2
- data/spec/rails_app/config/initializers/secret_token.rb +1 -1
- data/spec/rails_app/lib/lolita/configuration/field/my_custom_collection.rb +13 -13
- data/spec/rails_app/log/development.log +14313 -753
- data/spec/rails_app/public/javascripts/jquery-1.5.1.min.js +15 -15
- data/spec/rails_app/public/javascripts/lolita/main.js +6 -6
- data/spec/rails_app/public/javascripts/modernizr-1.7.min.js +1 -1
- data/spec/rails_app/public/javascripts/rails.js +137 -137
- data/spec/rails_app/public/javascripts/tinymce/langs/en.js +221 -221
- data/spec/rails_app/public/javascripts/tinymce/license.txt +504 -504
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/about.htm +52 -52
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/anchor.htm +26 -26
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/charmap.htm +51 -51
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/color_picker.htm +74 -74
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/editor_template_src.js +1328 -1328
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/image.htm +80 -80
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/about.js +73 -73
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/anchor.js +42 -42
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/charmap.js +354 -354
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/color_picker.js +329 -329
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/image.js +247 -247
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/link.js +153 -153
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/source_editor.js +56 -56
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/langs/en.js +68 -68
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/langs/en_dlg.js +53 -53
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/link.htm +57 -57
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/shortcuts.htm +47 -47
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/content.css +66 -66
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/dialog.css +117 -117
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/ui.css +988 -988
- data/spec/rails_app/public/javascripts/tinymce/themes/advanced/source_editor.htm +25 -25
- data/spec/rails_app/public/javascripts/tinymce/tiny_mce_popup.js +4 -4
- data/spec/rails_app/public/stylesheets/lolita/default.css +169 -169
- data/spec/rails_app/public/stylesheets/lolita/style.css +214 -214
- data/vendor/assets/javascripts/jquery-numeric.js +279 -279
- data/vendor/assets/javascripts/modernizr_1_7_min.js +1 -1
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/content.css +66 -66
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/dialog.css +117 -117
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/ui.css +988 -988
- data/vendor/assets/stylesheets/jquery-ui-1.8.16.custom.css +567 -567
- metadata +342 -349
- data/app/controllers/lolita/field_data_controller.rb~ +0 -45
- data/app/views/components/lolita/configuration/field/array/autocomplete/_display.html.haml~ +0 -16
- data/app/views/components/lolita/configuration/filter/_display.html.haml~ +0 -9
- data/lib/lolita/configuration/filter.rb~ +0 -122
- data/lib/lolita/version.rb~ +0 -30
- data/spec/configuration/filter_spec.rb~ +0 -167
data/spec/builder_spec.rb
CHANGED
@@ -1,121 +1,121 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/simple_spec_helper')
|
2
|
-
|
3
|
-
class SimpleObject
|
4
|
-
include Lolita::Builder
|
5
|
-
end
|
6
|
-
|
7
|
-
describe Lolita::Builder::Custom do
|
8
|
-
let(:object){SimpleObject.new}
|
9
|
-
let(:builder){Lolita::Builder::Custom.new(object,{})}
|
10
|
-
let(:klass){Lolita::Builder::Custom}
|
11
|
-
|
12
|
-
it "should create new Custom builder" do
|
13
|
-
builder = Lolita::Builder::Custom.new(object,{})
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should set name and state" do
|
17
|
-
builder = Lolita::Builder::Custom.new(object,{:name => "name", :state=>"state"})
|
18
|
-
builder.instance_variable_get(:"@name").should == "name"
|
19
|
-
builder.instance_variable_get(:"@state").should == "state"
|
20
|
-
end
|
21
|
-
|
22
|
-
it "should set default attributes" do
|
23
|
-
builder = Lolita::Builder::Custom.new(object,{:name => "name"})
|
24
|
-
builder.instance_variable_get(:"@state").should == :display
|
25
|
-
end
|
26
|
-
|
27
|
-
describe "build attributes" do
|
28
|
-
it "should set through #with" do
|
29
|
-
builder.with("name","state").build_attributes.should == {:name => "name", :state => "state"}
|
30
|
-
builder.with({:name=>"name",:state=>"state"}).build_attributes.should == {:name => "name", :state=>"state"}
|
31
|
-
builder.with("name",:state=>"state").build_attributes.should == {:name=>"name",:state=>"state"}
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
it "should return default state when no build attributes given" do
|
36
|
-
builder.state.should == :display
|
37
|
-
end
|
38
|
-
|
39
|
-
it "should return build attributes state when given" do
|
40
|
-
builder.with(:state=>"state").state.should == :"state"
|
41
|
-
end
|
42
|
-
|
43
|
-
it "should return default name when no build name given" do
|
44
|
-
builder.name.should == :"/simple_object"
|
45
|
-
end
|
46
|
-
|
47
|
-
it "should return build name when given" do
|
48
|
-
builder.with(:name => "name").name.should == :"/simple_object/name"
|
49
|
-
builder.with(:name => "/name").name.should == :"/name"
|
50
|
-
end
|
51
|
-
|
52
|
-
describe "#build" do
|
53
|
-
it "should return array with name,state and options" do
|
54
|
-
builder.build.should == [:"/simple_object",:"display",{}]
|
55
|
-
builder.with({:display_value => 1}).build.should == [:"/simple_object",:display,{:display_value=>1}]
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
describe "conditions" do
|
60
|
-
it "should use given over default when there's no conditions" do
|
61
|
-
builder = klass.new(object,:name => "/custom", :state => "special")
|
62
|
-
builder.build.should == [:"/custom",:"special",{}]
|
63
|
-
end
|
64
|
-
|
65
|
-
it "should use given over default when conditions met" do
|
66
|
-
builder = klass.new(object, :name => "/custom", :state=>"special", :unless=>{:state=>"display"})
|
67
|
-
builder.build.should == [:"/simple_object",:"display",{}]
|
68
|
-
builder.class_eval do
|
69
|
-
def default_state
|
70
|
-
:other
|
71
|
-
end
|
72
|
-
end
|
73
|
-
builder.build.should == [:"/custom",:special,{}]
|
74
|
-
end
|
75
|
-
|
76
|
-
it "should use given over build given when conditions met" do
|
77
|
-
builder = klass.new(object,:name => "/custom", :"state" => "special", :if=>{:state=>"default"})
|
78
|
-
builder.with(:state => "other").build.should == [:"/simple_object",:other,{}]
|
79
|
-
builder.with(:state => :default).build.should == [:"/custom",:special,{}]
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
describe Lolita::Builder do
|
85
|
-
|
86
|
-
let(:object){SimpleObject.new}
|
87
|
-
|
88
|
-
describe "#build" do
|
89
|
-
|
90
|
-
describe "default path" do
|
91
|
-
|
92
|
-
it "should be /:class_name/display" do
|
93
|
-
info=object.build
|
94
|
-
info.first.should == :"/simple_object"
|
95
|
-
info[1].should == :display
|
96
|
-
end
|
97
|
-
|
98
|
-
it "should use given name when it starts with /" do
|
99
|
-
object.builder = {:name =>"/custom"}
|
100
|
-
info = object.build
|
101
|
-
info.first.should == :"/custom"
|
102
|
-
info[1].should == :display
|
103
|
-
end
|
104
|
-
|
105
|
-
it "should make name /:class_name/:custom_name when it doesn't start with /" do
|
106
|
-
object.builder = {:name => "custom"}
|
107
|
-
info = object.build
|
108
|
-
info.first.should == :"/simple_object/custom"
|
109
|
-
info[1].should == :display
|
110
|
-
end
|
111
|
-
|
112
|
-
end
|
113
|
-
|
114
|
-
it "should use received name" do
|
115
|
-
object.builder = {:name=>"/custom"}
|
116
|
-
info = object.build("/other_custom")
|
117
|
-
info.first.should == :"/other_custom"
|
118
|
-
end
|
119
|
-
|
120
|
-
end
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/simple_spec_helper')
|
2
|
+
|
3
|
+
class SimpleObject
|
4
|
+
include Lolita::Builder
|
5
|
+
end
|
6
|
+
|
7
|
+
describe Lolita::Builder::Custom do
|
8
|
+
let(:object){SimpleObject.new}
|
9
|
+
let(:builder){Lolita::Builder::Custom.new(object,{})}
|
10
|
+
let(:klass){Lolita::Builder::Custom}
|
11
|
+
|
12
|
+
it "should create new Custom builder" do
|
13
|
+
builder = Lolita::Builder::Custom.new(object,{})
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should set name and state" do
|
17
|
+
builder = Lolita::Builder::Custom.new(object,{:name => "name", :state=>"state"})
|
18
|
+
builder.instance_variable_get(:"@name").should == "name"
|
19
|
+
builder.instance_variable_get(:"@state").should == "state"
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should set default attributes" do
|
23
|
+
builder = Lolita::Builder::Custom.new(object,{:name => "name"})
|
24
|
+
builder.instance_variable_get(:"@state").should == :display
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "build attributes" do
|
28
|
+
it "should set through #with" do
|
29
|
+
builder.with("name","state").build_attributes.should == {:name => "name", :state => "state"}
|
30
|
+
builder.with({:name=>"name",:state=>"state"}).build_attributes.should == {:name => "name", :state=>"state"}
|
31
|
+
builder.with("name",:state=>"state").build_attributes.should == {:name=>"name",:state=>"state"}
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should return default state when no build attributes given" do
|
36
|
+
builder.state.should == :display
|
37
|
+
end
|
38
|
+
|
39
|
+
it "should return build attributes state when given" do
|
40
|
+
builder.with(:state=>"state").state.should == :"state"
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should return default name when no build name given" do
|
44
|
+
builder.name.should == :"/simple_object"
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should return build name when given" do
|
48
|
+
builder.with(:name => "name").name.should == :"/simple_object/name"
|
49
|
+
builder.with(:name => "/name").name.should == :"/name"
|
50
|
+
end
|
51
|
+
|
52
|
+
describe "#build" do
|
53
|
+
it "should return array with name,state and options" do
|
54
|
+
builder.build.should == [:"/simple_object",:"display",{}]
|
55
|
+
builder.with({:display_value => 1}).build.should == [:"/simple_object",:display,{:display_value=>1}]
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe "conditions" do
|
60
|
+
it "should use given over default when there's no conditions" do
|
61
|
+
builder = klass.new(object,:name => "/custom", :state => "special")
|
62
|
+
builder.build.should == [:"/custom",:"special",{}]
|
63
|
+
end
|
64
|
+
|
65
|
+
it "should use given over default when conditions met" do
|
66
|
+
builder = klass.new(object, :name => "/custom", :state=>"special", :unless=>{:state=>"display"})
|
67
|
+
builder.build.should == [:"/simple_object",:"display",{}]
|
68
|
+
builder.class_eval do
|
69
|
+
def default_state
|
70
|
+
:other
|
71
|
+
end
|
72
|
+
end
|
73
|
+
builder.build.should == [:"/custom",:special,{}]
|
74
|
+
end
|
75
|
+
|
76
|
+
it "should use given over build given when conditions met" do
|
77
|
+
builder = klass.new(object,:name => "/custom", :"state" => "special", :if=>{:state=>"default"})
|
78
|
+
builder.with(:state => "other").build.should == [:"/simple_object",:other,{}]
|
79
|
+
builder.with(:state => :default).build.should == [:"/custom",:special,{}]
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
describe Lolita::Builder do
|
85
|
+
|
86
|
+
let(:object){SimpleObject.new}
|
87
|
+
|
88
|
+
describe "#build" do
|
89
|
+
|
90
|
+
describe "default path" do
|
91
|
+
|
92
|
+
it "should be /:class_name/display" do
|
93
|
+
info=object.build
|
94
|
+
info.first.should == :"/simple_object"
|
95
|
+
info[1].should == :display
|
96
|
+
end
|
97
|
+
|
98
|
+
it "should use given name when it starts with /" do
|
99
|
+
object.builder = {:name =>"/custom"}
|
100
|
+
info = object.build
|
101
|
+
info.first.should == :"/custom"
|
102
|
+
info[1].should == :display
|
103
|
+
end
|
104
|
+
|
105
|
+
it "should make name /:class_name/:custom_name when it doesn't start with /" do
|
106
|
+
object.builder = {:name => "custom"}
|
107
|
+
info = object.build
|
108
|
+
info.first.should == :"/simple_object/custom"
|
109
|
+
info[1].should == :display
|
110
|
+
end
|
111
|
+
|
112
|
+
end
|
113
|
+
|
114
|
+
it "should use received name" do
|
115
|
+
object.builder = {:name=>"/custom"}
|
116
|
+
info = object.build("/other_custom")
|
117
|
+
info.first.should == :"/other_custom"
|
118
|
+
end
|
119
|
+
|
120
|
+
end
|
121
121
|
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
class ApplicationController < ActionController::Base
|
2
|
-
protect_from_forgery
|
3
|
-
end
|
1
|
+
class ApplicationController < ActionController::Base
|
2
|
+
protect_from_forgery
|
3
|
+
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
# Methods added to this helper will be available to all templates in the application.
|
2
|
-
module ApplicationHelper
|
3
|
-
end
|
1
|
+
# Methods added to this helper will be available to all templates in the application.
|
2
|
+
module ApplicationHelper
|
3
|
+
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
class Address
|
2
|
-
include Mongoid::Document
|
3
|
-
field :street
|
4
|
-
field :city
|
5
|
-
field :state
|
6
|
-
field :post_code
|
7
|
-
embedded_in :person
|
1
|
+
class Address
|
2
|
+
include Mongoid::Document
|
3
|
+
field :street
|
4
|
+
field :city
|
5
|
+
field :state
|
6
|
+
field :post_code
|
7
|
+
embedded_in :person
|
8
8
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
class Comment
|
2
|
-
include Mongoid::Document
|
3
|
-
field :body
|
4
|
-
belongs_to :post
|
5
|
-
belongs_to :profile
|
1
|
+
class Comment
|
2
|
+
include Mongoid::Document
|
3
|
+
field :body
|
4
|
+
belongs_to :post
|
5
|
+
belongs_to :profile
|
6
6
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
class Preference
|
2
|
-
include Mongoid::Document
|
3
|
-
include Lolita::Configuration
|
4
|
-
field :name
|
5
|
-
has_and_belongs_to_many :profiles
|
1
|
+
class Preference
|
2
|
+
include Mongoid::Document
|
3
|
+
include Lolita::Configuration
|
4
|
+
field :name
|
5
|
+
has_and_belongs_to_many :profiles
|
6
6
|
end
|
@@ -1,14 +1,14 @@
|
|
1
|
-
class Profile
|
2
|
-
include Mongoid::Document
|
3
|
-
include Lolita::Configuration
|
4
|
-
field :name, :type=>String
|
5
|
-
field :age
|
6
|
-
field :genere
|
7
|
-
has_many :posts
|
8
|
-
has_many :comments
|
9
|
-
has_and_belongs_to_many :preferences
|
10
|
-
embeds_one :address
|
11
|
-
lolita do
|
12
|
-
|
13
|
-
end
|
1
|
+
class Profile
|
2
|
+
include Mongoid::Document
|
3
|
+
include Lolita::Configuration
|
4
|
+
field :name, :type=>String
|
5
|
+
field :age
|
6
|
+
field :genere
|
7
|
+
has_many :posts
|
8
|
+
has_many :comments
|
9
|
+
has_and_belongs_to_many :preferences
|
10
|
+
embeds_one :address
|
11
|
+
lolita do
|
12
|
+
|
13
|
+
end
|
14
14
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class Tag
|
2
|
-
include Mongoid::Document
|
3
|
-
field :name
|
1
|
+
class Tag
|
2
|
+
include Mongoid::Document
|
3
|
+
field :name
|
4
4
|
end
|
@@ -1 +1 @@
|
|
1
|
-
<td>overwritten cell</td>
|
1
|
+
<td>overwritten cell</td>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
# Load the rails application
|
2
|
-
require File.expand_path('../application', __FILE__)
|
3
|
-
|
4
|
-
# Initialize the rails application
|
5
|
-
RailsApp::Application.initialize!
|
1
|
+
# Load the rails application
|
2
|
+
require File.expand_path('../application', __FILE__)
|
3
|
+
|
4
|
+
# Initialize the rails application
|
5
|
+
RailsApp::Application.initialize!
|
@@ -1,37 +1,37 @@
|
|
1
|
-
RailsApp::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/environment.rb
|
3
|
-
# Do not compress assets
|
4
|
-
config.assets.compress = false
|
5
|
-
|
6
|
-
# Expands the lines which load the assets
|
7
|
-
config.assets.debug = true
|
8
|
-
# The production environment is meant for finished, "live" apps.
|
9
|
-
# Code is not reloaded between requests
|
10
|
-
config.cache_classes = true
|
11
|
-
|
12
|
-
# Full error reports are disabled and caching is turned on
|
13
|
-
config.consider_all_requests_local = false
|
14
|
-
config.action_controller.perform_caching = true
|
15
|
-
|
16
|
-
# See everything in the log (default is :info)
|
17
|
-
# config.log_level = :debug
|
18
|
-
|
19
|
-
# Use a different logger for distributed setups
|
20
|
-
# config.logger = SyslogLogger.new
|
21
|
-
|
22
|
-
# Use a different cache store in production
|
23
|
-
# config.cache_store = :mem_cache_store
|
24
|
-
|
25
|
-
# Disable Rails's static asset server
|
26
|
-
# In production, Apache or nginx will already do this
|
27
|
-
config.serve_static_assets = false
|
28
|
-
|
29
|
-
# Enable serving of images, stylesheets, and javascripts from an asset server
|
30
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
31
|
-
|
32
|
-
# Disable delivery errors, bad email addresses will be ignored
|
33
|
-
# config.action_mailer.raise_delivery_errors = false
|
34
|
-
|
35
|
-
# Enable threaded mode
|
36
|
-
# config.threadsafe!
|
37
|
-
end
|
1
|
+
RailsApp::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
3
|
+
# Do not compress assets
|
4
|
+
config.assets.compress = false
|
5
|
+
|
6
|
+
# Expands the lines which load the assets
|
7
|
+
config.assets.debug = true
|
8
|
+
# The production environment is meant for finished, "live" apps.
|
9
|
+
# Code is not reloaded between requests
|
10
|
+
config.cache_classes = true
|
11
|
+
|
12
|
+
# Full error reports are disabled and caching is turned on
|
13
|
+
config.consider_all_requests_local = false
|
14
|
+
config.action_controller.perform_caching = true
|
15
|
+
|
16
|
+
# See everything in the log (default is :info)
|
17
|
+
# config.log_level = :debug
|
18
|
+
|
19
|
+
# Use a different logger for distributed setups
|
20
|
+
# config.logger = SyslogLogger.new
|
21
|
+
|
22
|
+
# Use a different cache store in production
|
23
|
+
# config.cache_store = :mem_cache_store
|
24
|
+
|
25
|
+
# Disable Rails's static asset server
|
26
|
+
# In production, Apache or nginx will already do this
|
27
|
+
config.serve_static_assets = false
|
28
|
+
|
29
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
30
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
31
|
+
|
32
|
+
# Disable delivery errors, bad email addresses will be ignored
|
33
|
+
# config.action_mailer.raise_delivery_errors = false
|
34
|
+
|
35
|
+
# Enable threaded mode
|
36
|
+
# config.threadsafe!
|
37
|
+
end
|
@@ -1,37 +1,37 @@
|
|
1
|
-
RailsApp::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/environment.rb
|
3
|
-
# Do not compress assets
|
4
|
-
config.assets.compress = false
|
5
|
-
|
6
|
-
# Expands the lines which load the assets
|
7
|
-
config.assets.debug = true
|
8
|
-
# The test environment is used exclusively to run your application's
|
9
|
-
# test suite. You never need to work with it otherwise. Remember that
|
10
|
-
# your test database is "scratch space" for the test suite and is wiped
|
11
|
-
# and recreated between test runs. Don't rely on the data there!
|
12
|
-
config.cache_classes = true
|
13
|
-
|
14
|
-
# Log error messages when you accidentally call methods on nil.
|
15
|
-
config.whiny_nils = true
|
16
|
-
|
17
|
-
# Show full error reports and disable caching
|
18
|
-
config.consider_all_requests_local = true
|
19
|
-
config.action_controller.perform_caching = false
|
20
|
-
|
21
|
-
# Disable request forgery protection in test environment
|
22
|
-
config.action_controller.allow_forgery_protection = false
|
23
|
-
|
24
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
25
|
-
# The :test delivery method accumulates sent emails in the
|
26
|
-
# ActionMailer::Base.deliveries array.
|
27
|
-
config.action_mailer.delivery_method = :test
|
28
|
-
|
29
|
-
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
30
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
31
|
-
# like if you have constraints or database-specific column types
|
32
|
-
# config.active_record.schema_format = :sql
|
33
|
-
|
34
|
-
config.action_dispatch.show_exceptions = false
|
35
|
-
|
36
|
-
config.active_support.deprecation = :stderr
|
37
|
-
end
|
1
|
+
RailsApp::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
3
|
+
# Do not compress assets
|
4
|
+
config.assets.compress = false
|
5
|
+
|
6
|
+
# Expands the lines which load the assets
|
7
|
+
config.assets.debug = true
|
8
|
+
# The test environment is used exclusively to run your application's
|
9
|
+
# test suite. You never need to work with it otherwise. Remember that
|
10
|
+
# your test database is "scratch space" for the test suite and is wiped
|
11
|
+
# and recreated between test runs. Don't rely on the data there!
|
12
|
+
config.cache_classes = true
|
13
|
+
|
14
|
+
# Log error messages when you accidentally call methods on nil.
|
15
|
+
config.whiny_nils = true
|
16
|
+
|
17
|
+
# Show full error reports and disable caching
|
18
|
+
config.consider_all_requests_local = true
|
19
|
+
config.action_controller.perform_caching = false
|
20
|
+
|
21
|
+
# Disable request forgery protection in test environment
|
22
|
+
config.action_controller.allow_forgery_protection = false
|
23
|
+
|
24
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
25
|
+
# The :test delivery method accumulates sent emails in the
|
26
|
+
# ActionMailer::Base.deliveries array.
|
27
|
+
config.action_mailer.delivery_method = :test
|
28
|
+
|
29
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
30
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
31
|
+
# like if you have constraints or database-specific column types
|
32
|
+
# config.active_record.schema_format = :sql
|
33
|
+
|
34
|
+
config.action_dispatch.show_exceptions = false
|
35
|
+
|
36
|
+
config.active_support.deprecation = :stderr
|
37
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
Rails.backtrace_cleaner.remove_silencers!
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,2 +1,2 @@
|
|
1
|
-
ActiveSupport::Inflector.inflections do |inflect|
|
2
|
-
end
|
1
|
+
ActiveSupport::Inflector.inflections do |inflect|
|
2
|
+
end
|
@@ -1,2 +1,2 @@
|
|
1
|
-
Rails.application.config.secret_token = 'ea942c41850d502f2c8283e26bdc57829f471bb18224ddff0a192c4f32cdf6cb5aa0d82b3a7a7adbeb640c4b06f3aa1cd5f098162d8240f669b39d6b49680571'
|
1
|
+
Rails.application.config.secret_token = 'ea942c41850d502f2c8283e26bdc57829f471bb18224ddff0a192c4f32cdf6cb5aa0d82b3a7a7adbeb640c4b06f3aa1cd5f098162d8240f669b39d6b49680571'
|
2
2
|
Rails.application.config.session_store :cookie_store, :key => "_my_app"
|
@@ -1,14 +1,14 @@
|
|
1
|
-
module Lolita
|
2
|
-
module Configuration
|
3
|
-
module Field
|
4
|
-
class MyCustomCollection < Lolita::Configuration::Field::Array
|
5
|
-
|
6
|
-
def initialize *args,&block
|
7
|
-
super
|
8
|
-
@type="my_custom_collection"
|
9
|
-
end
|
10
|
-
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
1
|
+
module Lolita
|
2
|
+
module Configuration
|
3
|
+
module Field
|
4
|
+
class MyCustomCollection < Lolita::Configuration::Field::Array
|
5
|
+
|
6
|
+
def initialize *args,&block
|
7
|
+
super
|
8
|
+
@type="my_custom_collection"
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
14
|
end
|