dijon 0.0.2 → 0.0.3

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: 7452b0992a592f644a87ad6808f200c87b4f5a9a
4
- data.tar.gz: a304396ad9083e41f100fa7c0b14e7d8e0435467
3
+ metadata.gz: bb69bdf0d770655dc375e3370864585f2a680934
4
+ data.tar.gz: 392cdb059a0040efb4f4deabc58e190dc12d5527
5
5
  SHA512:
6
- metadata.gz: 2129f91ba2d027fb8c54e5940d26e3a8c29f923062e23f77f5af3740ca35ea9407ef1c2607f74d9a87de385614d30eddbeaeaea577c759853c3cd880caa29c29
7
- data.tar.gz: 08b090d60f8f8bde4ebf6144383303dc0511c66b393d7a0b1c344c0bb4f5f3bc01b1b3e851e321739849967deaddf58267cdad144e97a96ca235e2b30686ed8d
6
+ metadata.gz: 2d61d20bba08ea7aeb9cc7efcefe33a71425001779544ad29322c3bb3746a892304571a376cb17f27280ae758a4b07e042a932e4de420efe286c33f58f0cb317
7
+ data.tar.gz: 32cccf4ffc767656adfd732cd2c62b7847fdf53a86e4582ae0d72b1975608ee658e433018d8540429ab7f67a32f9e587376e694a8cdcb961201b7d4d961160cc
data/README.md CHANGED
@@ -14,6 +14,7 @@ Safari 8+
14
14
  ```javascript
15
15
  get(id) // returns Element
16
16
  getClass(name) // returns NodeList
17
+ getName(name) // returns NodeList
17
18
  getTag(name) // returns NodeList
18
19
  is(object) // returns shortened class name
19
20
  ```
@@ -1,5 +1,5 @@
1
1
  module Dijon
2
2
  module Rails
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -4,7 +4,7 @@ function ajax(method, url, data, callback) {
4
4
  method = method.toUpperCase();
5
5
  var request = new XMLHttpRequest();
6
6
  if (data) {
7
- if (method == 'get' && data) {
7
+ if (method == 'GET' && data) {
8
8
  url += '?';
9
9
  for (var p in data) url += p + '=' + encodeURIComponent(data[p]) + '&';
10
10
  }
@@ -14,7 +14,7 @@ function ajax(method, url, data, callback) {
14
14
  }
15
15
  request.open(method, url, true);
16
16
  if (callback) request.onload = function() {callback.call(this);};
17
- if (method == 'get' || method == 'delete' || !data) {
17
+ if (method == 'GET' || method == 'DELETE' || !data) {
18
18
  request.send();
19
19
  }
20
20
  else {
@@ -37,6 +37,10 @@ Element.prototype.getClass = function(name) {
37
37
  return this.getElementsByClassName(name);
38
38
  };
39
39
 
40
+ Element.prototype.getName = function(name) {
41
+ return this.getElementsByName(name);
42
+ };
43
+
40
44
  Element.prototype.getTag = function(name) {
41
45
  return this.getElementsByTagName(name);
42
46
  };
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dijon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Waits
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-02 00:00:00.000000000 Z
11
+ date: 2015-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -24,7 +24,8 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.2'
27
- description: For those times when jQuery is too much.
27
+ description: Simple performance-focused Javascript DOM extensions and utilities. For
28
+ those times when jQuery is too much.
28
29
  email:
29
30
  - dylan@waits.io
30
31
  executables: []
@@ -86,9 +87,9 @@ require_paths:
86
87
  - lib
87
88
  required_ruby_version: !ruby/object:Gem::Requirement
88
89
  requirements:
89
- - - ">="
90
+ - - "~>"
90
91
  - !ruby/object:Gem::Version
91
- version: '0'
92
+ version: '2.1'
92
93
  required_rubygems_version: !ruby/object:Gem::Requirement
93
94
  requirements:
94
95
  - - ">="