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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e22b1e4d836f74890e437343f39351ba1dd44f32
4
- data.tar.gz: d8bb09284e613b8d75314d3b56fe75e280a955b0
3
+ metadata.gz: 0dbc412cdeadb6d30709586942d06d87cfb3ec6b
4
+ data.tar.gz: 0764675b1140691f0bdfdf59af2e92b066358f04
5
5
  SHA512:
6
- metadata.gz: 3b14f007f6c8964fddd7b9983daa1a25ade4bae6915acefb38c3f193aef8335a1727638f8f60f4c2be23f63ea51e53d17b2621a3f8b842aaa93cb65eb841e730
7
- data.tar.gz: af02a95a33165208e740cf2d40e767d8990183c9c0cf95b4304c8c9bf946c706c838cd55b342cdefac6b201d63d92dc0787060ffb8ebdd6120576bffab3f8c3c
6
+ metadata.gz: f84cb059c793cc1f9a379030e3eba7d38b978a5956987dba2e3226aee4520ebe7b759c5ef4668fc99e08e86db14330805a1daf73d15ae879190c10cc8336090d
7
+ data.tar.gz: 7bdc90bd766dd2a235cdfcfd0261640eb55ae93f8c3886f239bb1afa07014eed0afd4506b4a1905444883c81726bfc534e6ae780ac704f67a887e2481b836e3e
@@ -5,6 +5,8 @@ rvm:
5
5
  - 2.0
6
6
  - jruby
7
7
  before_install:
8
+ - unset BUNDLE_GEMFILE
8
9
  - gem install bundler -v 1.10.5
9
10
  - cd example_app
10
- script: ./test.sh
11
+ script:
12
+ - ./test.sh
data/README.md CHANGED
@@ -17,7 +17,7 @@ tag #app
17
17
  <self>
18
18
  <h1> "Hello Imba!"
19
19
 
20
- def app
20
+ def window.app
21
21
  #app
22
22
  ```
23
23
 
@@ -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.assets.append_path Imba::Source::BROWSER_PATH.to_s
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.assets.register_mime_type 'text/imba', extensions: ['.imba'], charset: :unicode
34
- app.assets.register_transformer 'text/imba', 'application/javascript', Transformer.new(app.config.imba.compiler_options)
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
@@ -1,5 +1,5 @@
1
1
  module Imba
2
2
  module Rails
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
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.0
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: 2015-09-04 00:00:00.000000000 Z
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: