rootapp-rinruby 3.0.0 → 3.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: 3674c751b6e2bab3092c78749e1a9903eec21aaf
4
- data.tar.gz: c09d463dac52f838b3404a021840a3e0f0b013c2
3
+ metadata.gz: 81bf14b864d50cd5ad89f447f0f884cbfc072dd4
4
+ data.tar.gz: a18030b7362d6ad275d6ff38303d150604ab96b3
5
5
  SHA512:
6
- metadata.gz: 8cae525aa4896f7b1290668738d7cd1e30b3b1b774018e0d66d0ead236a937d0c6dca78d9ed12ce33497115f079b2a038f482de83cec265daacc67ee3378e180
7
- data.tar.gz: 6502bc046bdf5dae42825169cde211d36b0bdcb8fb5f264b7dd66ffe6316ad6753642b3c0e1a2c7f0e76d9da6fc5563011b3d1c3bad25d09ff282faad33bfcf1
6
+ metadata.gz: 37d5e557f49bb5bf406a7373d20754545c438470a0cd5a6c1194b3a074cd814eb434796394ba3535855fe629f767f1171526b8e1b6a670a5014a0d66bd60bf76
7
+ data.tar.gz: 44b73c990d4d91a3f1f7347accfa13763ecb77d7566dd80556c3105e442ebfe6b80c1f614e18c718e922e6f78454ecce253b897883ae8b9428635a00d1318056
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  pkg
2
2
  doc
3
3
  *~
4
+ *.gem
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in rinruby.gemspec
3
+ # Specify your gem's dependencies in rootapp-rinruby.gemspec
4
4
  gemspec
data/lib/rinruby.rb CHANGED
@@ -85,9 +85,6 @@ class RinRuby
85
85
  # Parse error
86
86
  ParseError = Class.new(Exception)
87
87
 
88
- # Attempt to pull undefined variable
89
- UndefinedVariableError = Class.new(Exception)
90
-
91
88
  # Cannot convert data type to one that can be sent over wire
92
89
  UnsupportedTypeError = Class.new(Exception)
93
90
 
@@ -424,7 +421,7 @@ class RinRuby
424
421
  raise EngineClosed if @engine.closed?
425
422
  if complete?(string)
426
423
  result = pull_engine(string)
427
- if ( ! singletons ) && ( result.length == 1 ) && ( result.class != String )
424
+ if !singletons && result && result.length == 1 && result.class != String
428
425
  result = result[0]
429
426
  end
430
427
  result
@@ -678,7 +675,7 @@ class RinRuby
678
675
  raise UnsupportedTypeError, "Unsupported R data type '#{result}'"
679
676
  end
680
677
  if ( type == RinRuby_Type_NotFound )
681
- raise RinRuby::UndefinedVariableError, "Undefined variable #{variable}"
678
+ return nil
682
679
  end
683
680
  @socket.read(4,buffer)
684
681
  length = to_signed_int(buffer.unpack('N')[0].to_i)
@@ -1,3 +1,3 @@
1
1
  class RinRuby
2
- VERSION = "3.0.0"
2
+ VERSION = "3.1.0"
3
3
  end
data/spec/rinruby_spec.rb CHANGED
@@ -125,10 +125,8 @@ describe RinRuby do
125
125
  end
126
126
  end
127
127
 
128
- it "raises UndefinedVariableError if pulling variable that is undefined" do
129
- expect do
130
- R.pull("miss")
131
- end.to raise_error(RinRuby::UndefinedVariableError)
128
+ it "returns nil when pulling variable that doesn't exist" do
129
+ expect(R.pull("miss")).to be(nil)
132
130
  end
133
131
 
134
132
  it "raises error message if trying to pull a type that cannot be sent over wire" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rootapp-rinruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ROOT devs
@@ -56,7 +56,6 @@ files:
56
56
  - ".gitignore"
57
57
  - ".travis.yml"
58
58
  - Gemfile
59
- - Gemfile.lock
60
59
  - History.txt
61
60
  - LICENSE.txt
62
61
  - Manifest.txt
data/Gemfile.lock DELETED
@@ -1,33 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rinruby (2.0.3)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- diff-lcs (1.2.5)
10
- rake (10.3.2)
11
- rspec (3.0.0)
12
- rspec-core (~> 3.0.0)
13
- rspec-expectations (~> 3.0.0)
14
- rspec-mocks (~> 3.0.0)
15
- rspec-core (3.0.2)
16
- rspec-support (~> 3.0.0)
17
- rspec-expectations (3.0.2)
18
- diff-lcs (>= 1.2.0, < 2.0)
19
- rspec-support (~> 3.0.0)
20
- rspec-mocks (3.0.2)
21
- rspec-support (~> 3.0.0)
22
- rspec-support (3.0.2)
23
-
24
- PLATFORMS
25
- ruby
26
-
27
- DEPENDENCIES
28
- rake
29
- rinruby!
30
- rspec
31
-
32
- BUNDLED WITH
33
- 1.12.4