remote_cp 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,9 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- remote_cp (0.0.10)
4
+ remote_cp (0.0.13)
5
5
  aws-s3
6
6
  minitar
7
+ rake
7
8
  thor
8
9
 
9
10
  GEM
@@ -16,8 +17,9 @@ GEM
16
17
  builder (3.0.0)
17
18
  mime-types (1.16)
18
19
  minitar (0.5.3)
20
+ rake (0.9.2)
19
21
  thor (0.14.6)
20
- xml-simple (1.0.12)
22
+ xml-simple (1.1.0)
21
23
 
22
24
  PLATFORMS
23
25
  ruby
@@ -1,3 +1,3 @@
1
1
  module RemoteCp
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
data/lib/remote_cp.rb CHANGED
@@ -10,14 +10,14 @@ include AWS::S3
10
10
  module RemoteCp
11
11
  class Clipboard
12
12
  include AWS::S3
13
- attr_accessor :content_bucket, :filename_bucket, :type_bucket
13
+ attr_accessor :content_object, :filename_object, :type_object
14
14
 
15
15
  def initialize
16
16
  connect
17
17
  @bucket = Bucket.find(bucket_name)
18
- @content_bucket = @bucket['content'] || create_obj("content", "")
19
- @filename_bucket = @bucket['file_name.txt'] || create_obj("file_name.txt", "")
20
- @type_bucket = @bucket['type'] || create_obj("type", "")
18
+ @content_object = @bucket['content'] || create_obj("content", "")
19
+ @filename_object = @bucket['file_name.txt'] || create_obj("file_name.txt", "")
20
+ @type_object = @bucket['type'] || create_obj("type", "")
21
21
  end
22
22
 
23
23
  def connect
@@ -54,19 +54,19 @@ module RemoteCp
54
54
  def push(str, filename = "anomymous", type = :file, content_type = nil)
55
55
  # I think that all this info should be included file's metadata
56
56
  # AWS::S3 does not support metadata setting on creation.
57
- @filename_bucket.value = filename
58
- @filename_bucket.save
57
+ @filename_object.value = filename
58
+ @filename_object.save
59
59
 
60
- @content_bucket.value = str
61
- @content_bucket.content_type = content_type
62
- @content_bucket.save
60
+ @content_object.value = str
61
+ @content_object.content_type = content_type
62
+ @content_object.save
63
63
 
64
- @type_bucket.value = type.to_s
65
- @type_bucket.save
64
+ @type_object.value = type.to_s
65
+ @type_object.save
66
66
  end
67
67
 
68
68
  def pull
69
- @content_bucket.value
69
+ @content_object.value
70
70
  end
71
71
 
72
72
  def bucket_name
@@ -74,7 +74,7 @@ module RemoteCp
74
74
  end
75
75
 
76
76
  def filetype
77
- @type_bucket.value
77
+ @type_object.value
78
78
  end
79
79
 
80
80
  def content
@@ -82,7 +82,7 @@ module RemoteCp
82
82
  end
83
83
 
84
84
  def filename
85
- @filename_bucket.value
85
+ @filename_object.value
86
86
  end
87
87
 
88
88
  def create_obj(key, value)
data/remote_cp.gemspec CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.add_dependency "aws-s3"
18
18
  s.add_dependency "thor"
19
19
  s.add_dependency "minitar"
20
+ s.add_dependency "rake"
20
21
  s.add_development_dependency("bundler", "~> 1.0")
21
22
  s.files = `git ls-files`.split("\n")
22
23
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remote_cp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 12
10
- version: 0.0.12
9
+ - 13
10
+ version: 0.0.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Martin Chabot
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-05 00:00:00 -04:00
18
+ date: 2011-07-21 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -61,9 +61,23 @@ dependencies:
61
61
  type: :runtime
62
62
  version_requirements: *id003
63
63
  - !ruby/object:Gem::Dependency
64
- name: bundler
64
+ name: rake
65
65
  prerelease: false
66
66
  requirement: &id004 !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ hash: 3
72
+ segments:
73
+ - 0
74
+ version: "0"
75
+ type: :runtime
76
+ version_requirements: *id004
77
+ - !ruby/object:Gem::Dependency
78
+ name: bundler
79
+ prerelease: false
80
+ requirement: &id005 !ruby/object:Gem::Requirement
67
81
  none: false
68
82
  requirements:
69
83
  - - ~>
@@ -74,7 +88,7 @@ dependencies:
74
88
  - 0
75
89
  version: "1.0"
76
90
  type: :development
77
- version_requirements: *id004
91
+ version_requirements: *id005
78
92
  description: Tools to facilitate file transfert across machine
79
93
  email:
80
94
  - chabotm@gmail.com