lxc 0.1.3 → 0.1.4

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.
@@ -12,7 +12,7 @@ class LXC
12
12
 
13
13
  # An array containing the valid container states extracted from the LXC
14
14
  # c-source code.
15
- STATES = %w(stopped starting running stopping aborting freezing frozen thawed).map(&:to_sym)
15
+ STATES = %w(stopped starting running stopping aborting freezing frozen thawed not_created).map(&:to_sym)
16
16
 
17
17
  # @!method stopped?
18
18
  # Returns true if the container is stopped, false otherwise.
@@ -2,7 +2,7 @@ class LXC
2
2
 
3
3
  unless const_defined?(:VERSION)
4
4
  # LXC Gem Version
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
 
8
8
  end
@@ -29,11 +29,19 @@ describe LXC::Container do
29
29
  LXC_VERSIONS.each do |lxc_version|
30
30
  context "LXC Target Version #{lxc_version}" do
31
31
 
32
+ describe "#not_created?" do
33
+ it "should return true for an un-created container" do
34
+ subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
35
+
36
+ subject.not_created?.should == true
37
+ end
38
+ end
39
+
32
40
  describe "#stopped?" do
33
41
  it "should return true for an un-created container" do
34
42
  subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
35
43
 
36
- subject.stopped?.should == true
44
+ subject.stopped?.should == false
37
45
  end
38
46
  end
39
47
 
@@ -110,10 +118,10 @@ describe LXC::Container do
110
118
  end
111
119
 
112
120
  describe "#state" do
113
- it "should return stopped for an un-created container" do
121
+ it "should return not_created for an un-created container" do
114
122
  subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
115
123
 
116
- subject.state.should == :stopped
124
+ subject.state.should == :not_created
117
125
  end
118
126
  end
119
127
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lxc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -182,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
182
  version: '0'
183
183
  segments:
184
184
  - 0
185
- hash: 3311340983123551161
185
+ hash: 2954289830468247715
186
186
  required_rubygems_version: !ruby/object:Gem::Requirement
187
187
  none: false
188
188
  requirements:
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  version: '0'
192
192
  segments:
193
193
  - 0
194
- hash: 3311340983123551161
194
+ hash: 2954289830468247715
195
195
  requirements: []
196
196
  rubyforge_project:
197
197
  rubygems_version: 1.8.25