key_control 0.0.6 → 0.0.7

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: ff77033d493fe7d5c4d3efce964e1a01500cc24e
4
- data.tar.gz: c6d31ad1d873ac69378ffb75c5033373904e5286
3
+ metadata.gz: b087651548cd85bf0f8771392e68b298ee8aaa56
4
+ data.tar.gz: 74b5ae765bfd409d6d6d728d470a9d6a26425fc7
5
5
  SHA512:
6
- metadata.gz: 9b4d8dcd0de20f4ab26b6b333cd88ed8ba3fb0f6e7a00377fc58a8946d3fde3336af9578eac512fa9f32e03ce01b1c08b9ccd4b722890843f8d778f2ade51188
7
- data.tar.gz: 5bd6485baefafc81a7f2224df367afb1c3247ed71fa5783f3fb5f485634bf742648b5db3adb0bd253dfe90621d09a3ae6572cd3026c1aa52a24f17af9943ed4f
6
+ metadata.gz: 406288bca0c3a9916cc75e81693485866cf41101097b4f80754115eecd6fd972215c60fba4f71b450d905a76363286ae6272de42c4ec9e6a66c687859a48030b
7
+ data.tar.gz: b4d89c857a6778368a2ea32d316e8b978a5f3de11942a86e5235f2498102a43ecadfeb3cfbf4ec32325b768ecde881edc8cd7132cf7624d2e484574514c46405
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rake/testtask"
3
3
 
4
+ DEFAULT_TEST_VM = "kernel-3.10-ruby-2.2"
5
+
4
6
  Rake::TestTask.new do |t|
5
7
  t.libs << "test"
6
8
  t.test_files = FileList['test/**/*_test.rb']
@@ -10,7 +12,7 @@ end
10
12
  desc "Bring up Vagrant VM for testing"
11
13
  task "vagrant:up" do
12
14
  # `unset` call due to https://github.com/mitchellh/vagrant/issues/3193
13
- system("unset RUBYLIB RUBYOPT; vagrant up")
15
+ system("unset RUBYLIB RUBYOPT; vagrant up #{DEFAULT_TEST_VM}")
14
16
  end
15
17
 
16
18
 
@@ -20,6 +22,6 @@ task :default do
20
22
  else
21
23
  Rake::Task['vagrant:up'].invoke
22
24
  # `unset` call due to https://github.com/mitchellh/vagrant/issues/3193
23
- system("unset RUBYLIB RUBYOPT; vagrant ssh -c 'cd /vagrant && bundle && rake test'")
25
+ system("unset RUBYLIB RUBYOPT; vagrant ssh #{DEFAULT_TEST_VM} -c 'cd /vagrant && bundle && rake test'")
24
26
  end
25
27
  end
data/Vagrantfile CHANGED
@@ -3,25 +3,51 @@
3
3
 
4
4
  # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5
5
  VAGRANTFILE_API_VERSION = "2"
6
- DEFAULT_RUBY = "2.0.0-p451"
7
6
 
8
7
  Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
9
- config.vm.box = "chef/centos-6.5"
10
- config.vm.box_url = "https://vagrantcloud.com/chef/centos-6.5/version/1/provider/virtualbox.box"
11
-
12
- config.vm.provision "shell", inline: <<-PROVISIONER
13
- yum update -y
14
- wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
15
- wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
16
- rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
17
- yum install git libffi-devel openssl-devel readline-devel -y
18
- yum groupinstall "Development Tools" -y
19
- sudo -u vagrant git clone https://github.com/sstephenson/rbenv.git ~vagrant/.rbenv
20
- sudo -u vagrant echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~vagrant/.bash_profile
21
- sudo -u vagrant echo 'eval "$(rbenv init -)"' >> ~vagrant/.bash_profile
22
- sudo -u vagrant git clone https://github.com/sstephenson/ruby-build.git ~vagrant/.rbenv/plugins/ruby-build
23
- sudo -u vagrant -i rbenv install #{DEFAULT_RUBY}
24
- sudo -u vagrant -i rbenv global #{DEFAULT_RUBY}
25
- sudo -u vagrant -i gem install bundler
26
- PROVISIONER
8
+ rbenv_setup = lambda do |ruby_version|
9
+ <<-RBENV
10
+ sudo -u vagrant git clone https://github.com/sstephenson/rbenv.git ~vagrant/.rbenv
11
+ sudo -u vagrant echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~vagrant/.bash_profile
12
+ sudo -u vagrant echo 'eval "$(rbenv init -)"' >> ~vagrant/.bash_profile
13
+ sudo -u vagrant git clone https://github.com/sstephenson/ruby-build.git ~vagrant/.rbenv/plugins/ruby-build
14
+ sudo -u vagrant -i rbenv install #{ruby_version}
15
+ sudo -u vagrant -i rbenv global #{ruby_version}
16
+ sudo -u vagrant -i gem install bundler
17
+ RBENV
18
+ end
19
+
20
+ config.vm.define "kernel-2.6-ruby-2.0" do |conf|
21
+ ruby_version = "2.0.0-p451"
22
+
23
+ conf.vm.box = "nrel/CentOS-6.5-x86_64"
24
+ conf.vm.box_url = "https://vagrantcloud.com/nrel/boxes/CentOS-6.5-x86_64/versions/1.2.0/providers/virtualbox.box"
25
+
26
+ conf.vm.provision "shell", inline: <<-PROVISIONER
27
+ yum update -y
28
+ wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
29
+ wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
30
+ rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
31
+ yum install git libffi-devel openssl-devel readline-devel -y
32
+ yum groupinstall "Development Tools" -y
33
+ #{rbenv_setup[ruby_version]}
34
+ PROVISIONER
35
+ end
36
+
37
+ config.vm.define "kernel-3.10-ruby-2.2" do |conf|
38
+ ruby_version = "2.2.0"
39
+
40
+ conf.vm.box = "chef/centos-7.0"
41
+ conf.vm.box_url = "https://atlas.hashicorp.com/chef/boxes/centos-7.0/versions/1.0.0/providers/virtualbox.box"
42
+
43
+ conf.vm.provision "shell", inline: <<-PROVISIONER
44
+ yum update -y
45
+ wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
46
+ wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
47
+ rpm -Uvh remi-release-7*.rpm epel-release-7*.rpm
48
+ yum groupinstall "Development Tools" -y
49
+ yum install git libffi-devel openssl-devel readline-devel -y
50
+ #{rbenv_setup[ruby_version]}
51
+ PROVISIONER
52
+ end
27
53
  end
@@ -1,3 +1,3 @@
1
1
  module KeyControl
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -2,7 +2,7 @@ require "test_helper"
2
2
 
3
3
  describe KeyControl::KeyRing do
4
4
  let(:secret) { "the secret time forgot" }
5
- let(:key) { "my-key" }
5
+ let(:key) { "my-key-#{rand}" }
6
6
 
7
7
  before do
8
8
  ring[key].must_equal nil
@@ -79,14 +79,12 @@ describe KeyControl::KeyRing do
79
79
  it "allows read/write of values in the same thread/process" do
80
80
  ring[key] = secret
81
81
  ring[key].must_equal secret
82
- ring.delete key
83
82
  end
84
83
 
85
84
  it "allows read/write of values across threads in the same process" do
86
85
  Thread.new { ring[key] = secret }.join
87
86
 
88
87
  ring[key].must_equal secret
89
- ring.delete key
90
88
  end
91
89
 
92
90
  it "allows read/write of values across processes in the same session" do
@@ -94,7 +92,6 @@ describe KeyControl::KeyRing do
94
92
  Process.waitpid(pid)
95
93
 
96
94
  ring[key].must_equal secret
97
- ring.delete key
98
95
  end
99
96
  end
100
97
  end
data/test/test_helper.rb CHANGED
@@ -1,4 +1,3 @@
1
- require "minitest/unit"
2
1
  require "minitest/autorun"
3
2
  require "minitest/mock"
4
3
  require "key_control"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: key_control
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Horner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-16 00:00:00.000000000 Z
11
+ date: 2015-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  version: '0'
82
82
  requirements: []
83
83
  rubyforge_project:
84
- rubygems_version: 2.2.2
84
+ rubygems_version: 2.4.5
85
85
  signing_key:
86
86
  specification_version: 4
87
87
  summary: A simple wrapper for the `keyctl` utility.