spiker 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -1
- data/Gemfile.lock +1 -1
- data/README.md +6 -1
- data/lib/spiker/generators/multi.rb +2 -2
- data/lib/spiker/generators/simple.rb +1 -1
- data/lib/spiker/generators/templates/{multi_app.rb → multi_app.rb.erb} +0 -0
- data/lib/spiker/generators/templates/{multi_app_test.rb → multi_app_test.rb.erb} +0 -0
- data/lib/spiker/generators/templates/multi_gemfile.rb +4 -4
- data/lib/spiker/generators/templates/multi_guardfile.rb +2 -2
- data/lib/spiker/generators/templates/{simple_app.rb → simple_app.rb.erb} +0 -0
- data/lib/spiker/generators/templates/simple_gemfile.rb +4 -4
- data/lib/spiker/generators/templates/simple_guardfile.rb +4 -2
- data/lib/spiker/version.rb +1 -1
- data/spiker.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 907101e30efff6e0426d45830d7907599b4ee590b7415381d6515e610a454beb
|
4
|
+
data.tar.gz: 8befa5bc352c113c415e9ca223c4a24549213196a748dca6ee543d911b04b830
|
5
5
|
SHA512:
|
6
|
-
metadata.gz: '
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09045548a1f614957922c597fe54ece30bf8a76cbf26dcfb59c54d3b57230f3cd6deb80e3c73370dadd8628a6fa775a8dd076049590e4bb7efdfc6f7f24a8dfb'
|
7
|
+
data.tar.gz: 21279e2734fd077c48a9414554139b1adc9adb757dc7d629fb76da27cb60a7ad78f9d4f6434502e83138dd35dab6565ab9139bc89e73908c6dcac2fe3acb5cd6
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -56,7 +56,12 @@ end
|
|
56
56
|
|
57
57
|
From here, the user should be able to start Guard and immediately begin development in a red-green fashion.
|
58
58
|
|
59
|
-
The "
|
59
|
+
The "multi" option places directories and files into a named directory, and is intended to flesh out a more complex spike that includes a tests directory and `test_helper.rb`, a `lib` directory, README.md, etc. The overall workflow is still the same:
|
60
|
+
|
61
|
+
$ spiker multi my_spike
|
62
|
+
$ cd my_spike
|
63
|
+
|
64
|
+
Bundle will run automatically and the user will be able to start development in a red-green fashion just the same as with the simple spike. There is also a Rakefile provided, the Guardfile is modified from the simple version to include files in directories, and simple tests are predefined.
|
60
65
|
|
61
66
|
## Development
|
62
67
|
|
@@ -27,14 +27,14 @@ module Spiker
|
|
27
27
|
name_in_snake_case = Spiker.snake_case(name)
|
28
28
|
name_as_class = Spiker.classify(name)
|
29
29
|
opts = { name_as_class: name_as_class, name_in_snake_case: name_in_snake_case }
|
30
|
-
template("multi_app_test.rb", "#{name}/test/#{name_in_snake_case}_test.rb", opts)
|
30
|
+
template("multi_app_test.rb.erb", "#{name}/test/#{name_in_snake_case}_test.rb", opts)
|
31
31
|
template("multi_test_helper.rb", "#{name}/test/test_helper.rb", opts)
|
32
32
|
end
|
33
33
|
|
34
34
|
def create_app_files
|
35
35
|
name_in_snake_case = Spiker.snake_case(name)
|
36
36
|
opts = { name_as_class: Spiker.classify(name) }
|
37
|
-
template("multi_app.rb", "#{name}/lib/#{name_in_snake_case}.rb", opts)
|
37
|
+
template("multi_app.rb.erb", "#{name}/lib/#{name_in_snake_case}.rb", opts)
|
38
38
|
end
|
39
39
|
|
40
40
|
def create_guard_file
|
File without changes
|
File without changes
|
@@ -4,7 +4,7 @@ source "https://rubygems.org"
|
|
4
4
|
|
5
5
|
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
6
6
|
|
7
|
-
gem
|
8
|
-
gem
|
9
|
-
gem
|
10
|
-
gem
|
7
|
+
gem "minitest"
|
8
|
+
gem "minitest-reporters"
|
9
|
+
gem "guard"
|
10
|
+
gem "guard-minitest"
|
@@ -4,7 +4,7 @@ clearing :on
|
|
4
4
|
|
5
5
|
guard :minitest, all_after_pass: true do
|
6
6
|
# with Minitest::Unit
|
7
|
-
watch(%r{^test/(.*)
|
7
|
+
watch(%r{^test/(.*)/?(.*)_test\.rb$})
|
8
8
|
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}#{m[2]}_test.rb" }
|
9
|
-
watch(%r{^test/test_helper\.rb$}) {
|
9
|
+
watch(%r{^test/test_helper\.rb$}) { "test" }
|
10
10
|
end
|
File without changes
|
@@ -4,8 +4,8 @@ source "https://rubygems.org"
|
|
4
4
|
|
5
5
|
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
6
6
|
|
7
|
-
gem
|
8
|
-
gem
|
7
|
+
gem "minitest"
|
8
|
+
gem "minitest-reporters"
|
9
9
|
|
10
|
-
gem
|
11
|
-
gem
|
10
|
+
gem "guard"
|
11
|
+
gem "guard-minitest"
|
@@ -1,6 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
clearing :on
|
2
4
|
|
3
|
-
guard :minitest, all_after_pass: true, test_folders: [
|
5
|
+
guard :minitest, all_after_pass: true, test_folders: ["."], test_file_patterns: "*.rb" do
|
4
6
|
# with Minitest::Unit
|
5
|
-
watch(
|
7
|
+
watch(/^app\.rb$/) { "./app.rb" }
|
6
8
|
end
|
data/lib/spiker/version.rb
CHANGED
data/spiker.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
|
11
11
|
spec.summary = "Properly spike your Ruby"
|
12
12
|
spec.description = "Scaffold for code spikes, includes simple boilerplate with Minitest + Guard to make red/green work out-of-the-box."
|
13
|
-
spec.homepage = "http://github.com/
|
13
|
+
spec.homepage = "http://github.com/norlinga/spiker"
|
14
14
|
spec.license = "MIT"
|
15
15
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
16
16
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spiker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Norling
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -49,23 +49,23 @@ files:
|
|
49
49
|
- lib/spiker/cli.rb
|
50
50
|
- lib/spiker/generators/multi.rb
|
51
51
|
- lib/spiker/generators/simple.rb
|
52
|
-
- lib/spiker/generators/templates/multi_app.rb
|
53
|
-
- lib/spiker/generators/templates/multi_app_test.rb
|
52
|
+
- lib/spiker/generators/templates/multi_app.rb.erb
|
53
|
+
- lib/spiker/generators/templates/multi_app_test.rb.erb
|
54
54
|
- lib/spiker/generators/templates/multi_gemfile.rb
|
55
55
|
- lib/spiker/generators/templates/multi_guardfile.rb
|
56
56
|
- lib/spiker/generators/templates/multi_rakefile.rb
|
57
57
|
- lib/spiker/generators/templates/multi_test_helper.rb
|
58
|
-
- lib/spiker/generators/templates/simple_app.rb
|
58
|
+
- lib/spiker/generators/templates/simple_app.rb.erb
|
59
59
|
- lib/spiker/generators/templates/simple_gemfile.rb
|
60
60
|
- lib/spiker/generators/templates/simple_guardfile.rb
|
61
61
|
- lib/spiker/version.rb
|
62
62
|
- spiker.gemspec
|
63
|
-
homepage: http://github.com/
|
63
|
+
homepage: http://github.com/norlinga/spiker
|
64
64
|
licenses:
|
65
65
|
- MIT
|
66
66
|
metadata:
|
67
67
|
allowed_push_host: https://rubygems.org
|
68
|
-
homepage_uri: http://github.com/
|
68
|
+
homepage_uri: http://github.com/norlinga/spiker
|
69
69
|
source_code_uri: https://github.com/norlinga/spiker
|
70
70
|
changelog_uri: https://github.com/norlinga/spiker
|
71
71
|
post_install_message:
|