ngannotate-rails 0.9.6 → 0.9.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWM2Yzk4NzkwZDA0Zjk3YmU5YTMwYTU5Y2Q0Mzg3NTQxODUyZjdmYg==
4
+ NzUwODM3YjhlYzk0YmZhNzU0ZDFmMDM4OWMyZjQwNGZjZWY0MzA4NQ==
5
5
  data.tar.gz: !binary |-
6
- ZmUwMWE3MjBlYzA5YTg5NjAzOTIyNmMxYmYxODAyYzUyODUzN2I5NQ==
6
+ NTc3Njk5M2EyNmExMDdhYTQ0YmIxN2I1ODZiZmI1ZmQ4MjA4YWY2Mw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjA0N2RjNDEwODk5NzI4MGI4NjBhYjNmMzQ1MDFjMTFjODI0ZDNlMTM3MDgx
10
- MmJhZDNhOGE3OTU4OGFjM2QxZGMwNWYzZTFhNDkwNmNhMmUzNTgzN2FkZmFj
11
- NDQ5MTgwNzhiY2RiYjRjMzYyMDIwY2ZmZmNlNjI2YjQ2YjM5YjM=
9
+ OGNlMWVmOGU0YzkwYjY5NDZiMjdlNDFmZTIyYjI1MzhlMjRhMTNhMmY4N2Vl
10
+ OTY5MDA4MTEwYjZjNzdhOWUxMDgyZWUyOGRlNzY0MmZjMGQ2ZTAzNGRiY2Q2
11
+ NGM2NDA0OTg4MmEwNTE1YzIwNTA0ZWRkM2U1MzE2NDJhOGJjODU=
12
12
  data.tar.gz: !binary |-
13
- ZTc4N2RkM2M5N2I3YTY1NTAzMzVhYzUyNjIxZDg4NWI0NjcyMjNkMmY1MDFh
14
- Y2Q3ZWEwOGU5ZjY3Y2RmZTg2M2MwMzFiYjZlMmJiZWVjNTg5MTJiMzQ5YzMx
15
- ZDE2MzRlYTBjMjNkNTQxZDI4MTFlNjk2M2MyZTM3NmMxNDQ1OTg=
13
+ NmNiODdlODBhYmZjM2EyZGI1ZjhmOTU3YzEzZTIzZTg5YWM3ZTYzOTg1MmFl
14
+ M2U3M2FjYjk2YmM5MmIwNGE2YjhmZTI0NWMwMWFkNWFlMDgyZjI0YWJiMzgw
15
+ OGRmOTFmMTJhNTZkMDg0N2Y1MmVkZDZiYzhjOGM5ODQwNGMxNTQ=
data/README.md CHANGED
@@ -16,6 +16,28 @@ And then execute:
16
16
 
17
17
  That's it! ngannotate-rails integrates seamlessly into the Rails asset pipeline; your JavaScript or CoffeeScript assets will automatically be run through the ngannotate pre-minifier.
18
18
 
19
+ Usage
20
+ -----
21
+
22
+ By default ng-annotate processing is disabled in development and test environments. Processing, however, can be enforced by specifying NG_FORCE=true option.
23
+
24
+
25
+ Options available as environment variables:
26
+
27
+ NG_REGEXP - regexp passed to ng-annoate
28
+ see ng-annotate documentation
29
+ NG_OPT - comma separate list of "opt=value" key pairs passed as options to ng-annotate
30
+ see ng-annotate documentation
31
+ NG_FORCE=true - force ng-annoate processing in development/test environment
32
+
33
+
34
+ Examples,
35
+
36
+ # Test assets compile in rails development environment
37
+ # (assuming config/environments/development.rb is adjusted approriately)
38
+ NG_FORCE=true RAILS_ENV=development bundle exec rake assets:clean assets:precompile
39
+
40
+
19
41
  Versioning
20
42
  ----------
21
43
 
@@ -44,4 +66,4 @@ There is a Rails 3 application bundled in `example/` that you can use to test th
44
66
  Credits
45
67
  -------
46
68
 
47
- This gem is based into https://github.com/btford/ngmin
69
+ This gem is based into https://github.com/jasonm/ngmin-rails
@@ -13,10 +13,21 @@ module Ngannotate
13
13
  end
14
14
 
15
15
  #
16
- # Skip processing in environments where it does not make sense
16
+ # To allow testing assets compile in development environment
17
+ #
18
+ # To explicitly force assets compile in development environment
19
+ # NG_FORCE=true RAILS_ENV=development bundle exec rake assets:clean assets:precompile
20
+ #
21
+ def force
22
+ ENV['NG_FORCE'] == 'true'
23
+ end
24
+
25
+ #
26
+ # Skip processing in environments where it does not make sense.
27
+ # Override by NG_FORCE=true env variable
17
28
  #
18
29
  def skip
19
- ::Rails.env.development? || ::Rails.env.test?
30
+ !force && (::Rails.env.development? || ::Rails.env.test?)
20
31
  end
21
32
 
22
33
  def evaluate(context, locals)
@@ -1,5 +1,5 @@
1
1
  module Ngannotate
2
2
  module Rails
3
- VERSION = "0.9.6"
3
+ VERSION = "0.9.6.1"
4
4
  end
5
5
  end
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Kari Ikonen"]
10
10
  spec.email = ["mr.kari.ikonen@gmail.com"]
11
11
  spec.description = %q{Use ngannotate in the Rails asset pipeline.}
12
- spec.summary = %q{Use ngannotate in the Rails asset pipeline.}
12
+ spec.summary = %q{Summary: Use ngannotate in the Rails asset pipeline.}
13
13
  spec.homepage = "https://github.com/kikonen/ngannotate-rails"
14
14
  spec.license = "MIT"
15
15
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ngannotate-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kari Ikonen
@@ -95,5 +95,5 @@ rubyforge_project:
95
95
  rubygems_version: 2.2.2
96
96
  signing_key:
97
97
  specification_version: 4
98
- summary: Use ngannotate in the Rails asset pipeline.
98
+ summary: ! 'Summary: Use ngannotate in the Rails asset pipeline.'
99
99
  test_files: []