SrBuj 0.5.3 → 0.6.0

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
- YjA1ZjZhYjIyYTRiYTEzZDgyMTg5ZjUyOTEwNGJhNzY0NjU5OGEzMQ==
4
+ NGE1ZTk5OTFiZGU2YjM0MDJkYjBjNGQ5ZTBlNjE0ODgwODNhOGNiOA==
5
5
  data.tar.gz: !binary |-
6
- YzJkMWIzMGE5Zjc3YTA2YzZjZTg1ZjBiMjUwOTViYWNjZWQzYTA1Nw==
6
+ Y2UxMWUwNDgwMmM5OTdiYjIxOTg4N2YyNmNiOGQyNmM2ZjRhYzdkNA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YzFiZjZhMjc3MmYzYWNlZTQ1Y2E0N2M4YjQwN2Q3MWQxYzhhYjY3NDUwOThm
10
- YTZlZTJiZmVmZTg1ZDVkMzBkNDI2OTAzYTk2NDg5MWRmZmZhMjk4NzliMzdh
11
- OGYxZTFkZjM2NTVhYTJlOTA5MTA3MTdiNzRiMjQ1NGI0MGQzNTU=
9
+ YTMwNTMwMDY4ZDhmZDI2YjI1OWFmZTcyYmMxN2M2ZTY2YTI2YzhiYTNiOTZi
10
+ YmQ0ZDQ5NWU3MDkzOTNlNjdlMzMwZTNjYzY2ODVkNjhhMGY5YmE5ZjQ5MmRm
11
+ MDdiNDIyZGUwNTRiY2NjMjY3ZTRhMTE1NDhiMzkzMzQ5YmI1ZjM=
12
12
  data.tar.gz: !binary |-
13
- ZGI5ZjhhOTg5NGYyZjBkNDkxMDAyMmJhZmFhNTk4ZDM3MDJhZGQ1ODM2OWNh
14
- MDYzNzYwYzgzMDRiMWViMmZiMDZmZjFjZjJkMDA2YmZkMDE5YjQ4OTQ4NDYy
15
- ZWI5ZGVkZmI4MWY0NDBhMTEzNTA1NjIzNGVlYjY1YzYxOTgxMTM=
13
+ Y2Q5N2U5OTMwNjkzYzQ4ZDlmYWZlYzUwYjhiZjhlOTYyNjg0MTVkMWFhOTRm
14
+ YWYzYWIyNGMzZGMxOTE0NzA1ZDJmYjA5NzliNTdmNTYzZmNlMWQyNTc3YjJk
15
+ MzM5MzlkMjgxZWM2Y2RjNzQyMjU0MDc0YWZhYWRkOTY0NGZlNmY=
data/README.md CHANGED
@@ -72,7 +72,7 @@ Use and Options
72
72
  - callback(data[callback]) = after a successeded request, call this function.
73
73
  - data[custom] = just proxy the response to my custom function in callback, nothing more.
74
74
  - jqueryselector(data[jqueryselector]): Change the data[target] & data[error] for selectors in jquery and find the element!
75
-
75
+ - respond-as(data[respond-as]): We can alter the respond behavior without careing the method used on the request. values: GET/POST/PUT/PATCH/DELETE
76
76
  You can use it with any element available. (links forms tables divs anything).
77
77
 
78
78
  Example
data/lib/SrBuj/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module SrBuj
2
- VERSION = '0.5.3'
2
+ VERSION = '0.6.0'
3
3
  end
@@ -13,7 +13,7 @@
13
13
  };
14
14
  var SrBuj;
15
15
  $.SrBuj = SrBuj = {
16
- version: '0.5.3',
16
+ version: '0.6.0',
17
17
  selector: '[data-remote][data-target]',
18
18
  defaults: {
19
19
  '$el': undefined,
@@ -47,13 +47,17 @@
47
47
 
48
48
  },
49
49
  getVerb: function($el){
50
- var dataVerb = $el.data('method'),
50
+ var respond_as = $el.data('respond-as'),
51
+ dataVerb = $el.data('method'),
51
52
  replace = $el.data('replace'),
52
53
  proto = $el.attr('method');
53
- if( dataVerb )
54
- return dataVerb.toUpperCase();
54
+ if (respond_as)
55
+ return respond_as.toUpperCase();
55
56
  else
56
- if (proto) return replace ? 'PUT' : proto.toUpperCase();
57
+ if( dataVerb )
58
+ return dataVerb.toUpperCase();
59
+ else
60
+ if (proto) return replace ? 'PUT' : proto.toUpperCase();
57
61
  },
58
62
  getOptions: function(el, user_options){
59
63
  var options = {},
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: SrBuj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - gagoar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-04 00:00:00.000000000 Z
11
+ date: 2013-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler