rails-dummy 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 0eee8b42d6f94515f3c19e6894e0166c5c029e94c492f268acbb9de2ef3594fb
4
- data.tar.gz: eb601ed67ac5bc6f0d03fe3e148fa46fee5a4ddc89135942410ac741c5b3f7e7
3
+ metadata.gz: 4b582590f574411041603be7e62147eb9eadac30fdb3e895e95dd540aaac9833
4
+ data.tar.gz: 2357bb683da0015a6eec9119d2a8ef63dd88f94ab03ee93bbbe7d387e9bbb12d
5
5
  SHA512:
6
- metadata.gz: aca3948bba5457c0177743842cb6910f4610c96c60c37d762b539c469cda7c1f2752751ff5e760a659aaee8e257bc7b6ec90c554ff4f053eda06dd762b86bf42
7
- data.tar.gz: b4bea087ae077c035fae8fa7d5725fa6b74686adbc1232f571936a795054b2e02ac8b788602850623dacbd8e870365ebcfe9dc434611f311d80382675134e648
6
+ metadata.gz: 7ce10f254bc0a12fcc1f64e348d71fb121b65d59224e4c55e55196075933438085ee8d69afbf09b29b2e35f3eff58feb92391d31f4cfaa7834f61ac17f53e875
7
+ data.tar.gz: 8196fab33658978607339d57915c45f927ea35ce96dcfdbbe60e3da9e92efb4914290d1264e15805625c152ade407cf3abe1465572d1e164a614c823264070a6
@@ -1,5 +1,5 @@
1
1
  module Rails
2
2
  module Dummy
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
data/lib/tasks/dummy.rake CHANGED
@@ -12,8 +12,21 @@ namespace :dummy do
12
12
 
13
13
  params = [dummy_path] + %W{-q -f --skip-bundle -T -G}
14
14
 
15
- params += File.read(File.expand_path('.dummyrc'))
16
- .to_s.split("\n").compact if File.exists?('.dummyrc')
15
+ params = [dummy_path] + %W{-q -f --skip-bundle -T -G}
16
+
17
+ if File.exist?('.dummyrc')
18
+ File.readlines(File.expand_path('.dummyrc')).each do |option|
19
+ next if option.blank?
20
+ next if option.start_with?('#')
21
+
22
+ option.chomp!
23
+
24
+ value = option[/^(?:(?!#).)*/].strip
25
+ next if value.blank?
26
+
27
+ params << value
28
+ end
29
+ end
17
30
 
18
31
  Rails::Dummy::Generator.start(params)
19
32
 
@@ -19,7 +19,22 @@ describe 'dummy:setup', type: :task do
19
19
  end
20
20
 
21
21
  before do
22
- File.write(File.expand_path('.dummyrc'), "--database=#{db_type}\n")
22
+ File.write(File.expand_path('.dummyrc'),
23
+ <<-BODY
24
+ # Available options:
25
+ # rails _4.2.11_ new --help
26
+
27
+ # Usage:
28
+ # rails new APP_PATH [options]
29
+
30
+ # Options:
31
+ # -r, [--ruby=PATH] # Path to the Ruby binary of your choice
32
+ # # Default: ~/.asdf/installs/ruby/2.7.3/bin/ruby
33
+ # ....
34
+
35
+ --database=#{db_type} # Using custom database driver
36
+ BODY
37
+ )
23
38
  end
24
39
 
25
40
  after do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-dummy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stas SUȘCOV
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-01 00:00:00.000000000 Z
11
+ date: 2023-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -124,7 +124,7 @@ homepage: https://github.com/courseware/rails-dummy
124
124
  licenses:
125
125
  - MIT
126
126
  metadata: {}
127
- post_install_message:
127
+ post_install_message:
128
128
  rdoc_options: []
129
129
  require_paths:
130
130
  - lib
@@ -139,8 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  requirements: []
142
- rubygems_version: 3.0.1
143
- signing_key:
142
+ rubygems_version: 3.4.10
143
+ signing_key:
144
144
  specification_version: 4
145
145
  summary: Use it to generate a dummy app for RSpec
146
146
  test_files: