ribbon 0.6.0 → 0.7.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.
data/Gemfile CHANGED
@@ -2,7 +2,11 @@ source :rubygems
2
2
 
3
3
  gemspec
4
4
 
5
- { rookie: '~/projects/rookie' }.each do |project, path|
5
+ {
6
+ acclaim: '~/projects/acclaim',
7
+ jewel: '~/projects/jewel',
8
+ rookie: '~/projects/rookie'
9
+ }.each do |project, path|
6
10
  path = File.expand_path path
7
11
  gem project.to_s, path: path if Dir.exists? path
8
12
  end
File without changes
@@ -1,6 +1,11 @@
1
- %w(core_extensions/basic_object options version wrapper).each do |file|
2
- require file.prepend 'ribbon/'
3
- end
1
+ %w(
2
+
3
+ ribbon/core_extensions/basic_object
4
+ ribbon/gem
5
+ ribbon/options
6
+ ribbon/wrapper
7
+
8
+ ).each { |file| require file }
4
9
 
5
10
  # Ribbons are essentially hashes that use method names as keys.
6
11
  #
@@ -339,8 +344,8 @@ class << Ribbon
339
344
  # @param [Ribbon, Ribbon::Wrapper, #to_hash] object the object to be wrapped
340
345
  # @return [Ribbon::Wrapper] a new wrapped ribbon
341
346
  # @since 0.2.0
342
- def wrap(object = ::Ribbon.new)
343
- Ribbon::Wrapper.new object
347
+ def wrap(object = ::Ribbon.new, &block)
348
+ Ribbon::Wrapper.new object, &block
344
349
  end
345
350
 
346
351
  # Returns the hash of a Ribbon. Will attempt to convert other objects.
@@ -0,0 +1,17 @@
1
+ require 'jewel'
2
+
3
+ class Ribbon < BasicObject
4
+
5
+ # Ribbon gem information and metadata.
6
+ #
7
+ # @author Matheus Afonso Martins Moreira
8
+ # @since 0.7.0
9
+ class Gem < ::Jewel::Gem
10
+
11
+ root '../..'
12
+
13
+ specification ::Gem::Specification.load root.join('ribbon.gemspec').to_s
14
+
15
+ end
16
+
17
+ end
@@ -1,20 +1,23 @@
1
1
  #!/usr/bin/env gem build
2
2
  # encoding: utf-8
3
- $:.unshift File.expand_path('../lib', __FILE__)
4
3
 
5
- require 'ribbon/version'
4
+ Gem::Specification.new 'ribbon' do |gem|
6
5
 
7
- Gem::Specification.new('ribbon') do |gem|
6
+ current_directory = File.dirname __FILE__
7
+ version_file = File.expand_path "#{gem.name}.version", current_directory
8
8
 
9
- gem.version = Ribbon::Version::STRING
10
- gem.summary = 'Ruby Object Notation'
9
+ gem.version = File.read(version_file).chomp
10
+
11
+ gem.summary = 'Ruby Object Notation'
11
12
  gem.description = "#{gem.summary} – Inspired by JSON and OpenStruct"
12
- gem.homepage = 'https://github.com/matheusmoreira/ribbon'
13
+ gem.homepage = 'https://github.com/matheusmoreira/ribbon'
13
14
 
14
15
  gem.author = 'Matheus Afonso Martins Moreira'
15
- gem.email = 'matheus.a.m.moreira@gmail.com'
16
+ gem.email = 'matheus.a.m.moreira@gmail.com'
17
+
18
+ gem.files = `git ls-files`.split "\n"
16
19
 
17
- gem.files = `git ls-files`.split "\n"
20
+ gem.add_runtime_dependency 'jewel'
18
21
 
19
22
  gem.add_development_dependency 'rookie'
20
23
  gem.add_development_dependency 'yard'
@@ -0,0 +1 @@
1
+ 0.7.0
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.6.0
4
+ version: 0.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-21 00:00:00.000000000 Z
12
+ date: 2012-06-24 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: jewel
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: rookie
16
32
  requirement: !ruby/object:Gem::Requirement
@@ -69,7 +85,7 @@ files:
69
85
  - .rvmrc
70
86
  - .yardopts
71
87
  - Gemfile
72
- - LICENSE.MPL2
88
+ - LICENSE.MPLv2.0
73
89
  - README.markdown
74
90
  - Rakefile
75
91
  - lib/ribbon.rb
@@ -80,10 +96,11 @@ files:
80
96
  - lib/ribbon/core_extensions/object.rb
81
97
  - lib/ribbon/core_extensions/object/option_scope.rb
82
98
  - lib/ribbon/core_extensions/object/yield_or_eval.rb
99
+ - lib/ribbon/gem.rb
83
100
  - lib/ribbon/options.rb
84
- - lib/ribbon/version.rb
85
101
  - lib/ribbon/wrapper.rb
86
102
  - ribbon.gemspec
103
+ - ribbon.version
87
104
  homepage: https://github.com/matheusmoreira/ribbon
88
105
  licenses: []
89
106
  post_install_message:
@@ -98,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
98
115
  version: '0'
99
116
  segments:
100
117
  - 0
101
- hash: 4498555956886884455
118
+ hash: -1868364444812272642
102
119
  required_rubygems_version: !ruby/object:Gem::Requirement
103
120
  none: false
104
121
  requirements:
@@ -107,10 +124,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
124
  version: '0'
108
125
  segments:
109
126
  - 0
110
- hash: 4498555956886884455
127
+ hash: -1868364444812272642
111
128
  requirements: []
112
129
  rubyforge_project:
113
- rubygems_version: 1.8.21
130
+ rubygems_version: 1.8.24
114
131
  signing_key:
115
132
  specification_version: 3
116
133
  summary: Ruby Object Notation
@@ -1,31 +0,0 @@
1
- class Ribbon < BasicObject
2
-
3
- # Ribbon's version.
4
- module Version
5
-
6
- # Major version.
7
- #
8
- # Increments denote backward-incompatible changes and additions.
9
- MAJOR = 0
10
-
11
- # Minor version.
12
- #
13
- # Increments denote backward-compatible changes and additions.
14
- MINOR = 6
15
-
16
- # Patch version.
17
- #
18
- # Increments denote changes in implementation.
19
- PATCH = 0
20
-
21
- # Build version.
22
- #
23
- # Used for pre-release versions.
24
- BUILD = nil
25
-
26
- # Complete version string, which is every individual version number joined
27
- # by a dot (<tt>'.'</tt>), in descending order of prescedence.
28
- STRING = [ MAJOR, MINOR, PATCH, BUILD ].compact.join '.'
29
-
30
- end
31
- end