nprogress-rails 0.1.3.1 → 0.1.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 +4 -4
- data/README.md +21 -1
- data/app/assets/javascripts/nprogress-angular.js +20 -0
- data/nprogress-rails.gemspec +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 005266c9f8515ef2f35d53a105bc5d8f9b5894d6
|
4
|
+
data.tar.gz: 6bad57e6468ca128b9b3a3d12692ad34b85935d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 998073599de67692a99871e3af1c3b6d86b82798afa36320d75dc4aacd832a5b00dc4db9d291fe023be76bd7caf450cabafcf4fe2723fc1923e21322b2ab03ae
|
7
|
+
data.tar.gz: 932013e1bc9cbe92b49f9765adcaa4fa86306a00342ced4b8344fbd8c77d07e58a43051f0f5460ea97038fb99b90b0a9c711709c09e470dccdc6a6a2bf2460c1
|
data/README.md
CHANGED
@@ -49,9 +49,29 @@ Also, into your `application.css.scss` file:
|
|
49
49
|
```
|
50
50
|
|
51
51
|
The `nprogress-bootstrap` is required if you use bootstrap and have a fixed
|
52
|
-
toolbar or anything else. tl;dr: if the console shows no
|
52
|
+
toolbar or anything else. tl;dr: if the console shows no errors, but the
|
53
53
|
progress doesn't appear, try this.
|
54
54
|
|
55
|
+
### Angular.js support [experimental]
|
56
|
+
|
57
|
+
You can try the Angular.js support with this:
|
58
|
+
|
59
|
+
```javascript
|
60
|
+
// ...
|
61
|
+
//= require nprogress
|
62
|
+
//= require nprogress-angular
|
63
|
+
|
64
|
+
var app = angular.module('myApp',[]).config([
|
65
|
+
'$httpProvider',
|
66
|
+
function($httpProvider) {
|
67
|
+
$httpProvider.interceptors.push(nprogressAngularInterceptor);
|
68
|
+
nprogressAngularInterceptor = undefined;
|
69
|
+
}
|
70
|
+
]);
|
71
|
+
```
|
72
|
+
|
73
|
+
This should make all requests made with `$http` show/hide the NProgress bar.
|
74
|
+
|
55
75
|
## Customization
|
56
76
|
|
57
77
|
You can use any of the configurations described in the [readme](https://github.com/rstacruz/nprogress#configuration)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
var nprogressAngularInterceptor = ['$q', function($q) {
|
2
|
+
return {
|
3
|
+
'request': function(config) {
|
4
|
+
NProgress.start();
|
5
|
+
return config;
|
6
|
+
},
|
7
|
+
'requestError': function(rejection) {
|
8
|
+
NProgress.done();
|
9
|
+
return $q.reject(rejection);
|
10
|
+
},
|
11
|
+
'response': function(response) {
|
12
|
+
NProgress.done();
|
13
|
+
return response;
|
14
|
+
},
|
15
|
+
'responseError': function(rejection) {
|
16
|
+
NProgress.done();
|
17
|
+
return $q.reject(rejection);
|
18
|
+
}
|
19
|
+
};
|
20
|
+
}];
|
data/nprogress-rails.gemspec
CHANGED
@@ -4,10 +4,10 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'nprogress-rails'
|
7
|
-
spec.version = '0.1.
|
7
|
+
spec.version = '0.1.6.1'
|
8
8
|
spec.authors = ['Carlos Alexandro Becker']
|
9
9
|
spec.email = ['caarlos0@gmail.com']
|
10
|
-
spec.description = %q{This is a gem for the rstacruz' nprogress implementation. It's based on version nprogress 0.1.
|
10
|
+
spec.description = %q{This is a gem for the rstacruz' nprogress implementation. It's based on version nprogress 0.1.6.}
|
11
11
|
spec.summary = %q{Slim progress bars for Ajax'y applications. Inspired by Google, YouTube, and Medium.}
|
12
12
|
spec.homepage = 'https://github.com/caarlos0/nprogress-rails'
|
13
13
|
spec.license = 'MIT'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nprogress-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Alexandro Becker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: This is a gem for the rstacruz' nprogress implementation. It's based
|
70
|
-
on version nprogress 0.1.
|
70
|
+
on version nprogress 0.1.6.
|
71
71
|
email:
|
72
72
|
- caarlos0@gmail.com
|
73
73
|
executables: []
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- README.md
|
81
81
|
- Rakefile
|
82
82
|
- app/assets/javascripts/nprogress-ajax.js
|
83
|
+
- app/assets/javascripts/nprogress-angular.js
|
83
84
|
- app/assets/javascripts/nprogress-pjax.js
|
84
85
|
- app/assets/javascripts/nprogress-turbolinks.js
|
85
86
|
- app/assets/javascripts/nprogress.js
|