ribbon 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.yardopts +1 -0
- data/LICENSE.MPL2 +3 -0
- data/Rakefile +1 -1
- data/lib/ribbon.rb +304 -176
- data/lib/ribbon/core_extensions.rb +13 -0
- data/lib/ribbon/{core_ext → core_extensions}/array.rb +15 -3
- data/lib/ribbon/core_extensions/basic_object.rb +24 -0
- data/lib/ribbon/core_extensions/hash.rb +41 -0
- data/lib/ribbon/core_extensions/object.rb +18 -0
- data/lib/ribbon/core_extensions/object/option_scope.rb +21 -0
- data/lib/ribbon/core_extensions/object/yield_or_eval.rb +15 -0
- data/lib/ribbon/options.rb +54 -0
- data/lib/ribbon/version.rb +1 -1
- data/lib/ribbon/wrapper.rb +126 -78
- data/ribbon.gemspec +4 -2
- metadata +56 -13
- data/LICENSE.GPLv3 +0 -14
- data/lib/ribbon/core_ext.rb +0 -9
- data/lib/ribbon/core_ext/hash.rb +0 -22
data/ribbon.gemspec
CHANGED
@@ -7,8 +7,8 @@ require 'ribbon/version'
|
|
7
7
|
Gem::Specification.new('ribbon') do |gem|
|
8
8
|
|
9
9
|
gem.version = Ribbon::Version::STRING
|
10
|
-
gem.summary = 'Ruby Object Notation
|
11
|
-
gem.description = "#{gem.summary} Inspired by JSON and OpenStruct
|
10
|
+
gem.summary = 'Ruby Object Notation'
|
11
|
+
gem.description = "#{gem.summary} – Inspired by JSON and OpenStruct"
|
12
12
|
gem.homepage = 'https://github.com/matheusmoreira/ribbon'
|
13
13
|
|
14
14
|
gem.author = 'Matheus Afonso Martins Moreira'
|
@@ -17,5 +17,7 @@ Gem::Specification.new('ribbon') do |gem|
|
|
17
17
|
gem.files = `git ls-files`.split "\n"
|
18
18
|
|
19
19
|
gem.add_development_dependency 'rookie'
|
20
|
+
gem.add_development_dependency 'yard'
|
21
|
+
gem.add_development_dependency 'redcarpet' # yard uses it for markdown formatting
|
20
22
|
|
21
23
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ribbon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rookie
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,8 +21,45 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: yard
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: redcarpet
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
description: Ruby Object Notation – Inspired by JSON and OpenStruct
|
26
63
|
email: matheus.a.m.moreira@gmail.com
|
27
64
|
executables: []
|
28
65
|
extensions: []
|
@@ -30,14 +67,20 @@ extra_rdoc_files: []
|
|
30
67
|
files:
|
31
68
|
- .gitignore
|
32
69
|
- .rvmrc
|
70
|
+
- .yardopts
|
33
71
|
- Gemfile
|
34
|
-
- LICENSE.
|
72
|
+
- LICENSE.MPL2
|
35
73
|
- README.markdown
|
36
74
|
- Rakefile
|
37
75
|
- lib/ribbon.rb
|
38
|
-
- lib/ribbon/
|
39
|
-
- lib/ribbon/
|
40
|
-
- lib/ribbon/
|
76
|
+
- lib/ribbon/core_extensions.rb
|
77
|
+
- lib/ribbon/core_extensions/array.rb
|
78
|
+
- lib/ribbon/core_extensions/basic_object.rb
|
79
|
+
- lib/ribbon/core_extensions/hash.rb
|
80
|
+
- lib/ribbon/core_extensions/object.rb
|
81
|
+
- lib/ribbon/core_extensions/object/option_scope.rb
|
82
|
+
- lib/ribbon/core_extensions/object/yield_or_eval.rb
|
83
|
+
- lib/ribbon/options.rb
|
41
84
|
- lib/ribbon/version.rb
|
42
85
|
- lib/ribbon/wrapper.rb
|
43
86
|
- ribbon.gemspec
|
@@ -55,7 +98,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
55
98
|
version: '0'
|
56
99
|
segments:
|
57
100
|
- 0
|
58
|
-
hash:
|
101
|
+
hash: 4498555956886884455
|
59
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
103
|
none: false
|
61
104
|
requirements:
|
@@ -64,11 +107,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
107
|
version: '0'
|
65
108
|
segments:
|
66
109
|
- 0
|
67
|
-
hash:
|
110
|
+
hash: 4498555956886884455
|
68
111
|
requirements: []
|
69
112
|
rubyforge_project:
|
70
|
-
rubygems_version: 1.8.
|
113
|
+
rubygems_version: 1.8.21
|
71
114
|
signing_key:
|
72
115
|
specification_version: 3
|
73
|
-
summary: Ruby Object Notation
|
116
|
+
summary: Ruby Object Notation
|
74
117
|
test_files: []
|
data/LICENSE.GPLv3
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
Copyright © 2011 Matheus Afonso Martins Moreira
|
2
|
-
|
3
|
-
This program is free software: you can redistribute it and/or modify
|
4
|
-
it under the terms of the GNU General Public License as published by
|
5
|
-
the Free Software Foundation, either version 3 of the License, or
|
6
|
-
(at your option) any later version.
|
7
|
-
|
8
|
-
This program is distributed in the hope that it will be useful,
|
9
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
GNU General Public License for more details.
|
12
|
-
|
13
|
-
You should have received a copy of the GNU General Public License
|
14
|
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
data/lib/ribbon/core_ext.rb
DELETED
data/lib/ribbon/core_ext/hash.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'ribbon'
|
2
|
-
|
3
|
-
class Ribbon < BasicObject
|
4
|
-
module CoreExt
|
5
|
-
|
6
|
-
# Includes a method to convert hashes to ribbons.
|
7
|
-
module Hash
|
8
|
-
|
9
|
-
# Converts this hash to a Ribbon.
|
10
|
-
def to_ribbon
|
11
|
-
Ribbon.new self
|
12
|
-
end
|
13
|
-
|
14
|
-
# Same as #to_ribbon.
|
15
|
-
alias to_rbon to_ribbon
|
16
|
-
|
17
|
-
end
|
18
|
-
|
19
|
-
::Hash.send :include, ::Ribbon::CoreExt::Hash
|
20
|
-
|
21
|
-
end
|
22
|
-
end
|