mortar 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -279,7 +279,11 @@ class Mortar::Command::Jobs < Mortar::Command::Base
279
279
 
280
280
  # If the job is not complete, but not in the running state, just display its status
281
281
  else
282
- redisplay("[#{spinner(ticks)}] Status: #{job_status['status_description']}")
282
+ job_display_status = job_status['status_description']
283
+ if !job_status['status_details'].nil?
284
+ job_display_status += " - #{job_status['status_details']}"
285
+ end
286
+ redisplay("[#{spinner(ticks)}] Status: #{job_display_status}")
283
287
  end
284
288
  end
285
289
  # If not polling, get the job status and display the results
@@ -24,8 +24,7 @@ class Mortar::Command::Local < Mortar::Command::Base
24
24
 
25
25
  # local:configure
26
26
  #
27
- # Install dependencies for running this pig project locally, other
28
- # commands will also perform this step automatically.
27
+ # Install dependencies for running this mortar project locally - other mortar:local commands will also perform this step automatically.
29
28
  #
30
29
  def configure
31
30
  ctrl = Mortar::Local::Controller.new
@@ -34,7 +33,7 @@ class Mortar::Command::Local < Mortar::Command::Base
34
33
 
35
34
  # local:run SCRIPT
36
35
  #
37
- # Run a job on your local machine
36
+ # Run a job on your local machine.
38
37
  #
39
38
  # -p, --parameter NAME=VALUE # Set a pig parameter value in your script.
40
39
  # -f, --param-file PARAMFILE # Load pig parameter values from a file.
@@ -88,7 +87,7 @@ class Mortar::Command::Local < Mortar::Command::Base
88
87
 
89
88
  # local:validate SCRIPT
90
89
  #
91
- # Run a job on your local machine
90
+ # Locally validate the syntax of a script.
92
91
  #
93
92
  # -p, --parameter NAME=VALUE # Set a pig parameter value in your script.
94
93
  # -f, --param-file PARAMFILE # Load pig parameter values from a file.
@@ -78,6 +78,7 @@ class Mortar::Command::Projects < Mortar::Command::Base
78
78
  git.git("add .")
79
79
  git.git("commit -m \"Mortar project scaffolding\"")
80
80
  Mortar::Command::run("projects:register", [name])
81
+ display "NOTE: You'll need to change to the new directory to use your project:\n cd #{name}\n\n"
81
82
  end
82
83
  end
83
84
  alias_command "new", "projects:create"
@@ -32,6 +32,7 @@ module Mortar
32
32
  def set_script_binding(script_name, options)
33
33
  options = options
34
34
  script_name = script_name
35
+ script_name_alias = script_name.gsub /[^0-9a-z]/i, ''
35
36
  @script_binding = binding
36
37
  end
37
38
 
@@ -83,6 +83,7 @@ module Mortar
83
83
  def set_script_binding(project_name, options)
84
84
  options = options
85
85
  project_name = project_name
86
+ project_name_alias = project_name.gsub /[^0-9a-z]/i, ''
86
87
  @script_binding = binding
87
88
  end
88
89
  end
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  <%= '%default'%> INPUT_PATH 's3n://mortar-example-data/tutorial/excite.log.bz2'
10
- <%= '%default'%> OUTPUT_PATH 's3n://my-output-bucket/$MORTAR_EMAIL_S3_ESCAPED/<%= script_name %>'
10
+ <%= '%default'%> OUTPUT_PATH 's3n://my-output-bucket/$MORTAR_EMAIL_S3_ESCAPED/<%= script_name_alias %>'
11
11
 
12
12
  <% if not options[:skip_udf] %>
13
13
  /**
@@ -29,7 +29,7 @@ filtered = FILTER my_input_data
29
29
  -- This is an example call to a python user-defined function
30
30
  with_udf_output = FOREACH filtered
31
31
  GENERATE field0..field2,
32
- <%= script_name %>.example_udf(field0) AS example_udf_field;
32
+ <%= script_name_alias %>.example_udf(field0) AS example_udf_field;
33
33
 
34
34
  -- remove any existing data
35
35
  rmf $OUTPUT_PATH;
@@ -12,7 +12,8 @@
12
12
  /**
13
13
  * User-Defined Functions (UDFs)
14
14
  */
15
- REGISTER '../udfs/python/<%= project_name %>.py' USING streaming_python AS <%= project_name %>;
15
+
16
+ REGISTER '../udfs/python/<%= project_name %>.py' USING streaming_python AS <%= project_name_alias %>;
16
17
 
17
18
  -- This is an example of loading up input data
18
19
  my_input_data = LOAD '$INPUT_PATH'
@@ -26,7 +27,7 @@ filtered = FILTER my_input_data
26
27
  -- This is an example call to a python user-defined function
27
28
  with_udf_output = FOREACH filtered
28
29
  GENERATE field0..field2,
29
- <%= project_name %>.example_udf(field0) AS example_udf_field;
30
+ <%= project_name_alias %>.example_udf(field0) AS example_udf_field;
30
31
 
31
32
  -- remove any existing data
32
33
  rmf $OUTPUT_PATH;
@@ -16,5 +16,5 @@
16
16
 
17
17
  module Mortar
18
18
  # see http://semver.org/
19
- VERSION = "0.8.1"
19
+ VERSION = "0.8.2"
20
20
  end
@@ -137,6 +137,9 @@ STDOUT
137
137
  \e[1;32m create\e[0m udfs/python
138
138
  \e[1;32m create\e[0m udfs/python/some_new_project.py
139
139
  Sending request to register project: some_new_project... done\n\n\r\e[0KStatus: ACTIVE \n\nYour project is ready for use. Type 'mortar help' to see the commands you can perform on the project.\n
140
+ NOTE: You'll need to change to the new directory to use your project:
141
+ cd some_new_project
142
+
140
143
  STDOUT
141
144
  end
142
145
 
metadata CHANGED
@@ -1,167 +1,164 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mortar
3
- version: !ruby/object:Gem::Version
4
- version: 0.8.1
3
+ version: !ruby/object:Gem::Version
4
+ hash: 59
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 8
9
+ - 2
10
+ version: 0.8.2
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Mortar Data
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2013-05-22 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2013-05-30 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: mortar-api-ruby
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: 0.6.3
22
- type: :runtime
23
22
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
23
+ requirement: &id001 !ruby/object:Gem::Requirement
25
24
  none: false
26
- requirements:
25
+ requirements:
27
26
  - - ~>
28
- - !ruby/object:Gem::Version
27
+ - !ruby/object:Gem::Version
28
+ hash: 1
29
+ segments:
30
+ - 0
31
+ - 6
32
+ - 3
29
33
  version: 0.6.3
30
- - !ruby/object:Gem::Dependency
31
- name: netrc
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ~>
36
- - !ruby/object:Gem::Version
37
- version: '0.7'
38
34
  type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: netrc
39
38
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
39
+ requirement: &id002 !ruby/object:Gem::Requirement
41
40
  none: false
42
- requirements:
41
+ requirements:
43
42
  - - ~>
44
- - !ruby/object:Gem::Version
45
- version: '0.7'
46
- - !ruby/object:Gem::Dependency
47
- name: launchy
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ~>
52
- - !ruby/object:Gem::Version
53
- version: '2.1'
43
+ - !ruby/object:Gem::Version
44
+ hash: 5
45
+ segments:
46
+ - 0
47
+ - 7
48
+ version: "0.7"
54
49
  type: :runtime
50
+ version_requirements: *id002
51
+ - !ruby/object:Gem::Dependency
52
+ name: launchy
55
53
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
54
+ requirement: &id003 !ruby/object:Gem::Requirement
57
55
  none: false
58
- requirements:
56
+ requirements:
59
57
  - - ~>
60
- - !ruby/object:Gem::Version
61
- version: '2.1'
62
- - !ruby/object:Gem::Dependency
58
+ - !ruby/object:Gem::Version
59
+ hash: 1
60
+ segments:
61
+ - 2
62
+ - 1
63
+ version: "2.1"
64
+ type: :runtime
65
+ version_requirements: *id003
66
+ - !ruby/object:Gem::Dependency
63
67
  name: excon
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ~>
68
- - !ruby/object:Gem::Version
69
- version: '0.15'
70
- type: :development
71
68
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ~>
76
- - !ruby/object:Gem::Version
77
- version: '0.15'
78
- - !ruby/object:Gem::Dependency
79
- name: fakefs
80
- requirement: !ruby/object:Gem::Requirement
69
+ requirement: &id004 !ruby/object:Gem::Requirement
81
70
  none: false
82
- requirements:
71
+ requirements:
83
72
  - - ~>
84
- - !ruby/object:Gem::Version
85
- version: 0.4.2
73
+ - !ruby/object:Gem::Version
74
+ hash: 21
75
+ segments:
76
+ - 0
77
+ - 15
78
+ version: "0.15"
86
79
  type: :development
80
+ version_requirements: *id004
81
+ - !ruby/object:Gem::Dependency
82
+ name: fakefs
87
83
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
84
+ requirement: &id005 !ruby/object:Gem::Requirement
89
85
  none: false
90
- requirements:
86
+ requirements:
91
87
  - - ~>
92
- - !ruby/object:Gem::Version
88
+ - !ruby/object:Gem::Version
89
+ hash: 11
90
+ segments:
91
+ - 0
92
+ - 4
93
+ - 2
93
94
  version: 0.4.2
94
- - !ruby/object:Gem::Dependency
95
- name: gem-release
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
95
  type: :development
96
+ version_requirements: *id005
97
+ - !ruby/object:Gem::Dependency
98
+ name: gem-release
103
99
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- - !ruby/object:Gem::Dependency
111
- name: rake
112
- requirement: !ruby/object:Gem::Requirement
100
+ requirement: &id006 !ruby/object:Gem::Requirement
113
101
  none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ hash: 3
106
+ segments:
107
+ - 0
108
+ version: "0"
118
109
  type: :development
110
+ version_requirements: *id006
111
+ - !ruby/object:Gem::Dependency
112
+ name: rake
119
113
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
- - !ruby/object:Gem::Dependency
127
- name: rr
128
- requirement: !ruby/object:Gem::Requirement
114
+ requirement: &id007 !ruby/object:Gem::Requirement
129
115
  none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: '0'
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ hash: 3
120
+ segments:
121
+ - 0
122
+ version: "0"
134
123
  type: :development
124
+ version_requirements: *id007
125
+ - !ruby/object:Gem::Dependency
126
+ name: rr
135
127
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
128
+ requirement: &id008 !ruby/object:Gem::Requirement
137
129
  none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
142
- - !ruby/object:Gem::Dependency
143
- name: rspec
144
- requirement: !ruby/object:Gem::Requirement
145
- none: false
146
- requirements:
147
- - - ! '>='
148
- - !ruby/object:Gem::Version
149
- version: '0'
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ hash: 3
134
+ segments:
135
+ - 0
136
+ version: "0"
150
137
  type: :development
138
+ version_requirements: *id008
139
+ - !ruby/object:Gem::Dependency
140
+ name: rspec
151
141
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
142
+ requirement: &id009 !ruby/object:Gem::Requirement
153
143
  none: false
154
- requirements:
155
- - - ! '>='
156
- - !ruby/object:Gem::Version
157
- version: '0'
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ hash: 3
148
+ segments:
149
+ - 0
150
+ version: "0"
151
+ type: :development
152
+ version_requirements: *id009
158
153
  description: Client library and command-line tool to interact with the Mortar service.
159
154
  email: support@mortardata.com
160
- executables:
155
+ executables:
161
156
  - mortar
162
157
  extensions: []
158
+
163
159
  extra_rdoc_files: []
164
- files:
160
+
161
+ files:
165
162
  - README.md
166
163
  - bin/mortar
167
164
  - css/illustrate.css
@@ -252,26 +249,38 @@ files:
252
249
  - spec/support/display_message_matcher.rb
253
250
  homepage: http://mortardata.com/
254
251
  licenses: []
252
+
255
253
  post_install_message:
256
254
  rdoc_options: []
257
- require_paths:
255
+
256
+ require_paths:
258
257
  - lib
259
- required_ruby_version: !ruby/object:Gem::Requirement
258
+ required_ruby_version: !ruby/object:Gem::Requirement
260
259
  none: false
261
- requirements:
262
- - - ! '>='
263
- - !ruby/object:Gem::Version
260
+ requirements:
261
+ - - ">="
262
+ - !ruby/object:Gem::Version
263
+ hash: 57
264
+ segments:
265
+ - 1
266
+ - 8
267
+ - 7
264
268
  version: 1.8.7
265
- required_rubygems_version: !ruby/object:Gem::Requirement
269
+ required_rubygems_version: !ruby/object:Gem::Requirement
266
270
  none: false
267
- requirements:
268
- - - ! '>='
269
- - !ruby/object:Gem::Version
270
- version: '0'
271
+ requirements:
272
+ - - ">="
273
+ - !ruby/object:Gem::Version
274
+ hash: 3
275
+ segments:
276
+ - 0
277
+ version: "0"
271
278
  requirements: []
279
+
272
280
  rubyforge_project:
273
- rubygems_version: 1.8.23
281
+ rubygems_version: 1.8.24
274
282
  signing_key:
275
283
  specification_version: 3
276
284
  summary: Client library and CLI to interact with the Mortar service.
277
285
  test_files: []
286
+