rmb 3.0.2 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/Gemfile +1 -1
  2. data/Rakefile +1 -1
  3. data/lib/rmb/api.rb +15 -14
  4. data/rmb.gemspec +4 -4
  5. metadata +9 -9
data/Gemfile CHANGED
@@ -6,7 +6,7 @@ gem "mime-types"
6
6
  gem "json"
7
7
  gem "httparty", "0.6.1"
8
8
  gem "multipart-post"
9
- gem "activesupport", "2.3.9"
9
+ gem "orderedhash", "0.0.6"
10
10
 
11
11
  group :development, :test do
12
12
  gem "echoe"
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ begin
18
18
  echoe.changelog = "History.rdoc"
19
19
 
20
20
  # TODO have this generated from Gemfile or vice versa
21
- echoe.runtime_dependencies = ["mime-types", "json", "httparty 0.6.1", "multipart-post 1.0.1", "activesupport 2.3.9"]
21
+ echoe.runtime_dependencies = ["mime-types", "json", "httparty 0.6.1", "multipart-post 1.0.1", "orderedhash 0.0.6"]
22
22
  echoe.development_dependencies = ["rspec", "diff-lcs", "fakeweb"]
23
23
 
24
24
  echoe.ignore_pattern = "tmtags"
@@ -3,7 +3,7 @@ require 'mime/types'
3
3
  require 'httparty'
4
4
  require 'net/http/post/multipart'
5
5
  require 'json'
6
- require 'active_support/ordered_hash'
6
+ require 'orderedhash'
7
7
 
8
8
  class Rmb::Api
9
9
  include HTTParty
@@ -253,20 +253,21 @@ class Rmb::Api
253
253
 
254
254
  def sort_hash_recursively(oldhash = {}, depth = 0)
255
255
  return false if depth > 4
256
- sortedhash = ActiveSupport::OrderedHash.new
257
- oldhash.keys.sort_by {|s| s.to_s}.each {|key|
258
- if oldhash[key].is_a? Hash
259
- sortedhash[key] = sort_hash_recursively(oldhash[key], depth + 1)
260
- elsif oldhash[key].is_a? Array
261
- oldhash[key].map! do |element|
262
- element = sort_hash_recursively(element, depth + 1)
263
- end
264
- sortedhash[key] = oldhash[key]
265
- else
266
- sortedhash[key] = oldhash[key].to_s
256
+ sortedhash = OrderedHash.new
257
+
258
+ oldhash.keys.sort_by {|s| s.to_s}.each do |key|
259
+ if oldhash[key].is_a? Hash
260
+ sortedhash[key] = sort_hash_recursively(oldhash[key], depth + 1)
261
+ elsif oldhash[key].is_a? Array
262
+ oldhash[key].map! do |element|
263
+ element = sort_hash_recursively(element, depth + 1)
267
264
  end
268
- }
265
+ sortedhash[key] = oldhash[key]
266
+ else
267
+ sortedhash[key] = oldhash[key].to_s
268
+ end
269
+ end
269
270
  return sortedhash
270
271
  end
271
272
 
272
- end
273
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rmb}
5
- s.version = "3.0.2"
5
+ s.version = "3.0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Jake Good, Eric Skiff, Kunal Shah, Seth Thomas Rasmussen, Matthew Rathbone", "Bryan Woods"]
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
26
26
  s.add_runtime_dependency(%q<json>, [">= 0"])
27
27
  s.add_runtime_dependency(%q<httparty>, ["= 0.6.1"])
28
28
  s.add_runtime_dependency(%q<multipart-post>, ["= 1.0.1"])
29
- s.add_runtime_dependency(%q<activesupport>, ["= 2.3.9"])
29
+ s.add_runtime_dependency(%q<orderedhash>, ["= 0.0.6"])
30
30
  s.add_development_dependency(%q<rspec>, [">= 0"])
31
31
  s.add_development_dependency(%q<test-unit>, ["= 1.2.3"])
32
32
  s.add_development_dependency(%q<diff-lcs>, [">= 0"])
@@ -36,7 +36,7 @@ Gem::Specification.new do |s|
36
36
  s.add_dependency(%q<json>, [">= 0"])
37
37
  s.add_dependency(%q<httparty>, ["= 0.6.1"])
38
38
  s.add_dependency(%q<multipart-post>, ["= 1.0.1"])
39
- s.add_runtime_dependency(%q<activesupport>, ["= 2.3.9"])
39
+ s.add_runtime_dependency(%q<orderedhash>, ["= 0.0.6"])
40
40
  s.add_dependency(%q<rspec>, [">= 0"])
41
41
  s.add_development_dependency(%q<test-unit>, ["= 1.2.3"])
42
42
  s.add_dependency(%q<diff-lcs>, [">= 0"])
@@ -47,7 +47,7 @@ Gem::Specification.new do |s|
47
47
  s.add_dependency(%q<json>, [">= 0"])
48
48
  s.add_dependency(%q<httparty>, ["= 0.6.1"])
49
49
  s.add_dependency(%q<multipart-post>, ["= 1.0.1"])
50
- s.add_runtime_dependency(%q<activesupport>, ["= 2.3.9"])
50
+ s.add_runtime_dependency(%q<orderedhash>, ["= 0.0.6"])
51
51
  s.add_dependency(%q<rspec>, [">= 0"])
52
52
  s.add_development_dependency(%q<test-unit>, ["= 1.2.3"])
53
53
  s.add_dependency(%q<diff-lcs>, [">= 0"])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 2
10
- version: 3.0.2
9
+ - 3
10
+ version: 3.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jake Good, Eric Skiff, Kunal Shah, Seth Thomas Rasmussen, Matthew Rathbone
@@ -80,19 +80,19 @@ dependencies:
80
80
  type: :runtime
81
81
  version_requirements: *id004
82
82
  - !ruby/object:Gem::Dependency
83
- name: activesupport
83
+ name: orderedhash
84
84
  prerelease: false
85
85
  requirement: &id005 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - "="
89
89
  - !ruby/object:Gem::Version
90
- hash: 17
90
+ hash: 19
91
91
  segments:
92
- - 2
93
- - 3
94
- - 9
95
- version: 2.3.9
92
+ - 0
93
+ - 0
94
+ - 6
95
+ version: 0.0.6
96
96
  type: :runtime
97
97
  version_requirements: *id005
98
98
  - !ruby/object:Gem::Dependency