trusted-sandbox 0.0.11.pre → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc841b00560c9a8bd0b26bcc9ce940b095fed242
4
- data.tar.gz: 7bd8e5c072575fea41bda718a32a99a6015d4d46
3
+ metadata.gz: 710b66a2281fd58e96bafba2d61df2aac9c9bcb8
4
+ data.tar.gz: cce27e66c0599c3c0ee94f1cc848f5e715dc3445
5
5
  SHA512:
6
- metadata.gz: b2b63ac24b3daa49808d3ede5cef2fe21fbd7f0adf109412d06c91d5c77b78c2260d897af2ad292ccebccaea02937904e6209ff5bedbadef8b6e546512046617
7
- data.tar.gz: 3acab287609c12d11a6b7e1c4635b41ea5afb94a1c2f4babb5cc43b6edbd9c2f38004d78bc4018aa68976d10c7f47f7080a1a9603bbbca9f85c9001c7431a313
6
+ metadata.gz: 1ad8fc3d96d46c245f98dd5065e8916dad3e4a2754f9e3ddaf3510140713c43fd9a71dbe5a4cc11e56b43ad78233d7aa4de77b3de8a8b7bf72ff988ba4c3d5ac
7
+ data.tar.gz: c6e4c9de28b98df0abca1efda6fe8cb555b578c87bf3d267aaea9519d686e3befdb65e57ba9a7e664ceb5d45ab9ec63f893de9da1a91863d5c979287f807dc0a
@@ -1,3 +1,3 @@
1
1
  module TrustedSandbox
2
- VERSION = '0.0.11.pre'
2
+ VERSION = '0.1.0'
3
3
  end
@@ -45,7 +45,7 @@ describe 'integration testing' do
45
45
  end
46
46
 
47
47
  it 'works when not limited' do
48
- response = TrustedSandbox.with_options(memory_limit: 100_000_000) do |s|
48
+ response = TrustedSandbox.with_options(memory_limit: 150_000_000) do |s|
49
49
  s.run_code('x = "*" * 50_000_000')
50
50
  end
51
51
  response.stderr.should be_empty
@@ -45,7 +45,7 @@ describe TrustedSandbox::UidPool do
45
45
  describe '#lock' do
46
46
  context 'There are still available IDs' do
47
47
  it 'gives the UIDs' do
48
- [@subject.lock, @subject.lock, @subject.lock].should == [1, 2, 3]
48
+ [@subject.lock, @subject.lock, @subject.lock].sort.should == [1, 2, 3]
49
49
  end
50
50
  end
51
51
 
@@ -68,21 +68,21 @@ describe TrustedSandbox::UidPool do
68
68
  it 'sets the right available and used' do
69
69
  @subject.available.should == 2
70
70
  @subject.used.should == 1
71
- @subject.available_uids.should == [2,3]
71
+ @subject.available_uids.sort.should == [2,3]
72
72
  @subject.used_uids.should == [1]
73
73
  end
74
74
  it 'releases the right uid' do
75
75
  @subject.release @uid
76
76
  @subject.available.should == 3
77
77
  @subject.used.should == 0
78
- @subject.available_uids.should == [1,2,3]
78
+ @subject.available_uids.sort.should == [1,2,3]
79
79
  @subject.used_uids.should == []
80
80
  end
81
81
  it 'does not release the wrong uid' do
82
82
  @subject.release @uid + 1
83
83
  @subject.available.should == 2
84
84
  @subject.used.should == 1
85
- @subject.available_uids.should == [2,3]
85
+ @subject.available_uids.sort.should == [2,3]
86
86
  @subject.used_uids.should == [1]
87
87
  end
88
88
  end
@@ -96,13 +96,13 @@ describe TrustedSandbox::UidPool do
96
96
  @subject.available.should == 0
97
97
  @subject.used.should == 3
98
98
  @subject.available_uids.should == []
99
- @subject.used_uids.should == [1,2,3]
99
+ @subject.used_uids.sort.should == [1,2,3]
100
100
  end
101
101
  it 'works' do
102
102
  @subject.release_all
103
103
  @subject.available.should == 3
104
104
  @subject.used.should == 0
105
- @subject.available_uids.should == [1,2,3]
105
+ @subject.available_uids.sort.should == [1,2,3]
106
106
  @subject.used_uids.should == []
107
107
  end
108
108
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusted-sandbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11.pre
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amit Aharoni
@@ -155,9 +155,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - ">"
158
+ - - ">="
159
159
  - !ruby/object:Gem::Version
160
- version: 1.3.1
160
+ version: '0'
161
161
  requirements: []
162
162
  rubyforge_project:
163
163
  rubygems_version: 2.2.2