nprogress-rails 0.1.2.1 → 0.1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88eae30d7bb5e2d06fd7f4dccdb3c9f35b7b9b4c
4
- data.tar.gz: d8d5596f1c7aae87eebaadfd155be58ebb3daf2e
3
+ metadata.gz: 278b552490c22b4aedee9ad61d9373d5c88d3c3e
4
+ data.tar.gz: d5b875c149435aa524431d9a0dcbe9c0521f3032
5
5
  SHA512:
6
- metadata.gz: 440a900466aca0a530496a805701d8108a541aa61db02f450350910b0f280717ff329b2253df9ea3e77388eb485064006a94b85a0dab3183057465a07015a452
7
- data.tar.gz: 24bb13dd8cf69dc4226a4b96fad6ff33a02eb155f20a039717136cd32d5812fd15ecd90933194b1da638d965f84d5e5bd34882eb9763188e009def9ab4fac700
6
+ metadata.gz: 60cf28239c7f4f11480a7f93a653a7aa481754d3d9ea2d41b83c91d71bdd576251e60e31e9afe92c0cce4c2550a94ac8e6d67990372563b5ae48413371ccce0f
7
+ data.tar.gz: b42fde331ad1ee0950a35021d5bec0e33174e9fef039601ff2a2851d345b9054ccc9ae45c893ff82c6d04d092494de99e8b82bced9b409c49fd536e1f1090cfc
data/README.md CHANGED
@@ -36,7 +36,9 @@ In your `application.js.coffee` (or just JS):
36
36
  #= require nprogress-turbolinks
37
37
  ```
38
38
 
39
- The `nprogress-turbolinks` is required only if you use turbolinks. Otherwise,
39
+ The `nprogress-turbolinks` is required only if you use turbolinks. Using pjax
40
+ rather than turbolinks? Simply require `nprogress-pjax` instead. Want it also
41
+ for simple jQuery AJAX calls? Just require `nprogress-ajax`. Otherwise,
40
42
  you will have to deal with show/hide the progress by your own.
41
43
 
42
44
  Also, into your `application.css.scss` file:
@@ -50,6 +52,27 @@ The `nprogress-bootstrap` is required if you use bootstrap and have a fixed
50
52
  toolbar or anything else. tl;dr: if the console shows no erros, but the
51
53
  progress doesn't appear, try this.
52
54
 
55
+ ## Customization
56
+
57
+ You can use any of the configurations described in the [readme](https://github.com/rstacruz/nprogress#configuration)
58
+ with this lib. I just recommend you to do so ASAP, for example, just after
59
+ the `nprogress-rails` require:
60
+
61
+ ```coffeescript
62
+ # this is the application.js.coffee file:
63
+
64
+ #= require jquery
65
+ #= require jquery_ujs
66
+ #= require turbolinks
67
+ #= require nprogress
68
+ #= require nprogress-turbolinks
69
+
70
+ NProgress.configure
71
+ showSpinner: false
72
+ ease: 'ease'
73
+ speed: 500
74
+ ```
75
+
53
76
 
54
77
  ## Contributing
55
78
 
@@ -4,7 +4,7 @@ $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.2.1"
7
+ spec.version = "0.1.2.2"
8
8
  spec.authors = ["Carlos Alexandro Becker"]
9
9
  spec.email = ["caarlos0@gmail.com"]
10
10
  spec.description = %q{This is a gem for the rstacruz' nprogress implementation. It's based on version nprogress 0.1.2.}
@@ -0,0 +1,4 @@
1
+ $(function() {
2
+ $(document).on('ajaxStart', function() { NProgress.start(); });
3
+ $(document).on('ajaxComplete', function() { NProgress.done(); });
4
+ });
@@ -0,0 +1,4 @@
1
+ $(function() {
2
+ $(document).on('pjax:send', function() { NProgress.start(); });
3
+ $(document).on('pjax:complete', function() { NProgress.done(); });
4
+ });
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.2.1
4
+ version: 0.1.2.2
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: 2013-08-21 00:00:00.000000000 Z
11
+ date: 2013-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -53,6 +53,8 @@ files:
53
53
  - Rakefile
54
54
  - lib/nprogress-rails.rb
55
55
  - nprogress-rails.gemspec
56
+ - vendor/assets/javascripts/nprogress-ajax.js
57
+ - vendor/assets/javascripts/nprogress-pjax.js
56
58
  - vendor/assets/javascripts/nprogress-turbolinks.js
57
59
  - vendor/assets/javascripts/nprogress.js
58
60
  - vendor/assets/stylesheets/nprogress-bootstrap.css
@@ -77,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
79
  version: '0'
78
80
  requirements: []
79
81
  rubyforge_project:
80
- rubygems_version: 2.0.3
82
+ rubygems_version: 2.0.2
81
83
  signing_key:
82
84
  specification_version: 4
83
85
  summary: Slim progress bars for Ajax'y applications. Inspired by Google, YouTube,