simply_mongo 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/{README.rdoc → README.md} +43 -12
- data/RELEASE-NOTES.md +24 -0
- data/Rakefile +8 -1
- data/lib/generators/simply_mongo/install/install_generator.rb +28 -5
- data/lib/generators/simply_mongo/install/templates/mongo.rb +1 -1
- data/lib/generators/simply_mongo/install/templates/mongo.yml +11 -7
- data/lib/simply_mongo/version.rb +1 -1
- data/lib/simply_mongo.rb +1 -0
- data/lib/tasks/simply_mongo.rake +7 -0
- data/test/enterprise/Gemfile +7 -13
- data/test/enterprise/Gemfile.lock +87 -87
- data/test/enterprise/app/assets/javascripts/enterprises.js.coffee +1 -1
- data/test/enterprise/app/controllers/enterprises_controller.rb +2 -2
- data/test/enterprise/bin/bundle +3 -0
- data/test/enterprise/bin/rails +4 -0
- data/test/enterprise/bin/rake +4 -0
- data/test/enterprise/config/application.rb +7 -16
- data/test/enterprise/config/database.yml +0 -0
- data/test/enterprise/config/environment.rb +2 -0
- data/test/enterprise/config/environments/development.rb +1 -9
- data/test/enterprise/config/environments/production.rb +3 -1
- data/test/enterprise/config/environments/test.rb +1 -2
- data/test/enterprise/config/initializers/mongo.rb +1 -1
- data/test/enterprise/config/initializers/secret_token.rb +1 -0
- data/test/enterprise/config/mongo.yml +14 -10
- data/test/enterprise/log/development.log +3768 -690
- data/test/enterprise/log/install.log +393 -0
- data/test/enterprise/tmp/cache/assets/CF0/DA0/sprockets%2Fd7d5b37686831d37c4dd75e645f5e016 +0 -0
- data/test/enterprise/tmp/cache/assets/E25/4C0/sprockets%2Fde2fd9fd11c04a582cdbbe3d84a35ae6 +0 -0
- metadata +87 -41
- data/lib/tasks/simply_mongo_tasks.rake +0 -4
- data/test/cmd_line_client/Enterprise.json +0 -30
- data/test/cmd_line_client/client.rb +0 -128
- data/test/enterprise/script/rails +0 -6
- data/test/enterprise/tmp/pids/server.pid +0 -1
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 81390b82d957590c6c0189ca29d232d258d5d912
|
4
|
+
data.tar.gz: 4a46748d131cb7095e1cd132cf9dce695e30dd8e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ff9b7d3a179b184ea0b79b372ea2edc92de754cb685e176a598d74d393ae69551a7f66cf8efcc6d54c1b9a082e03d2d4f5a0b1894f29a456c2a4afd5e7de43a9
|
7
|
+
data.tar.gz: ecb8093c616618932f3578782b66e63e70c9f5bdd28061b61e6b2386f552d7dfb9dc6bebf863dca93aca88376fae06ecd31bffcc053bd46f689db1f1e0f32590
|
data/{README.rdoc → README.md}
RENAMED
@@ -1,24 +1,36 @@
|
|
1
|
-
|
1
|
+
#Simply Mongo
|
2
|
+
|
3
|
+
[![Gem Version][GV img]][Gem Version]
|
4
|
+
[![Build Status][BS img]][Build Status]
|
5
|
+
[![Dependency Status][DS img]][Dependency Status]
|
6
|
+
[![Coverage Status][CS img]][Coverage Status]
|
7
|
+
|
2
8
|
|
3
9
|
This project uses an MIT-LICENSE.
|
4
10
|
|
5
|
-
Installing the
|
6
|
-
|
11
|
+
Installing the **simply_mongo** gem sets up a Rails environment where the standard Mongo driver can be easily used.
|
12
|
+
|
13
|
+
## Intstallation
|
14
|
+
|
15
|
+
$ gem install simply_mongo
|
16
|
+
|
17
|
+
|
18
|
+
After installing the gem run the Rails generator:
|
7
19
|
|
8
20
|
$ rails g simply_mongo:install
|
9
21
|
|
10
|
-
|
22
|
+
This creates the YAML file 'config/mongo.yml' that contains the database configuration parameters.
|
11
23
|
|
12
|
-
|
24
|
+
## Examples
|
13
25
|
A simple controller example of adding a document to a collection
|
14
26
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
27
|
+
e = params[:enterprise] # extract the JSON document
|
28
|
+
ec = SimplyMongo.db['CollectionName'] # get reference to collection
|
29
|
+
id = BSON::ObjectId.new # set the ID
|
30
|
+
e[:_id] = id
|
31
|
+
ec.insert(e) # stuff document into collection
|
20
32
|
|
21
|
-
|
33
|
+
## Simple JSON Document
|
22
34
|
|
23
35
|
"enterprise": {
|
24
36
|
"city": "Bedrock",
|
@@ -50,7 +62,7 @@ A simple controller example of adding a document to a collection
|
|
50
62
|
}
|
51
63
|
|
52
64
|
|
53
|
-
|
65
|
+
## Simple Rails Controller Example
|
54
66
|
|
55
67
|
require 'simply_mongo'
|
56
68
|
|
@@ -108,3 +120,22 @@ A simple controller example of adding a document to a collection
|
|
108
120
|
end
|
109
121
|
|
110
122
|
end
|
123
|
+
|
124
|
+
# Versioning
|
125
|
+
This library aims to adhere to [Semantic Versioning 2.0.0](http://semver.org/). Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, that version should be immediately yanked and/or a new version should be immediately released that restores compatibility. Breaking changes to the public API will only be introduced with new major versions. As a result of this policy, you can (and should) specify a dependency on this gem using the [Pessimistic Version Constraint](http://docs.rubygems.org/read/chapter/16#page74) with two digits of precision.
|
126
|
+
|
127
|
+
For example:
|
128
|
+
|
129
|
+
spec.add_dependency 'simply_mongo', '~> 1.0'
|
130
|
+
|
131
|
+
|
132
|
+
[Gem Version]: https://rubygems.org/gems/simply_mongo
|
133
|
+
[Build Status]: https://travis-ci.org/robdbirch/simply_mongo
|
134
|
+
[travis pull requests]: https://travis-ci.org/robdbirch/simply_mongo/pull_requests
|
135
|
+
[Dependency Status]: https://gemnasium.com/robdbirch/simply_mongo
|
136
|
+
[Coverage Status]: https://coveralls.io/r/robdbirch/simply_mongo
|
137
|
+
|
138
|
+
[GV img]: https://badge.fury.io/rb/simply_mongo.png
|
139
|
+
[BS img]: https://travis-ci.org/robdbirch/simply_mongo.png
|
140
|
+
[DS img]: https://gemnasium.com/robdbirch/simply_mongo.png
|
141
|
+
[CS img]: https://coveralls.io/repos/robdbirch/simply_mongo/badge.png?branch=master
|
data/RELEASE-NOTES.md
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# Simply Mongo Release Notes
|
2
|
+
|
3
|
+
### Version 0.0.7
|
4
|
+
|
5
|
+
* Ruby 2.0 support
|
6
|
+
* Rails 4.0 support
|
7
|
+
* Updated dependent gems
|
8
|
+
* New Mongo ruby driver uses new write concerns options, safe option removed from config
|
9
|
+
* Updated README.md
|
10
|
+
* Added Release Notes
|
11
|
+
* Tagged Release
|
12
|
+
* Added Travis-Ci Support
|
13
|
+
* Removed manual client test
|
14
|
+
* Added rspec tests
|
15
|
+
|
16
|
+
#### Generator
|
17
|
+
|
18
|
+
The generator will automatically backup existing files and create new ones and then generate a warning message
|
19
|
+
|
20
|
+
#### Bug Fixes
|
21
|
+
|
22
|
+
Test client improper response code check
|
23
|
+
|
24
|
+
## To Do
|
data/Rakefile
CHANGED
@@ -4,6 +4,7 @@ begin
|
|
4
4
|
rescue LoadError
|
5
5
|
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
6
|
end
|
7
|
+
|
7
8
|
begin
|
8
9
|
require 'rdoc/task'
|
9
10
|
rescue LoadError
|
@@ -21,9 +22,15 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
21
22
|
end
|
22
23
|
|
23
24
|
|
25
|
+
Bundler::GemHelper.install_tasks
|
24
26
|
|
27
|
+
load "#{File.expand_path("../", __FILE__)}/lib/tasks/simply_mongo.rake"
|
25
28
|
|
26
|
-
|
29
|
+
require 'rspec/core/rake_task'
|
30
|
+
|
31
|
+
RSpec::Core::RakeTask.new(:spec)
|
32
|
+
|
33
|
+
task :default => :spec
|
27
34
|
|
28
35
|
require 'rake/testtask'
|
29
36
|
|
@@ -1,17 +1,40 @@
|
|
1
1
|
require 'rails/generators'
|
2
|
+
require 'fileutils'
|
2
3
|
|
3
4
|
module SimplyMongo
|
4
5
|
module Generators
|
5
6
|
class InstallGenerator < ::Rails::Generators::Base
|
6
7
|
source_root File.expand_path("../templates", __FILE__)
|
7
|
-
desc "This will install the template mongo.yml and
|
8
|
-
|
8
|
+
desc "This will install the template mongo.yml and the SimplyMongo Initializer file"
|
9
|
+
|
9
10
|
def install
|
10
|
-
|
11
|
-
|
12
|
-
|
11
|
+
config_dir = "#{Rails.root}/config"
|
12
|
+
|
13
|
+
mongo_yml = "mongo.yml"
|
14
|
+
working_file = "#{config_dir}/#{mongo_yml}"
|
15
|
+
if File.exists? working_file
|
16
|
+
simply_mongo_back_up_file(working_file, mongo_yml)
|
17
|
+
end
|
18
|
+
copy_file mongo_yml, working_file
|
19
|
+
puts "Now Configure #{Rails.root}/config/#{mongo_yml}"
|
20
|
+
|
21
|
+
mongo_rb = "mongo.rb"
|
22
|
+
working_file = "#{config_dir}/initializers/#{mongo_rb}"
|
23
|
+
if File.exists? working_file
|
24
|
+
simply_mongo_back_up_file(working_file, mongo_rb)
|
25
|
+
end
|
26
|
+
copy_file mongo_rb, working_file
|
13
27
|
end
|
14
28
|
|
29
|
+
private
|
30
|
+
|
31
|
+
def simply_mongo_back_up_file(working_file, new_file)
|
32
|
+
mv_time = DateTime.now.strftime("%Y%m%d%H%M%S%L")
|
33
|
+
mf = "#{working_file}_#{mv_time}"
|
34
|
+
puts "WARNING: ** Backing up existing #{new_file} to #{File.basename(mf)}"
|
35
|
+
FileUtils.mv working_file, mf
|
36
|
+
end
|
37
|
+
|
15
38
|
end
|
16
39
|
end
|
17
40
|
end
|
@@ -2,9 +2,17 @@
|
|
2
2
|
# Simply Mongo Driver Specification
|
3
3
|
#
|
4
4
|
# OPTIONS:
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
5
|
+
#
|
6
|
+
# Notes about write concern options:
|
7
|
+
# Write concern options are propagated to objects instantiated from this MongoClient.
|
8
|
+
# These defaults can be overridden upon instantiation of any object by explicitly setting an options hash
|
9
|
+
# on initialization.
|
10
|
+
#
|
11
|
+
# :w [String, Integer, Symbol] - default: 1 - Set default number of nodes to which a write should be acknowledged
|
12
|
+
# :j [Boolean] - default false - Set journal acknowledgement
|
13
|
+
# :wtimeout [Integer] - defualt: nil - Set replica set acknowledgement timeout
|
14
|
+
# :fsync [Boolean] - default false - Set fsync acknowledgement.
|
15
|
+
#
|
8
16
|
# :slave_ok (Boolean) — default: false — Must be set to true when connecting to a single, slave node.
|
9
17
|
# :logger (Logger, #debug) — default: nil — A Logger instance for debugging driver ops.
|
10
18
|
# Note that logging negatively impacts performance; therefore, it should not be
|
@@ -25,8 +33,6 @@ development:
|
|
25
33
|
host: localhost
|
26
34
|
port: 27017
|
27
35
|
options:
|
28
|
-
safe: true
|
29
|
-
|
30
36
|
|
31
37
|
test:
|
32
38
|
adapter: mongodb
|
@@ -34,7 +40,6 @@ test:
|
|
34
40
|
host: localhost
|
35
41
|
port: 27017
|
36
42
|
options:
|
37
|
-
safe: true
|
38
43
|
|
39
44
|
production:
|
40
45
|
adapter: mongodb
|
@@ -42,4 +47,3 @@ production:
|
|
42
47
|
host: localhost
|
43
48
|
port: 27017
|
44
49
|
options:
|
45
|
-
safe: true
|
data/lib/simply_mongo/version.rb
CHANGED
data/lib/simply_mongo.rb
CHANGED
data/test/enterprise/Gemfile
CHANGED
@@ -6,26 +6,20 @@ gem 'bson_ext'
|
|
6
6
|
|
7
7
|
# Bundle edge Rails instead:
|
8
8
|
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
9
|
+
gem 'sass-rails'
|
10
|
+
gem 'coffee-rails'
|
9
11
|
|
12
|
+
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
13
|
+
# gem 'therubyracer', :platform => :ruby
|
10
14
|
|
11
|
-
|
12
|
-
# in production environments by default.
|
13
|
-
group :assets do
|
14
|
-
gem 'sass-rails'
|
15
|
-
gem 'coffee-rails'
|
16
|
-
|
17
|
-
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
18
|
-
# gem 'therubyracer', :platform => :ruby
|
19
|
-
|
20
|
-
gem 'uglifier'
|
21
|
-
end
|
15
|
+
gem 'uglifier'
|
22
16
|
|
23
17
|
group :production do
|
24
18
|
|
25
19
|
end
|
26
20
|
|
27
|
-
|
28
|
-
gem 'simply_mongo'
|
21
|
+
gem 'simply_mongo', :git => 'git://github.com/robdbirch/simply_mongo.git'
|
22
|
+
#gem 'simply_mongo'
|
29
23
|
|
30
24
|
gem 'jquery-rails'
|
31
25
|
|
@@ -1,110 +1,110 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git://github.com/robdbirch/simply_mongo.git
|
3
|
+
revision: 6085b0140c689464a9a03d5db4b5d7a2b9e3c552
|
4
|
+
specs:
|
5
|
+
simply_mongo (0.0.7)
|
6
|
+
bson (>= 1.8, <= 2.0)
|
7
|
+
bson_ext (>= 1.8, <= 2.0)
|
8
|
+
mongo (>= 1.8, <= 2.0)
|
9
|
+
rails (>= 3.2, <= 4.0)
|
10
|
+
rake
|
11
|
+
|
1
12
|
GEM
|
2
13
|
remote: https://rubygems.org/
|
3
14
|
specs:
|
4
|
-
actionmailer (
|
5
|
-
actionpack (=
|
6
|
-
mail (~> 2.
|
7
|
-
actionpack (
|
8
|
-
|
9
|
-
|
10
|
-
builder (~> 3.0.0)
|
15
|
+
actionmailer (4.0.0)
|
16
|
+
actionpack (= 4.0.0)
|
17
|
+
mail (~> 2.5.3)
|
18
|
+
actionpack (4.0.0)
|
19
|
+
activesupport (= 4.0.0)
|
20
|
+
builder (~> 3.1.0)
|
11
21
|
erubis (~> 2.7.0)
|
12
|
-
|
13
|
-
rack (~>
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
coffee-rails (3.2.2)
|
22
|
+
rack (~> 1.5.2)
|
23
|
+
rack-test (~> 0.6.2)
|
24
|
+
activemodel (4.0.0)
|
25
|
+
activesupport (= 4.0.0)
|
26
|
+
builder (~> 3.1.0)
|
27
|
+
activerecord (4.0.0)
|
28
|
+
activemodel (= 4.0.0)
|
29
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
30
|
+
activesupport (= 4.0.0)
|
31
|
+
arel (~> 4.0.0)
|
32
|
+
activerecord-deprecated_finders (1.0.3)
|
33
|
+
activesupport (4.0.0)
|
34
|
+
i18n (~> 0.6, >= 0.6.4)
|
35
|
+
minitest (~> 4.2)
|
36
|
+
multi_json (~> 1.3)
|
37
|
+
thread_safe (~> 0.1)
|
38
|
+
tzinfo (~> 0.3.37)
|
39
|
+
arel (4.0.0)
|
40
|
+
atomic (1.1.14)
|
41
|
+
bson (1.9.2)
|
42
|
+
bson_ext (1.9.2)
|
43
|
+
bson (~> 1.9.2)
|
44
|
+
builder (3.1.4)
|
45
|
+
coffee-rails (4.0.0)
|
37
46
|
coffee-script (>= 2.2.0)
|
38
|
-
railties (
|
47
|
+
railties (>= 4.0.0.beta, < 5.0)
|
39
48
|
coffee-script (2.2.0)
|
40
49
|
coffee-script-source
|
41
50
|
execjs
|
42
|
-
coffee-script-source (1.
|
51
|
+
coffee-script-source (1.6.3)
|
43
52
|
erubis (2.7.0)
|
44
|
-
execjs (
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
thor (~> 0.14)
|
52
|
-
json (1.7.5)
|
53
|
-
mail (2.4.4)
|
54
|
-
i18n (>= 0.4.0)
|
53
|
+
execjs (2.0.1)
|
54
|
+
hike (1.2.3)
|
55
|
+
i18n (0.6.5)
|
56
|
+
jquery-rails (3.0.4)
|
57
|
+
railties (>= 3.0, < 5.0)
|
58
|
+
thor (>= 0.14, < 2.0)
|
59
|
+
mail (2.5.4)
|
55
60
|
mime-types (~> 1.16)
|
56
61
|
treetop (~> 1.4.8)
|
57
|
-
mime-types (1.
|
58
|
-
|
59
|
-
|
60
|
-
|
62
|
+
mime-types (1.25)
|
63
|
+
minitest (4.7.5)
|
64
|
+
mongo (1.9.2)
|
65
|
+
bson (~> 1.9.2)
|
66
|
+
multi_json (1.8.0)
|
61
67
|
polyglot (0.3.3)
|
62
|
-
rack (1.
|
63
|
-
rack-cache (1.2)
|
64
|
-
rack (>= 0.4)
|
65
|
-
rack-ssl (1.3.2)
|
66
|
-
rack
|
68
|
+
rack (1.5.2)
|
67
69
|
rack-test (0.6.2)
|
68
70
|
rack (>= 1.0)
|
69
|
-
rails (
|
70
|
-
actionmailer (=
|
71
|
-
actionpack (=
|
72
|
-
activerecord (=
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
railties (
|
78
|
-
actionpack (=
|
79
|
-
activesupport (=
|
80
|
-
rack-ssl (~> 1.3.2)
|
71
|
+
rails (4.0.0)
|
72
|
+
actionmailer (= 4.0.0)
|
73
|
+
actionpack (= 4.0.0)
|
74
|
+
activerecord (= 4.0.0)
|
75
|
+
activesupport (= 4.0.0)
|
76
|
+
bundler (>= 1.3.0, < 2.0)
|
77
|
+
railties (= 4.0.0)
|
78
|
+
sprockets-rails (~> 2.0.0)
|
79
|
+
railties (4.0.0)
|
80
|
+
actionpack (= 4.0.0)
|
81
|
+
activesupport (= 4.0.0)
|
81
82
|
rake (>= 0.8.7)
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
sass (3.2.1)
|
88
|
-
sass-rails (3.2.5)
|
89
|
-
railties (~> 3.2.0)
|
83
|
+
thor (>= 0.18.1, < 2.0)
|
84
|
+
rake (10.1.0)
|
85
|
+
sass (3.2.10)
|
86
|
+
sass-rails (4.0.0)
|
87
|
+
railties (>= 4.0.0.beta, < 5.0)
|
90
88
|
sass (>= 3.1.10)
|
91
|
-
|
92
|
-
|
93
|
-
bson
|
94
|
-
bson_ext
|
95
|
-
mongo
|
96
|
-
rails (~> 3.2.8)
|
97
|
-
sprockets (2.1.3)
|
89
|
+
sprockets-rails (~> 2.0.0)
|
90
|
+
sprockets (2.10.0)
|
98
91
|
hike (~> 1.2)
|
92
|
+
multi_json (~> 1.0)
|
99
93
|
rack (~> 1.0)
|
100
94
|
tilt (~> 1.1, != 1.3.0)
|
101
|
-
|
102
|
-
|
103
|
-
|
95
|
+
sprockets-rails (2.0.0)
|
96
|
+
actionpack (>= 3.0)
|
97
|
+
activesupport (>= 3.0)
|
98
|
+
sprockets (~> 2.8)
|
99
|
+
thor (0.18.1)
|
100
|
+
thread_safe (0.1.3)
|
101
|
+
atomic
|
102
|
+
tilt (1.4.1)
|
103
|
+
treetop (1.4.15)
|
104
104
|
polyglot
|
105
105
|
polyglot (>= 0.3.1)
|
106
|
-
tzinfo (0.3.
|
107
|
-
uglifier (
|
106
|
+
tzinfo (0.3.37)
|
107
|
+
uglifier (2.2.1)
|
108
108
|
execjs (>= 0.3.0)
|
109
109
|
multi_json (~> 1.0, >= 1.0.2)
|
110
110
|
|
@@ -118,5 +118,5 @@ DEPENDENCIES
|
|
118
118
|
mongo
|
119
119
|
rails
|
120
120
|
sass-rails
|
121
|
-
simply_mongo
|
121
|
+
simply_mongo!
|
122
122
|
uglifier
|
@@ -1,3 +1,3 @@
|
|
1
1
|
# Place all the behaviors and hooks related to the matching controller here.
|
2
2
|
# All this logic will automatically be available in application.js.
|
3
|
-
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-
|
3
|
+
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-scripts/
|
@@ -52,10 +52,10 @@ class EnterprisesController < ApplicationController
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def destroy
|
55
|
-
ec = SimplyMongo.db['enterprises']
|
56
55
|
id = params['id']
|
57
56
|
bid = BSON::ObjectId id
|
58
|
-
ec.
|
57
|
+
ec = SimplyMongo.db['enterprises']
|
58
|
+
ec.remove({'_id' => bid})
|
59
59
|
render :text => { :removed =>"removed"}
|
60
60
|
end
|
61
61
|
|
@@ -1,19 +1,14 @@
|
|
1
1
|
require File.expand_path('../boot', __FILE__)
|
2
2
|
|
3
|
-
#
|
4
|
-
# require "active_record/railtie"
|
3
|
+
#require 'rails/all'
|
5
4
|
require "action_controller/railtie"
|
6
5
|
require "action_mailer/railtie"
|
7
|
-
require "
|
6
|
+
require "rails/test_unit/railtie"
|
8
7
|
require "sprockets/railtie"
|
9
|
-
# require "rails/test_unit/railtie"
|
10
8
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
# If you want your assets lazily compiled in production, use this line
|
15
|
-
# Bundler.require(:default, :assets, Rails.env)
|
16
|
-
end
|
9
|
+
# Require the gems listed in Gemfile, including any gems
|
10
|
+
# you've limited to :test, :development, or :production.
|
11
|
+
Bundler.require(:default, Rails.env)
|
17
12
|
|
18
13
|
module Enterprise
|
19
14
|
class Application < Rails::Application
|
@@ -50,14 +45,10 @@ module Enterprise
|
|
50
45
|
# like if you have constraints or database-specific column types
|
51
46
|
# config.active_record.schema_format = :sql
|
52
47
|
|
53
|
-
|
54
|
-
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
55
|
-
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
56
|
-
# parameters by using an attr_accessible or attr_protected declaration.
|
57
|
-
# config.active_record.whitelist_attributes = true
|
48
|
+
config.app_middleware.delete "ActiveRecord::ConnectionAdapters::ConnectionManagement"
|
58
49
|
|
59
50
|
# Enable the asset pipeline
|
60
|
-
config.assets.enabled =
|
51
|
+
config.assets.enabled = false
|
61
52
|
|
62
53
|
# Version of your assets, change this if you want to expire all your assets
|
63
54
|
config.assets.version = '1.0'
|
File without changes
|
@@ -6,8 +6,7 @@ Enterprise::Application.configure do
|
|
6
6
|
# since you don't have to restart the web server when you make code changes.
|
7
7
|
config.cache_classes = false
|
8
8
|
|
9
|
-
|
10
|
-
config.whiny_nils = true
|
9
|
+
config.eager_load = false
|
11
10
|
|
12
11
|
# Show full error reports and disable caching
|
13
12
|
config.consider_all_requests_local = true
|
@@ -19,13 +18,6 @@ Enterprise::Application.configure do
|
|
19
18
|
# Print deprecation notices to the Rails logger
|
20
19
|
config.active_support.deprecation = :log
|
21
20
|
|
22
|
-
# Only use best-standards-support built into browsers
|
23
|
-
config.action_dispatch.best_standards_support = :builtin
|
24
|
-
|
25
|
-
|
26
|
-
# Do not compress assets
|
27
|
-
config.assets.compress = false
|
28
|
-
|
29
21
|
# Expands the lines which load the assets
|
30
22
|
config.assets.debug = true
|
31
23
|
end
|
@@ -12,7 +12,7 @@ Enterprise::Application.configure do
|
|
12
12
|
config.serve_static_assets = false
|
13
13
|
|
14
14
|
# Compress JavaScripts and CSS
|
15
|
-
config.assets.
|
15
|
+
config.assets.js_compressor = :uglifier
|
16
16
|
|
17
17
|
# Don't fallback to assets pipeline if a precompiled asset is missed
|
18
18
|
config.assets.compile = false
|
@@ -61,4 +61,6 @@ Enterprise::Application.configure do
|
|
61
61
|
# Send deprecation notices to registered listeners
|
62
62
|
config.active_support.deprecation = :notify
|
63
63
|
|
64
|
+
config.eager_load = true
|
65
|
+
|
64
66
|
end
|
@@ -11,8 +11,7 @@ Enterprise::Application.configure do
|
|
11
11
|
config.serve_static_assets = true
|
12
12
|
config.static_cache_control = "public, max-age=3600"
|
13
13
|
|
14
|
-
|
15
|
-
config.whiny_nils = true
|
14
|
+
config.eager_load = false
|
16
15
|
|
17
16
|
# Show full error reports and disable caching
|
18
17
|
config.consider_all_requests_local = true
|
@@ -5,3 +5,4 @@
|
|
5
5
|
# Make sure the secret is at least 30 characters and all random,
|
6
6
|
# no regular words or you'll be exposed to dictionary attacks.
|
7
7
|
Enterprise::Application.config.secret_token = '6ebe0b6241b8eaa39dd5116ff06f52c4596520a8c5edfcc42089366c2387020e41032ed5ef2e5bacaeedf8036ceb2447ea569be8418f809199fe32855ad8474c'
|
8
|
+
Enterprise::Application.config.secret_key_base = '6ebe0b6241b8eaa39dd5116ff06f52c4596520a8c5edfcc42089366c2387020e41032ed5ef2e5bacaeedf8036ceb2447ea569be8418f809199fe32855ad8474c'
|