mno-enterprise 3.0.7 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +112 -28
  3. metadata +8 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 819f497bc543c37d9c22ee8912c1477695267308
4
- data.tar.gz: 1165ab475abb3e30b223ec68ce2801ea654f0b35
3
+ metadata.gz: 2d2d6dcd42e6df47e98018eed8e3b5fd7b53569d
4
+ data.tar.gz: c5fb8d12b8310cb8e205a1c957d48971d0e3f8ba
5
5
  SHA512:
6
- metadata.gz: 31d3f6deb8be8fc23fc9644bbbd417fff368d7c157dc3d150289e8a43fca836b44f499fcaab4823322746651d576b63fe549d42d3fdc427b947a3dbddb9923ab
7
- data.tar.gz: 8f81e6eb485f05d158a8afd875571d6cab5c6a70e1908a3843646278afdd171381bdf5895685ad1bb845cc630984e374bdeaf18ba7b748b8d6831fe990e72bc2
6
+ metadata.gz: d51d76eb36dc20cbac2f1586ed1592bb19815c42a75d5684064485bc587fd7244300e7461fff9b5b4db189b4f872c8c641d0c8b3eea5e2167777fe23b4b98c87
7
+ data.tar.gz: 111fafe66029ab4ff15d7920249cc060f4f4ac5403a3a4948c2ed4be3589c95c8e7e759c61e8de25dff06bcc77c1baed2e60a939b4cd402b221762076c27c448
data/README.md CHANGED
@@ -5,6 +5,10 @@
5
5
  </p>
6
6
 
7
7
  [![Gem Version](https://badge.fury.io/rb/mno-enterprise.svg)](https://rubygems.org/gems/mno-enterprise)
8
+ [![Build Status](https://travis-ci.org/maestrano/mno-enterprise.svg?branch=master)](https://travis-ci.org/maestrano/mno-enterprise)
9
+ [![Dependency Status](https://gemnasium.com/badges/github.com/maestrano/mno-enterprise.svg)](https://gemnasium.com/github.com/maestrano/mno-enterprise)
10
+ [![Code Climate](https://codeclimate.com/github/maestrano/mno-enterprise/badges/gpa.svg)](https://codeclimate.com/github/maestrano/mno-enterprise)
11
+ [![Test Coverage](https://codeclimate.com/github/maestrano/mno-enterprise/badges/coverage.svg)](https://codeclimate.com/github/maestrano/mno-enterprise/coverage)
8
12
 
9
13
  The Maestrano Enterprise Engine can be included in a Rails project to bootstrap an instance of Maestrano Enterprise Express.
10
14
 
@@ -13,17 +17,18 @@ The goal of this engine is to provide a base that you can easily extend with cus
13
17
  - - -
14
18
 
15
19
  1. [Install](#install)
16
- 2. [Building the Frontend](#building-the-frontend)
17
- 3. [Modifying the style - Theme Previewer](#modifying-the-style---theme-previewer)
18
- 4. [Extending the Frontend](#extending-the-frontend)
19
- 5. [Replacing the Frontend](#replacing-the-frontend)
20
- 6. [Generating a database extension](#generating-a-database-extension)
21
- 7. [Deploying](#deploying)
20
+ 2. [Configuration](#configuration)
21
+ 3. [Building the Frontend](#building-the-frontend)
22
+ 4. [Modifying the style - Theme Previewer](#modifying-the-style---theme-previewer)
23
+ 5. [Extending the Frontend](#extending-the-frontend)
24
+ 6. [Replacing the Frontend](#replacing-the-frontend)
25
+ 7. [Generating a database extension](#generating-a-database-extension)
26
+ 8. [Deploying](#deploying)
22
27
  1. [Deploy a Puma stack on EC2 via Webistrano/Capistrano](#deploy-a-puma-stack-on-ec2-via-webistranocapistrano)
23
28
  2. [Sample nginx config for I18n](#sample-nginx-config-for-i18n)
24
29
  3. [Health Checks](#health-checks)
25
- 8. [Migrating from v2 to v3](#migrating-from-v2-to-v3)
26
- 9. [Contributing](#contributing)
30
+ 9. [Migrating from v2 to v3](#migrating-from-v2-to-v3)
31
+ 10. [Contributing](#contributing)
27
32
 
28
33
  - - -
29
34
 
@@ -33,7 +38,7 @@ The goal of this engine is to provide a base that you can easily extend with cus
33
38
 
34
39
  You can generate a complete rails project using the application template:
35
40
  ```ruby
36
- rails new [project_name] -TSOJ -m https://raw.githubusercontent.com/maestrano/mno-enterprise/master/rails-template/mnoe-app-template.rb
41
+ rails new [project_name] -TOJ -m https://raw.githubusercontent.com/maestrano/mno-enterprise/master/rails-template/mnoe-app-template.rb
37
42
  ```
38
43
 
39
44
  For more details see the template [README](rails-template/README.md).
@@ -70,6 +75,86 @@ Once node is installed, you can run the following commands to ensure that all de
70
75
  bin/rake mnoe:frontend:install_dependencies
71
76
  ```
72
77
 
78
+ ## Configuration
79
+
80
+ ### Emailing platform
81
+
82
+ Maestrano Enterprise support either [Mandrill](https://www.mandrill.com/) or [SparkPost](https://www.sparkpost.com/).
83
+
84
+ You can use either provider as long as your account has the [required templates](https://maestrano.atlassian.net/wiki/display/MNOE/Emailing).
85
+
86
+ If you want to copy the default templates to your own account you can use the tools in `tools/emails`
87
+
88
+ #### Mandrill
89
+
90
+ ```ruby
91
+ # Gemfile
92
+ gem 'mandrill-api', '~> 1.0.53'
93
+
94
+ # config/application.yml
95
+ MANDRILL_API_KEY: api_key
96
+
97
+ # config/initializers/mno_enterprise.rb
98
+ MnoEnterprise.configure do |config|
99
+ config.mail_adapter = :mandrill
100
+ end
101
+ ```
102
+
103
+ #### SparkPost
104
+
105
+ ```ruby
106
+ # Gemfile
107
+ gem 'sparkpost', '~> 0.1.4'
108
+
109
+ # config/application.yml
110
+ SPARKPOST_API_KEY: api_key
111
+
112
+ # config/initializers/mno_enterprise.rb
113
+ MnoEnterprise.configure do |config|
114
+ config.mail_adapter = :sparkpost
115
+ end
116
+ ```
117
+
118
+ #### SMTP
119
+ SMTP server settings are needed to send emails via SMTP. In case there's no SMTP server, a personal gmail account could be used as an alternative.
120
+ To use gmail to send SMTP emails, the gmail account should be set to allow "less secure apps".
121
+ Typically for security reasons, system environment variables 'SMTP_USERNAME' and 'SMTP_PASSWORD' should be used to set the SMTP credentials.
122
+
123
+ ```ruby
124
+ # Gemfile
125
+ gem 'premailer-rails'
126
+
127
+ # config/environments/production.rb
128
+ Rails.application.configure do
129
+ config.action_mailer.raise_delivery_errors = false
130
+ config.action_mailer.default_url_options = { :host => host_domain, :port => port_number }
131
+ config.action_mailer.asset_host = your_apps_root_url
132
+ config.action_mailer.delivery_method = :smtp
133
+ ActionMailer::Base.smtp_settings = {
134
+ address: 'smtp.gmail.com',
135
+ port: 587,
136
+ domain: 'gmail.com',
137
+ user_name: ENV['SMTP_USERNAME'],
138
+ password: ENV['SMTP_PASSWORD'],
139
+ authentication: 'plain',
140
+ enable_starttls_auto: true
141
+ }
142
+ end
143
+
144
+ # config/initializers/mno_enterprise.rb
145
+ MnoEnterprise.configure do |config|
146
+ config.mail_adapter = :smtp
147
+ end
148
+
149
+ # config/initializers/assets.rb
150
+ Rails.application.config.assets.precompile += %w( mno_enterprise/mail.css )
151
+ ```
152
+
153
+ ##### Customization of mail templates
154
+ - You can override the default mail templates by adding template files ( template-name.html.erb, template-name.text.erb ) to the mail view directory (/app/views/system_notifications).
155
+ - Logo can also be overriden by adding your own logo image (main-logo.png) to the image assets directory (/app/assets/images/mno_enterprise).
156
+ - Write your own stylesheet by adding mail.css file to the stylesheets directory (/app/assets/stylesheets/mno_enterprise). The css rules you write will be applied to all the mail templates including the default ones.
157
+
73
158
  ## Building the frontend
74
159
  The Maestrano Enterprise frontend is a Single Page Application (SPA) that is separate from the Rails project. The source code for this frontend can be found on the [mno-enterprise-angular Github repository](https://github.com/maestrano/mno-enterprise-angular)
75
160
 
@@ -113,6 +198,21 @@ foreman start -f Procfile.dev
113
198
 
114
199
  This will accelerate your development as the gulp serve task use BrowserSync to reload the browser any time a file is changed.
115
200
 
201
+ ### Adding a custom font
202
+
203
+ It is possible to add custom fonts, shared all over the rails application screens and the AngularJS SPA.
204
+
205
+ Simply copy the font files under the directory `/frontend/src/fonts/` of your host application and create a `font-faces.less` file containing your *font-face* definitions.
206
+
207
+ An example of a project using a custom font can be seen on the [mno-enterprise-demo](https://github.com/maestrano/mno-enterprise-demo) project.
208
+
209
+ NB: Your host project may have been generated or created before the implementation of this feature, in this case make sure the the file `/app/assets/stylesheets/main.less` contains:
210
+ ```less
211
+ // Import custom fonts
212
+ //--------------------------------------------
213
+ @import "../../../frontend/src/fonts/font-faces";
214
+ ```
215
+
116
216
  ## Replacing the Frontend
117
217
 
118
218
  In some cases you may decide that the current [mno-enterprise-angular](https://github.com/maestrano/mno-enterprise-angular) frontend is not appropriate at all.
@@ -197,27 +297,11 @@ There are various endpoints to perform health checks:
197
297
  {
198
298
  "app-version": "9061048-6811c4a",
199
299
  "mno-enterprise-version": "0.0.1",
200
- "env": "test",
201
- "mno-api-host": "https://api-hub.maestrano.com"
300
+ "env": "test"
202
301
  }
203
302
  ```
204
303
 
205
- `/mnoe/health_check` & `/mnoe/health_check/full`: Complete health check (cache, smtp, database, ...).
206
- See [health_check](https://github.com/ianheggie/health_check) and the [initalizer](api/config/initializers/health_check.rb) for the default configuration.
207
-
208
- You can override it by creating an initalizer in the host app, eg:
209
-
210
- ```ruby
211
- # my-mnoe-app/config/initializers/health_check.rb
212
- HealthCheck.setup do |config|
213
- # You can customize which checks happen on a standard health check
214
- config.standard_checks = %w(cache site)
215
-
216
- # You can set what tests are run with the 'full' or 'all' parameter
217
- config.full_checks = %w(cache site custom database migrations)
218
- end
219
- ```
220
-
304
+ `/mnoe/health_check` & `/mnoe/health_check/full`: Complete health check (cache, smtp, database, ...). See [health_check](https://github.com/ianheggie/health_check)
221
305
 
222
306
  ## Migrating from v2 to v3
223
307
 
@@ -227,7 +311,7 @@ First switch to a new branch such as v2-to-v3.
227
311
  git co -b v2-to-v3
228
312
  ```
229
313
 
230
- Open your Gemfile and ensure that your project points to the v3.0-dev of Maestrano Enterprise. You gemfile should look like this:
314
+ Open your Gemfile and ensure that your project points to the v3.0-dev branch of Maestrano Enterprise. You gemfile should look like this:
231
315
  ```ruby
232
316
  gem 'mno-enterprise', git: 'https://some-token:x-oauth-basic@github.com/alachaum/mno-enterprise.git', branch: 'v3.0-dev'
233
317
  ```
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mno-enterprise
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.7
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnaud Lachaume
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-06-05 00:00:00.000000000 Z
12
+ date: 2016-07-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mno-enterprise-core
@@ -17,42 +17,42 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 3.0.7
20
+ version: 3.1.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 3.0.7
27
+ version: 3.1.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: mno-enterprise-api
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - '='
33
33
  - !ruby/object:Gem::Version
34
- version: 3.0.7
34
+ version: 3.1.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - '='
40
40
  - !ruby/object:Gem::Version
41
- version: 3.0.7
41
+ version: 3.1.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: mno-enterprise-frontend
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - '='
47
47
  - !ruby/object:Gem::Version
48
- version: 3.0.7
48
+ version: 3.1.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - '='
54
54
  - !ruby/object:Gem::Version
55
- version: 3.0.7
55
+ version: 3.1.0
56
56
  description: Maestrano Enterprise is your application marketplace, out of the box.
57
57
  email:
58
58
  - developers@maestrano.com