angular_sprinkles 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/angular_sprinkles.gemspec +2 -2
- data/lib/angular_sprinkles/java_script.rb +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dafbcaba32994ad34dc1f4a823842cfbca68fbdc
|
4
|
+
data.tar.gz: c8b63cd4e09c91447ca816e4dc87ab8ed1653161
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2713e0baf4e6969edf8c5d48916bebd8b91bf0d833fd91a6fe73fd7cd77c3bced85620cccabe5cae9ea3a618643980b62feef80801be40c93c43b0f92bbc53d
|
7
|
+
data.tar.gz: b9c31e8430583dee715be944325215a0f5906f01db398d7cb5814af23d829e1c89a2a03a00e1bc41aa58a9488e6cf017acb8f23a4eedab863360cba50876a8bc
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.9
|
data/angular_sprinkles.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: angular_sprinkles 0.0.
|
5
|
+
# stub: angular_sprinkles 0.0.9 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "angular_sprinkles"
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.9"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
@@ -16,6 +16,12 @@ module AngularSprinkles
|
|
16
16
|
ctrlName = 'Ctrl';
|
17
17
|
#{CONTROLLER_FN} = #{CONTROLLER_FN} || function(){};
|
18
18
|
app.controller(ctrlName, #{CONTROLLER_FN});
|
19
|
+
app.config(['$httpProvider', function ($httpProvider) {
|
20
|
+
var csrfToken = document.querySelector('meta[name=csrf-token]');
|
21
|
+
if (csrfToken) {
|
22
|
+
$httpProvider.defaults.headers.common['X-CSRF-Token'] = csrfToken.content;
|
23
|
+
}
|
24
|
+
}]);
|
19
25
|
doc.setAttribute('data-ng-controller', ctrlName + ' as #{CONTROLLER_NAME}');
|
20
26
|
angular.bootstrap(doc, [app.name]);
|
21
27
|
};
|
@@ -26,7 +32,6 @@ module AngularSprinkles
|
|
26
32
|
<<-BlockOfJavaScript
|
27
33
|
#{CONTROLLER_FN} = #{CONTROLLER_FN} || function ($injector) {
|
28
34
|
#{string}
|
29
|
-
|
30
35
|
#{SERVICE_QUEUE}.forEach(function (service) {
|
31
36
|
this[service] = $injector.get(service);
|
32
37
|
}.bind(this));
|