alf-core 0.13.0 → 0.13.1
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md
CHANGED
data/lib/alf-core/version.rb
CHANGED
@@ -15,11 +15,12 @@ module Alf
|
|
15
15
|
|
16
16
|
# (see Reader#line2tuple)
|
17
17
|
def line2tuple(line)
|
18
|
+
return nil if line.strip.empty?
|
18
19
|
begin
|
19
20
|
h = Kernel.eval(line)
|
20
|
-
raise "Tuple expected, got
|
21
|
+
raise "Tuple expected, got `#{h.inspect}`" unless TupleLike===h
|
21
22
|
rescue Exception => ex
|
22
|
-
$stderr << "Skipping
|
23
|
+
$stderr << "Skipping `#{line.strip}`: #{ex.message}\n"
|
23
24
|
nil
|
24
25
|
else
|
25
26
|
return h
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module Alf
|
3
|
+
describe Viewpoint, "members" do
|
4
|
+
|
5
|
+
subject{ viewpoint.members }
|
6
|
+
|
7
|
+
context 'on a base viewpoint' do
|
8
|
+
let(:viewpoint){
|
9
|
+
Module.new{
|
10
|
+
include Alf::Viewpoint
|
11
|
+
native :a_native_one
|
12
|
+
def restricted
|
13
|
+
restrict(a_native_one, id: 1)
|
14
|
+
end
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
it 'should have expected members' do
|
19
|
+
subject.should eq([:a_native_one, :restricted])
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alf-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-08-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -972,6 +972,7 @@ files:
|
|
972
972
|
- spec/unit/alf-update/inserter/test_var_ref.rb
|
973
973
|
- spec/unit/alf-update/inserter/test_wrap.rb
|
974
974
|
- spec/unit/alf-update/updater/test_var_ref.rb
|
975
|
+
- spec/unit/alf-viewpoint/test_members.rb
|
975
976
|
- spec/unit/alf-viewpoint/test_namespace.rb
|
976
977
|
- spec/unit/alf-viewpoint/test_native.rb
|
977
978
|
- spec/unit/alf-viewpoint/test_native_const.rb
|
@@ -992,7 +993,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
992
993
|
version: '0'
|
993
994
|
segments:
|
994
995
|
- 0
|
995
|
-
hash:
|
996
|
+
hash: -3410216638395775327
|
996
997
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
997
998
|
none: false
|
998
999
|
requirements:
|
@@ -1536,6 +1537,7 @@ test_files:
|
|
1536
1537
|
- spec/unit/alf-update/inserter/test_var_ref.rb
|
1537
1538
|
- spec/unit/alf-update/inserter/test_wrap.rb
|
1538
1539
|
- spec/unit/alf-update/updater/test_var_ref.rb
|
1540
|
+
- spec/unit/alf-viewpoint/test_members.rb
|
1539
1541
|
- spec/unit/alf-viewpoint/test_namespace.rb
|
1540
1542
|
- spec/unit/alf-viewpoint/test_native.rb
|
1541
1543
|
- spec/unit/alf-viewpoint/test_native_const.rb
|