faceter 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/faceter.gemspec +2 -2
- data/lib/faceter/coercers.rb +1 -1
- data/lib/faceter/version.rb +1 -1
- data/spec/integration/commands/create_spec.rb +8 -2
- data/spec/integration/rom_spec.rb +10 -8
- metadata +5 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e6f8053205fcafa7fa89140ea545b1c176840c3
|
4
|
+
data.tar.gz: 903dc64fc54cc8ee2231af4a0e2665fd65784b23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03947b2e5af98ca277fc1cbcca5c427858bdf21123f3346031ef3011a4fe84ba19c27642e162418fe10fea997e8f162981e187bc9be3a5ae3af1e97e5ea19b01
|
7
|
+
data.tar.gz: 9f1766a2a30985818a2c77fe94d00baad66ca200a83aab13a78daafe8e23cc58f204acbe40f6d6f19503949c79c46277dd94ee32b0677f1b84d450ce7396f972
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## version 0.0.2 2015-09-18
|
2
|
+
|
3
|
+
### Bugs Fixed
|
4
|
+
|
5
|
+
* Allow `command` to be used without first argument (nepalez)
|
6
|
+
|
7
|
+
### Internal
|
8
|
+
|
9
|
+
* Fix dependency from 'abstract_mapper' v0.0.2 (nepalez).
|
10
|
+
The next v0.1.0 breaks API.
|
11
|
+
* Update integration specs for rom v0.9.1 (nepalez)
|
12
|
+
|
13
|
+
[Compare v0.0.1...v0.0.2](https://github.com/nepalez/faceter/compare/v0.0.1...v0.0.2)
|
14
|
+
|
15
|
+
This is the first published version
|
16
|
+
|
1
17
|
## version 0.0.1 2015-08-06
|
2
18
|
|
3
19
|
This is the first published version
|
data/faceter.gemspec
CHANGED
@@ -18,11 +18,11 @@ Gem::Specification.new do |gem|
|
|
18
18
|
|
19
19
|
gem.required_ruby_version = ">= 2.1"
|
20
20
|
|
21
|
-
gem.add_runtime_dependency "abstract_mapper", "~> 0.0
|
21
|
+
gem.add_runtime_dependency "abstract_mapper", "~> 0.0.2"
|
22
22
|
gem.add_runtime_dependency "selector", "~> 0.0"
|
23
23
|
|
24
24
|
gem.add_development_dependency "hexx-rspec", "~> 0.4"
|
25
|
-
gem.add_development_dependency "rom", "~> 0.
|
25
|
+
gem.add_development_dependency "rom", "~> 0.9.1"
|
26
26
|
gem.add_development_dependency "benchmark-ips", "~> 2.2"
|
27
27
|
gem.add_development_dependency "inflecto", "~> 0.0"
|
28
28
|
|
data/lib/faceter/coercers.rb
CHANGED
data/lib/faceter/version.rb
CHANGED
@@ -5,11 +5,11 @@ describe "create" do
|
|
5
5
|
subject { mapper.new.call input }
|
6
6
|
|
7
7
|
let(:input) do
|
8
|
-
[{ foo: 1, bar: 3 }]
|
8
|
+
[{ foo: 1, bar: 3, abc: { xyz: 1 } }]
|
9
9
|
end
|
10
10
|
|
11
11
|
let(:output) do
|
12
|
-
[{ foo: 1, bar: 3, baz: [1, 3], qux: 4, quxx: 3 }]
|
12
|
+
[{ foo: 1, bar: 3, baz: [1, 3], qux: 4, quxx: 3, abc: 1 }]
|
13
13
|
end
|
14
14
|
|
15
15
|
let(:mapper) do
|
@@ -22,6 +22,12 @@ describe "create" do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
create :quxx, from: :bar
|
25
|
+
|
26
|
+
field :abc do
|
27
|
+
create from: :xyz do |xyz|
|
28
|
+
xyz
|
29
|
+
end
|
30
|
+
end
|
25
31
|
end
|
26
32
|
end
|
27
33
|
end
|
@@ -2,10 +2,6 @@ require "rom"
|
|
2
2
|
require "rom/memory"
|
3
3
|
|
4
4
|
describe "ROM integration" do
|
5
|
-
|
6
|
-
let(:setup) { ROM.setup :memory }
|
7
|
-
let(:rom) { ROM.finalize.env }
|
8
|
-
|
9
5
|
before do
|
10
6
|
class UserMapper < Faceter::Mapper
|
11
7
|
group :email, to: :emails
|
@@ -17,6 +13,9 @@ describe "ROM integration" do
|
|
17
13
|
end
|
18
14
|
end
|
19
15
|
|
16
|
+
# Set ROM environment
|
17
|
+
ROM.use :auto_registration
|
18
|
+
setup = ROM.setup :memory
|
20
19
|
setup.relation(:users)
|
21
20
|
|
22
21
|
setup.mappers do
|
@@ -26,14 +25,17 @@ describe "ROM integration" do
|
|
26
25
|
users = setup.default.dataset(:users)
|
27
26
|
users.insert(id: 1, name: "Joe", email: "joe@doe.com")
|
28
27
|
users.insert(id: 1, name: "Joe", email: "joe@doe.org")
|
28
|
+
|
29
|
+
ROM.finalize
|
29
30
|
end
|
30
31
|
|
32
|
+
let(:rom) { ROM.env }
|
33
|
+
let(:users) { rom.relation(:users) }
|
34
|
+
|
31
35
|
it "works" do
|
32
|
-
expect(
|
33
|
-
{ id: 1, name: "Joe", emails: ["joe@doe.com", "joe@doe.org"] }
|
34
|
-
]
|
36
|
+
expect(users.as(:mapped).to_a)
|
37
|
+
.to eql [{ id: 1, name: "Joe", emails: ["joe@doe.com", "joe@doe.org"] }]
|
35
38
|
end
|
36
39
|
|
37
40
|
after { Object.send :remove_const, :UserMapper }
|
38
|
-
|
39
41
|
end # describe "ROM integration"
|
metadata
CHANGED
@@ -1,23 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faceter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kozin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: abstract_mapper
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.0'
|
20
|
-
- - ">="
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: 0.0.2
|
23
20
|
type: :runtime
|
@@ -25,9 +22,6 @@ dependencies:
|
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0.0'
|
30
|
-
- - ">="
|
31
25
|
- !ruby/object:Gem::Version
|
32
26
|
version: 0.0.2
|
33
27
|
- !ruby/object:Gem::Dependency
|
@@ -64,14 +58,14 @@ dependencies:
|
|
64
58
|
requirements:
|
65
59
|
- - "~>"
|
66
60
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
61
|
+
version: 0.9.1
|
68
62
|
type: :development
|
69
63
|
prerelease: false
|
70
64
|
version_requirements: !ruby/object:Gem::Requirement
|
71
65
|
requirements:
|
72
66
|
- - "~>"
|
73
67
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
68
|
+
version: 0.9.1
|
75
69
|
- !ruby/object:Gem::Dependency
|
76
70
|
name: benchmark-ips
|
77
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -251,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
251
245
|
version: '0'
|
252
246
|
requirements: []
|
253
247
|
rubyforge_project:
|
254
|
-
rubygems_version: 2.4.
|
248
|
+
rubygems_version: 2.4.8
|
255
249
|
signing_key:
|
256
250
|
specification_version: 4
|
257
251
|
summary: ROM-compatible data mapper
|