proto_factory 0.0.1 → 0.0.2

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: 5295f83cdb9c8faba78557920c3c8e13fa81f51a
4
- data.tar.gz: 1ef8db214c673593ce0aa3f096e3b484c18d0dc2
3
+ metadata.gz: 21d0092504f851463d7d50ecd099379401ffd5bf
4
+ data.tar.gz: 905f1e391a2121ba3d7f6c1a7bb5dfbda744dafa
5
5
  SHA512:
6
- metadata.gz: c9a99328f6eb941d6751437920391826012773aa500ac5bbbf6bc3934354b424b4d2e682e1b8276d7c0c269d395fc8a4ad35969ee6aada067820628b7e4b88d0
7
- data.tar.gz: dd817f00bf54325becf470efda2d3c959c6e70af52d7c6f575908ad672f7366960fd66b5d7fbd9c92f766058d7dd22cfa3f7825d7d6572d18eb9dbdb730f82f6
6
+ metadata.gz: d88706ca834f204c842701ef0284f955f8de52d97c66b5597f851e03bd64188f5aa3dc698f46854017be4e5e8f7927c92465f1c3c66ecf64f27eadb214ee0bf5
7
+ data.tar.gz: 8a6a26135dc6b1d4235eba9ce0120283e0ebfd7e26d66e2ab0c6503d5899fe23925945fda9ef1ed399c5d853e4af1f79cb8b9e9d4f281b2dfaa244f4d2231cdc
@@ -0,0 +1,13 @@
1
+ module ProtoFactory
2
+ class Builder
3
+
4
+ def self.build(factory_name)
5
+ factory_class = self.find(factory_name).safe_constantize
6
+ # other logic
7
+ end
8
+
9
+ def self.find(factory_name)
10
+ ProtoFactory::Configuration.factories[factory_name.to_sym]
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ module ProtoFactory
2
+ class Configuration
3
+ attr_accessor :factories
4
+ end
5
+ end
data/lib/proto_factory.rb CHANGED
@@ -1,5 +1,20 @@
1
- class ProtoFactory
2
- def self.hello
3
- "Hello World!"
1
+ require "proto_factory/configuration"
2
+ require "proto_factory/builder"
3
+
4
+ module ProtoFactory
5
+ class << self
6
+ attr_writer :configuration
7
+ end
8
+
9
+ def self.configuration
10
+ @configuration ||= Configuration.new
11
+ end
12
+
13
+ def self.reset
14
+ @configuration = Configuration.new
15
+ end
16
+
17
+ def self.configure
18
+ yield(configuration)
4
19
  end
5
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proto_factory
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
  - Lucas Moore, Terese Lichty, Marshall Houston
@@ -17,6 +17,8 @@ extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
19
  - lib/proto_factory.rb
20
+ - lib/proto_factory/builder.rb
21
+ - lib/proto_factory/configuration.rb
20
22
  homepage: https://ibotta.com
21
23
  licenses:
22
24
  - MIT