ucloud_storage 0.0.6 → 0.0.7

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.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ucloud_storage (0.0.5)
4
+ ucloud_storage (0.0.7)
5
5
  httparty
6
6
 
7
7
  GEM
@@ -6,7 +6,7 @@ module UcloudStorage
6
6
  class NotAuthorized < StandardError; end
7
7
 
8
8
  class UcloudStorage
9
- attr_accessor :user, :pass, :storage_url, :auth_token
9
+ attr_accessor :user, :pass, :storage_url, :auth_token, :code
10
10
 
11
11
  def authorize
12
12
  response = HTTParty.get("https://api.ucloudbiz.olleh.com/storage/v1/auth/",
@@ -33,7 +33,8 @@ module UcloudStorage
33
33
  "Content-Type" => contenttype,
34
34
  "Content-Length" => file.size.to_s },
35
35
  body: file.read)
36
- case response.code
36
+ self.code = response.code
37
+ case self.code
37
38
  when 201 then
38
39
  true
39
40
  else
@@ -1,3 +1,3 @@
1
1
  module UcloudStorage
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ucloud_storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-04-24 00:00:00.000000000 Z
13
+ date: 2013-04-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
17
- requirement: &70159997988600 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,15 @@ dependencies:
22
22
  version: '0'
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *70159997988600
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
26
31
  - !ruby/object:Gem::Dependency
27
32
  name: vcr
28
- requirement: &70159997988020 !ruby/object:Gem::Requirement
33
+ requirement: !ruby/object:Gem::Requirement
29
34
  none: false
30
35
  requirements:
31
36
  - - ! '>='
@@ -33,10 +38,15 @@ dependencies:
33
38
  version: '0'
34
39
  type: :development
35
40
  prerelease: false
36
- version_requirements: *70159997988020
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
37
47
  - !ruby/object:Gem::Dependency
38
48
  name: webmock
39
- requirement: &70159997987440 !ruby/object:Gem::Requirement
49
+ requirement: !ruby/object:Gem::Requirement
40
50
  none: false
41
51
  requirements:
42
52
  - - ! '>='
@@ -44,10 +54,15 @@ dependencies:
44
54
  version: '0'
45
55
  type: :development
46
56
  prerelease: false
47
- version_requirements: *70159997987440
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
48
63
  - !ruby/object:Gem::Dependency
49
64
  name: httparty
50
- requirement: &70159997986760 !ruby/object:Gem::Requirement
65
+ requirement: !ruby/object:Gem::Requirement
51
66
  none: false
52
67
  requirements:
53
68
  - - ! '>='
@@ -55,7 +70,12 @@ dependencies:
55
70
  version: '0'
56
71
  type: :runtime
57
72
  prerelease: false
58
- version_requirements: *70159997986760
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
59
79
  description: ucloud storage API
60
80
  email:
61
81
  - wangsy@wangsy.com
@@ -64,21 +84,36 @@ executables: []
64
84
  extensions: []
65
85
  extra_rdoc_files: []
66
86
  files:
67
- - .gitignore
68
- - CHANGELOG
69
- - Gemfile
70
- - Gemfile.lock
71
- - LICENSE
72
- - README.md
73
- - Rakefile
74
- - lib/ucloud_storage.rb
75
- - lib/ucloud_storage/ucloud_storage.rb
76
- - lib/ucloud_storage/version.rb
77
- - spec/fixtures/sample_file.txt
78
- - spec/support/auth_info.sample.yml
79
- - spec/support/vcr.rb
80
- - spec/ucloud_storage_spec.rb
81
- - ucloud_storage.gemspec
87
+ - !binary |-
88
+ LmdpdGlnbm9yZQ==
89
+ - !binary |-
90
+ Q0hBTkdFTE9H
91
+ - !binary |-
92
+ R2VtZmlsZQ==
93
+ - !binary |-
94
+ R2VtZmlsZS5sb2Nr
95
+ - !binary |-
96
+ TElDRU5TRQ==
97
+ - !binary |-
98
+ UkVBRE1FLm1k
99
+ - !binary |-
100
+ UmFrZWZpbGU=
101
+ - !binary |-
102
+ bGliL3VjbG91ZF9zdG9yYWdlLnJi
103
+ - !binary |-
104
+ bGliL3VjbG91ZF9zdG9yYWdlL3VjbG91ZF9zdG9yYWdlLnJi
105
+ - !binary |-
106
+ bGliL3VjbG91ZF9zdG9yYWdlL3ZlcnNpb24ucmI=
107
+ - !binary |-
108
+ c3BlYy9maXh0dXJlcy9zYW1wbGVfZmlsZS50eHQ=
109
+ - !binary |-
110
+ c3BlYy9zdXBwb3J0L2F1dGhfaW5mby5zYW1wbGUueW1s
111
+ - !binary |-
112
+ c3BlYy9zdXBwb3J0L3Zjci5yYg==
113
+ - !binary |-
114
+ c3BlYy91Y2xvdWRfc3RvcmFnZV9zcGVjLnJi
115
+ - !binary |-
116
+ dWNsb3VkX3N0b3JhZ2UuZ2Vtc3BlYw==
82
117
  homepage: https://github.com/wangsy/ucloud-storage
83
118
  licenses: []
84
119
  post_install_message:
@@ -99,12 +134,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
134
  version: '0'
100
135
  requirements: []
101
136
  rubyforge_project: ucloudstorage
102
- rubygems_version: 1.8.5
137
+ rubygems_version: 1.8.24
103
138
  signing_key:
104
139
  specification_version: 3
105
140
  summary: simple API for authorize, upload files
106
141
  test_files:
107
- - spec/fixtures/sample_file.txt
108
- - spec/support/auth_info.sample.yml
109
- - spec/support/vcr.rb
110
- - spec/ucloud_storage_spec.rb
142
+ - !binary |-
143
+ c3BlYy9maXh0dXJlcy9zYW1wbGVfZmlsZS50eHQ=
144
+ - !binary |-
145
+ c3BlYy9zdXBwb3J0L2F1dGhfaW5mby5zYW1wbGUueW1s
146
+ - !binary |-
147
+ c3BlYy9zdXBwb3J0L3Zjci5yYg==
148
+ - !binary |-
149
+ c3BlYy91Y2xvdWRfc3RvcmFnZV9zcGVjLnJi