edge_cast 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0c2f6c2a4782b9234bd74ffc3c9824e674d63187
4
+ data.tar.gz: 0959d8f894f411de91754bc1620c2c07c4c1545c
5
+ SHA512:
6
+ metadata.gz: 0caab0da3db2fb82e20f7bc65ab7163a38b78cd4c8c55cf8db084c582363d8c8db5647680d12d1a72b3074b8d023e563fe1a63708443a8c3b32446cff5d7f88c
7
+ data.tar.gz: 7a843fb5e3f4ebfdd393da0965e0bd3f77f297703601fc155771188ccbc17acdf9392299aab392bc3fa64b6b59d0fb18ff889a96af4dea4fd7a08db51a3e9792
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
- ### 0.0.1 - 12 November, 2012
1
+ ## 0.0.2 - 20 August, 2013
2
+
3
+ ### Bug fix
4
+
5
+ - Use ActiveSupport instead of monkey-patch Hash. ([@rymai][])
6
+
7
+ ## 0.0.1 - 12 November, 2012
2
8
 
3
9
  ### New features
4
10
 
@@ -1,5 +1,3 @@
1
- require 'edge_cast/core_ext/string'
2
-
3
1
  module EdgeCast
4
2
  class Client
5
3
  module Media
@@ -14,7 +12,7 @@ module EdgeCast
14
12
 
15
13
  def wrap_field_per_media(response, field)
16
14
  (response.is_a?(Array) ? response : [response]).inject({}) do |hash, r|
17
- Media.from_code(r['MediaTypeId'])[:keys].each { |key| hash[key] = r[field.camelize] }
15
+ Media.from_code(r['MediaTypeId'])[:keys].each { |key| hash[key] = r[field.to_s.camelize] }
18
16
  hash
19
17
  end
20
18
  end
@@ -1,15 +1,5 @@
1
- require 'edge_cast/core_ext/string'
2
-
3
1
  class Hash
4
2
 
5
- def symbolize_keys!
6
- self.keys.each do |key|
7
- value = delete(key)
8
- self[key.to_sym] = value.respond_to?(:symbolize_keys!) ? value.symbolize_keys! : value
9
- end
10
- self
11
- end
12
-
13
3
  def to_result!
14
4
  keys.each do |key|
15
5
  value = delete(key)
@@ -1,3 +1,3 @@
1
1
  module EdgeCast
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
data/lib/edge_cast.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'active_support/core_ext/string'
2
+ require 'active_support/core_ext/hash'
1
3
  require 'edge_cast/client'
2
4
  require 'edge_cast/config'
3
5
 
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edge_cast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Rémy Coutable
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-11-12 00:00:00.000000000 Z
11
+ date: 2013-08-20 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: faraday
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: faraday_middleware
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,59 +34,66 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0.8'
41
+ - !ruby/object:Gem::Dependency
42
+ name: activesupport
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '4.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '4.0'
46
55
  - !ruby/object:Gem::Dependency
47
56
  name: rspec
48
57
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
58
  requirements:
51
59
  - - ~>
52
60
  - !ruby/object:Gem::Version
53
- version: '2.11'
61
+ version: '2.14'
54
62
  type: :development
55
63
  prerelease: false
56
64
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
65
  requirements:
59
66
  - - ~>
60
67
  - !ruby/object:Gem::Version
61
- version: '2.11'
68
+ version: '2.14'
62
69
  - !ruby/object:Gem::Dependency
63
70
  name: vcr
64
71
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
72
  requirements:
67
73
  - - ~>
68
74
  - !ruby/object:Gem::Version
69
- version: '2.3'
75
+ version: '2.5'
70
76
  type: :development
71
77
  prerelease: false
72
78
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
79
  requirements:
75
80
  - - ~>
76
81
  - !ruby/object:Gem::Version
77
- version: '2.3'
82
+ version: '2.5'
78
83
  - !ruby/object:Gem::Dependency
79
84
  name: webmock
80
85
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
86
  requirements:
83
87
  - - ~>
84
88
  - !ruby/object:Gem::Version
85
- version: '1.9'
89
+ version: 1.11.0
86
90
  type: :development
87
91
  prerelease: false
88
92
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
93
  requirements:
91
94
  - - ~>
92
95
  - !ruby/object:Gem::Version
93
- version: '1.9'
96
+ version: 1.11.0
94
97
  description: EdgeCast Web Services REST API Ruby wrapper.
95
98
  email:
96
99
  - remy@jilion.com
@@ -111,7 +114,6 @@ files:
111
114
  - lib/edge_cast/config.rb
112
115
  - lib/edge_cast/connection.rb
113
116
  - lib/edge_cast/core_ext/hash.rb
114
- - lib/edge_cast/core_ext/string.rb
115
117
  - lib/edge_cast/error/bad_gateway.rb
116
118
  - lib/edge_cast/error/bad_request.rb
117
119
  - lib/edge_cast/error/client_error.rb
@@ -135,26 +137,25 @@ files:
135
137
  - README.md
136
138
  homepage: https://github.com/jilion/edge_cast
137
139
  licenses: []
140
+ metadata: {}
138
141
  post_install_message:
139
142
  rdoc_options: []
140
143
  require_paths:
141
144
  - lib
142
145
  required_ruby_version: !ruby/object:Gem::Requirement
143
- none: false
144
146
  requirements:
145
- - - ! '>='
147
+ - - '>='
146
148
  - !ruby/object:Gem::Version
147
149
  version: '0'
148
150
  required_rubygems_version: !ruby/object:Gem::Requirement
149
- none: false
150
151
  requirements:
151
- - - ! '>='
152
+ - - '>='
152
153
  - !ruby/object:Gem::Version
153
154
  version: '0'
154
155
  requirements: []
155
156
  rubyforge_project:
156
- rubygems_version: 1.8.23
157
+ rubygems_version: 2.0.3
157
158
  signing_key:
158
- specification_version: 3
159
+ specification_version: 4
159
160
  summary: EdgeCast Web Services REST API Ruby wrapper.
160
161
  test_files: []
@@ -1,27 +0,0 @@
1
- class String
2
-
3
- def underscore
4
- word = self.to_s.dup
5
- word.gsub!(/::/, '/')
6
- word.gsub!(/([A-Z\d]+)([A-Z][a-z])/,'\1_\2')
7
- word.gsub!(/([a-z\d])([A-Z])/,'\1_\2')
8
- word.tr!("-", "_")
9
- word.downcase!
10
- word
11
- end
12
-
13
- def camelize
14
- string = self.to_s
15
- string = string.sub(/^[a-z\d]*/) { $&.capitalize }
16
- string.gsub(/(?:_|(\/))([a-z\d]*)/i) { "#{$1}#{$2.capitalize}" }.gsub('/', '::')
17
- end
18
-
19
- end
20
-
21
- class Symbol
22
-
23
- def camelize
24
- self.to_s.camelize
25
- end
26
-
27
- end