ngannotate-rails 0.14.0 → 0.14.0.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: 12cefe78e395a67fad3ac0548108d5c62ea21bb7
4
- data.tar.gz: b2c747b404ed9335e95d2396610b19839aa39f10
3
+ metadata.gz: 76f18064b3f05f1095ce98f771f09bfe9f84681f
4
+ data.tar.gz: 6ff5ced0258a5811c01e4e224083a30181bf4b25
5
5
  SHA512:
6
- metadata.gz: d7e6d415071b07a4be20bfaea6bd33c8fb6e05066184624426a9aadda79a381a39cdef06f688a5fe5607fda288c2f280404f36a4072be69938e9aea1353638dd
7
- data.tar.gz: f944f5aa7ae8cb120db850f3e3441626d46ecb5f101f1c5ccd35946845522680650a7e8c7957a28000189ad099c8c2799a4baeae90acac6b7ecc2d0cfb640b17
6
+ metadata.gz: eb4d157bd943ec7c58900849d35be2a8c83bc96aaef4911412907d84305ca7c3a7d457fd049a1504a7bac4b8d08736d3b1c92b0d8b1860694e0df59feab0088f
7
+ data.tar.gz: 17ef84bb1a3b0c91d63f46c0e71fb7a0caf9aea137ed047c5ec624ee89e530a5230bc2448fa4c86ec383fa01e0cd7c71b2d1b410173169ac18a3199fa8df4e5c
data/README.md CHANGED
@@ -30,6 +30,15 @@ Options available as environment variables:
30
30
  see ng-annotate documentation
31
31
  NG_FORCE=true - force ng-annoate processing in development/test environment
32
32
 
33
+ You can also define when ng-annotate should process with the `process` option to the environment configuration
34
+
35
+ config/environments/development.rb
36
+
37
+ Rails.application.configure do
38
+ ...
39
+ config.ng_annotate.process = true
40
+ ...
41
+ end
33
42
 
34
43
  Examples,
35
44
 
@@ -18,6 +18,8 @@ module Ngannotate
18
18
  #
19
19
  # To explicitly force assets compile in development environment
20
20
  # NG_FORCE=true RAILS_ENV=development bundle exec rake assets:clean assets:precompile
21
+ # or add to environments/development.rb
22
+ # config.ng_annotate.process = true
21
23
  #
22
24
  def force
23
25
  ENV['NG_FORCE'] == 'true'
@@ -28,7 +30,7 @@ module Ngannotate
28
30
  # Override by NG_FORCE=true env variable
29
31
  #
30
32
  def skip
31
- !force && (::Rails.env.development? || ::Rails.env.test?)
33
+ !force && !::Rails.configuration.ng_annotate.process
32
34
  end
33
35
 
34
36
  def evaluate(context, locals)
@@ -1,8 +1,15 @@
1
+ require 'active_support/core_ext/class/attribute'
1
2
  require 'ngannotate/processor'
2
3
 
3
4
  module Ngannotate
4
5
  module Rails
5
6
  class Railtie < ::Rails::Railtie
7
+ config.ng_annotate = ActiveSupport::OrderedOptions.new
8
+
9
+ # Establish static configuration defaults
10
+ # Disabled by default in development and test environments
11
+ config.ng_annotate.process = !::Rails.env.development? && !::Rails.env.test?
12
+
6
13
  initializer "ngannotate-rails.add_ngannotate_postprocessor", :group => :all do |app|
7
14
  app.assets.register_postprocessor 'application/javascript', Ngannotate::Processor
8
15
  end
@@ -1,5 +1,5 @@
1
1
  module Ngannotate
2
2
  module Rails
3
- VERSION = "0.14.0"
3
+ VERSION = "0.14.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ngannotate-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kari Ikonen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-30 00:00:00.000000000 Z
11
+ date: 2014-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -111,3 +111,4 @@ signing_key:
111
111
  specification_version: 4
112
112
  summary: 'Summary: Use ngannotate in the Rails asset pipeline.'
113
113
  test_files: []
114
+ has_rdoc: