ngannotate-rails 0.9.6 → 0.9.6.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 +8 -8
- data/README.md +23 -1
- data/lib/ngannotate/processor.rb +13 -2
- data/lib/ngannotate/rails/version.rb +1 -1
- data/ngannotate-rails.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzUwODM3YjhlYzk0YmZhNzU0ZDFmMDM4OWMyZjQwNGZjZWY0MzA4NQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTc3Njk5M2EyNmExMDdhYTQ0YmIxN2I1ODZiZmI1ZmQ4MjA4YWY2Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGNlMWVmOGU0YzkwYjY5NDZiMjdlNDFmZTIyYjI1MzhlMjRhMTNhMmY4N2Vl
|
10
|
+
OTY5MDA4MTEwYjZjNzdhOWUxMDgyZWUyOGRlNzY0MmZjMGQ2ZTAzNGRiY2Q2
|
11
|
+
NGM2NDA0OTg4MmEwNTE1YzIwNTA0ZWRkM2U1MzE2NDJhOGJjODU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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/
|
69
|
+
This gem is based into https://github.com/jasonm/ngmin-rails
|
data/lib/ngannotate/processor.rb
CHANGED
@@ -13,10 +13,21 @@ module Ngannotate
|
|
13
13
|
end
|
14
14
|
|
15
15
|
#
|
16
|
-
#
|
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)
|
data/ngannotate-rails.gemspec
CHANGED
@@ -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: []
|