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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e033f423bf97c5a01e4a82d0d7cf4b7ed79a7fb
4
- data.tar.gz: 1ba016d6090a2221a922dafe55e0149d91eca4f6
3
+ metadata.gz: 3e6f8053205fcafa7fa89140ea545b1c176840c3
4
+ data.tar.gz: 903dc64fc54cc8ee2231af4a0e2665fd65784b23
5
5
  SHA512:
6
- metadata.gz: 325f69c325db01ebf36f74c563733d76d01f7cdf662c126a2132baa2fb55d1b1eeb5c7a7a61600e8a30be8b7d01c125c8eb97625a19b79d8b5888c1cda44a17b
7
- data.tar.gz: 9e9586cdbdbfb53a59e61638408450bd662e70a491a679fadd1453a0a43485d798f3f4aeee4fd39b32447f203a4b35c3201d9390336678f8e39a8e8806717453
6
+ metadata.gz: 03947b2e5af98ca277fc1cbcca5c427858bdf21123f3346031ef3011a4fe84ba19c27642e162418fe10fea997e8f162981e187bc9be3a5ae3af1e97e5ea19b01
7
+ data.tar.gz: 9f1766a2a30985818a2c77fe94d00baad66ca200a83aab13a78daafe8e23cc58f204acbe40f6d6f19503949c79c46277dd94ee32b0677f1b84d450ce7396f972
@@ -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
@@ -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", ">= 0.0.2"
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.8"
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
 
@@ -44,7 +44,7 @@ module Faceter
44
44
  end
45
45
 
46
46
  # @private
47
- def self.create(name, **options)
47
+ def self.create(name = nil, **options)
48
48
  { name: name, keys: options.fetch(:from) }
49
49
  end
50
50
 
@@ -6,6 +6,6 @@ module Faceter
6
6
 
7
7
  # The semantic version of the module.
8
8
  # @see http://semver.org/ Semantic versioning 2.0
9
- VERSION = "0.0.1".freeze
9
+ VERSION = "0.0.2".freeze
10
10
 
11
11
  end # module Faceter
@@ -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(rom.relation(:users).as(:mapped).to_a).to eql [
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.1
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-08-06 00:00:00.000000000 Z
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: '0.8'
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: '0.8'
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.6
248
+ rubygems_version: 2.4.8
255
249
  signing_key:
256
250
  specification_version: 4
257
251
  summary: ROM-compatible data mapper