mockley_crew 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mockley_crew/version.rb +1 -1
  3. data/vendor/gems/sqlite3/cache/sqlite3-1.3.13.gem +0 -0
  4. data/vendor/gems/sqlite3/extensions/x86_64-linux/2.5.0/sqlite3-1.3.13/gem.build_complete +0 -0
  5. data/vendor/gems/sqlite3/extensions/x86_64-linux/2.5.0/sqlite3-1.3.13/gem_make.out +33 -0
  6. data/vendor/gems/sqlite3/extensions/x86_64-linux/2.5.0/sqlite3-1.3.13/mkmf.log +592 -0
  7. data/vendor/gems/sqlite3/extensions/x86_64-linux/2.5.0/sqlite3-1.3.13/sqlite3/sqlite3_native.so +0 -0
  8. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/API_CHANGES.rdoc +50 -0
  9. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/CHANGELOG.rdoc +292 -0
  10. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ChangeLog.cvs +88 -0
  11. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/Gemfile +15 -0
  12. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/LICENSE +27 -0
  13. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/Manifest.txt +52 -0
  14. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/README.rdoc +118 -0
  15. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/Rakefile +10 -0
  16. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/Makefile +263 -0
  17. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/backup.c +168 -0
  18. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/backup.h +15 -0
  19. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/backup.o +0 -0
  20. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/database.c +888 -0
  21. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/database.h +15 -0
  22. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/database.o +0 -0
  23. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/exception.c +94 -0
  24. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/exception.h +8 -0
  25. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/exception.o +0 -0
  26. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/extconf.rb +71 -0
  27. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/sqlite3.c +152 -0
  28. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/sqlite3.o +0 -0
  29. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/sqlite3_native.so +0 -0
  30. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/sqlite3_ruby.h +52 -0
  31. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/statement.c +447 -0
  32. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/statement.h +16 -0
  33. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/ext/sqlite3/statement.o +0 -0
  34. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/faq/faq.rb +145 -0
  35. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/faq/faq.yml +426 -0
  36. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/lib/sqlite3/constants.rb +49 -0
  37. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/lib/sqlite3/database.rb +591 -0
  38. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/lib/sqlite3/errors.rb +44 -0
  39. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/lib/sqlite3/pragmas.rb +588 -0
  40. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/lib/sqlite3/resultset.rb +195 -0
  41. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/lib/sqlite3/sqlite3_native.so +0 -0
  42. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/lib/sqlite3/statement.rb +144 -0
  43. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/lib/sqlite3/translator.rb +118 -0
  44. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/lib/sqlite3/value.rb +57 -0
  45. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/lib/sqlite3/version.rb +25 -0
  46. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/lib/sqlite3.rb +15 -0
  47. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/setup.rb +1333 -0
  48. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/tasks/faq.rake +9 -0
  49. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/tasks/gem.rake +38 -0
  50. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/tasks/native.rake +52 -0
  51. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/tasks/vendor_sqlite3.rake +97 -0
  52. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/helper.rb +18 -0
  53. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_backup.rb +33 -0
  54. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_collation.rb +82 -0
  55. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_database.rb +430 -0
  56. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_database_readonly.rb +36 -0
  57. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_deprecated.rb +44 -0
  58. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_encoding.rb +155 -0
  59. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_integration.rb +576 -0
  60. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_integration_open_close.rb +30 -0
  61. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_integration_pending.rb +115 -0
  62. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_integration_resultset.rb +159 -0
  63. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_integration_statement.rb +194 -0
  64. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_result_set.rb +37 -0
  65. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_sqlite3.rb +21 -0
  66. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_statement.rb +260 -0
  67. data/vendor/gems/sqlite3/gems/sqlite3-1.3.13/test/test_statement_execute.rb +35 -0
  68. data/vendor/gems/sqlite3/specifications/sqlite3-1.3.13.gemspec +56 -0
  69. metadata +67 -1
@@ -0,0 +1,9 @@
1
+ # Generate FAQ
2
+ desc "Generate the FAQ document"
3
+ task :faq => ['faq/faq.html']
4
+
5
+ file 'faq/faq.html' => ['faq/faq.rb', 'faq/faq.yml'] do
6
+ cd 'faq' do
7
+ ruby "faq.rb > faq.html"
8
+ end
9
+ end
@@ -0,0 +1,38 @@
1
+ begin
2
+ require 'hoe'
3
+ rescue LoadError
4
+ # try with rubygems?
5
+ require 'rubygems'
6
+ require 'hoe'
7
+ end
8
+
9
+ Hoe.plugin :debugging, :doofus, :git, :minitest, :bundler
10
+
11
+ HOE = Hoe.spec 'sqlite3' do
12
+ developer 'Jamis Buck', 'jamis@37signals.com'
13
+ developer 'Luis Lavena', 'luislavena@gmail.com'
14
+ developer 'Aaron Patterson', 'aaron@tenderlovemaking.com'
15
+
16
+ license "BSD-3"
17
+
18
+ self.readme_file = 'README.rdoc'
19
+ self.history_file = 'CHANGELOG.rdoc'
20
+ self.extra_rdoc_files = FileList['*.rdoc', 'ext/**/*.c']
21
+
22
+ require_ruby_version ">= 1.8.7"
23
+ require_rubygems_version ">= 1.3.5"
24
+
25
+ spec_extras[:extensions] = ["ext/sqlite3/extconf.rb"]
26
+
27
+ extra_dev_deps << ['rake-compiler', "~> 0.9.3"]
28
+ extra_dev_deps << ['rake-compiler-dock', "~> 0.5.2"]
29
+ extra_dev_deps << ["mini_portile", "~> 0.6.2"]
30
+ extra_dev_deps << ["minitest", "~> 5.0"]
31
+ extra_dev_deps << ["hoe-bundler", "~> 1.0"]
32
+
33
+ clean_globs.push('**/test.db')
34
+ end
35
+
36
+ Hoe.add_include_dirs '.'
37
+
38
+ # vim: syntax=ruby
@@ -0,0 +1,52 @@
1
+ # use rake-compiler for building the extension
2
+ require 'rake/extensiontask'
3
+ require 'rake/extensioncompiler'
4
+
5
+ # NOTE: version used by cross compilation of Windows native extension
6
+ # It do not affect compilation under other operating systems
7
+ # The version indicated is the minimum DLL suggested for correct functionality
8
+ BINARY_VERSION = "3.8.11.1"
9
+ URL_VERSION = "3081101"
10
+ URL_PATH = "/2015"
11
+
12
+ task :devkit do
13
+ begin
14
+ require "devkit"
15
+ rescue LoadError => e
16
+ abort "Failed to activate RubyInstaller's DevKit required for compilation."
17
+ end
18
+ end
19
+
20
+ # build sqlite3_native C extension
21
+ RUBY_EXTENSION = Rake::ExtensionTask.new('sqlite3_native', HOE.spec) do |ext|
22
+ # where to locate the extension
23
+ ext.ext_dir = 'ext/sqlite3'
24
+
25
+ # where native extension will be copied (matches makefile)
26
+ ext.lib_dir = "lib/sqlite3"
27
+
28
+ # clean binary folders always
29
+ CLEAN.include("#{ext.lib_dir}/?.?")
30
+
31
+ # automatically add build options to avoid need of manual input
32
+ if RUBY_PLATFORM =~ /mswin|mingw/ then
33
+ # define target for extension (supporting fat binaries)
34
+ RUBY_VERSION =~ /(\d+\.\d+)/
35
+ ext.lib_dir = "lib/sqlite3/#{$1}"
36
+ else
37
+
38
+ # detect cross-compiler available
39
+ begin
40
+ Rake::ExtensionCompiler.mingw_host
41
+ ext.cross_compile = true
42
+ ext.cross_platform = ['i386-mswin32-60', 'i386-mingw32', 'x64-mingw32']
43
+ rescue RuntimeError
44
+ # noop
45
+ end
46
+ end
47
+ end
48
+
49
+ # ensure things are compiled prior testing
50
+ task :test => [:compile]
51
+
52
+ # vim: syntax=ruby
@@ -0,0 +1,97 @@
1
+ require "rake/clean"
2
+ require "rake/extensioncompiler"
3
+ require "mini_portile"
4
+
5
+ CLOBBER.include("ports")
6
+
7
+ directory "ports"
8
+
9
+ def define_sqlite_task(platform, host)
10
+ recipe = MiniPortile.new "sqlite3", BINARY_VERSION
11
+ recipe.files << "http://sqlite.org#{URL_PATH}/sqlite-autoconf-#{URL_VERSION}.tar.gz"
12
+ recipe.host = host
13
+
14
+ desc "Compile sqlite3 for #{platform} (#{host})"
15
+ task "ports:sqlite3:#{platform}" => ["ports"] do |t|
16
+ checkpoint = "ports/.#{recipe.name}-#{recipe.version}-#{recipe.host}.installed"
17
+
18
+ unless File.exist?(checkpoint)
19
+ cflags = "-O2 -DSQLITE_ENABLE_COLUMN_METADATA"
20
+ cflags << " -fPIC" if recipe.host && recipe.host.include?("x86_64")
21
+ recipe.configure_options << "CFLAGS='#{cflags}'"
22
+ recipe.cook
23
+ touch checkpoint
24
+ end
25
+ end
26
+
27
+ recipe
28
+ end
29
+
30
+ # native sqlite3 compilation
31
+ recipe = define_sqlite_task(RUBY_PLATFORM, RbConfig::CONFIG["host"])
32
+
33
+ # force compilation of sqlite3 when working natively under MinGW
34
+ if RUBY_PLATFORM =~ /mingw/
35
+ RUBY_EXTENSION.config_options << "--with-opt-dir=#{recipe.path}"
36
+
37
+ # also prepend DevKit into compilation phase
38
+ Rake::Task["compile"].prerequisites.unshift "devkit", "ports:sqlite3:#{RUBY_PLATFORM}"
39
+ Rake::Task["native"].prerequisites.unshift "devkit", "ports:sqlite3:#{RUBY_PLATFORM}"
40
+ end
41
+
42
+ # trick to test local compilation of sqlite3
43
+ if ENV["USE_MINI_PORTILE"] == "true"
44
+ # fake recipe so we can build a directory to it
45
+ recipe = MiniPortile.new "sqlite3", BINARY_VERSION
46
+ recipe.host = RbConfig::CONFIG["host"]
47
+
48
+ RUBY_EXTENSION.config_options << "--with-opt-dir=#{recipe.path}"
49
+
50
+ # compile sqlite3 first
51
+ Rake::Task["compile"].prerequisites.unshift "ports:sqlite3:#{RUBY_PLATFORM}"
52
+ end
53
+
54
+ # iterate over all cross-compilation platforms and define the proper
55
+ # sqlite3 recipe for it.
56
+ if RUBY_EXTENSION.cross_compile
57
+ config_path = File.expand_path("~/.rake-compiler/config.yml")
58
+ if File.exist?(config_path)
59
+ # obtains platforms from rake-compiler's config.yml
60
+ config_file = YAML.load_file(config_path)
61
+
62
+ Array(RUBY_EXTENSION.cross_platform).each do |platform|
63
+ # obtain platform from rbconfig file
64
+ config_key = config_file.keys.sort.find { |key|
65
+ key.start_with?("rbconfig-#{platform}-")
66
+ }
67
+ rbfile = config_file[config_key]
68
+
69
+ # skip if rbconfig cannot be read
70
+ next unless File.exist?(rbfile)
71
+
72
+ host = IO.read(rbfile).match(/CONFIG\["CC"\] = "(.*)"/)[1].sub(/\-gcc/, '')
73
+ recipe = define_sqlite_task(platform, host)
74
+
75
+ RUBY_EXTENSION.cross_config_options << {
76
+ platform => "--with-opt-dir=#{recipe.path}"
77
+ }
78
+
79
+ # pre-compile sqlite3 port when cross-compiling
80
+ task :cross => "ports:sqlite3:#{platform}"
81
+ end
82
+ else
83
+ warn "rake-compiler configuration doesn't exist, but is required for ports"
84
+ end
85
+ end
86
+
87
+ task :cross do
88
+ ["CC", "CXX", "LDFLAGS", "CPPFLAGS", "RUBYOPT"].each do |var|
89
+ ENV.delete(var)
90
+ end
91
+ end
92
+
93
+ desc "Build windows binary gems per rake-compiler-dock."
94
+ task "gem:windows" do
95
+ require "rake_compiler_dock"
96
+ RakeCompilerDock.sh "bundle && rake cross native gem MAKE='nice make -j`nproc`'"
97
+ end
@@ -0,0 +1,18 @@
1
+ require 'sqlite3'
2
+ require 'minitest/autorun'
3
+
4
+ unless RUBY_VERSION >= "1.9"
5
+ require 'iconv'
6
+ end
7
+
8
+ module SQLite3
9
+ class TestCase < Minitest::Test
10
+ alias :assert_not_equal :refute_equal
11
+ alias :assert_not_nil :refute_nil
12
+ alias :assert_raise :assert_raises
13
+
14
+ def assert_nothing_raised
15
+ yield
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,33 @@
1
+ require 'helper'
2
+
3
+ module SQLite3
4
+ class TestBackup < SQLite3::TestCase
5
+ def setup
6
+ @sdb = SQLite3::Database.new(':memory:')
7
+ @ddb = SQLite3::Database.new(':memory:')
8
+ @sdb.execute('CREATE TABLE foo (idx, val);');
9
+ @data = ('A'..'Z').map{|x|x * 40}
10
+ @data.each_with_index do |v, i|
11
+ @sdb.execute('INSERT INTO foo (idx, val) VALUES (?, ?);', [i, v])
12
+ end
13
+ end
14
+
15
+ def test_backup_step
16
+ b = SQLite3::Backup.new(@ddb, 'main', @sdb, 'main')
17
+ while b.step(1) == SQLite3::Constants::ErrorCode::OK
18
+ assert_not_equal(0, b.remaining)
19
+ end
20
+ assert_equal(0, b.remaining)
21
+ b.finish
22
+ assert_equal(@data.length, @ddb.execute('SELECT * FROM foo;').length)
23
+ end
24
+
25
+ def test_backup_all
26
+ b = SQLite3::Backup.new(@ddb, 'main', @sdb, 'main')
27
+ assert_equal(SQLite3::Constants::ErrorCode::DONE, b.step(-1))
28
+ assert_equal(0, b.remaining)
29
+ b.finish
30
+ assert_equal(@data.length, @ddb.execute('SELECT * FROM foo;').length)
31
+ end
32
+ end if defined?(SQLite3::Backup)
33
+ end
@@ -0,0 +1,82 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ require 'helper'
4
+
5
+ module SQLite3
6
+ class TestCollation < SQLite3::TestCase
7
+ class Comparator
8
+ attr_reader :calls
9
+ def initialize
10
+ @calls = []
11
+ end
12
+
13
+ def compare left, right
14
+ @calls << [left, right]
15
+ left <=> right
16
+ end
17
+ end
18
+
19
+ def setup
20
+ @db = SQLite3::Database.new(':memory:')
21
+ @create = "create table ex(id int, data string)"
22
+ @db.execute(@create);
23
+ [ [1, 'hello'], [2, 'world'] ].each do |vals|
24
+ @db.execute('insert into ex (id, data) VALUES (?, ?)', vals)
25
+ end
26
+ end
27
+
28
+ def test_custom_collation
29
+ comparator = Comparator.new
30
+
31
+ @db.collation 'foo', comparator
32
+
33
+ assert_equal comparator, @db.collations['foo']
34
+ @db.execute('select data from ex order by 1 collate foo')
35
+ assert_equal 1, comparator.calls.length
36
+ end
37
+
38
+ def test_remove_collation
39
+ comparator = Comparator.new
40
+
41
+ @db.collation 'foo', comparator
42
+ @db.collation 'foo', nil
43
+
44
+ assert_nil @db.collations['foo']
45
+ assert_raises(SQLite3::SQLException) do
46
+ @db.execute('select data from ex order by 1 collate foo')
47
+ end
48
+ end
49
+
50
+ if RUBY_VERSION >= '1.9.1'
51
+ def test_encoding
52
+ comparator = Comparator.new
53
+ @db.collation 'foo', comparator
54
+ @db.execute('select data from ex order by 1 collate foo')
55
+
56
+ a, b = *comparator.calls.first
57
+
58
+ assert_equal Encoding.find('UTF-8'), a.encoding
59
+ assert_equal Encoding.find('UTF-8'), b.encoding
60
+ end
61
+
62
+ def test_encoding_default_internal
63
+ warn_before = $-w
64
+ $-w = false
65
+ before_enc = Encoding.default_internal
66
+
67
+ Encoding.default_internal = 'EUC-JP'
68
+ comparator = Comparator.new
69
+ @db.collation 'foo', comparator
70
+ @db.execute('select data from ex order by 1 collate foo')
71
+
72
+ a, b = *comparator.calls.first
73
+
74
+ assert_equal Encoding.find('EUC-JP'), a.encoding
75
+ assert_equal Encoding.find('EUC-JP'), b.encoding
76
+ ensure
77
+ Encoding.default_internal = before_enc
78
+ $-w = warn_before
79
+ end
80
+ end
81
+ end
82
+ end