rmega 0.1.4 → 0.1.5

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: 53ab6c3f8d9135aac13fa5d8556a530d33f0076c
4
+ data.tar.gz: e8df74fafe4202607824754b35ffed9558638ef3
5
+ SHA512:
6
+ metadata.gz: 7ca62565f0f2207053354845a74e03bc58ce6612e231b9a70b65d218a25ec79342f709c9513a37f647bcfc61fdb2e1a45b18a42688ff84638e326029af826d49
7
+ data.tar.gz: c9082a0e4792a461ef87941969a047413a0593a003ae46338ddfc23a2ac08362fae04f492dd8c217049ed08851040ceea7e08f0cd14422a8131a4435569c2e46
data/TODO.md CHANGED
@@ -2,5 +2,6 @@
2
2
 
3
3
  * Handle timeouts in download/upload
4
4
  * Handle error code -3 response, that is "A temporary congestion or server malfunction prevented your request from being processed.". I noticed that this occurs quite often when creating/deleting a folder node :/
5
+ * Sometimes uploaded data is corrupted
5
6
  * Search for TODO in the project for other minor tasks
6
7
  * Resist the hypnotoad's will
data/lib/rmega/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rmega
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
data/lib/rmega.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'active_support/json'
2
- require 'active_support/core_ext/object/to_json'
3
2
  require 'active_support/core_ext/module/delegation'
4
3
  require 'active_support/core_ext/string/inflections'
5
4
  require 'httpclient'
data/rmega.gemspec CHANGED
@@ -22,6 +22,6 @@ Gem::Specification.new do |gem|
22
22
  gem.add_development_dependency "rake"
23
23
 
24
24
  gem.add_dependency "httpclient"
25
- gem.add_dependency 'active_support'
25
+ gem.add_dependency 'activesupport'
26
26
  gem.add_dependency "execjs"
27
27
  end
@@ -57,15 +57,13 @@ describe 'File upload' do
57
57
  File.open(@path, 'wb') do |f|
58
58
  512.times { f.write(@buffer) }
59
59
  end
60
- end
61
-
62
- let!(:folder) { @storage.root.create_folder(@name) }
63
60
 
64
- # TODO: `let` and `subject` declarations are not intended to be called in a `before(:all)`
65
- before(:all) { folder.upload(@path) }
61
+ @folder = @storage.root.create_folder(@name)
62
+ @folder.upload(@path)
63
+ end
66
64
 
67
65
  it 'finds the uploaded file and verify its content' do
68
- file = folder.files.find { |f| f.name == @name }
66
+ file = @folder.files.find { |f| f.name == @name }
69
67
  download_path = "#{@path}.downloaded"
70
68
  file.download(download_path)
71
69
 
@@ -74,7 +72,7 @@ describe 'File upload' do
74
72
  end
75
73
  end
76
74
 
77
- after { folder.delete }
75
+ after { @folder.delete if @folder }
78
76
  end
79
77
  end
80
78
  end
metadata CHANGED
@@ -1,110 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmega
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
5
- prerelease:
4
+ version: 0.1.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Daniele Molteni
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-25 00:00:00.000000000 Z
11
+ date: 2014-04-14 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: pry
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
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
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
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'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: httpclient
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
- name: active_support
70
+ name: activesupport
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: execjs
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  description: mega.co.nz ruby api
@@ -160,27 +147,26 @@ files:
160
147
  homepage: https://github.com/topac/rmega
161
148
  licenses:
162
149
  - MIT
150
+ metadata: {}
163
151
  post_install_message:
164
152
  rdoc_options: []
165
153
  require_paths:
166
154
  - lib
167
155
  required_ruby_version: !ruby/object:Gem::Requirement
168
- none: false
169
156
  requirements:
170
- - - ! '>='
157
+ - - '>='
171
158
  - !ruby/object:Gem::Version
172
159
  version: 1.9.3
173
160
  required_rubygems_version: !ruby/object:Gem::Requirement
174
- none: false
175
161
  requirements:
176
- - - ! '>='
162
+ - - '>='
177
163
  - !ruby/object:Gem::Version
178
164
  version: '0'
179
165
  requirements: []
180
166
  rubyforge_project:
181
- rubygems_version: 1.8.24
167
+ rubygems_version: 2.0.14
182
168
  signing_key:
183
- specification_version: 3
169
+ specification_version: 4
184
170
  summary: mega.co.nz ruby api
185
171
  test_files:
186
172
  - spec/integration/file_download_spec.rb