ace-rails-ap 3.0.3 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -8
- data/lib/ace/rails/engine.rb +3 -0
- data/lib/ace/rails/version.rb +1 -1
- data/vendor/assets/javascripts/ace-rails-ap.js +2 -0
- data/vendor/assets/javascripts/set_ace_paths.js.erb +5 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be8935634992bbd9473e1842eb231a30d0d31244
|
4
|
+
data.tar.gz: 6736d38668d527d593d81110945c289bab4c2a83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b30649b31cbffb384a578c925eda11599fd18f02c14e8b7aa7c9fee00e73e8950d3540cd031f39973e90ad13a8a0940790e53187317d0e55dba21bd7be610009
|
7
|
+
data.tar.gz: b6eb56d79356dd04295a7015c0e4f5240389c6ded75452a8755e3f06c3e19c42e317e319d77a3ea43d682f7562755bbaab2ad3658ff535fbbbc2c3b3ee111aed
|
data/README.md
CHANGED
@@ -3,29 +3,43 @@
|
|
3
3
|
The [Ajax.org Cloud9 Editor (Ace)](https://github.com/ajaxorg/ace) for the Rails 3.1+ asset
|
4
4
|
pipeline.
|
5
5
|
|
6
|
-
##
|
6
|
+
## Installation
|
7
7
|
|
8
|
-
|
8
|
+
In your Gemfile, add:
|
9
9
|
|
10
10
|
```ruby
|
11
11
|
gem 'ace-rails-ap'
|
12
12
|
```
|
13
13
|
|
14
|
-
`
|
14
|
+
Then execute `bundle` and restart your server.
|
15
|
+
|
16
|
+
Add in your application.js file:
|
15
17
|
|
16
18
|
```javascript
|
17
|
-
//= require ace
|
18
|
-
//= require ace/worker-html
|
19
|
+
//= require ace-rails-ap
|
19
20
|
```
|
20
21
|
|
21
|
-
To include a theme or mode,
|
22
|
+
To include a theme or mode, add them in your application.js file:
|
22
23
|
|
23
24
|
```javascript
|
24
25
|
//= require ace/theme-sometheme
|
25
26
|
//= require ace/mode-somemode
|
26
27
|
```
|
27
28
|
|
28
|
-
|
29
|
+
Do not include Ace workers files in your application.js file. Then just use Ace like normal.
|
30
|
+
|
31
|
+
## Rails Asset Pipeline
|
32
|
+
|
33
|
+
Ace editor will dynamically load in run-time the workers javascript files.
|
34
|
+
ace-rails-ap play nice with rails asset pipeline by automatically configuring the precompilation of the workers files,
|
35
|
+
and by setting-up Ace to load the fingerprinted worker files. You have nothing to do, it just works.
|
36
|
+
|
37
|
+
## Migrate from previous version of ace-rails-ap
|
38
|
+
|
39
|
+
You may have done some customisation to allow ace-rails-ap to work in production, such as adding the worker files in
|
40
|
+
`assets.precompile` of your application.rb and/or using `ace.config.setModuleUrl` function. You can remove those.
|
41
|
+
|
42
|
+
Also replace the previous javascript manifest instruction `//= require ace/ace` by the new `//= require ace-rails-ap`, and remove
|
43
|
+
all workers from your javascript manifest.
|
29
44
|
|
30
|
-
Then just use Ace like normal.
|
31
45
|
|
data/lib/ace/rails/engine.rb
CHANGED
data/lib/ace/rails/version.rb
CHANGED
@@ -0,0 +1,5 @@
|
|
1
|
+
ace.config.set('basePath', '/assets/ace');
|
2
|
+
<% Dir[File.dirname(__FILE__) + '/ace/worker-*.js'].each do |file| %>
|
3
|
+
<% worker = File.basename(file, '.js').sub(/^worker-/, '') %>
|
4
|
+
ace.config.setModuleUrl("ace/mode/<%= worker %>_worker", "<%= asset_path "ace/worker-#{worker}.js" %>");
|
5
|
+
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ace-rails-ap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Krieger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- lib/ace/rails/engine.rb
|
58
58
|
- lib/ace/rails/version.rb
|
59
59
|
- update.sh
|
60
|
+
- vendor/assets/javascripts/ace-rails-ap.js
|
60
61
|
- vendor/assets/javascripts/ace/ace.js
|
61
62
|
- vendor/assets/javascripts/ace/ext-beautify.js
|
62
63
|
- vendor/assets/javascripts/ace/ext-chromevox.js
|
@@ -370,6 +371,7 @@ files:
|
|
370
371
|
- vendor/assets/javascripts/ace/worker-php.js
|
371
372
|
- vendor/assets/javascripts/ace/worker-xml.js
|
372
373
|
- vendor/assets/javascripts/ace/worker-xquery.js
|
374
|
+
- vendor/assets/javascripts/set_ace_paths.js.erb
|
373
375
|
homepage: https://github.com/codykrieger/ace-rails-ap
|
374
376
|
licenses:
|
375
377
|
- MIT
|