cloudfactory 0.6.4 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -179,10 +179,9 @@ describe CF::CustomTaskForm do
179
179
 
180
180
  end
181
181
 
182
- it "should returtn sucsess for updating form without errors" do
183
- form_content = {:form_title => "updated form", :instruction => "Updated one", :html => @updated_html}
182
+ it "should return sucsess for updating form without errors" do
183
+ form_content = {:title => "updated form", :instruction => "Updated one", :raw_html => @updated_html}
184
184
  form = CF::CustomTaskForm.update(@line.title, 1, form_content)
185
- binding.pry
186
185
  form.code.should eql(200)
187
186
  form["title"].should eql("updated form")
188
187
  CGI.unescape_html(form["raw_html"]).should eql("<!DOCTYPE html>\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n<meta http-equiv='\\\"Content-Type\\\"' content='\\\"text/html;' charset='UTF-8\\\"'>\n</head>\n<body>\n<div id=\"form-content\">\n <form>\n<div id=\"instructions\">\n <ul>\n<li>Look at the business card properly and fill in asked data.</li>\n <li>Make sure you enter everything found on business card.</li>\n <li>Work may be rejected if it is incomplete or mistakes are found.</li>\n </ul>\n</div>\n <div id=\"image-field-wrapper\">\n <div id=\"image-panel\">\n <img class=\"card-image\" src=\"{{image_url}}\">\n</div>\n <div id=\"field-panel\">\n FullName<br><input class=\"input-field first_name\" type=\"text\" name=\"output[first_name]\"><input class=\"input-field middle_name\" type=\"text\" name=\"output[middle_name]\"><input class=\"input-field last_name\" type=\"text\" name=\"output[last_name]\"><br><br>Contact<br><input class=\"input-field email\" type=\"text\" name=\"output[email]\" placeholder=\"Email\"><input class=\"input-field phone\" type=\"text\" name=\"output[phone]\" placeholder=\"Phone\"><input class=\"input-field mobile\" type=\"text\" name=\"output[mobile]\" placeholder=\"Mobile\"><br>\n</div>\n </div>\n </form>\n</div>\n</body>\n</html>\n")
@@ -320,7 +319,7 @@ describe CF::CustomTaskForm do
320
319
  end
321
320
  line.title.should eql(title)
322
321
  line.department_name.should eql("Digitization")
323
- line.stations.first.form.errors.should eql(["Instruction can't be blank", "Raw html should contain a Form tag"])
322
+ line.stations.first.form.errors.should eql(["Raw html should contain a Form tag"])
324
323
  end
325
324
 
326
325
  it "creating without any html data" do
@@ -29,7 +29,6 @@ module CF
29
29
  end
30
30
  end
31
31
  line.stations.first.type.should eql("WorkStation")
32
- line.stations.first.worker.errors.should eql("[\"Reward can't be blank\"]")
33
32
  end
34
33
 
35
34
  it "in plain ruby way with invalid data and should set the error" do
@@ -47,7 +46,6 @@ module CF
47
46
  line.stations.first.worker = worker
48
47
 
49
48
  line.stations.first.type.should eql("WorkStation")
50
- line.stations.first.worker.errors.should eql("[\"Reward can't be blank\"]")
51
49
  end
52
50
 
53
51
  it "should only display the attributes which are mentioned in to_s method" do
@@ -60,8 +58,136 @@ module CF
60
58
  CF::HumanWorker.new({:station => station, :number => 1, :reward => 20})
61
59
  end
62
60
  end
63
- line.stations.first.worker.to_s.should eql("{:id => => #{line.stations.first.worker.id}, :number => 1, :reward => 20, :stat_badge => {\"approval_rating\"=>80, \"assignment_duration\"=>3600, \"abandonment_rate\"=>30, \"country\"=>nil}, :errors => }")
61
+ line.stations.first.worker.to_s.should eql("{:id => => #{line.stations.first.worker.id}, :number => 1, :reward => 20, :stat_badge => {\"approval_rating\"=>80, \"assignment_duration\"=>3600, \"abandonment_rate\"=>30, \"country\"=>nil}, :errors => ,:badges =>}")
64
62
  end
65
63
  end
66
- end
67
- end
64
+
65
+ context "assign badge to the worker" do
66
+ before(:each) do
67
+ @badge = CF::Badge.create(
68
+ :name => "Bizcard Digitizer_dsl",
69
+ :description => "this badge qualifies the worker for bizcard digitization",
70
+ :max_badge_assignments => 100,
71
+ :retries_allowed => 5,
72
+ :pass_percentage => 80,
73
+ :assignment_duration => 3600,
74
+ :allow_retake_after => 5,
75
+ :check_manually =>false,
76
+ :form => "./lib/cf/cli/templates/sample-line/form.html",
77
+ :known_answers=>
78
+ [
79
+ { "name" => "transcription pilot",
80
+ "input"=> {"image_url"=> "http://onwired.com/images/portfolio/linda-stanley-business-card.jpg"},
81
+ "expected_output"=>{"gender"=>{"value"=>"Male"}, "rich"=>{"value"=>"1"}}
82
+ },
83
+ {
84
+ "name" => "pilot",
85
+ "input"=>{"image_url"=> "http://onwired.com/images/portfolio/linda-stanley-business-card.jpg2"},
86
+ "expected_output"=>{"gender"=>{"value"=>"Male"}, "rich"=>{"value"=>"2"}}
87
+ }
88
+ ]
89
+ )
90
+
91
+ @badge2 = CF::Badge.create(
92
+ :name => "Bizcard Digitizer_next",
93
+ :description => "this badge qualifies the worker for bizcard digitization",
94
+ :max_badge_assignments => 100,
95
+ :retries_allowed => 5,
96
+ :pass_percentage => 80,
97
+ :assignment_duration => 3600,
98
+ :allow_retake_after => 5,
99
+ :check_manually =>false,
100
+ :form => "./lib/cf/cli/templates/sample-line/form.html",
101
+ :known_answers=>
102
+ [
103
+ { "name" => "transcription pilot",
104
+ "input"=> {"image_url"=> "http://onwired.com/images/portfolio/linda-stanley-business-card.jpg"},
105
+ "expected_output"=>{"gender"=>{"value"=>"Male"}, "rich"=>{"value"=>"1"}}
106
+ },
107
+ {
108
+ "name" => "pilot",
109
+ "input"=>{"image_url"=> "http://onwired.com/images/portfolio/linda-stanley-business-card.jpg2"},
110
+ "expected_output"=>{"gender"=>{"value"=>"Male"}, "rich"=>{"value"=>"2"}}
111
+ }
112
+ ]
113
+ )
114
+ end
115
+
116
+
117
+ it "should assign a badge to the station worker in block DSL way" do
118
+ WebMock.allow_net_connect!
119
+ title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
120
+ sleep 1
121
+ line = CF::Line.create(title, "Digitization") do |l|
122
+ CF::InputFormat.new({:line => l, :name => "image_url", :required => true, :valid_type => "url"})
123
+ CF::Station.create({:line =>l, :type => "work"}) do |s|
124
+ @worker = CF::HumanWorker.new({:station => s, :number => 1, :reward => 20,:badge => ["Bizcard Digitizer_dsl"]})
125
+ end
126
+ end
127
+ line.stations.first.worker.badges.should eql([{"name"=>"Bizcard Digitizer_dsl"}])
128
+ end
129
+
130
+ it "should assign badge to the station worker in plain ruby way " do
131
+ WebMock.allow_net_connect!
132
+ title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
133
+ sleep 1
134
+ line = CF::Line.new(title, "Digitization")
135
+ input_format = CF::InputFormat.new({:name => "image_url", :required => true, :valid_type => "url"})
136
+ line.input_formats input_format
137
+
138
+ station = CF::Station.new({:type => "work"})
139
+ line.stations station
140
+
141
+ worker = CF::HumanWorker.new({:number => 1, :reward => 1 , :stat_badge =>[] , :badge => ["Bizcard Digitizer_dsl"]})
142
+ line.stations.first.worker = worker
143
+ line.stations.first.worker.badges.should eql([{"name"=>"Bizcard Digitizer_dsl"}])
144
+ end
145
+
146
+ it "should assign multiple badges to the station worker in block DSL Way" do
147
+ WebMock.allow_net_connect!
148
+ title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
149
+ sleep 1
150
+ line = CF::Line.create(title, "Digitization") do |l|
151
+ CF::InputFormat.new({:line => l, :name => "image_url", :required => true, :valid_type => "url"})
152
+ CF::Station.create({:line =>l, :type => "work"}) do |s|
153
+ @worker = CF::HumanWorker.new({:station => s, :number => 1, :reward => 20,:badge => ["Bizcard Digitizer_dsl", "Bizcard Digitizer_next"]})
154
+ end
155
+ end
156
+ line.stations.first.worker.badges.should include({"name"=>"Bizcard Digitizer_dsl"},{"name"=>"Bizcard Digitizer_next"})
157
+
158
+ end
159
+
160
+ it "should assign multiple badges to the station worker in plain ruby Way" do
161
+ WebMock.allow_net_connect!
162
+ title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
163
+ sleep 1
164
+ line = CF::Line.new(title, "Digitization")
165
+ input_format = CF::InputFormat.new({:name => "image_url", :required => true, :valid_type => "url"})
166
+ line.input_formats input_format
167
+
168
+ station = CF::Station.new({:type => "work"})
169
+ line.stations station
170
+
171
+ worker = CF::HumanWorker.new({:number => 1, :reward => 1 , :stat_badge =>[] , :badge => ["Bizcard Digitizer_dsl", "Bizcard Digitizer_next"]})
172
+ line.stations.first.worker = worker
173
+ line.stations.first.worker.badges.should include({"name"=>"Bizcard Digitizer_dsl"},{"name"=>"Bizcard Digitizer_next"})
174
+
175
+ end
176
+
177
+ it "should raise error if the badge does not exist" do
178
+ WebMock.allow_net_connect!
179
+ title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
180
+ sleep 1
181
+ line = CF::Line.create(title, "Digitization") do |l|
182
+ CF::InputFormat.new({:line => l, :name => "image_url", :required => true, :valid_type => "url"})
183
+ CF::Station.create({:line =>l, :type => "work"}) do |s|
184
+ @worker = CF::HumanWorker.new({:station => s, :number => 1, :reward => 20,:badge => ["Bizcard Digitizer_dsl2", "Bizcard Digitizer_next"]})
185
+ end
186
+ end
187
+ line.stations.last.worker.errors.should eql("Badge with name Bizcard Digitizer_dsl2 was not found.")
188
+ end
189
+
190
+ end
191
+
192
+ end
193
+ end
@@ -158,7 +158,7 @@ describe CF::Line do
158
158
  end
159
159
 
160
160
  context "listing lines" do
161
- it "should list all the existing lines that belong to particular owner" do
161
+ xit "should list all the existing lines that belong to particular owner" do
162
162
  WebMock.allow_net_connect!
163
163
  5.times do |i|
164
164
  title_i = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
@@ -169,7 +169,7 @@ describe CF::Line do
169
169
  lines.class.should eql(Hash)
170
170
  end
171
171
 
172
- it "should list all the public lines" do
172
+ xit "should list all the public lines" do
173
173
  WebMock.allow_net_connect!
174
174
  title_0 = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
175
175
  sleep 1
@@ -376,7 +376,7 @@ describe CF::Line do
376
376
  sleep 1
377
377
  line = CF::Line.new(title, "Digitization")
378
378
  line_1 = CF::Line.new(title, "Digitization")
379
- line_1.errors.should eql(["Title is already taken"])
379
+ line_1.errors.should eql(["Title is already taken for this account"])
380
380
  end
381
381
  end
382
382
 
@@ -429,9 +429,10 @@ describe CF::Line do
429
429
  worker_id = line_details['stations'].first['worker']['id']
430
430
  form_field_id = line_details['stations'].first['form_fields'].first['id']
431
431
  station_input_format_id = line_details['stations'].first['input_formats'].first['id']
432
- line_details.should eql({"title"=>"#{title}", "description"=>"", "department"=>"Digitization", "input_formats"=>[{"id"=>"#{line_input_format_id}", "name"=>"Company", "required"=>true, "valid_type"=>nil}], "stations"=>[{"index"=>1, "type"=>"WorkStation", "input_formats"=>[{"id"=>"#{station_input_format_id}", "name"=>"Company", "required"=>true, "valid_type"=>nil}], "worker"=>{"id"=>"#{worker_id}", "number"=>1, "reward"=>20, "type"=>"HumanWorker", "stat_badge"=>{"abandonment_rate"=>30, "approval_rating"=>80, "country"=>nil, "adult"=>nil}}, "form"=>{"title"=>"Enter text from a business card image", "instruction"=>"Describe"}, "form_fields"=>[{"id"=>"#{form_field_id}", "label"=>"First Name", "field_type"=>"short_answer", "hint"=>nil, "required"=>true, "unique"=>nil, "hide_label"=>nil, "value"=>nil, "option_values"=>nil}]}], "code"=>200})
432
+ line_details.should eql({"title"=>"#{title}", "description"=>"", "department"=>"Digitization", "input_formats"=>[{"id"=>"#{line_input_format_id}", "name"=>"Company", "required"=>true, "valid_type"=>nil}], "stations"=>[{"index"=>1, "type"=>"WorkStation", "input_formats"=>[{"id"=>"#{station_input_format_id}", "name"=>"Company", "required"=>true, "valid_type"=>nil}], "worker"=>{"id"=>"#{worker_id}", "number"=>1, "reward"=>"20", "type"=>"HumanWorker", "stat_badge"=>{"abandonment_rate"=>30, "approval_rating"=>80, "country"=>nil, "adult"=>nil}}, "form"=>{"title"=>"Enter text from a business card image", "instruction"=>"Describe"}, "form_fields"=>[{"id"=>"#{form_field_id}", "label"=>"First Name", "field_type"=>"short_answer", "hint"=>nil, "required"=>true, "unique"=>nil, "hide_label"=>nil, "value"=>nil, "option_values"=>nil}]}], "code"=>200})
433
433
  end
434
434
 
435
+
435
436
  it "for robot worker" do
436
437
  WebMock.allow_net_connect!
437
438
  title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
@@ -455,7 +456,7 @@ describe CF::Line do
455
456
  line.class.should eql(Hash)
456
457
  end
457
458
 
458
- it "should get all lines with pagination all" do
459
+ xit "should get all lines with pagination all" do
459
460
  WebMock.allow_net_connect!
460
461
  25.times do |i|
461
462
  title_i = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
@@ -469,7 +470,8 @@ describe CF::Line do
469
470
  end
470
471
 
471
472
  context "get a line of other account and using that line to create run under own account" do
472
- it "as public line" do
473
+ #remove pending and if you have account name "hero"
474
+ xit "as public line" do
473
475
  WebMock.allow_net_connect!
474
476
  CF.configure do |config|
475
477
  config.api_key = "2512bb347f0cfa42c3ce24947d820a5d82d445a7"
@@ -236,7 +236,7 @@ module CF
236
236
  end
237
237
  run = CF::Run.create(line, "run-#{title}", [{"url"=> "http://media-robot.s3.amazonaws.com/media_robot/media/upload/8/ten.mov"}])
238
238
  run_1 = CF::Run.create(line, "run-#{title}", [{"url"=> "http://media-robot.s3.amazonaws.com/media_robot/media/upload/8/ten.mov"}])
239
- run_1.errors.should eql(["Title is already taken"])
239
+ run_1.errors.should eql(["Title is already taken for this account"])
240
240
  end
241
241
 
242
242
  it "should create production run and find created run" do
@@ -55,7 +55,7 @@ describe CF::TaskForm do
55
55
  end
56
56
  end
57
57
  form = line.stations[0].form
58
- form.errors.should eql(["Title can't be blank", "Instruction can't be blank"])
58
+ form.errors.should eql(["Title can't be blank"])
59
59
  form.instruction.should eq(nil)
60
60
  form.form_fields.should eq([])
61
61
  end
@@ -76,23 +76,6 @@ describe CF::TaskForm do
76
76
  form.instruction.should eq("describe")
77
77
  form.form_fields.should eq([])
78
78
  end
79
-
80
- it "without Instruction" do
81
- WebMock.allow_net_connect!
82
- title = "line_title#{Time.new.strftime('%Y%b%d-%H%M%S')}".downcase
83
- sleep 1
84
- line = CF::Line.create(title, "Digitization") do
85
- CF::InputFormat.new({:line => self, :name => "image_url", :required => true, :valid_type => "url"})
86
- CF::Station.create({:line => self, :type => "work"}) do |station|
87
- CF::HumanWorker.new({:station => station, :number => 1, :reward => 20})
88
- CF::TaskForm.new({:station => station, :title => "title"})
89
- end
90
- end
91
- form = line.stations[0].form
92
- form.errors.should eql(["Instruction can't be blank"])
93
- form.title.should eq("title")
94
- form.form_fields.should eq([])
95
- end
96
79
  end
97
80
 
98
81
  context "get instruction info" do
@@ -25,9 +25,8 @@ module CF
25
25
  end
26
26
  end
27
27
  run = CF::Run.create(line, "text_appending_robot_run", [{"Company"=>"Sprout","Website"=>"www.sprout.com"}])
28
- # debugger
29
28
  line.stations.last.worker.class.should eql(CF::RobotWorker)
30
- line.stations.first.worker.reward.should eql("20")
29
+ line.stations.first.worker.reward.should eql(20)
31
30
  line.stations.first.worker.number.should eql(1)
32
31
  line.stations.last.worker.settings.should eql({:append => ["{{description}}"], :separator => "||"})
33
32
  line.stations.last.worker.type.should eql("TextAppendingRobot")
@@ -63,12 +62,12 @@ module CF
63
62
 
64
63
  worker_1 = CF::RobotWorker.create({:type => "text_appending_robot", :settings => {:append => ["{{description}}"], :separator => "||"}})
65
64
  line.stations.last.worker = worker_1
66
-
65
+
67
66
  run = CF::Run.create(line, "text_appending_robot_run_1", [{"Company"=>"Sprout","Website"=>"www.sprout.com"}])
68
67
  # debugger
69
-
68
+
70
69
  line.stations.last.worker.class.should eql(CF::RobotWorker)
71
- line.stations.first.worker.reward.should eql("20")
70
+ line.stations.first.worker.reward.should eql(20)
72
71
  line.stations.first.worker.number.should eql(1)
73
72
  line.stations.last.worker.settings.should eql({:append => ["{{description}}"], :separator => "||"})
74
73
  line.stations.last.worker.type.should eql("TextAppendingRobot")
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.6.4
4
+ version: '0.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: 2012-07-02 00:00:00.000000000 Z
12
+ date: 2012-07-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
16
- requirement: &2157742880 !ruby/object:Gem::Requirement
16
+ requirement: &2163345460 !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: *2157742880
24
+ version_requirements: *2163345460
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &2157742180 !ruby/object:Gem::Requirement
27
+ requirement: &2163361320 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3.0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2157742180
35
+ version_requirements: *2163361320
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: hashie
38
- requirement: &2157741180 !ruby/object:Gem::Requirement
38
+ requirement: &2163360820 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2157741180
46
+ version_requirements: *2163360820
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rest-client
49
- requirement: &2157740800 !ruby/object:Gem::Requirement
49
+ requirement: &2163360440 !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: *2157740800
57
+ version_requirements: *2163360440
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: json
60
- requirement: &2157740300 !ruby/object:Gem::Requirement
60
+ requirement: &2163359980 !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: *2157740300
68
+ version_requirements: *2163359980
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: thor
71
- requirement: &2157739720 !ruby/object:Gem::Requirement
71
+ requirement: &2163359480 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0.14'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *2157739720
79
+ version_requirements: *2163359480
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: highline
82
- requirement: &2157739300 !ruby/object:Gem::Requirement
82
+ requirement: &2163359060 !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: *2157739300
90
+ version_requirements: *2163359060
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: httparty
93
- requirement: &2157738760 !ruby/object:Gem::Requirement
93
+ requirement: &2163358520 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0.7'
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *2157738760
101
+ version_requirements: *2163358520
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: terminal-table
104
- requirement: &2157738220 !ruby/object:Gem::Requirement
104
+ requirement: &2163358020 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '1.4'
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *2157738220
112
+ version_requirements: *2163358020
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: millisami-csv-hash
115
- requirement: &2157737840 !ruby/object:Gem::Requirement
115
+ requirement: &2163357640 !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: *2157737840
123
+ version_requirements: *2163357640
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: awesome_print
126
- requirement: &2157753700 !ruby/object:Gem::Requirement
126
+ requirement: &2163357180 !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: :runtime
133
133
  prerelease: false
134
- version_requirements: *2157753700
134
+ version_requirements: *2163357180
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: rubyzip
137
- requirement: &2157753240 !ruby/object:Gem::Requirement
137
+ requirement: &2163356760 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: '0'
143
143
  type: :runtime
144
144
  prerelease: false
145
- version_requirements: *2157753240
145
+ version_requirements: *2163356760
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: pry
148
- requirement: &2157752620 !ruby/object:Gem::Requirement
148
+ requirement: &2163356340 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: '0'
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *2157752620
156
+ version_requirements: *2163356340
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: pry-nav
159
- requirement: &2157751620 !ruby/object:Gem::Requirement
159
+ requirement: &2163355920 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: '0'
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *2157751620
167
+ version_requirements: *2163355920
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: aruba
170
- requirement: &2157751180 !ruby/object:Gem::Requirement
170
+ requirement: &2163355500 !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: *2157751180
178
+ version_requirements: *2163355500
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: rails
181
- requirement: &2157750640 !ruby/object:Gem::Requirement
181
+ requirement: &2163355000 !ruby/object:Gem::Requirement
182
182
  none: false
183
183
  requirements:
184
184
  - - ~>
@@ -186,10 +186,10 @@ dependencies:
186
186
  version: 3.0.3
187
187
  type: :development
188
188
  prerelease: false
189
- version_requirements: *2157750640
189
+ version_requirements: *2163355000
190
190
  - !ruby/object:Gem::Dependency
191
191
  name: bundler
192
- requirement: &2157750140 !ruby/object:Gem::Requirement
192
+ requirement: &2163354580 !ruby/object:Gem::Requirement
193
193
  none: false
194
194
  requirements:
195
195
  - - ! '>='
@@ -197,10 +197,10 @@ dependencies:
197
197
  version: '0'
198
198
  type: :development
199
199
  prerelease: false
200
- version_requirements: *2157750140
200
+ version_requirements: *2163354580
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: generator_spec
203
- requirement: &2157749600 !ruby/object:Gem::Requirement
203
+ requirement: &2163354040 !ruby/object:Gem::Requirement
204
204
  none: false
205
205
  requirements:
206
206
  - - ~>
@@ -208,10 +208,10 @@ dependencies:
208
208
  version: '0.8'
209
209
  type: :development
210
210
  prerelease: false
211
- version_requirements: *2157749600
211
+ version_requirements: *2163354040
212
212
  - !ruby/object:Gem::Dependency
213
213
  name: rspec
214
- requirement: &2157749160 !ruby/object:Gem::Requirement
214
+ requirement: &2163353620 !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: *2157749160
222
+ version_requirements: *2163353620
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: cucumber
225
- requirement: &2157748680 !ruby/object:Gem::Requirement
225
+ requirement: &2163369540 !ruby/object:Gem::Requirement
226
226
  none: false
227
227
  requirements:
228
228
  - - ! '>='
@@ -230,10 +230,10 @@ dependencies:
230
230
  version: '0'
231
231
  type: :development
232
232
  prerelease: false
233
- version_requirements: *2157748680
233
+ version_requirements: *2163369540
234
234
  - !ruby/object:Gem::Dependency
235
235
  name: rdoc
236
- requirement: &2157748160 !ruby/object:Gem::Requirement
236
+ requirement: &2163369040 !ruby/object:Gem::Requirement
237
237
  none: false
238
238
  requirements:
239
239
  - - ~>
@@ -241,10 +241,10 @@ dependencies:
241
241
  version: 3.5.3
242
242
  type: :development
243
243
  prerelease: false
244
- version_requirements: *2157748160
244
+ version_requirements: *2163369040
245
245
  - !ruby/object:Gem::Dependency
246
246
  name: vcr
247
- requirement: &2157747740 !ruby/object:Gem::Requirement
247
+ requirement: &2163368620 !ruby/object:Gem::Requirement
248
248
  none: false
249
249
  requirements:
250
250
  - - ! '>='
@@ -252,10 +252,10 @@ dependencies:
252
252
  version: '0'
253
253
  type: :development
254
254
  prerelease: false
255
- version_requirements: *2157747740
255
+ version_requirements: *2163368620
256
256
  - !ruby/object:Gem::Dependency
257
257
  name: rake
258
- requirement: &2157747280 !ruby/object:Gem::Requirement
258
+ requirement: &2163368160 !ruby/object:Gem::Requirement
259
259
  none: false
260
260
  requirements:
261
261
  - - ! '>='
@@ -263,10 +263,10 @@ dependencies:
263
263
  version: '0'
264
264
  type: :development
265
265
  prerelease: false
266
- version_requirements: *2157747280
266
+ version_requirements: *2163368160
267
267
  - !ruby/object:Gem::Dependency
268
268
  name: webmock
269
- requirement: &2157746860 !ruby/object:Gem::Requirement
269
+ requirement: &2163367740 !ruby/object:Gem::Requirement
270
270
  none: false
271
271
  requirements:
272
272
  - - ! '>='
@@ -274,10 +274,10 @@ dependencies:
274
274
  version: '0'
275
275
  type: :development
276
276
  prerelease: false
277
- version_requirements: *2157746860
277
+ version_requirements: *2163367740
278
278
  - !ruby/object:Gem::Dependency
279
279
  name: timecop
280
- requirement: &2157746440 !ruby/object:Gem::Requirement
280
+ requirement: &2163367320 !ruby/object:Gem::Requirement
281
281
  none: false
282
282
  requirements:
283
283
  - - ! '>='
@@ -285,7 +285,7 @@ dependencies:
285
285
  version: '0'
286
286
  type: :development
287
287
  prerelease: false
288
- version_requirements: *2157746440
288
+ version_requirements: *2163367320
289
289
  description: A Ruby wrapper and CLI for to interact with Cloudfactory.com REST API
290
290
  email:
291
291
  - administrator@sprout-technology.com
@@ -328,6 +328,8 @@ files:
328
328
  - lib/cf/account.rb
329
329
  - lib/cf/badge.rb
330
330
  - lib/cf/cli.rb
331
+ - lib/cf/cli/badge.rb
332
+ - lib/cf/cli/badge_yaml_validator.rb
331
333
  - lib/cf/cli/config.rb
332
334
  - lib/cf/cli/form.rb
333
335
  - lib/cf/cli/line.rb
@@ -335,6 +337,7 @@ files:
335
337
  - lib/cf/cli/production.rb
336
338
  - lib/cf/cli/templates/form_preview.html.erb
337
339
  - lib/cf/cli/templates/html_file.html.erb
340
+ - lib/cf/cli/templates/sample-line/badge.yml.erb
338
341
  - lib/cf/cli/templates/sample-line/form.html
339
342
  - lib/cf/cli/templates/sample-line/line.yml.erb
340
343
  - lib/cf/cli/templates/sample-line/sample-line.csv