melissadata 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,33 +1,2 @@
1
1
  source "http://rubygems.org"
2
-
3
- gem 'vagrant', :git => 'https://github.com/mitchellh/vagrant.git'
4
-
5
2
  gemspec
6
-
7
- # #############################################################################
8
- # # Dependencies in this Gemfile are managed through the gemspec. Add/remove
9
- # # depenencies there, rather than editing this file ex:
10
- # #
11
- # # Gem::Specification.new do |s|
12
- # # ...
13
- # # s.add_dependency("sinatra")
14
- # # s.add_development_dependency("rack-test")
15
- # # end
16
- # #
17
- # #############################################################################
18
- # source "http://rubygems.org"
19
-
20
- # project_dir = File.expand_path('..', __FILE__)
21
- # gemspec_path = File.expand_path('melissa-data.gemspec', project_dir)
22
-
23
- # #
24
- # # Setup gemspec dependencies
25
- # #
26
-
27
- # gemspec = eval(File.read(gemspec_path))
28
- # gemspec.dependencies.each do |dep|
29
- # group = dep.type == :development ? :development : :default
30
- # gem dep.name, dep.requirement, :group => group
31
- # end
32
- # gem(gemspec.name, gemspec.version, :path => project_dir)
33
-
@@ -1,24 +1,11 @@
1
- GIT
2
- remote: https://github.com/mitchellh/vagrant.git
3
- revision: a42ab2ce208a39df783c5942c50f46883cbf2f4c
4
- specs:
5
- vagrant (0.8.3.dev)
6
- archive-tar-minitar (= 0.5.2)
7
- erubis (~> 2.7.0)
8
- i18n (~> 0.5.0)
9
- json (~> 1.5.1)
10
- net-scp (~> 1.0.4)
11
- net-ssh (~> 2.1.4)
12
- thor (~> 0.14.6)
13
- virtualbox (~> 0.9.1)
14
-
15
1
  PATH
16
2
  remote: .
17
3
  specs:
18
- melissadata (0.1.0)
4
+ melissadata (0.1.1)
19
5
  activesupport
20
6
  awesome_print
21
7
  cloudfiles
8
+ commander
22
9
  i18n
23
10
  msgpack-rpc
24
11
  multi_json
@@ -28,29 +15,33 @@ PATH
28
15
  GEM
29
16
  remote: http://rubygems.org/
30
17
  specs:
31
- activesupport (3.0.9)
18
+ activesupport (3.1.1)
19
+ multi_json (~> 1.0)
32
20
  archive-tar-minitar (0.5.2)
33
21
  awesome_print (0.4.0)
34
- cloudfiles (1.4.17)
22
+ cloudfiles (1.4.18)
35
23
  mime-types (>= 1.16)
36
- coderay (0.9.8)
24
+ coderay (1.0.0)
37
25
  columnize (0.3.4)
38
- diff-lcs (1.1.2)
26
+ commander (4.0.6)
27
+ highline (~> 1.5.0)
28
+ diff-lcs (1.1.3)
39
29
  erubis (2.7.0)
40
- ffi (1.0.9)
30
+ ffi (1.0.11)
41
31
  growl (1.0.3)
42
- guard (0.5.1)
32
+ guard (0.7.0)
43
33
  thor (~> 0.14.6)
44
- guard-rspec (0.4.1)
34
+ guard-rspec (0.4.5)
45
35
  guard (>= 0.4.0)
46
- i18n (0.5.0)
36
+ highline (1.5.2)
37
+ i18n (0.6.0)
47
38
  iobuffer (1.0.0)
48
- json (1.5.3)
39
+ json (1.5.4)
49
40
  linecache19 (0.5.12)
50
41
  ruby_core_source (>= 0.1.4)
51
- method_source (0.6.0)
42
+ method_source (0.6.5)
52
43
  ruby_parser (>= 2.0.5)
53
- mime-types (1.16)
44
+ mime-types (1.17.2)
54
45
  msgpack (0.4.6)
55
46
  msgpack-rpc (0.4.5)
56
47
  msgpack (>= 0.4.4)
@@ -59,11 +50,11 @@ GEM
59
50
  net-scp (1.0.4)
60
51
  net-ssh (>= 1.99.1)
61
52
  net-ssh (2.1.4)
62
- pry (0.9.3)
53
+ pry (0.9.6)
63
54
  coderay (>= 0.9.8)
64
- method_source (>= 0.6.0)
55
+ method_source (>= 0.6.5)
65
56
  ruby_parser (>= 2.0.5)
66
- slop (~> 1.9.0)
57
+ slop (~> 2.1.0)
67
58
  rake (0.9.2)
68
59
  rev (0.3.2)
69
60
  iobuffer (>= 0.1.3)
@@ -85,17 +76,27 @@ GEM
85
76
  ruby-debug-base19 (>= 0.11.19)
86
77
  ruby_core_source (0.1.5)
87
78
  archive-tar-minitar (>= 0.5.2)
88
- ruby_parser (2.2.0)
79
+ ruby_parser (2.3.0)
89
80
  sexp_processor (~> 3.0)
90
81
  sexp_processor (3.0.6)
91
- simplecov (0.4.2)
92
- simplecov-html (~> 0.4.4)
93
- simplecov-html (0.4.5)
94
- slop (1.9.1)
82
+ simplecov (0.5.4)
83
+ multi_json (~> 1.0.3)
84
+ simplecov-html (~> 0.5.3)
85
+ simplecov-html (0.5.3)
86
+ slop (2.1.0)
95
87
  thor (0.14.6)
96
- virtualbox (0.9.1)
88
+ vagrant (0.8.7)
89
+ archive-tar-minitar (= 0.5.2)
90
+ erubis (~> 2.7.0)
91
+ i18n (~> 0.6.0)
92
+ json (~> 1.5.1)
93
+ net-scp (~> 1.0.4)
94
+ net-ssh (~> 2.1.4)
95
+ thor (~> 0.14.6)
96
+ virtualbox (~> 0.9.1)
97
+ virtualbox (0.9.2)
97
98
  ffi (~> 1.0.9)
98
- yajl-ruby (0.8.2)
99
+ yajl-ruby (1.1.0)
99
100
 
100
101
  PLATFORMS
101
102
  ruby
@@ -109,4 +110,4 @@ DEPENDENCIES
109
110
  rspec (> 2.4)
110
111
  ruby-debug19
111
112
  simplecov (>= 0.4.0)
112
- vagrant!
113
+ vagrant
data/Rakefile CHANGED
@@ -12,17 +12,17 @@ task :setup do
12
12
  sh "bundle exec vagrant box add lucid64 http://files.vagrantup.com/lucid64.box"
13
13
  end
14
14
 
15
- sh "bundle exec vagrant up"
15
+ # sh "bundle exec vagrant up"
16
16
 
17
- puts <<-STR
17
+ # puts <<-STR
18
18
 
19
19
 
20
- Now make sure you have a MelissaData DVD (or .dmg) mounted (e.g. IPL-DVD-2011-Q1),
21
- then run:
20
+ # Now make sure you have a MelissaData DVD (or .dmg) mounted (e.g. IPL-DVD-2011-Q1),
21
+ # then run:
22
22
 
23
- rake md:install
23
+ # rake md:install
24
24
 
25
- STR
25
+ # STR
26
26
  end
27
27
 
28
28
  if bundler_installed
@@ -10,8 +10,8 @@ Vagrant::Config.run do |config|
10
10
 
11
11
  config.vm.forward_port 'melissadata', 1404, 14004
12
12
 
13
- # config.vm.customize do |vm|
14
- # vm.cpu_count = 2
15
- # vm.memory_size = 1024
16
- # end
13
+ config.vm.customize do |vm|
14
+ vm.cpu_count = 2
15
+ vm.memory_size = 1024
16
+ end
17
17
  end
@@ -2,4 +2,5 @@
2
2
  require File.expand_path('../lib/melissadata/melissadata', File.dirname(__FILE__))
3
3
 
4
4
  svr = MelissaData::Server::TCP.new
5
+ # svr = MelissaData::Server::TCP.new('0.0.0.0', 1404) # Defaults
5
6
  svr.run
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.expand_path('../lib/melissadata/melissadata', File.dirname(__FILE__))
4
+ require 'commander/import'
5
+
6
+ program :version, MelissaData::VERSION
7
+ program :description, 'Upload new MelissaData lib and data files to remote servers'
8
+
9
+ command :data do |c|
10
+ c.syntax = 'update data [options]'
11
+ c.summary = ''
12
+ c.description = ''
13
+ c.example 'description', 'command example'
14
+
15
+ c.action do |args, options|
16
+ source_paths_and_names = Dir['/Volumes/*-DVD-*/**/md*Ref.pdf'].map do |path|
17
+ dir = File.dirname(path)
18
+ name = path.match(/md(.*)Ref\.pdf/).captures.first
19
+ [dir, name]
20
+ end
21
+
22
+ username = ask("CloudFiles username: ")
23
+ api_key = ask("CloudFiles api_key: ") { |q| q.echo = "*" }
24
+ bucket_name = ask("CloudFiles bucket: ")
25
+
26
+ source_paths_and_names.reverse.each do |source_path,name|
27
+ data_file = "./#{name}.tgz"
28
+ filename = File.basename(data_file)
29
+
30
+ FileUtils.chdir source_path do
31
+ puts "Creating #{filename}"
32
+ `tar czf #{data_file} data`
33
+ end
34
+
35
+ cf = CloudFiles::Connection.new(:username => username, :api_key => api_key)
36
+ cont = cf.container bucket_name
37
+ remote_object = cont.create_object "#{filename}", false
38
+ puts "Uploading #{filename}"
39
+ remote_object.load_from_filename data_file
40
+ end
41
+ end
42
+ end
@@ -2,9 +2,7 @@ include_recipe 'ubuntu'
2
2
 
3
3
  package 'git-core'
4
4
 
5
- %w[ rake bundler i18n thor activesupport multi_json yajl-ruby ].each{ |gem| gem_package gem }
6
-
7
- include_recipe 'rvm::r192'
5
+ %w[ rake bundler i18n thor activesupport multi_json yajl-ruby curl ].each{ |gem| gem_package gem }
8
6
 
9
7
  %w[ src lib data ].each do |subdir|
10
8
  directory "/opt/melissadata/#{subdir}" do
@@ -1,6 +1,6 @@
1
1
  require_recipe "rvm::system"
2
2
 
3
3
  bash "RVM install 1.9.2" do
4
- code "/usr/local/rvm/bin/rvm install 1.9.2 --with-readline-dir=$rvm_path/usr --with-zlib-dir=$rvm_path/usr"
4
+ code "/usr/local/rvm/bin/rvm install 1.9.2"
5
5
  not_if "/usr/local/rvm/bin/rvm list | grep -q '1.9.2'"
6
6
  end
@@ -1,3 +1,5 @@
1
+ package 'curl'
2
+
1
3
  bash "Download and run rvm-install-system-wide" do
2
4
  code "bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)"
3
5
  not_if "[ -e /usr/local/rvm ]"
@@ -10,15 +12,15 @@ end
10
12
  # end
11
13
  # end
12
14
 
13
- bash "Install RVM Readline package" do
14
- code "/usr/local/rvm/bin/rvm pkg install readline"
15
- not_if "[ -e $rvm_path/usr/lib/libreadline.so ]"
16
- end
15
+ # bash "Install RVM Readline package" do
16
+ # code "/usr/local/rvm/bin/rvm pkg install readline"
17
+ # not_if "[ -e $rvm_path/usr/lib/libreadline.so ]"
18
+ # end
17
19
 
18
- bash "Install RVM zlib package" do
19
- code "/usr/local/rvm/bin/rvm pkg install zlib"
20
- not_if "[ -e $rvm_path/usr/lib/libz.so ]"
21
- end
20
+ # bash "Install RVM zlib package" do
21
+ # code "/usr/local/rvm/bin/rvm pkg install zlib"
22
+ # not_if "[ -e $rvm_path/usr/lib/libz.so ]"
23
+ # end
22
24
 
23
25
  (node[:accounts] || 'vagrant').each do |username, options|
24
26
  group 'rvm' do
@@ -5,6 +5,7 @@ require 'i18n'
5
5
  require 'thor'
6
6
  require 'thor/group'
7
7
  require 'thor/actions'
8
+ require 'cloudfiles'
8
9
 
9
10
  module MelissaData
10
11
  module_function
@@ -1,12 +1,10 @@
1
1
  module MelissaData::Server
2
2
 
3
3
  class TCP < Base
4
- def run
4
+ def run(host=MelissaData::DEFAULT_TCP_ADDRESS, port=MelissaData::DEFAULT_TCP_PORT)
5
5
  trap("INT") { self.stop }
6
6
  trap("TERM") { self.stop }
7
7
 
8
- host = MelissaData::DEFAULT_TCP_ADDRESS
9
- port = MelissaData::DEFAULT_TCP_PORT
10
8
  server.listen(host, port, self)
11
9
 
12
10
  puts "== MelissaData TCP server is now listening on #{host}:#{port}"
@@ -8,6 +8,7 @@ module MelissaData::Server
8
8
  trap("TERM") { self.stop }
9
9
 
10
10
  @socket_file = MelissaData::DEFAULT_SOCKET_FILE
11
+ File.delete @socket_file if File.exists? @socket_file
11
12
  listener = MessagePack::RPC::UNIXServerTransport.new @socket_file
12
13
  server.listen(listener, self)
13
14
  puts "== MelissaData Unix server is running - socket file: #{@socket_file}"
@@ -55,6 +55,19 @@ module MelissaData::VagrantPlugin::Actions
55
55
  def sudo(command)
56
56
  @vm.ssh.execute{ |ssh| ssh.sudo! command }
57
57
  end
58
+
59
+ protected
60
+
61
+ def source_paths_and_names
62
+ # Examples:
63
+ # DQ-DVD-2011-05
64
+ # GEO-DVD-2011-Q2
65
+ @paths_and_names ||= Dir['/Volumes/*-DVD-*/**/md*Ref.pdf'].map do |path|
66
+ dir = File.dirname(path)
67
+ name = path.match(/md(.*)Ref\.pdf/).captures.first
68
+ [dir, name]
69
+ end
70
+ end
58
71
  end
59
72
 
60
73
  end
@@ -53,34 +53,6 @@ module MelissaData::VagrantPlugin::Actions
53
53
 
54
54
  @app.call(env)
55
55
  end
56
-
57
- protected
58
-
59
- def source_paths_and_names
60
- # Examples:
61
- # DQ-DVD-2011-05
62
- # GEO-DVD-2011-Q2
63
- @paths_and_names ||= Dir['/Volumes/*-DVD-*/**/md*Ref.pdf'].map do |path|
64
- dir = File.dirname(path)
65
- name = path.match(/md(.*)Ref\.pdf/).captures.first
66
- [dir, name]
67
- end
68
- end
69
-
70
- def package_data
71
- # source_paths_and_names.each do |source_path,name|
72
- # data_file = "#{dest_dir}/#{obj}.tgz"
73
- # inside "#{source_dir}/#{obj}" do
74
- # run "tar czf #{data_file} data"
75
- # end
76
-
77
- # say_status :upload, "#{obj}.tgz to #{options[:bucket_name]}"
78
- # cf = CloudFiles::Connection.new(:username => options[:username], :api_key => options[:api_key])
79
- # cont = cf.container options[:bucket_name]
80
- # remote_object = cont.create_object "#{obj}.tgz", false
81
- # remote_object.load_from_filename data_file
82
- # end
83
- end
84
56
  end
85
57
 
86
58
  end
@@ -16,6 +16,13 @@ module MelissaData::VagrantPlugin
16
16
  vm.env.actions.run(:md_update)
17
17
  end
18
18
  end
19
+
20
+ desc "upload", "Upload the new data files to CloudFiles"
21
+ def upload
22
+ target_vms.each do |vm|
23
+ vm.env.actions.run(:md_upload)
24
+ end
25
+ end
19
26
  end
20
27
 
21
28
  end
@@ -1,3 +1,3 @@
1
1
  module MelissaData
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
@@ -23,8 +23,10 @@ Gem::Specification.new do |s|
23
23
  s.add_dependency 'awesome_print'
24
24
  s.add_dependency 'yajl-ruby'
25
25
  s.add_dependency 'cloudfiles'
26
+ s.add_dependency 'commander'
26
27
 
27
28
  s.add_development_dependency 'rake'
29
+ s.add_development_dependency 'vagrant'
28
30
  s.add_development_dependency 'rspec', '>2.4'
29
31
  s.add_development_dependency 'growl'
30
32
  s.add_development_dependency 'guard-rspec'
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: melissadata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
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: 2011-08-31 00:00:00.000000000Z
13
+ date: 2011-11-17 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: i18n
17
- requirement: &2156880480 !ruby/object:Gem::Requirement
17
+ requirement: &70143628410800 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2156880480
25
+ version_requirements: *70143628410800
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: thor
28
- requirement: &2156880060 !ruby/object:Gem::Requirement
28
+ requirement: &70143628408820 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2156880060
36
+ version_requirements: *70143628408820
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: activesupport
39
- requirement: &2156879580 !ruby/object:Gem::Requirement
39
+ requirement: &70143628406720 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2156879580
47
+ version_requirements: *70143628406720
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: multi_json
50
- requirement: &2156879140 !ruby/object:Gem::Requirement
50
+ requirement: &70143628405080 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *2156879140
58
+ version_requirements: *70143628405080
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: msgpack-rpc
61
- requirement: &2156878580 !ruby/object:Gem::Requirement
61
+ requirement: &70143628403480 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: '0'
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *2156878580
69
+ version_requirements: *70143628403480
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: awesome_print
72
- requirement: &2156878040 !ruby/object:Gem::Requirement
72
+ requirement: &70143628401440 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: '0'
78
78
  type: :runtime
79
79
  prerelease: false
80
- version_requirements: *2156878040
80
+ version_requirements: *70143628401440
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: yajl-ruby
83
- requirement: &2156877400 !ruby/object:Gem::Requirement
83
+ requirement: &70143628399560 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: '0'
89
89
  type: :runtime
90
90
  prerelease: false
91
- version_requirements: *2156877400
91
+ version_requirements: *70143628399560
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: cloudfiles
94
- requirement: &2156876680 !ruby/object:Gem::Requirement
94
+ requirement: &70143628398580 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,10 +99,32 @@ dependencies:
99
99
  version: '0'
100
100
  type: :runtime
101
101
  prerelease: false
102
- version_requirements: *2156876680
102
+ version_requirements: *70143628398580
103
+ - !ruby/object:Gem::Dependency
104
+ name: commander
105
+ requirement: &70143628397480 !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ type: :runtime
112
+ prerelease: false
113
+ version_requirements: *70143628397480
103
114
  - !ruby/object:Gem::Dependency
104
115
  name: rake
105
- requirement: &2156876260 !ruby/object:Gem::Requirement
116
+ requirement: &70143628396340 !ruby/object:Gem::Requirement
117
+ none: false
118
+ requirements:
119
+ - - ! '>='
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ type: :development
123
+ prerelease: false
124
+ version_requirements: *70143628396340
125
+ - !ruby/object:Gem::Dependency
126
+ name: vagrant
127
+ requirement: &70143628394900 !ruby/object:Gem::Requirement
106
128
  none: false
107
129
  requirements:
108
130
  - - ! '>='
@@ -110,10 +132,10 @@ dependencies:
110
132
  version: '0'
111
133
  type: :development
112
134
  prerelease: false
113
- version_requirements: *2156876260
135
+ version_requirements: *70143628394900
114
136
  - !ruby/object:Gem::Dependency
115
137
  name: rspec
116
- requirement: &2156875680 !ruby/object:Gem::Requirement
138
+ requirement: &70143628389600 !ruby/object:Gem::Requirement
117
139
  none: false
118
140
  requirements:
119
141
  - - ! '>'
@@ -121,10 +143,10 @@ dependencies:
121
143
  version: '2.4'
122
144
  type: :development
123
145
  prerelease: false
124
- version_requirements: *2156875680
146
+ version_requirements: *70143628389600
125
147
  - !ruby/object:Gem::Dependency
126
148
  name: growl
127
- requirement: &2156871880 !ruby/object:Gem::Requirement
149
+ requirement: &70143628388180 !ruby/object:Gem::Requirement
128
150
  none: false
129
151
  requirements:
130
152
  - - ! '>='
@@ -132,10 +154,10 @@ dependencies:
132
154
  version: '0'
133
155
  type: :development
134
156
  prerelease: false
135
- version_requirements: *2156871880
157
+ version_requirements: *70143628388180
136
158
  - !ruby/object:Gem::Dependency
137
159
  name: guard-rspec
138
- requirement: &2156871400 !ruby/object:Gem::Requirement
160
+ requirement: &70143628386520 !ruby/object:Gem::Requirement
139
161
  none: false
140
162
  requirements:
141
163
  - - ! '>='
@@ -143,10 +165,10 @@ dependencies:
143
165
  version: '0'
144
166
  type: :development
145
167
  prerelease: false
146
- version_requirements: *2156871400
168
+ version_requirements: *70143628386520
147
169
  - !ruby/object:Gem::Dependency
148
170
  name: pry
149
- requirement: &2156870980 !ruby/object:Gem::Requirement
171
+ requirement: &70143628385940 !ruby/object:Gem::Requirement
150
172
  none: false
151
173
  requirements:
152
174
  - - ! '>='
@@ -154,10 +176,10 @@ dependencies:
154
176
  version: '0'
155
177
  type: :development
156
178
  prerelease: false
157
- version_requirements: *2156870980
179
+ version_requirements: *70143628385940
158
180
  - !ruby/object:Gem::Dependency
159
181
  name: ruby-debug19
160
- requirement: &2156870520 !ruby/object:Gem::Requirement
182
+ requirement: &70143628385060 !ruby/object:Gem::Requirement
161
183
  none: false
162
184
  requirements:
163
185
  - - ! '>='
@@ -165,10 +187,10 @@ dependencies:
165
187
  version: '0'
166
188
  type: :development
167
189
  prerelease: false
168
- version_requirements: *2156870520
190
+ version_requirements: *70143628385060
169
191
  - !ruby/object:Gem::Dependency
170
192
  name: simplecov
171
- requirement: &2156870020 !ruby/object:Gem::Requirement
193
+ requirement: &70143628384240 !ruby/object:Gem::Requirement
172
194
  none: false
173
195
  requirements:
174
196
  - - ! '>='
@@ -176,7 +198,7 @@ dependencies:
176
198
  version: 0.4.0
177
199
  type: :development
178
200
  prerelease: false
179
- version_requirements: *2156870020
201
+ version_requirements: *70143628384240
180
202
  description: Ruby wrappers around MelissaData objects
181
203
  email:
182
204
  - johnnyt@xan.do
@@ -184,11 +206,13 @@ email:
184
206
  executables:
185
207
  - md_tcp_server
186
208
  - md_unix_server
209
+ - upload
187
210
  extensions: []
188
211
  extra_rdoc_files: []
189
212
  files:
190
213
  - bin/md_tcp_server
191
214
  - bin/md_unix_server
215
+ - bin/upload
192
216
  - chef/cookbooks/apt/files/default/apt-cacher
193
217
  - chef/cookbooks/apt/files/default/apt-cacher.conf
194
218
  - chef/cookbooks/apt/files/default/apt-proxy-v2.conf
@@ -253,7 +277,6 @@ files:
253
277
  - lib/melissadata/vagrant_plugin/actions/base.rb
254
278
  - lib/melissadata/vagrant_plugin/actions/install.rb
255
279
  - lib/melissadata/vagrant_plugin/actions/update.rb
256
- - lib/melissadata/vagrant_plugin/actions/upload.rb
257
280
  - lib/melissadata/vagrant_plugin/actions.rb
258
281
  - lib/melissadata/vagrant_plugin/command.rb
259
282
  - lib/melissadata/vagrant_plugin/config.rb
@@ -262,8 +285,7 @@ files:
262
285
  - lib/melissadata.rb
263
286
  - locales/en.yml
264
287
  - melissadata.gemspec
265
- - pkg/melissadata-0.0.1.gem
266
- - pkg/melissadata-0.1.0.gem
288
+ - pkg/melissadata-0.1.2.gem
267
289
  - Rakefile
268
290
  - README.md
269
291
  - spec/helpers/vagrant_helpers.rb
@@ -1,45 +0,0 @@
1
- module MelissaData::VagrantPlugin::Actions
2
-
3
- class Upload < Base
4
- def call(env)
5
- @vm = env['vm']
6
- if @vm.created? && @vm.vm.running?
7
- target_root = env['config'].melissadata.target_path
8
- env.ui.info I18n.t("vagrant.plugins.melissadata.updating"), :prefix => false
9
-
10
-
11
- # objects.each do |obj|
12
- # data_file = "#{dest_dir}/#{obj}.tgz"
13
- # inside "#{source_dir}/#{obj}" do
14
- # run "tar czf #{data_file} data"
15
- # end
16
-
17
- # say_status :upload, "#{obj}.tgz to #{options[:bucket_name]}"
18
- # cf = CloudFiles::Connection.new(:username => options[:username], :api_key => options[:api_key])
19
- # cont = cf.container options[:bucket_name]
20
- # remote_object = cont.create_object "#{obj}.tgz", false
21
- # remote_object.load_from_filename data_file
22
-
23
- # # "#{source_dir}/#{obj}/linux/gcc34_64bit/*.h" => /opt/melissadata/src/
24
- # # "#{source_dir}/#{obj}/linux/gcc34_64bit/libmdEmail.so" => /opt/melissadata/lib/
25
- # # "#{source_dir}/#{obj}/linux/interfaces/ruby/mdEmailRubyWrapper.cpp" => /opt/melissadata/lib/
26
-
27
- # # inside "#{source_dir}/#{obj}/linux/gcc34_64bit" do
28
- # # run "tar czf #{data_file} data"
29
- # # end
30
- # end
31
-
32
-
33
- sudo "gem uninstall melissadata" if test? "ruby -r md -e 'puts MD::VERSION'" #%Q!ruby -e 'require "rubygems"; require "melissadata"'!
34
- gem_filename = "melissadata-#{MelissaData::VERSION}.gem"
35
- copy_file "#{File.expand_path("pkg/#{gem_filename}", MelissaData.gem_root)}"
36
- sudo "gem install #{target_root}/#{gem_filename} && rm #{target_root}/#{gem_filename}"
37
- else
38
- env.ui.error "Vagrant VM is not running", :prefix => false
39
- end
40
-
41
- @app.call(env)
42
- end
43
- end
44
-
45
- end
Binary file
Binary file