cloudfactory 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,35 +38,31 @@ module Cf
38
38
  # before starting the run creation process, we need to make sure whether the line exists or not
39
39
  # if not, then we got to first create the line and then do the production run
40
40
  # else we just simply do the production run
41
- if set_api_key(yaml_source)
42
- CF.account_name = CF::Account.info.name
43
- line = CF::Line.info(line_title)
44
- input_data_path = "#{Dir.pwd}/#{input_data}"
41
+ set_api_key(yaml_source)
42
+ CF.account_name = CF::Account.info.name
43
+ line = CF::Line.info(line_title)
44
+ input_data_path = "#{Dir.pwd}/#{input_data}"
45
45
 
46
- if line.error.blank?
47
- say "Creating a production run with title #{run_title}", :green
48
- run = CF::Run.create(line, run_title, input_data_path)
49
- if run.errors.blank?
50
- say("A run with title #{run.title} created successfully.", :green)
51
- say("View your run at http://#{CF.account_name}.#{CF.api_url.split("/")[-2]}/runs/#{CF.account_name}/#{run.title}", :yellow)
52
- else
53
- say("Error: #{run.errors}", :red)
54
- end
46
+ if line.error.blank?
47
+ say "Creating a production run with title #{run_title}", :green
48
+ run = CF::Run.create(line, run_title, input_data_path)
49
+ if run.errors.blank?
50
+ say("A run with title #{run.title} created successfully.", :green)
51
+ say("View your run at http://#{CF.account_name}.#{CF.api_url.split("/")[-2]}/runs/#{CF.account_name}/#{run.title}", :yellow)
55
52
  else
56
- # first create line
57
- say("Creating the line: #{line_title}", :green)
58
- Cf::Line.new.create
59
- # Now create a production run with the title run_title
60
- run = CF::Run.create(CF::Line.info(line_title), run_title, input_data_path)
61
- if run.errors.blank?
62
- say("A run with title #{run.title} using the line #{line_title} was successfully created.", :red)
63
- else
64
- say("Error: #{run.errors}", :red)
65
- end
66
-
53
+ say("Error: #{run.errors}", :red)
67
54
  end
68
55
  else
69
- say "The api_key is missing in the line.yml file", :red
56
+ # first create line
57
+ say("Creating the line: #{line_title}", :green)
58
+ Cf::Line.new.create
59
+ # Now create a production run with the title run_title
60
+ run = CF::Run.create(CF::Line.info(line_title), run_title, input_data_path)
61
+ if run.errors.blank?
62
+ say("A run with title #{run.title} using the line #{line_title} was successfully created.", :red)
63
+ else
64
+ say("Error: #{run.errors}", :red)
65
+ end
70
66
  end
71
67
  end
72
68
  end
data/lib/cf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module CF
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudfactory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-08 00:00:00.000000000Z
12
+ date: 2011-08-09 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
16
- requirement: &2156790380 !ruby/object:Gem::Requirement
16
+ requirement: &2157765560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2156790380
24
+ version_requirements: *2157765560
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &2156789740 !ruby/object:Gem::Requirement
27
+ requirement: &2157765060 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.0.3
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2156789740
35
+ version_requirements: *2157765060
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: hashie
38
- requirement: &2156789200 !ruby/object:Gem::Requirement
38
+ requirement: &2157764560 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.0.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2156789200
46
+ version_requirements: *2157764560
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rest-client
49
- requirement: &2156788740 !ruby/object:Gem::Requirement
49
+ requirement: &2157764160 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2156788740
57
+ version_requirements: *2157764160
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: json
60
- requirement: &2156788160 !ruby/object:Gem::Requirement
60
+ requirement: &2157763700 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *2156788160
68
+ version_requirements: *2157763700
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: thor
71
- requirement: &2156787540 !ruby/object:Gem::Requirement
71
+ requirement: &2157763180 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 0.14.6
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *2156787540
79
+ version_requirements: *2157763180
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: highline
82
- requirement: &2156787040 !ruby/object:Gem::Requirement
82
+ requirement: &2157762760 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *2156787040
90
+ version_requirements: *2157762760
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: httparty
93
- requirement: &2156786340 !ruby/object:Gem::Requirement
93
+ requirement: &2157762220 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 0.7.8
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *2156786340
101
+ version_requirements: *2157762220
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: terminal-table
104
- requirement: &2156785720 !ruby/object:Gem::Requirement
104
+ requirement: &2157761720 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 1.4.2
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *2156785720
112
+ version_requirements: *2157761720
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: millisami-csv-hash
115
- requirement: &2156785220 !ruby/object:Gem::Requirement
115
+ requirement: &2157761340 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *2156785220
123
+ version_requirements: *2157761340
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: aruba
126
- requirement: &2156784640 !ruby/object:Gem::Requirement
126
+ requirement: &2157760880 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *2156784640
134
+ version_requirements: *2157760880
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: rails
137
- requirement: &2156784020 !ruby/object:Gem::Requirement
137
+ requirement: &2157760380 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ~>
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: 3.0.3
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *2156784020
145
+ version_requirements: *2157760380
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: bundler
148
- requirement: &2156783400 !ruby/object:Gem::Requirement
148
+ requirement: &2157759880 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ~>
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: 1.0.0
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *2156783400
156
+ version_requirements: *2157759880
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: generator_spec
159
- requirement: &2156782820 !ruby/object:Gem::Requirement
159
+ requirement: &2157757860 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ~>
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: 0.8.3
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *2156782820
167
+ version_requirements: *2157757860
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: rspec-rails
170
- requirement: &2156782440 !ruby/object:Gem::Requirement
170
+ requirement: &2157757480 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ! '>='
@@ -175,10 +175,10 @@ dependencies:
175
175
  version: '0'
176
176
  type: :development
177
177
  prerelease: false
178
- version_requirements: *2156782440
178
+ version_requirements: *2157757480
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: cucumber
181
- requirement: &2156781860 !ruby/object:Gem::Requirement
181
+ requirement: &2157757020 !ruby/object:Gem::Requirement
182
182
  none: false
183
183
  requirements:
184
184
  - - ! '>='
@@ -186,10 +186,10 @@ dependencies:
186
186
  version: '0'
187
187
  type: :development
188
188
  prerelease: false
189
- version_requirements: *2156781860
189
+ version_requirements: *2157757020
190
190
  - !ruby/object:Gem::Dependency
191
191
  name: rdoc
192
- requirement: &2156781360 !ruby/object:Gem::Requirement
192
+ requirement: &2157756520 !ruby/object:Gem::Requirement
193
193
  none: false
194
194
  requirements:
195
195
  - - ~>
@@ -197,10 +197,10 @@ dependencies:
197
197
  version: 3.5.3
198
198
  type: :development
199
199
  prerelease: false
200
- version_requirements: *2156781360
200
+ version_requirements: *2157756520
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: vcr
203
- requirement: &2156780920 !ruby/object:Gem::Requirement
203
+ requirement: &2157756100 !ruby/object:Gem::Requirement
204
204
  none: false
205
205
  requirements:
206
206
  - - ! '>='
@@ -208,10 +208,10 @@ dependencies:
208
208
  version: '0'
209
209
  type: :development
210
210
  prerelease: false
211
- version_requirements: *2156780920
211
+ version_requirements: *2157756100
212
212
  - !ruby/object:Gem::Dependency
213
213
  name: rake
214
- requirement: &2156780340 !ruby/object:Gem::Requirement
214
+ requirement: &2157755640 !ruby/object:Gem::Requirement
215
215
  none: false
216
216
  requirements:
217
217
  - - ! '>='
@@ -219,10 +219,10 @@ dependencies:
219
219
  version: '0'
220
220
  type: :development
221
221
  prerelease: false
222
- version_requirements: *2156780340
222
+ version_requirements: *2157755640
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: webmock
225
- requirement: &2156779880 !ruby/object:Gem::Requirement
225
+ requirement: &2157755200 !ruby/object:Gem::Requirement
226
226
  none: false
227
227
  requirements:
228
228
  - - ! '>='
@@ -230,7 +230,7 @@ dependencies:
230
230
  version: '0'
231
231
  type: :development
232
232
  prerelease: false
233
- version_requirements: *2156779880
233
+ version_requirements: *2157755200
234
234
  description: A Ruby wrapper and CLI for to interact with Cloudfactory.com REST API
235
235
  email:
236
236
  - info@cloudfactory.com
@@ -306,7 +306,6 @@ files:
306
306
  - lib/cf/cli/templates/form_preview.html.erb
307
307
  - lib/cf/cli/templates/html_file.html.erb
308
308
  - lib/cf/cli/templates/js_file.js.erb
309
- - lib/cf/cli/templates/line.tt
310
309
  - lib/cf/cli/templates/sample-line/form.css
311
310
  - lib/cf/cli/templates/sample-line/form.html
312
311
  - lib/cf/cli/templates/sample-line/form.js
@@ -1,55 +0,0 @@
1
- # ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
2
- # See docs at http://developers.cloudfactory.com/lines/yaml.html
3
- # See examples at http://developers.cloudfactory.com/lines/examples.html
4
- #
5
- # Fill in your API key below (see http://cloudfactory.com/account#settings)
6
- # ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
7
-
8
- # Line settings (see http://cloudfactory.com/lines/yaml.html#line-settings)
9
- api_key: fill_in_your_api_key
10
- title: <%= title.underscore.dasherize %>
11
- description: Describe the line what its purpose is and what it does. You got the idea, right?
12
- department: Survey
13
-
14
-
15
- # Line Input Formats (see http://cloudfactory.com/lines/yaml.html#line-input-formats)
16
- # input_formats:
17
- # - name: company
18
- # required: true
19
- # valid_type: general # general, url, date, email, ...
20
-
21
- # Stations (see http://cloudfactory.com/lines/yaml.html#stations)
22
- stations:
23
- - station:
24
- station_index: 1
25
- station_type: work
26
- # Worker (see http://cloudfactory.com/lines/yaml.html#workers)
27
- worker:
28
- worker_type: human # human, impr
29
- num_workers: 2
30
- reward: 5
31
- # Task Form (see http://cloudfactory.com/lines/yaml.html#task-forms)
32
- task_form:
33
- form_title: Enter text from a business card image for TASKFORM
34
- instruction: Read the business card image and the fill the fields for TASKFORM
35
- form_fields:
36
- - label: CEO Name
37
- field_type: short_answer
38
- required: true
39
- - label: CEO Email
40
- field_type: email
41
- required: true
42
- - station:
43
- station_index: 2
44
- station_type: work
45
- worker:
46
- worker_type: human
47
- num_workers: 1
48
- reward: 3
49
- # Custom Task Form (see http://cloudfactory.com/lines/yaml.html#custom-task-form)
50
- custom_task_form:
51
- form_title: Enter text from a business card image for CUSTOMTASKFORM
52
- instruction: Read the business card image and the fill the fields for CUSTOMTASKFORM
53
- html: form.html
54
- css: form.css
55
- js: form.js