test-mysqld 0.0.1 → 0.0.2
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 +7 -0
- data/.gitignore +14 -0
- data/Gemfile +6 -0
- data/Rakefile +3 -43
- data/lib/test/mysqld.rb +8 -2
- data/spec/spec_helper.rb +5 -6
- data/spec/test-mysqld_spec.rb +6 -24
- data/test-mysqld.gemspec +15 -49
- metadata +52 -63
- data/.document +0 -5
- data/VERSION +0 -1
- data/spec/spec.opts +0 -1
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4d33030f5b01a98bc63a601f7c09afd27ec87c77
|
4
|
+
data.tar.gz: c54b9bcdbaf05bf2b8c41ff9ad4e5fd8f580d7d5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b6884fd0fe890cbaa9f70f37f2641f00597513dca2fd2ce88f2965d4442dfe44dd6162ff7a4b7cb41ffc74011e68ea5ba957abe4f4e2c584c6126c63e6d693ed
|
7
|
+
data.tar.gz: 8c56aec6bf68f8dcfdab243f84da0abe6c276b7e5029be0b39983fd6256cad710ff43949d616c130c70ab5b760286304800adc61c2a651dc15ef8034bfbb9d5f
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Rakefile
CHANGED
@@ -1,45 +1,5 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'jeweler'
|
6
|
-
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name = "test-mysqld"
|
8
|
-
gem.summary = %Q{port of Test::mysqld}
|
9
|
-
gem.description = %Q{port of Test::mysqld (mysqld runner for tests)}
|
10
|
-
gem.email = "miyucy@gmail.com"
|
11
|
-
gem.homepage = "http://github.com/miyucy/test-mysqld"
|
12
|
-
gem.authors = ["miyucy"]
|
13
|
-
gem.add_development_dependency "rspec", ">= 1.2.9"
|
14
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
15
|
-
end
|
16
|
-
Jeweler::GemcutterTasks.new
|
17
|
-
rescue LoadError
|
18
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
19
|
-
end
|
20
|
-
|
21
|
-
require 'spec/rake/spectask'
|
22
|
-
Spec::Rake::SpecTask.new(:spec) do |spec|
|
23
|
-
spec.libs << 'lib' << 'spec'
|
24
|
-
spec.spec_files = FileList['spec/**/*_spec.rb']
|
25
|
-
end
|
26
|
-
|
27
|
-
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
28
|
-
spec.libs << 'lib' << 'spec'
|
29
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
30
|
-
spec.rcov = true
|
31
|
-
end
|
32
|
-
|
33
|
-
task :spec => :check_dependencies
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
34
3
|
|
4
|
+
RSpec::Core::RakeTask.new
|
35
5
|
task :default => :spec
|
36
|
-
|
37
|
-
require 'rake/rdoctask'
|
38
|
-
Rake::RDocTask.new do |rdoc|
|
39
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
40
|
-
|
41
|
-
rdoc.rdoc_dir = 'rdoc'
|
42
|
-
rdoc.title = "test-mysqld #{version}"
|
43
|
-
rdoc.rdoc_files.include('README*')
|
44
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
45
|
-
end
|
data/lib/test/mysqld.rb
CHANGED
@@ -125,12 +125,18 @@ module Test
|
|
125
125
|
|
126
126
|
def find_mysqld
|
127
127
|
suppress_logging
|
128
|
-
find_executable 'mysqld'
|
128
|
+
exec_file_path = find_executable 'mysqld'
|
129
|
+
|
130
|
+
return exec_file_path unless File.symlink?(exec_file_path)
|
131
|
+
File.expand_path(File.readlink(exec_file_path), File.dirname(exec_file_path))
|
129
132
|
end
|
130
133
|
|
131
134
|
def find_mysql_install_db
|
132
135
|
suppress_logging
|
133
|
-
find_executable 'mysql_install_db'
|
136
|
+
exec_file_path = find_executable 'mysql_install_db'
|
137
|
+
|
138
|
+
return exec_file_path unless File.symlink?(exec_file_path)
|
139
|
+
File.expand_path(File.readlink(exec_file_path), File.dirname(exec_file_path))
|
134
140
|
end
|
135
141
|
|
136
142
|
def default_base_dir
|
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
require 'bundler/setup'
|
4
|
+
Bundler.require
|
3
5
|
require 'test/mysqld'
|
4
|
-
require 'spec'
|
5
|
-
require 'spec/autorun'
|
6
|
-
|
7
|
-
Spec::Runner.configure do |config|
|
8
6
|
|
7
|
+
RSpec.configure do |config|
|
9
8
|
end
|
data/spec/test-mysqld_spec.rb
CHANGED
@@ -1,29 +1,11 @@
|
|
1
|
-
require
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Test::Mysqld do
|
4
|
-
describe
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
before { Test::Mysqld.auto_start = true }
|
10
|
-
its(:auto_start) { should be_true }
|
11
|
-
end
|
12
|
-
|
13
|
-
describe "should be true or false" do
|
14
|
-
it "set Integer" do
|
15
|
-
Test::Mysqld.auto_start = 1
|
16
|
-
Test::Mysqld.auto_start.should be_true
|
17
|
-
end
|
18
|
-
|
19
|
-
it "set String" do
|
20
|
-
Test::Mysqld.auto_start = "false"
|
21
|
-
Test::Mysqld.auto_start.should be_true
|
22
|
-
end
|
23
|
-
|
24
|
-
it "set nil" do
|
25
|
-
Test::Mysqld.auto_start = nil
|
26
|
-
Test::Mysqld.auto_start.should be_false
|
4
|
+
describe '.auto_start=' do
|
5
|
+
it 'works' do
|
6
|
+
[[true, true], [false, false], [nil, false], [1, true], ['false', true], [Object.new, true]].each do |rvar, expect|
|
7
|
+
Test::Mysqld.auto_start = rvar
|
8
|
+
expect(Test::Mysqld.auto_start).to eq expect
|
27
9
|
end
|
28
10
|
end
|
29
11
|
end
|
data/test-mysqld.gemspec
CHANGED
@@ -1,52 +1,18 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
# coding: utf-8
|
2
|
+
Gem::Specification.new do |spec|
|
3
|
+
spec.name = "test-mysqld"
|
4
|
+
spec.version = "0.0.2"
|
5
|
+
spec.authors = ["miyucy"]
|
6
|
+
spec.email = ["fistfvck@gmail.com"]
|
7
|
+
spec.summary = %q{port of Test::mysqld (mysqld runner for tests)}
|
8
|
+
spec.description = %q{port of Test::mysqld (mysqld runner for tests)}
|
9
|
+
spec.homepage = "http://github.com/miyucy/test-mysqld"
|
5
10
|
|
6
|
-
|
7
|
-
|
8
|
-
|
11
|
+
spec.files = `git ls-files -z`.split("\x0")
|
12
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
13
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
14
|
+
spec.require_paths = ["lib"]
|
9
15
|
|
10
|
-
|
11
|
-
|
12
|
-
s.date = %q{2011-05-19}
|
13
|
-
s.description = %q{port of Test::mysqld (mysqld runner for tests)}
|
14
|
-
s.email = %q{miyucy@gmail.com}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
"LICENSE",
|
22
|
-
"README.rdoc",
|
23
|
-
"Rakefile",
|
24
|
-
"VERSION",
|
25
|
-
"lib/test/mysqld.rb",
|
26
|
-
"spec/spec.opts",
|
27
|
-
"spec/spec_helper.rb",
|
28
|
-
"spec/test-mysqld_spec.rb",
|
29
|
-
"test-mysqld.gemspec"
|
30
|
-
]
|
31
|
-
s.homepage = %q{http://github.com/miyucy/test-mysqld}
|
32
|
-
s.require_paths = ["lib"]
|
33
|
-
s.rubygems_version = %q{1.6.2}
|
34
|
-
s.summary = %q{port of Test::mysqld}
|
35
|
-
s.test_files = [
|
36
|
-
"spec/spec_helper.rb",
|
37
|
-
"spec/test-mysqld_spec.rb"
|
38
|
-
]
|
39
|
-
|
40
|
-
if s.respond_to? :specification_version then
|
41
|
-
s.specification_version = 3
|
42
|
-
|
43
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
44
|
-
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
45
|
-
else
|
46
|
-
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
47
|
-
end
|
48
|
-
else
|
49
|
-
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
50
|
-
end
|
16
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
17
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
51
18
|
end
|
52
|
-
|
metadata
CHANGED
@@ -1,93 +1,82 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: test-mysqld
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 1
|
10
|
-
version: 0.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- miyucy
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
11
|
+
date: 2014-09-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
23
21
|
prerelease: false
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
35
34
|
type: :development
|
36
|
-
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
37
41
|
description: port of Test::mysqld (mysqld runner for tests)
|
38
|
-
email:
|
42
|
+
email:
|
43
|
+
- fistfvck@gmail.com
|
39
44
|
executables: []
|
40
|
-
|
41
45
|
extensions: []
|
42
|
-
|
43
|
-
|
44
|
-
-
|
45
|
-
-
|
46
|
-
files:
|
47
|
-
- .document
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- Gemfile
|
48
50
|
- LICENSE
|
49
51
|
- README.rdoc
|
50
52
|
- Rakefile
|
51
|
-
- VERSION
|
52
53
|
- lib/test/mysqld.rb
|
53
|
-
- spec/spec.opts
|
54
54
|
- spec/spec_helper.rb
|
55
55
|
- spec/test-mysqld_spec.rb
|
56
56
|
- test-mysqld.gemspec
|
57
|
-
has_rdoc: true
|
58
57
|
homepage: http://github.com/miyucy/test-mysqld
|
59
58
|
licenses: []
|
60
|
-
|
59
|
+
metadata: {}
|
61
60
|
post_install_message:
|
62
61
|
rdoc_options: []
|
63
|
-
|
64
|
-
require_paths:
|
62
|
+
require_paths:
|
65
63
|
- lib
|
66
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
-
|
68
|
-
requirements:
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
69
66
|
- - ">="
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
version: "0"
|
75
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
-
none: false
|
77
|
-
requirements:
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
78
71
|
- - ">="
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
|
81
|
-
segments:
|
82
|
-
- 0
|
83
|
-
version: "0"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
84
74
|
requirements: []
|
85
|
-
|
86
75
|
rubyforge_project:
|
87
|
-
rubygems_version:
|
76
|
+
rubygems_version: 2.4.1
|
88
77
|
signing_key:
|
89
|
-
specification_version:
|
90
|
-
summary: port of Test::mysqld
|
91
|
-
test_files:
|
78
|
+
specification_version: 4
|
79
|
+
summary: port of Test::mysqld (mysqld runner for tests)
|
80
|
+
test_files:
|
92
81
|
- spec/spec_helper.rb
|
93
82
|
- spec/test-mysqld_spec.rb
|
data/.document
DELETED
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.0.1
|
data/spec/spec.opts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--color
|