go_figure 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,6 +13,10 @@ module GoFigure
13
13
  @params = {}
14
14
  end
15
15
 
16
+ def set_auto_registration_key(key)
17
+ @doc.root.xpath('server').first["agentAutoRegistrationKey"] = key
18
+ end
19
+
16
20
  def set_pipeline(git_url, working_dir)
17
21
  @doc.root.xpath('pipelines').remove
18
22
  agents = @doc.root.xpath('agents')
@@ -1,3 +1,3 @@
1
1
  module GoFigure
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -3,6 +3,25 @@ require 'test_helper'
3
3
  module GoFigure
4
4
  class GoConfigTest < Test::Unit::TestCase
5
5
 
6
+ def test_should_set_agent_registration_key_on_the_server
7
+ xml = %Q{<?xml version="1.0" encoding="utf-8"?>
8
+ <cruise xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="cruise-config.xsd" schemaVersion="41">
9
+ <server artifactsdir="artifacts">
10
+ <license user="IS team">GPXIhwIOEcByXG95ib4RMxIUn73G+BklnEn/Om+s/lHBCNhbboXsDufdjnom&#xD;
11
+ 7ZYFzs1hhlY1bRf044wu4y1pmKBe/E5OjA2TbK5PGm3pwOvzUYD/peudL5Gs&#xD;
12
+ q+Ia8uD2PBf1bBhoEoYSy9JSs5zTIlNtSc+rCCYkZq+Sn2p0lRHOUzZ0bdkh&#xD;
13
+ 3K/dHYyA4PsB1FciCZCShTlJwyOhSrpQw4qpJ2YAHl9yQN+v0HTGG4QV3fXG&#xD;
14
+ ztJLMGIEmyUR3CSu7KYHZ17XcgUsCFwrgbB24LgWC/CZg8r1eqb4lBh5V11b&#xD;
15
+ MSyuoIPAZhmk7osFKHdJ3wlGfEIQf2bhl+op7u/VZQ==</license>
16
+ </server>
17
+ </cruise>
18
+ }
19
+
20
+ config = GoConfig.new(:xml => xml)
21
+ config.set_auto_registration_key("foobar")
22
+ assert config.xml_content =~ /<server.*agentAutoRegistrationKey="foobar".*/
23
+ end
24
+
6
25
  def test_should_set_pipeline_in_a_config_file_with_no_pipelines_and_no_agents
7
26
  assert_pipeline_template %Q{<?xml version="1.0" encoding="utf-8"?>
8
27
  <cruise />
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: go_figure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-04-20 00:00:00.000000000Z
14
+ date: 2012-04-24 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: simplecov
18
- requirement: &70324008555740 !ruby/object:Gem::Requirement
18
+ requirement: !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,15 @@ dependencies:
23
23
  version: '0'
24
24
  type: :development
25
25
  prerelease: false
26
- version_requirements: *70324008555740
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ none: false
28
+ requirements:
29
+ - - ! '>='
30
+ - !ruby/object:Gem::Version
31
+ version: '0'
27
32
  - !ruby/object:Gem::Dependency
28
33
  name: nokogiri
29
- requirement: &70324008555240 !ruby/object:Gem::Requirement
34
+ requirement: !ruby/object:Gem::Requirement
30
35
  none: false
31
36
  requirements:
32
37
  - - ~>
@@ -34,7 +39,12 @@ dependencies:
34
39
  version: 1.5.0
35
40
  type: :runtime
36
41
  prerelease: false
37
- version_requirements: *70324008555240
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 1.5.0
38
48
  description: This provides a ruby DSL to create a configuration file for the go server
39
49
  (thoughtworks-studios.com/go)
40
50
  email:
@@ -82,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
92
  version: '0'
83
93
  requirements: []
84
94
  rubyforge_project: go_figure
85
- rubygems_version: 1.8.15
95
+ rubygems_version: 1.8.21
86
96
  signing_key:
87
97
  specification_version: 3
88
98
  summary: A Ruby DSL to write a configuration file for the a go server.