angular_progress 0.0.1 → 0.0.2

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2QzOTg4YTA0MjE3Y2MzNjZkMzAzYjJiZjRhMTNlNzZjNzQ1ODc3ZA==
4
+ OTMwZTUxMTc0MjE4NDZmNTRjMTJhYzQ4MzY4YjAxNGE5ODc1ZWUxZQ==
5
5
  data.tar.gz: !binary |-
6
- NzIyMmU5YzE4YTk0MGYyMWE1OGNlZjdiNDU3YzkxY2JkMjU3MWUxOQ==
6
+ OWNmZTA1NWQ1ZjU2YTNjMTI0YTFjMmE2Nzk2ZTg4ZmI1ZmM5ZTlmNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MDBiNGJjYTAyNTFmMGUyNThmNGZhN2VlMTcyMTI0ZjQwY2E2NjAwZDczYzRj
10
- MzViMTkzMmJmZWFjNWE2YTFkNWI2OGM5OWJlNmU3MzI5MzhhMzdjOGM1ODFk
11
- YzIwNTkwYjIwNDRmNjJmNGE2OGI2NWY2YzYyNjI3ZmE4NWNkMmI=
9
+ MGQ5ZTIwYmZhMDU1YTdhZjAyNjU5NGM3MmE5YTBmM2U3N2I0ZWI2NjI3MWE0
10
+ YWM2ZGE2MDQ4MmQyNTU0OTI0MzkxZDQ0ZDJiNzk1MjllN2RjZjBkZWM5Zjc0
11
+ NzM1NzNlMjEyNmQ4YTI1YWE1ODQxNjdiZmNmMTg5NGFlZTZjYTU=
12
12
  data.tar.gz: !binary |-
13
- YTNhMWQyMTAwNzc4MWM2M2IyOWY4MWY1ODZhZjBkNWU0MzVhZTAyZDg1YTk5
14
- YmFiODA4NDAzZTA4NTMyNmQwMWFlODIwNmNjNDA1YmNlOTYyZDc4YzU4YTFm
15
- YjhmMDQyMGEzNGM4OWYwYTUzMTNiMTQwYWNkODZjOWY3ZTBhMjY=
13
+ ZTdjOTM4NmE3NTUwYTFlNWVkNTc5MGE1MmNhY2JhZDVmMzRmYmM4OWU2YzZj
14
+ Y2UzMTNmYjEyYWQ3ODgzYmZkOTAyOGY2ODI0ZjkwMDUwNDY3ZTQ2OTZhZTZk
15
+ NmM1MTBmM2JlODMyNGI4NDNiZGEwMTg0NTY4ZDIyZGJhMTgxZjc=
data/README.md CHANGED
@@ -1,9 +1,16 @@
1
1
  # AngularProgress
2
2
 
3
- TODO: Write a gem description
3
+ Display progress of an HTTP action using AngularJS. Use it for spinners, progress-messages, success messages.
4
4
 
5
5
  ## Installation
6
6
 
7
+ There are two ways to use AngularProgress
8
+
9
+ #### Javascript
10
+
11
+
12
+ #### Ruby gem
13
+
7
14
  Add this line to your application's Gemfile:
8
15
 
9
16
  gem 'angular_progress'
@@ -18,8 +25,37 @@ Or install it yourself as:
18
25
 
19
26
  ## Usage
20
27
 
21
- TODO: Write usage instructions here
28
+ Example: Button with pending & success message ![button](https://dl.dropboxusercontent.com/u/23457337/angular_progress_1.gif)
29
+
30
+ Example: Button with pending & error message ![button_with_error](https://dl.dropboxusercontent.com/u/23457337/angular_progress_with_error.gif)
31
+ #### Markup
32
+
33
+ <div ng-controller="TestController">
34
+ <a ng-angular-progress="sampleHttpRequest" class="btn btn-default" ng-click="startRequest()"
35
+ http-pending="Saving..."
36
+ http-success="Saved Successfully"
37
+ http-error="Uh oh...">
38
+ Save
39
+ </div>
40
+ </div>
41
+
42
+ #### Javascript
43
+ ```javascript
44
+
45
+ angular.module('SampleApp', ['AngularProgress']);
22
46
 
47
+ angular.module('SampleApp').controller('SampleController', [
48
+ '$http', '$scope', function($http, $scope) {
49
+ $scope.makeRequest = function() {
50
+ $http.post('/my/endpoint', {
51
+ param1: 'value1'
52
+ }, {
53
+ requestName: 'sampleHttpRequest'
54
+ });
55
+ };
56
+ }
57
+ ]);
58
+ ```
23
59
  ## Contributing
24
60
 
25
61
  1. Fork it
@@ -1,3 +1,3 @@
1
1
  module AngularProgress
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -56,4 +56,4 @@ angular.module('AngularProgress').directive 'httpProgress', [ '$timeout', '$sce'
56
56
  scope.httpProgressSuccess()
57
57
  else if scope.requestCount is 0
58
58
  scope.httpProgressError()
59
- ]
59
+ ]
@@ -1,4 +1,4 @@
1
- angular.module('angularProgress').factory 'httpProgressInterceptor', ['$q', '$rootScope', ($q, $rootScope) ->
1
+ angular.module('AngularProgress').factory 'httpProgressInterceptor', ['$q', '$rootScope', ($q, $rootScope) ->
2
2
  request: (request) ->
3
3
  requestName = request.requestName || request.config?.requestName || request.data?.requestName
4
4
  if requestName
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: angular_progress
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tushar Ranka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-13 00:00:00.000000000 Z
11
+ date: 2014-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler