brototype 0.9.1 → 0.9.3
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 +10 -0
- data/lib/brototype/bro.rb +2 -2
- data/lib/brototype/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 715fc78a040e49c286fd8339f380d10cfbc38df0
|
4
|
+
data.tar.gz: be9c767d013da403047764da4bec53210e74308a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25acda85a5fb990515cacc7033d285894f1fed4072100f7383fd691f08b9431c346f94f7c638439b59501324bf58f83d0c320ed973eab1d5c6482cc48993ef10
|
7
|
+
data.tar.gz: cca5e8383dd041236e308a8f53f2e2870e3335f60c2d037bf6d6a13c05f349b6c26d63be57b399997fde9901d4f1a711b54e76ec19949324a1d1eab640ae6689
|
data/README.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
Bro, do you even Ruby?
|
4
4
|
|
5
|
+
This is a ruby port of the popular brototype.js library that can be found here:
|
6
|
+
https://github.com/letsgetrandy/brototype
|
7
|
+
|
8
|
+
|
9
|
+
|
5
10
|
## Installation
|
6
11
|
|
7
12
|
Add this line to your application's Gemfile:
|
@@ -18,6 +23,11 @@ Or install it yourself as:
|
|
18
23
|
|
19
24
|
$ gem install brototype
|
20
25
|
|
26
|
+
## Rspec is used to run the tests, just do:
|
27
|
+
|
28
|
+
```
|
29
|
+
RSpec::Core::RakeTask.new(:spec)
|
30
|
+
```
|
21
31
|
|
22
32
|
## Contributing
|
23
33
|
|
data/lib/brototype/bro.rb
CHANGED
@@ -27,7 +27,7 @@ module Brototype
|
|
27
27
|
# TODO if key is an array, return all
|
28
28
|
if @obj.is_a?(Hash)
|
29
29
|
key.split('.').inject(@obj) do |c, v|
|
30
|
-
c.respond_to?(:keys) ? c[v] : nil
|
30
|
+
c.respond_to?(:keys) ? c[v.start_with?(":") ? v[1..-1].to_sym : v] : nil
|
31
31
|
end
|
32
32
|
else
|
33
33
|
if @obj.respond_to?(key)
|
@@ -53,4 +53,4 @@ module Brototype
|
|
53
53
|
end
|
54
54
|
|
55
55
|
end
|
56
|
-
end
|
56
|
+
end
|
data/lib/brototype/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brototype
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric
|
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
94
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.
|
95
|
+
rubygems_version: 2.0.14
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: Bro, do you even Ruby?
|