quartz 0.2.6 → 0.2.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: e8f6c9a4a2b1be439b263d6e8edcf851a7dff9bc
4
- data.tar.gz: 6c289fdd3023c9c331352779eef346c2c7259371
3
+ metadata.gz: e8f044409d8ae2d9fb2aef66b50d106285d0e058
4
+ data.tar.gz: 3f6256f19397ebe630d6a1b1f78f955bc636ae33
5
5
  SHA512:
6
- metadata.gz: 7ab102e4110877642bb02c149548f2e8746e258797ab85f2637d9ebc439fb8f634a451e686607d3dc7633ae20d6344045ae3c6669d1048cd4a71204df363043e
7
- data.tar.gz: f923a2061e727caecb1e8a3bd12b17e5003cc6c7404c1ff4a552d773795a45bfa9eda42b6704dff052a441315d3fa33ae79d4f086d4ec710ce2ac1616d8db6bb
6
+ metadata.gz: 5d506532df70d7aaff7b6e1515213a20f1ebc5ed1afbcf729252c2950e37f5398b8c6427747c23c786d9130ebeedb687c62daf4cf4d3a3d522aaa8d4d5518250
7
+ data.tar.gz: e21509ba1e212b0795e6eedabde4ee1e21e3f5b0ef6bb70a4582aa54d30386b97e5730074d13f94d6931589ce12cf5e293d923d45e9f2084dc84a102dc322844
@@ -1,3 +1,8 @@
1
+ # 0.2.7
2
+ - [#28] Handle lack of Go processes gracefully at exit
3
+ - [#28] Don't validate GOPATH
4
+ - [#28] Validate Go executable only when compilation is needed
5
+
1
6
  # 0.2.6
2
7
  - [#13] Meaningful exception types
3
8
  - [#20] Speed up Go Quartz process boot time
@@ -1,25 +1,25 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- addressable (2.3.6)
4
+ addressable (2.3.7)
5
5
  builder (3.2.2)
6
6
  descendants_tracker (0.0.4)
7
7
  thread_safe (~> 0.3, >= 0.3.1)
8
8
  diff-lcs (1.2.5)
9
9
  docile (1.1.5)
10
- faraday (0.9.0)
10
+ faraday (0.9.1)
11
11
  multipart-post (>= 1.2, < 3)
12
- git (1.2.7)
13
- github_api (0.11.3)
12
+ git (1.2.9.1)
13
+ github_api (0.12.3)
14
14
  addressable (~> 2.3)
15
- descendants_tracker (~> 0.0.1)
15
+ descendants_tracker (~> 0.0.4)
16
16
  faraday (~> 0.8, < 0.10)
17
- hashie (>= 1.2)
17
+ hashie (>= 3.3)
18
18
  multi_json (>= 1.7.5, < 2.0)
19
- nokogiri (~> 1.6.0)
19
+ nokogiri (~> 1.6.3)
20
20
  oauth2
21
- hashie (3.0.0)
22
- highline (1.6.21)
21
+ hashie (3.4.0)
22
+ highline (1.7.1)
23
23
  jeweler (2.0.1)
24
24
  builder
25
25
  bundler (>= 1.0)
@@ -29,42 +29,43 @@ GEM
29
29
  nokogiri (>= 1.5.10)
30
30
  rake
31
31
  rdoc
32
- json (1.8.1)
33
- jwt (1.0.0)
34
- mini_portile (0.6.0)
32
+ json (1.8.2)
33
+ jwt (1.3.0)
34
+ mini_portile (0.6.2)
35
35
  multi_json (1.10.1)
36
36
  multi_xml (0.5.5)
37
37
  multipart-post (2.0.0)
38
- nokogiri (1.6.2.1)
39
- mini_portile (= 0.6.0)
40
- oauth2 (0.9.4)
38
+ nokogiri (1.6.6.2)
39
+ mini_portile (~> 0.6.0)
40
+ oauth2 (1.0.0)
41
41
  faraday (>= 0.8, < 0.10)
42
42
  jwt (~> 1.0)
43
43
  multi_json (~> 1.3)
44
44
  multi_xml (~> 0.5)
45
45
  rack (~> 1.2)
46
- rack (1.5.2)
47
- rake (10.3.2)
48
- rdoc (3.12.2)
46
+ rack (1.6.0)
47
+ rake (10.4.2)
48
+ rdoc (4.2.0)
49
49
  json (~> 1.4)
50
- rspec (3.1.0)
51
- rspec-core (~> 3.1.0)
52
- rspec-expectations (~> 3.1.0)
53
- rspec-mocks (~> 3.1.0)
54
- rspec-core (3.1.7)
55
- rspec-support (~> 3.1.0)
56
- rspec-expectations (3.1.2)
50
+ rspec (3.2.0)
51
+ rspec-core (~> 3.2.0)
52
+ rspec-expectations (~> 3.2.0)
53
+ rspec-mocks (~> 3.2.0)
54
+ rspec-core (3.2.1)
55
+ rspec-support (~> 3.2.0)
56
+ rspec-expectations (3.2.0)
57
57
  diff-lcs (>= 1.2.0, < 2.0)
58
- rspec-support (~> 3.1.0)
59
- rspec-mocks (3.1.3)
60
- rspec-support (~> 3.1.0)
61
- rspec-support (3.1.2)
62
- ruby-prof (0.15.3)
63
- simplecov (0.9.1)
58
+ rspec-support (~> 3.2.0)
59
+ rspec-mocks (3.2.1)
60
+ diff-lcs (>= 1.2.0, < 2.0)
61
+ rspec-support (~> 3.2.0)
62
+ rspec-support (3.2.2)
63
+ ruby-prof (0.15.6)
64
+ simplecov (0.9.2)
64
65
  docile (~> 1.1.0)
65
66
  multi_json (~> 1.0)
66
- simplecov-html (~> 0.8.0)
67
- simplecov-html (0.8.0)
67
+ simplecov-html (~> 0.9.0)
68
+ simplecov-html (0.9.0)
68
69
  thread_safe (0.3.4)
69
70
 
70
71
  PLATFORMS
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.6
1
+ 0.2.7
@@ -2,14 +2,10 @@ require 'json'
2
2
  require 'securerandom'
3
3
  require 'socket'
4
4
 
5
- module Quartz
6
- end
5
+ module Quartz; end
7
6
 
8
7
  require 'quartz/exceptions'
9
8
  require 'quartz/go_process'
10
9
  require 'quartz/go_struct'
11
10
  require 'quartz/client'
12
11
  require 'quartz/validations'
13
-
14
- Quartz::Validations.check_for_go
15
- Quartz::Validations.check_go_quartz_version
@@ -12,6 +12,7 @@ class Quartz::GoProcess
12
12
  ENV['QUARTZ_SOCKET'] = @socket_path
13
13
 
14
14
  if opts[:file_path]
15
+ Quartz::Validations.check_for_go
15
16
  compile_and_run(opts[:file_path])
16
17
  elsif opts[:bin_path]
17
18
  @go_process = IO.popen(opts[:bin_path])
@@ -67,7 +68,7 @@ class Quartz::GoProcess
67
68
  response = read
68
69
 
69
70
  if response['error']
70
- raise Quartz::GoResponseError, "Metadata error: #{read['error']}"
71
+ raise Quartz::GoResponseError, "Metadata error: #{response['error']}"
71
72
  end
72
73
 
73
74
  response['result']
@@ -118,6 +119,7 @@ class Quartz::GoProcess
118
119
  end
119
120
 
120
121
  def self.cleanup
122
+ return unless @processes
121
123
  @processes.each(&:cleanup)
122
124
  @processes = []
123
125
  end
@@ -14,7 +14,7 @@ class Quartz::GoStruct
14
14
  @struct_methods = @method_name_to_arg_info.keys
15
15
  end
16
16
 
17
- def call(method_name, args)
17
+ def call(method_name, args = {})
18
18
  unless @struct_methods.include?(method_name)
19
19
  raise Quartz::ArgumentError, "Invalid method: #{method_name}"
20
20
  end
@@ -1,7 +1,5 @@
1
1
  module Quartz::Validations
2
2
 
3
- GO_FILE_LOCATION = 'src/github.com/DavidHuie/quartz/go/quartz/quartz.go'
4
-
5
3
  def self.check_for_go
6
4
  go_exists = ENV['PATH'].split(File::PATH_SEPARATOR).any? do |directory|
7
5
  File.exist?(File.join(directory, 'go'))
@@ -10,27 +8,4 @@ module Quartz::Validations
10
8
  raise Quartz::ConfigError, 'Go not installed.' unless go_exists
11
9
  end
12
10
 
13
- def self.check_go_quartz_version
14
- current_quartz = File.read(File.join(File.dirname(__FILE__), '../../go/quartz/quartz.go'))
15
-
16
- installed_quartz_dir = ENV['GOPATH'].split(File::PATH_SEPARATOR).select do |directory|
17
- File.exist?(File.join(directory, Quartz::Validations::GO_FILE_LOCATION))
18
- end[0]
19
-
20
- unless installed_quartz_dir
21
- raise Quartz::ConfigError, "GOPATH not configured."
22
- end
23
-
24
- installed_quartz = File.read(File.join(installed_quartz_dir,
25
- Quartz::Validations::GO_FILE_LOCATION))
26
-
27
- if current_quartz != installed_quartz
28
- STDERR.write <<-EOS
29
- Warning: the version of Quartz in $GOPATH does not match
30
- the version packaged with the gem. Please update the Go
31
- Quartz package.
32
- EOS
33
- end
34
- end
35
-
36
11
  end
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: quartz 0.2.6 ruby lib
5
+ # stub: quartz 0.2.7 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "quartz"
9
- s.version = "0.2.6"
9
+ s.version = "0.2.7"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["David Huie"]
14
- s.date = "2015-02-28"
14
+ s.date = "2015-03-01"
15
15
  s.description = "A gem for calling Go code from Ruby"
16
16
  s.email = "dahuie@gmail.com"
17
17
  s.extra_rdoc_files = [
@@ -54,7 +54,7 @@ Gem::Specification.new do |s|
54
54
  ]
55
55
  s.homepage = "http://github.com/DavidHuie/quartz"
56
56
  s.licenses = ["MIT"]
57
- s.rubygems_version = "2.4.3"
57
+ s.rubygems_version = "2.2.2"
58
58
  s.summary = "A gem for calling Go code from Ruby"
59
59
 
60
60
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quartz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Huie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-28 00:00:00.000000000 Z
11
+ date: 2015-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jeweler
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.4.3
129
+ rubygems_version: 2.2.2
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: A gem for calling Go code from Ruby