simmer 1.0.0.pre.alpha.4 → 1.0.0.pre.alpha.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/simmer.rb +32 -19
  3. data/lib/simmer/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1197e913b7b6a7b9a814fb2474aa9d89844af7c4efe872ae001116354a3b6cdb
4
- data.tar.gz: 6e24db3887b3abb23489642547f64ce4c68af85493b06c54d0c9bc15c637cc44
3
+ metadata.gz: c70362d593331adc1b9499d1292f6a3c43d06a556eddfcc5d52c203d1f5081e0
4
+ data.tar.gz: edd212d1fc90f57a06bf8594793ac7c574a40e5ac39b3b25ce2dd1abed2a0b9f
5
5
  SHA512:
6
- metadata.gz: 3e994e8d2f87598a9baa31211e5baeae2210c8dc8e5e8337579ea2417c835162b12c59dbbd5e84d34d5f969bbe5770dc02ec8017c3e45fb0a1af6572a07f5916
7
- data.tar.gz: 4f15f5aadaff3d595969aee68ad8c0689f879b1f6c0fde5fc7febe0f4aeff0fa25cc04c0cfeaa263fcca9e3e33ea20598d8d586803e34db68fd58bbf1739eb19
6
+ metadata.gz: 40e8856733adf93d0602bad3e06a8d7da6a304a2a0856efcd43a279318441c836311630fcfa9ee5e4b75c8ddf7d261c34c8d6c23cd69b5adccc87591cb59a3ce
7
+ data.tar.gz: f67b95adfb5bddd49996306b540621b79fd1430c5cd82a1310b80ab6652657e52b4bf297b2e42c6dabe4a2d15f7fd48c26f25337bef12d511819add50ea85ad4
@@ -50,32 +50,30 @@ module Simmer
50
50
  out: $stdout,
51
51
  simmer_dir: DEFAULT_SIMMER_DIR
52
52
  )
53
- # Get configuration
54
- yaml_reader = Util::YamlReader.new
55
- raw_config = yaml_reader.smash(config_path)
56
- configuration = Configuration.new(raw_config, simmer_dir)
53
+ configuration = make_configuration(config_path: config_path, simmer_dir: simmer_dir)
54
+ fixtures = make_fixtures(configuration)
55
+ specs = make_specifications(path, configuration.tests_dir)
56
+ runner = make_runner(configuration, out, fixtures)
57
+ suite = make_suite(configuration, out, runner)
57
58
 
58
- # Get fixtures
59
- raw_fixtures = yaml_reader.smash(configuration.fixtures_dir)
60
- fixtures = Database::FixtureSet.new(raw_fixtures)
61
-
62
- # Get specifications to run
63
- specs = make_specifications(path, configuration.tests_dir)
59
+ suite.run(specs)
60
+ end
64
61
 
65
- # Make main executable instances
66
- runner = make_runner(configuration, out, fixtures)
67
- suite = Suite.new(
68
- config: configuration.config,
69
- out: out,
70
- results_dir: configuration.results_dir,
71
- runner: runner
72
- )
62
+ def make_configuration(
63
+ config_path: DEFAULT_CONFIG_PATH,
64
+ simmer_dir: DEFAULT_SIMMER_DIR
65
+ )
66
+ raw_config = yaml_reader.smash(config_path)
73
67
 
74
- suite.run(specs)
68
+ Configuration.new(raw_config, simmer_dir)
75
69
  end
76
70
 
77
71
  private
78
72
 
73
+ def yaml_reader
74
+ Util::YamlReader.new
75
+ end
76
+
79
77
  def make_specifications(path, tests_dir)
80
78
  path = path.to_s.empty? ? tests_dir : path
81
79
 
@@ -144,5 +142,20 @@ module Simmer
144
142
 
145
143
  Externals::SpoonClient.new(configuration.files_dir, spoon)
146
144
  end
145
+
146
+ def make_fixtures(configuration)
147
+ raw_fixtures = yaml_reader.smash(configuration.fixtures_dir)
148
+
149
+ Database::FixtureSet.new(raw_fixtures)
150
+ end
151
+
152
+ def make_suite(configuration, out, runner)
153
+ Suite.new(
154
+ config: configuration.config,
155
+ out: out,
156
+ results_dir: configuration.results_dir,
157
+ runner: runner
158
+ )
159
+ end
147
160
  end
148
161
  end
@@ -8,5 +8,5 @@
8
8
  #
9
9
 
10
10
  module Simmer
11
- VERSION = '1.0.0-alpha.4'
11
+ VERSION = '1.0.0-alpha.5'
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.alpha.4
4
+ version: 1.0.0.pre.alpha.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Ruggio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-03 00:00:00.000000000 Z
11
+ date: 2020-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: acts_as_hashable