mobilize-base 1.0.91 → 1.0.92

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/README.md CHANGED
@@ -96,7 +96,7 @@ Mobilize-Base contains all of the gems it needs to run.
96
96
  add this to your Gemfile:
97
97
 
98
98
  ``` ruby
99
- gem "mobilize-base", "~>1.0"
99
+ gem "mobilize-base"
100
100
  ```
101
101
 
102
102
  or do
@@ -602,7 +602,7 @@ crewmembers.
602
602
  [mongoid]: http://mongoid.org/en/mongoid/index.html
603
603
  [resque_redis]: https://github.com/defunkt/resque#section_Installing_Redis
604
604
  [mongodb_quickstart]: http://www.mongodb.org/display/DOCS/Quickstart
605
- [git_samples]: https://github.ngmoco.com/Ngpipes/mobilize-base/tree/master/lib/samples
605
+ [git_samples]: https://github.com/ngmoco/mobilize-base/tree/master/lib/samples
606
606
  [rvm]: https://rvm.io/
607
607
  [resque-web]: https://github.com/defunkt/resque#standalone
608
608
  [mobilize-ssh]: https://github.com/ngmoco/mobilize-ssh
@@ -49,16 +49,10 @@ module Mobilize
49
49
  #return blank response if there are no slots available
50
50
  return nil unless gdrive_slot
51
51
  s = Stage.where(:path=>stage_path).first
52
- source = s.params['source']
52
+ source_path = s.params['source']
53
53
  target_path = s.params['target']
54
- source_job_name, source_stage_name = if source.index("/")
55
- source.split("/")
56
- else
57
- [nil, source]
58
- end
59
- source_stage_path = "#{s.job.runner.path}/#{source_job_name || s.job.name}/#{source_stage_name}"
60
- source_stage = Stage.where(:path=>source_stage_path).first
61
- tsv = source_stage.out_dst.read
54
+ source_dst = s.source_dst(source_path)
55
+ tsv = source_dst.read
62
56
  sheet_name = target_path.split("/").last
63
57
  temp_path = [stage_path.gridsafe,sheet_name].join("/")
64
58
  temp_sheet = Gsheet.find_or_create_by_path(temp_path,gdrive_slot)
@@ -68,6 +68,19 @@ module Mobilize
68
68
  return j.stages[s.idx]
69
69
  end
70
70
 
71
+ def source_dst(source_path)
72
+ #gets dataset based on path given in source parameter
73
+ s = self
74
+ source_job_name, source_stage_name = if source_path.index("/")
75
+ source_path.split("/")
76
+ else
77
+ [nil, source_path]
78
+ end
79
+ source_stage_path = "#{s.job.runner.path}/#{source_job_name || s.job.name}/#{source_stage_name}"
80
+ source_stage = Stage.where(:path=>source_stage_path).first
81
+ source_stage.out_dst
82
+ end
83
+
71
84
  def Stage.perform(id,*args)
72
85
  s = Stage.where(:path=>id).first
73
86
  j = s.job
@@ -1,5 +1,5 @@
1
1
  module Mobilize
2
2
  module Base
3
- VERSION = "1.0.91"
3
+ VERSION = "1.0.92"
4
4
  end
5
5
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = Mobilize::Base::VERSION
8
8
  s.authors = ["Cassio Paes-Leme"]
9
9
  s.email = ["cpaesleme@ngmoco.com"]
10
- s.homepage = ""
10
+ s.homepage = "http://github.com/ngmoco/mobilize-base"
11
11
  s.summary = %q{Moves datasets and schedules data transfers using MongoDB, Resque and Google Docs}
12
12
  s.description = %q{Manage your organization's workflows entirely through Google Docs and irb.
13
13
  Mobilize schedules jobs, queues workers, sends failure notifications, and
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobilize-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.91
4
+ version: 1.0.92
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-02 00:00:00.000000000 Z
12
+ date: 2013-01-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -224,7 +224,7 @@ files:
224
224
  - test/mobilize-base_test.rb
225
225
  - test/redis-test.conf
226
226
  - test/test_helper.rb
227
- homepage: ''
227
+ homepage: http://github.com/ngmoco/mobilize-base
228
228
  licenses: []
229
229
  post_install_message:
230
230
  rdoc_options: []
@@ -238,7 +238,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
238
238
  version: '0'
239
239
  segments:
240
240
  - 0
241
- hash: -136156851409089699
241
+ hash: -2588231747568814205
242
242
  required_rubygems_version: !ruby/object:Gem::Requirement
243
243
  none: false
244
244
  requirements:
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  version: '0'
248
248
  segments:
249
249
  - 0
250
- hash: -136156851409089699
250
+ hash: -2588231747568814205
251
251
  requirements: []
252
252
  rubyforge_project: mobilize-base
253
253
  rubygems_version: 1.8.24