sycl 1.5 → 1.6

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.
Files changed (2) hide show
  1. data/lib/sycl.rb +19 -15
  2. metadata +6 -6
@@ -1,7 +1,17 @@
1
1
  # = sycl.rb - Simple YAML Configuration Library
2
2
  #
3
+ # Sycl is a gem that makes using YAML[http://yaml.org/] for
4
+ # configuration files convenient and easy. Hashes and arrays made from
5
+ # parsing YAML via Sycl get helper methods that provide simple and natural
6
+ # syntax for querying and setting values. YAML output through Sycl is
7
+ # sorted, so configuration file versions can be compared consistently, and
8
+ # Sycl has hooks to add output styles, so your configuration files stay
9
+ # easy for humans to read and edit, even after being parsed and
10
+ # re-emitted.
11
+ #
3
12
  # For more details, visit the
4
13
  # {Sycl GitHub page}[https://github.com/groupon/sycl/"target="_parent].
14
+ # = sycl.rb - Simple YAML Configuration Library
5
15
  #
6
16
  # == License
7
17
  #
@@ -35,21 +45,15 @@
35
45
  # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36
46
  # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
47
 
38
- require 'yaml'
48
+ # sycl relies on the 'syck' YAML parser. Beginning with Ruby 2, syck
49
+ # was removed from Ruby'd stdlib. This logic ensures the correct yaml
50
+ # parser gets loaded if Rubies >= 2 are present.
39
51
 
40
- # = sycl.rb - Simple YAML Configuration Library
41
- #
42
- # Sycl is a gem that makes using YAML[http://yaml.org/] for
43
- # configuration files convenient and easy. Hashes and arrays made from
44
- # parsing YAML via Sycl get helper methods that provide simple and natural
45
- # syntax for querying and setting values. YAML output through Sycl is
46
- # sorted, so configuration file versions can be compared consistently, and
47
- # Sycl has hooks to add output styles, so your configuration files stay
48
- # easy for humans to read and edit, even after being parsed and
49
- # re-emitted.
50
- #
51
- # For more details, visit the
52
- # {Sycl GitHub page}[https://github.com/groupon/sycl/"target="_parent].
52
+ if RUBY_VERSION.to_i >= 2
53
+ require 'syck'
54
+ else
55
+ require 'yaml'
56
+ end
53
57
 
54
58
  module Sycl
55
59
 
@@ -586,7 +590,7 @@ module Sycl
586
590
  if self_key != other_key
587
591
  return self_key <=> other_key
588
592
  elsif other.is_a?(Hash) && self[self_key] != other[other_key]
589
- if self[self_ key].respond_to?(:<=>)
593
+ if self[self_key].respond_to?(:<=>)
590
594
  return self[self_key] <=> other[other_key]
591
595
  else
592
596
  return self[self_key].to_s <=> other[other_key].to_s
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sycl
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 5
9
- version: "1.5"
8
+ - 6
9
+ version: "1.6"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Andrew Ho
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2013-07-18 00:00:00 +00:00
17
+ date: 2015-12-14 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies: []
20
20
 
@@ -56,8 +56,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  segments:
57
57
  - 0
58
58
  version: "0"
59
- requirements: []
60
-
59
+ requirements:
60
+ - syck must be the default YAML parsing library. For Rubies >= 2.0, the "syck" gem must be available
61
61
  rubyforge_project:
62
62
  rubygems_version: 1.5.3
63
63
  signing_key: