mokkku 0.0.4 → 0.0.6

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/bin/mokkku +18 -0
  3. data/lib/mokkku/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3069dcc17521f52cabc1f043476f7d0c01e657460f7a756f8e3c9dc0e7e27d23
4
- data.tar.gz: b7cb51c7bf5d8a45604dd17c7143a3657c857901a22fad09819eed548b05046a
3
+ metadata.gz: 2b88f4de6bc1e66ddbfcd4c5a71deb0c67dd5e26e70c5b1b15cc2266d7b8e542
4
+ data.tar.gz: ddbbe031b42eeafaabfb333bd341157106805b975750cee1a7071af9f481db75
5
5
  SHA512:
6
- metadata.gz: 01cc5b791e4d82c189c9d36491bb5d0f9eb52a7170fb536a53c0957188de8a40bf22a03b6ecc14c111995440629663d7b7f9dc96bfaede49a0986e725eafccd0
7
- data.tar.gz: a5f1111d24cbbb13b959ca1cc4b85c4a08fd8643359027ea9b672c57e1ea4c21e6d42dd6be1fd4ebb70d2c56dcbb40557b9c1b91e9870721d3de5c2f80b0377c
6
+ metadata.gz: 1f01c9ea4bb5305b02cf44fd8b80e9b596b2d847a5f35ee6b1583d6a345f49a1a5d575e27b59e172cb992e730f536ee5ff0afa7cf679a3057314886ad99dcc0e
7
+ data.tar.gz: a865b250cafcfd2a7729152f2f0589c084f9a226588bdd957fef141489c87d2c90e3020bb1cbe44f74aeee429a338c087a0bdef10a555d9e50656aacc95a6f37
data/bin/mokkku CHANGED
@@ -3,6 +3,7 @@
3
3
 
4
4
  require 'mokkku'
5
5
  require 'optionparser'
6
+ require 'fileutils'
6
7
 
7
8
  options = {}
8
9
 
@@ -38,4 +39,21 @@ OptionParser.new do |opts|
38
39
  end
39
40
  end.parse!
40
41
 
42
+ base_dir = Dir.pwd
43
+ # Load Rails project
44
+ begin
45
+ require File.join(base_dir, 'config', 'boot')
46
+ require File.join(base_dir, 'config', 'environment')
47
+ rescue LoadError
48
+ puts "\nUh-oh! You must be in the root directory of a Rails project.\n"
49
+ raise
50
+ end
51
+
52
+ # Load Rails models
53
+ Rails.application.eager_load! if defined?(Rails)
54
+ # Rails 6 support
55
+ Zeitwerk::Loader.eager_load_all if defined?(Zeitwerk)
56
+
57
+ FileUtils.mkdir_p(File.join(base_dir, 'spec/mocks'))
58
+
41
59
  Mokkku::Cli::Runner.start(options)
@@ -3,7 +3,7 @@ module Mokkku
3
3
  module_function
4
4
 
5
5
  def to_s
6
- '0.0.4'
6
+ '0.0.6'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mokkku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paweł Dąbrowski
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  requirements: []
127
- rubygems_version: 3.4.10
127
+ rubygems_version: 3.2.32
128
128
  signing_key:
129
129
  specification_version: 4
130
130
  summary: Generate mock data that is unique for your application