deploy_version 0.1.0 → 0.2.0

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{deploy_version}
8
- s.version = "0.0.0"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["kazuyoshi tlacaelel"]
12
- s.date = %q{2010-06-01}
13
- s.description = %q{ Encapsulation for deploy version }
12
+ s.date = %q{2010-06-30}
13
+ s.description = %q{Encapsulation for deploy version}
14
14
  s.email = %q{kazu.dev@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
23
23
  "README.rdoc",
24
24
  "Rakefile",
25
25
  "VERSION",
26
+ "deploy_version.gemspec",
26
27
  "lib/deploy_version.rb",
27
28
  "test/helper.rb",
28
29
  "test/test_deploy_version.rb"
@@ -31,7 +32,7 @@ Gem::Specification.new do |s|
31
32
  s.rdoc_options = ["--charset=UTF-8"]
32
33
  s.require_paths = ["lib"]
33
34
  s.rubygems_version = %q{1.3.7}
34
- s.summary = %q{Keep track of which version is being deployed.}
35
+ s.summary = %q{keep track of which version is being deployed.}
35
36
  s.test_files = [
36
37
  "test/helper.rb",
37
38
  "test/test_deploy_version.rb"
@@ -22,14 +22,15 @@ module Deploy
22
22
 
23
23
  def initialize
24
24
  @deployed_time = Time.now
25
+ @custom_values = {}
25
26
  end
26
27
 
27
28
  def load_from_url
28
- raise Error.not_implemented
29
+ raise Error.not_implemented 'load_from_url'
29
30
  end
30
31
 
31
32
  def load_from_file
32
- raise Error.not_implemented
33
+ raise Error.not_implemented 'load_from_file'
33
34
  end
34
35
 
35
36
  def store_to_file(filename)
@@ -47,11 +48,16 @@ module Deploy
47
48
  @deployed_time
48
49
  end
49
50
 
51
+ def add key, value
52
+ @custom_values[key] = value
53
+ end
54
+
50
55
  def to_h
51
56
  {
52
57
  :current_version => @current_version,
53
58
  :deployed_by => @deployed_by,
54
- :deployed_time => deployed_time
59
+ :deployed_time => deployed_time,
60
+ :custom_values => @custom_values
55
61
  }
56
62
  end
57
63
 
@@ -1,7 +1,20 @@
1
1
  require 'helper'
2
2
 
3
3
  class TestDeployVersion < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
4
+
5
+ def setup
6
+ @version = Deploy::Version.new
7
+ @version.current_version = '1'
8
+ @version.deployed_by = 'me'
9
+ end
10
+
11
+ def dead_beef
12
+ 0xDEADBEEF
6
13
  end
14
+
15
+ should 'add a custom value' do
16
+ @version.add :cluster_id, dead_beef
17
+ assert_equal @version.to_h[:custom_values][:cluster_id], dead_beef
18
+ end
19
+
7
20
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deploy_version
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 0.1.0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - kazuyoshi tlacaelel
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-02 00:00:00 -05:00
18
+ date: 2010-06-30 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency