imba-rails 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/.travis.yml +3 -1
- data/README.md +1 -1
- data/lib/imba/rails.rb +19 -3
- data/lib/imba/rails/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0dbc412cdeadb6d30709586942d06d87cfb3ec6b
|
4
|
+
data.tar.gz: 0764675b1140691f0bdfdf59af2e92b066358f04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f84cb059c793cc1f9a379030e3eba7d38b978a5956987dba2e3226aee4520ebe7b759c5ef4668fc99e08e86db14330805a1daf73d15ae879190c10cc8336090d
|
7
|
+
data.tar.gz: 7bdc90bd766dd2a235cdfcfd0261640eb55ae93f8c3886f239bb1afa07014eed0afd4506b4a1905444883c81726bfc534e6ae780ac704f67a887e2481b836e3e
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
data/lib/imba/rails.rb
CHANGED
@@ -25,13 +25,29 @@ module Imba
|
|
25
25
|
# TODO: not make this global?
|
26
26
|
config.imba = ImbaOptions.new
|
27
27
|
|
28
|
+
def configure_assets(app)
|
29
|
+
if config.respond_to?(:assets) && config.assets.respond_to?(:configure)
|
30
|
+
# Rails 4.x
|
31
|
+
config.assets.configure do |env|
|
32
|
+
yield env
|
33
|
+
end
|
34
|
+
else
|
35
|
+
# Rails 3.2
|
36
|
+
yield app.assets
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
28
40
|
initializer 'imba.asset_paths', :after => 'sprockets.environment', :group => :all do |app|
|
29
|
-
app
|
41
|
+
configure_assets app do |env|
|
42
|
+
env.append_path Imba::Source::BROWSER_PATH.to_s
|
43
|
+
end
|
30
44
|
end
|
31
45
|
|
32
46
|
initializer 'imba.compiler' do |app|
|
33
|
-
app
|
34
|
-
|
47
|
+
configure_assets app do |env|
|
48
|
+
env.register_mime_type 'text/imba', extensions: ['.imba'], charset: :unicode
|
49
|
+
env.register_transformer 'text/imba', 'application/javascript', Transformer.new(app.config.imba.compiler_options)
|
50
|
+
end
|
35
51
|
end
|
36
52
|
end
|
37
53
|
end
|
data/lib/imba/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imba-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Magnus Holm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -122,4 +122,3 @@ signing_key:
|
|
122
122
|
specification_version: 4
|
123
123
|
summary: Rails integration for Imba
|
124
124
|
test_files: []
|
125
|
-
has_rdoc:
|