msfl 0.0.1.pre.rc6 → 0.0.1.pre.rc7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/msfl/datasets/{cars.rb → car.rb} +1 -1
- data/lib/msfl/datasets/{movies.rb → movie.rb} +1 -1
- data/msfl.gemspec +2 -2
- data/spec/msfl/datasets/base_spec.rb +2 -2
- data/spec/msfl/shared_examples.rb +2 -2
- data/spec/msfl/sinatra/helpers_spec.rb +1 -1
- data/spec/msfl/sinatra_spec.rb +12 -12
- data/spec/msfl/validators/semantic_spec.rb +2 -2
- data/spec/msfl_spec.rb +5 -5
- data/spec/spec_helper.rb +2 -2
- metadata +20 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83c63367edc19c703d2f4cf7ec91cb9108845eb8
|
4
|
+
data.tar.gz: af422af9657995730826dc70f26bfcf3cf0ede87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98a0f847408159abe70615382c7979adb88e8f3ae19b7cca99653d771d874a42b08d334616e107e98aa82aba31f2894eaf9ee70d8eda3aad5e6de6fa9ac1e34e
|
7
|
+
data.tar.gz: 81963210e26b6d44c305056661368dc79cc9805193f607a78306db4080afa92849fb63df6b83bb6eeeecfa2e57c471fb956b71f4958caf8c134b49e9b36163ae
|
data/msfl.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'msfl'
|
3
|
-
s.version = '0.0.1-
|
4
|
-
s.date = '2015-03-
|
3
|
+
s.version = '0.0.1-rc7'
|
4
|
+
s.date = '2015-03-26'
|
5
5
|
s.summary = "MSFL in Ruby"
|
6
6
|
s.description = "Serializers, validators, and other tasty goodness for the Mattermark Semantic Filter Language in Ruby."
|
7
7
|
s.authors = ["Courtland Caldwell"]
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe "MSFL::Datasets::Base" do
|
4
4
|
|
5
|
-
let(:test_instance) { MSFL::Datasets::
|
5
|
+
let(:test_instance) { MSFL::Datasets::Movie.new }
|
6
6
|
|
7
7
|
let(:errors) { [ ] }
|
8
8
|
|
@@ -28,7 +28,7 @@ describe "MSFL::Datasets::Base" do
|
|
28
28
|
|
29
29
|
describe "#type_conforms?" do
|
30
30
|
|
31
|
-
context "when MSFL is configured to use
|
31
|
+
context "when MSFL is configured to use Movie as the dataset" do
|
32
32
|
|
33
33
|
subject(:mut) { test_instance.type_conforms? obj, field }
|
34
34
|
|
@@ -20,9 +20,9 @@ shared_examples_for "an invocation of MSFL::Sinatra.validate" do
|
|
20
20
|
it { is_expected.to be true }
|
21
21
|
end
|
22
22
|
|
23
|
-
context "when params[:dataset] is :
|
23
|
+
context "when params[:dataset] is :movie" do
|
24
24
|
|
25
|
-
let(:dataset) { :
|
25
|
+
let(:dataset) { :movie }
|
26
26
|
|
27
27
|
context "when params[:filter] is a valid filter" do
|
28
28
|
|
data/spec/msfl/sinatra_spec.rb
CHANGED
@@ -47,21 +47,21 @@ describe "MSFL::Sinatra" do
|
|
47
47
|
|
48
48
|
let(:dataset) { nil }
|
49
49
|
|
50
|
-
context "when params[:dataset] is :
|
50
|
+
context "when params[:dataset] is :movie" do
|
51
51
|
|
52
|
-
let(:dataset) { :
|
52
|
+
let(:dataset) { :movie }
|
53
53
|
|
54
|
-
it "is a new instance of MSFL::Datasets::
|
55
|
-
expect(mut).to be_a MSFL::Datasets::
|
54
|
+
it "is a new instance of MSFL::Datasets::Movie" do
|
55
|
+
expect(mut).to be_a MSFL::Datasets::Movie
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
context "when params[:dataset] is :
|
59
|
+
context "when params[:dataset] is :car" do
|
60
60
|
|
61
|
-
let(:dataset) { :
|
61
|
+
let(:dataset) { :car }
|
62
62
|
|
63
|
-
it "is a new instance of MSFL::Datasets::
|
64
|
-
expect(mut).to be_a MSFL::Datasets::
|
63
|
+
it "is a new instance of MSFL::Datasets::Car" do
|
64
|
+
expect(mut).to be_a MSFL::Datasets::Car
|
65
65
|
end
|
66
66
|
end
|
67
67
|
end
|
@@ -74,14 +74,14 @@ describe "MSFL::Sinatra" do
|
|
74
74
|
|
75
75
|
let(:dataset) { nil }
|
76
76
|
|
77
|
-
context "when params[:dataset] is :
|
77
|
+
context "when params[:dataset] is :movie" do
|
78
78
|
|
79
|
-
let(:dataset) { :
|
79
|
+
let(:dataset) { :movie }
|
80
80
|
|
81
|
-
it "is a semantic validator instance of MSFL::Datasets::
|
81
|
+
it "is a semantic validator instance of MSFL::Datasets::Movie" do
|
82
82
|
validator = mut
|
83
83
|
expect(validator).to be_a MSFL::Validators::Semantic
|
84
|
-
expect(validator.dataset).to be_a MSFL::Datasets::
|
84
|
+
expect(validator.dataset).to be_a MSFL::Datasets::Movie
|
85
85
|
end
|
86
86
|
end
|
87
87
|
end
|
@@ -21,10 +21,10 @@ describe "MSFL::Validators::Semantic" do
|
|
21
21
|
|
22
22
|
context "when MSFL is configured for one or more datasets" do
|
23
23
|
|
24
|
-
before { MSFL.configure(reset: true) { |configuration| configuration.datasets = [MSFL::Datasets::
|
24
|
+
before { MSFL.configure(reset: true) { |configuration| configuration.datasets = [MSFL::Datasets::Movie] } }
|
25
25
|
|
26
26
|
it "has an instance of the first item in MSFL.configuration.datasets (an instance of Class) as the dataset" do
|
27
|
-
expect(mut.dataset).to be_a MSFL::Datasets::
|
27
|
+
expect(mut.dataset).to be_a MSFL::Datasets::Movie
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
data/spec/msfl_spec.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require 'msfl/datasets/
|
2
|
+
require 'msfl/datasets/movie'
|
3
3
|
describe "MSFL" do
|
4
4
|
|
5
5
|
let(:json_encoded_msfl) do
|
@@ -71,8 +71,8 @@ describe "MSFL" do
|
|
71
71
|
let(:validator) { MSFL::Validators::Semantic.new }
|
72
72
|
|
73
73
|
it "is configured using a block" do
|
74
|
-
MSFL.configure(reset: true) { |configuration| configuration.datasets = [MSFL::Datasets::
|
75
|
-
expect(MSFL.configuration.datasets).to eq [MSFL::Datasets::
|
74
|
+
MSFL.configure(reset: true) { |configuration| configuration.datasets = [MSFL::Datasets::Movie] }
|
75
|
+
expect(MSFL.configuration.datasets).to eq [MSFL::Datasets::Movie]
|
76
76
|
end
|
77
77
|
|
78
78
|
it "parses json encoded MSFL" do
|
@@ -80,12 +80,12 @@ describe "MSFL" do
|
|
80
80
|
end
|
81
81
|
|
82
82
|
it "rejects invalid MSFL filters" do
|
83
|
-
MSFL.configure(reset: true) { |conf| conf.datasets = [MSFL::Datasets::
|
83
|
+
MSFL.configure(reset: true) { |conf| conf.datasets = [MSFL::Datasets::Movie] }
|
84
84
|
expect(validator.validate invalid_ruby_encoded_msfl).to be false
|
85
85
|
end
|
86
86
|
|
87
87
|
it "accepts valid MSFL filters" do
|
88
|
-
MSFL.configure(reset: true) { |conf| conf.datasets = [MSFL::Datasets::
|
88
|
+
MSFL.configure(reset: true) { |conf| conf.datasets = [MSFL::Datasets::Movie] }
|
89
89
|
expect(validator.validate ruby_encoded_msfl).to be true
|
90
90
|
end
|
91
91
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -4,5 +4,5 @@ require 'rspec/support/spec'
|
|
4
4
|
require 'byebug'
|
5
5
|
require_relative '../lib/msfl'
|
6
6
|
require_relative 'msfl/shared_examples'
|
7
|
-
require_relative '../lib/msfl/datasets/
|
8
|
-
require_relative '../lib/msfl/datasets/
|
7
|
+
require_relative '../lib/msfl/datasets/movie'
|
8
|
+
require_relative '../lib/msfl/datasets/car'
|
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: msfl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.pre.
|
4
|
+
version: 0.0.1.pre.rc7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Courtland Caldwell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.7'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: simplecov
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0.9'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.9'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: yard
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0.8'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.8'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '3.1'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '3.1'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: byebug
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '3.5'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '3.5'
|
97
97
|
description: Serializers, validators, and other tasty goodness for the Mattermark
|
@@ -101,7 +101,7 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
-
-
|
104
|
+
- .gitignore
|
105
105
|
- Gemfile
|
106
106
|
- Gemfile.lock
|
107
107
|
- LICENSE
|
@@ -112,8 +112,8 @@ files:
|
|
112
112
|
- lib/msfl/configuration.rb
|
113
113
|
- lib/msfl/datasets.rb
|
114
114
|
- lib/msfl/datasets/base.rb
|
115
|
-
- lib/msfl/datasets/
|
116
|
-
- lib/msfl/datasets/
|
115
|
+
- lib/msfl/datasets/car.rb
|
116
|
+
- lib/msfl/datasets/movie.rb
|
117
117
|
- lib/msfl/parsers.rb
|
118
118
|
- lib/msfl/parsers/json.rb
|
119
119
|
- lib/msfl/sinatra.rb
|
@@ -143,17 +143,17 @@ require_paths:
|
|
143
143
|
- lib
|
144
144
|
required_ruby_version: !ruby/object:Gem::Requirement
|
145
145
|
requirements:
|
146
|
-
- -
|
146
|
+
- - '>='
|
147
147
|
- !ruby/object:Gem::Version
|
148
148
|
version: '0'
|
149
149
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
|
-
- -
|
151
|
+
- - '>'
|
152
152
|
- !ruby/object:Gem::Version
|
153
153
|
version: 1.3.1
|
154
154
|
requirements: []
|
155
155
|
rubyforge_project:
|
156
|
-
rubygems_version: 2.
|
156
|
+
rubygems_version: 2.4.2
|
157
157
|
signing_key:
|
158
158
|
specification_version: 4
|
159
159
|
summary: MSFL in Ruby
|