spiker 0.1.1 → 0.1.5
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 +17 -15
- data/lib/spiker/cli.rb +15 -6
- data/lib/spiker/generators/given.rb +47 -0
- data/lib/spiker/generators/multi.rb +68 -0
- data/lib/spiker/generators/simple.rb +9 -5
- data/lib/spiker/generators/templates/common/basic.env +1 -0
- data/lib/spiker/generators/templates/given/app.rb.erb +23 -0
- data/lib/spiker/generators/templates/given/gemfile.rb +14 -0
- data/lib/spiker/generators/templates/given/guardfile.rb +10 -0
- data/lib/spiker/generators/templates/multi/app.rb.erb +9 -0
- data/lib/spiker/generators/templates/multi/app_test.rb.erb +13 -0
- data/lib/spiker/generators/templates/{simple_gemfile.rb → multi/gemfile.rb} +5 -5
- data/lib/spiker/generators/templates/multi/guardfile.rb +10 -0
- data/lib/spiker/generators/templates/multi/rakefile.rb +12 -0
- data/lib/spiker/generators/templates/multi/readme.md.erb +44 -0
- data/lib/spiker/generators/templates/multi/test_helper.rb +18 -0
- data/lib/spiker/generators/templates/{simple_app.rb → simple/app.rb.erb} +7 -2
- data/lib/spiker/generators/templates/simple/gemfile.rb +13 -0
- data/lib/spiker/generators/templates/simple/guardfile.rb +8 -0
- data/lib/spiker/version.rb +1 -1
- data/lib/spiker.rb +10 -0
- data/spiker.gemspec +1 -1
- metadata +20 -8
- data/lib/spiker/generators/multiple.rb +0 -15
- data/lib/spiker/generators/templates/simple_guardfile.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d65d9dc195dfb1282b040fbfcac1139d9cc4c44f8bae2441deef02901ad0e38a
|
4
|
+
data.tar.gz: add551461d8e80b7626e5c96e738ed79b93ee360b3c2d7f809f07e90390a20f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f90ec88cf889ab847482622d47e040b5c6ba64b664e261b21c3076963a5f669d027f3cbc494349d48fcc7c44902cec6878a60e50181e67690f6facacf3abfef4
|
7
|
+
data.tar.gz: 0ec1b5564017f569255ffbec1286b85a5edf793c98e9a23fa4cd08d1c1b4bbda6b20ad2cb09ee648bc91be32c284f947748e2293002ed90fe079b26674eaa100
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,20 +1,12 @@
|
|
1
1
|
# Spiker
|
2
2
|
|
3
|
-
Spiker helps you validate your ideas under test. It can also be a basic educational tool, giving the learner a minimal framework to start writing and testing
|
3
|
+
Spiker helps you validate your ideas under test. It can also be a basic educational tool, giving the learner a minimal framework to start writing and testing their Ruby code.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
[![Gem Version](https://badge.fury.io/rb/spiker.svg)](https://badge.fury.io/rb/spiker)
|
8
8
|
|
9
|
-
|
10
|
-
gem 'spiker'
|
11
|
-
```
|
12
|
-
|
13
|
-
And then execute:
|
14
|
-
|
15
|
-
$ bundle install
|
16
|
-
|
17
|
-
Or install it yourself as:
|
9
|
+
Install it directly:
|
18
10
|
|
19
11
|
$ gem install spiker
|
20
12
|
|
@@ -29,9 +21,10 @@ Then, create a new spike:
|
|
29
21
|
$ spiker simple my_spike
|
30
22
|
$ cd my_spike
|
31
23
|
|
32
|
-
Using the "simple" formula, Spiker will create an `app.rb` file, a `Gemfile`,
|
24
|
+
Using the "simple" formula, Spiker will create an `app.rb` file, a `Gemfile`, a `Guardfile` and an `.env` file for configuration, to be read by the `dotenv` gem. The `app.rb` file will contain boilerplate for both Minitest and a Ruby class in the same file:
|
33
25
|
|
34
26
|
```ruby
|
27
|
+
require 'dotenv/load'
|
35
28
|
require 'minitest'
|
36
29
|
require 'minitest/autorun'
|
37
30
|
require 'minitest/reporters'
|
@@ -39,8 +32,12 @@ require 'minitest/reporters'
|
|
39
32
|
Minitest::Reporters.use!
|
40
33
|
|
41
34
|
class MySpikeTest < Minitest::Test
|
42
|
-
def
|
43
|
-
|
35
|
+
def test_name
|
36
|
+
assert_equal "Fred", MySpike.new(name: "Fred").name
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_default_env_value
|
40
|
+
assert_equal "test", ENV["TEST_VALUE"]
|
44
41
|
end
|
45
42
|
end
|
46
43
|
|
@@ -54,7 +51,12 @@ end
|
|
54
51
|
|
55
52
|
From here, the user should be able to start Guard and immediately begin development in a red-green fashion.
|
56
53
|
|
57
|
-
The "
|
54
|
+
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:
|
55
|
+
|
56
|
+
$ spiker multi my_spike
|
57
|
+
$ cd my_spike
|
58
|
+
|
59
|
+
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.
|
58
60
|
|
59
61
|
## Development
|
60
62
|
|
data/lib/spiker/cli.rb
CHANGED
@@ -3,12 +3,15 @@
|
|
3
3
|
require "thor"
|
4
4
|
require_relative "version"
|
5
5
|
require_relative "generators/simple"
|
6
|
-
require_relative "generators/
|
6
|
+
require_relative "generators/given"
|
7
|
+
require_relative "generators/multi"
|
7
8
|
|
8
9
|
module Spiker
|
9
|
-
# Accept options "
|
10
|
-
#
|
11
|
-
# and
|
10
|
+
# Accept options "simple", "given", or "multi".
|
11
|
+
# Both Simple and Given create "single file" spikes
|
12
|
+
# with the tests and spike code in a single file.
|
13
|
+
# The Multi option creates a more traditionally structured
|
14
|
+
# spike directory with tests, code, README, etc. That is all.
|
12
15
|
class CLI < Thor
|
13
16
|
desc "version", "Show version"
|
14
17
|
def version
|
@@ -21,10 +24,16 @@ module Spiker
|
|
21
24
|
Spiker::Generators::Simple.start([name])
|
22
25
|
end
|
23
26
|
|
24
|
-
desc "
|
27
|
+
desc "given NAME", "Spike in a single file using Given syntax"
|
28
|
+
method_option :name, type: :string, aliases: "-n", desc: "Name of the spike"
|
29
|
+
def given(name)
|
30
|
+
Spiker::Generators::GivenOption.start([name])
|
31
|
+
end
|
32
|
+
|
33
|
+
desc "multi NAME", "Spike over multiple files"
|
25
34
|
method_option :name, type: :string, aliases: "-n", desc: "Name of the spike"
|
26
35
|
def multiple(name)
|
27
|
-
Spiker::Generators::
|
36
|
+
Spiker::Generators::Multi.start([name])
|
28
37
|
end
|
29
38
|
end
|
30
39
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "thor/group"
|
4
|
+
require_relative "../../spiker"
|
5
|
+
|
6
|
+
module Spiker
|
7
|
+
module Generators
|
8
|
+
# Generates a single spike file, with supporting infrastructure.
|
9
|
+
# For simpler spikes that don't need a ton of organization.
|
10
|
+
class GivenOption < Thor::Group
|
11
|
+
include Thor::Actions
|
12
|
+
|
13
|
+
argument :name, type: :string
|
14
|
+
|
15
|
+
def self.source_root
|
16
|
+
"#{File.dirname(__FILE__)}/templates/given"
|
17
|
+
end
|
18
|
+
|
19
|
+
def create_spike_directory
|
20
|
+
empty_directory(name)
|
21
|
+
end
|
22
|
+
|
23
|
+
def create_spike_file
|
24
|
+
opts = { name_as_class: Spiker.classify(name) }
|
25
|
+
template("app.rb.erb", "#{name}/app.rb", opts)
|
26
|
+
end
|
27
|
+
|
28
|
+
def create_guard_file
|
29
|
+
template("guardfile.rb", "#{name}/Guardfile")
|
30
|
+
end
|
31
|
+
|
32
|
+
def create_gem_file
|
33
|
+
template("gemfile.rb", "#{name}/Gemfile")
|
34
|
+
end
|
35
|
+
|
36
|
+
def create_env_file
|
37
|
+
template("../common/basic.env", "#{name}/.env")
|
38
|
+
end
|
39
|
+
|
40
|
+
def run_bundler
|
41
|
+
inside(name) do
|
42
|
+
run("bundle install")
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "thor/group"
|
4
|
+
require_relative "../../spiker"
|
5
|
+
|
6
|
+
module Spiker
|
7
|
+
module Generators
|
8
|
+
# Generates multiple spike files, seperating tests from the
|
9
|
+
# tested code. For when the spike gets too hairy for a single
|
10
|
+
# file.
|
11
|
+
class Multi < Thor::Group
|
12
|
+
include Thor::Actions
|
13
|
+
|
14
|
+
argument :name, type: :string
|
15
|
+
|
16
|
+
def self.source_root
|
17
|
+
"#{File.dirname(__FILE__)}/templates/multi"
|
18
|
+
end
|
19
|
+
|
20
|
+
def create_spike_directories
|
21
|
+
empty_directory(name)
|
22
|
+
empty_directory("#{name}/lib")
|
23
|
+
empty_directory("#{name}/test")
|
24
|
+
end
|
25
|
+
|
26
|
+
def create_test_files
|
27
|
+
name_in_snake_case = Spiker.snake_case(name)
|
28
|
+
name_as_class = Spiker.classify(name)
|
29
|
+
opts = { name_as_class: name_as_class, name_in_snake_case: name_in_snake_case }
|
30
|
+
template("app_test.rb.erb", "#{name}/test/#{name_in_snake_case}_test.rb", opts)
|
31
|
+
template("test_helper.rb", "#{name}/test/test_helper.rb", opts)
|
32
|
+
end
|
33
|
+
|
34
|
+
def create_app_files
|
35
|
+
name_in_snake_case = Spiker.snake_case(name)
|
36
|
+
opts = { name_as_class: Spiker.classify(name) }
|
37
|
+
template("app.rb.erb", "#{name}/lib/#{name_in_snake_case}.rb", opts)
|
38
|
+
end
|
39
|
+
|
40
|
+
def create_guard_file
|
41
|
+
template("guardfile.rb", "#{name}/Guardfile")
|
42
|
+
end
|
43
|
+
|
44
|
+
def create_gem_file
|
45
|
+
template("gemfile.rb", "#{name}/Gemfile")
|
46
|
+
end
|
47
|
+
|
48
|
+
def create_rake_file
|
49
|
+
template("rakefile.rb", "#{name}/Rakefile")
|
50
|
+
end
|
51
|
+
|
52
|
+
def create_readme_file
|
53
|
+
opts = { name_as_class: Spiker.classify(name), name: name }
|
54
|
+
template("readme.md.erb", "#{name}/README.md", opts)
|
55
|
+
end
|
56
|
+
|
57
|
+
def create_env_file
|
58
|
+
template("../common/basic.env", "#{name}/.env")
|
59
|
+
end
|
60
|
+
|
61
|
+
def run_bundler
|
62
|
+
inside(name) do
|
63
|
+
run("bundle install")
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -13,7 +13,7 @@ module Spiker
|
|
13
13
|
argument :name, type: :string
|
14
14
|
|
15
15
|
def self.source_root
|
16
|
-
"#{File.dirname(__FILE__)}/templates"
|
16
|
+
"#{File.dirname(__FILE__)}/templates/simple"
|
17
17
|
end
|
18
18
|
|
19
19
|
def create_spike_directory
|
@@ -21,16 +21,20 @@ module Spiker
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def create_spike_file
|
24
|
-
opts = {name_as_class: Spiker.classify(name)}
|
25
|
-
template("
|
24
|
+
opts = { name_as_class: Spiker.classify(name) }
|
25
|
+
template("app.rb.erb", "#{name}/app.rb", opts)
|
26
26
|
end
|
27
27
|
|
28
28
|
def create_guard_file
|
29
|
-
template("
|
29
|
+
template("guardfile.rb", "#{name}/Guardfile")
|
30
30
|
end
|
31
31
|
|
32
32
|
def create_gem_file
|
33
|
-
template("
|
33
|
+
template("gemfile.rb", "#{name}/Gemfile")
|
34
|
+
end
|
35
|
+
|
36
|
+
def create_env_file
|
37
|
+
template("../common/basic.env", "#{name}/.env")
|
34
38
|
end
|
35
39
|
|
36
40
|
def run_bundler
|
@@ -0,0 +1 @@
|
|
1
|
+
TEST_VALUE="test"
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'dotenv/load'
|
2
|
+
require 'minitest'
|
3
|
+
require 'minitest/autorun'
|
4
|
+
require 'minitest/reporters'
|
5
|
+
require 'minitest/given'
|
6
|
+
|
7
|
+
Minitest::Reporters.use!
|
8
|
+
|
9
|
+
describe 'When Initializing a <%= config[:name_as_class] %>' do
|
10
|
+
context 'Named Fred' do
|
11
|
+
Given(:fred) { <%= config[:name_as_class] %>.new(name: 'Fred') }
|
12
|
+
Then {
|
13
|
+
expect(fred.name).must_equal 'Fred'
|
14
|
+
}
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
class <%= config[:name_as_class] %>
|
19
|
+
attr_accessor :name
|
20
|
+
def initialize(name:)
|
21
|
+
@name = name
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
6
|
+
|
7
|
+
gem "minitest"
|
8
|
+
gem "minitest-reporters"
|
9
|
+
gem "minitest-given"
|
10
|
+
|
11
|
+
gem "guard"
|
12
|
+
gem "guard-minitest"
|
13
|
+
|
14
|
+
gem "dotenv"
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
clearing :on
|
4
|
+
|
5
|
+
guard :minitest, all_after_pass: true, test_folders: ["."], test_file_patterns: "*.rb" do
|
6
|
+
# We're using Minitest's Spec syntax, loaded by Given.
|
7
|
+
# We don't have to watch for spec files through because
|
8
|
+
# we're using a single file, which is also the app file.
|
9
|
+
watch(/^app\.rb$/) { "./app.rb" }
|
10
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
class <%= config[:name_as_class] %>Test < MiniTest::Test
|
6
|
+
def test_default_class_instantiates
|
7
|
+
assert <%= config[:name_as_class] %>.new
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_default_class_responds_to_hello
|
11
|
+
assert_equal "Hello, world!", <%= config[:name_as_class] %>.hello
|
12
|
+
end
|
13
|
+
end
|
@@ -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
|
9
|
-
|
10
|
-
gem
|
11
|
-
gem
|
7
|
+
gem "minitest"
|
8
|
+
gem "minitest-reporters"
|
9
|
+
gem "guard"
|
10
|
+
gem "guard-minitest"
|
11
|
+
gem "dotenv"
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
clearing :on
|
4
|
+
|
5
|
+
guard :minitest, all_after_pass: true do
|
6
|
+
# with Minitest::Unit
|
7
|
+
watch(%r{^test/(.*)/?(.*)_test\.rb$})
|
8
|
+
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}#{m[2]}_test.rb" }
|
9
|
+
watch(%r{^test/test_helper\.rb$}) { "test" }
|
10
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# <%= config[:name_as_class] %> Spike
|
2
|
+
|
3
|
+
This is the auto-generated README for the <%= config[:name_as_class] %> spike. This content was generated by the [Spiker](https://github.com/norlinga/spiker) gem.
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
This directory is the result of **someone** running the following command on a command line:
|
8
|
+
|
9
|
+
$ gem install spiker
|
10
|
+
$ spiker multi <%= config[:name] %>
|
11
|
+
$ cd <%= config[:name] %>
|
12
|
+
|
13
|
+
Once inside the spike directory, open your favorite text editor and then execute the following command:
|
14
|
+
|
15
|
+
$ bundle install
|
16
|
+
$ guard
|
17
|
+
|
18
|
+
Bundler will have executed once when the spike directory was first created, but it's no problem to run it again (in case the spike directory was shared between machines / environments).
|
19
|
+
|
20
|
+
After starting Guard you should have been greeted with passing tests. You are now ready to start hashing out your spike under test.
|
21
|
+
|
22
|
+
## Adding to This README
|
23
|
+
|
24
|
+
This README could be a great place to capture findings from your spike. Topics to address in this README might include:
|
25
|
+
|
26
|
+
- what was the initial motivation for this spike?
|
27
|
+
- what is the current state of this spike?
|
28
|
+
- is there a future intention or unrealized goal for this spike?
|
29
|
+
- what was discovered in the course of this spike?
|
30
|
+
- who is involved in this spike?
|
31
|
+
|
32
|
+
## Feel Free to Include Code
|
33
|
+
|
34
|
+
Embedding code in a Markdown file is easy - this README uses the triple backtick syntax. The following code will be rendered as a Ruby code block:
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
require 'dotenv'
|
38
|
+
|
39
|
+
puts ENV["TEST_VALUE"]
|
40
|
+
|
41
|
+
"maybe show some code in your README?".capitalize
|
42
|
+
```
|
43
|
+
|
44
|
+
Spikes are intended to be short lived, but that's no reason to skip proper practices in your spike development. Have fun!
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
|
4
|
+
# require the default lib file
|
5
|
+
require "<%= config[:name_in_snake_case] %>"
|
6
|
+
|
7
|
+
require "minitest/autorun"
|
8
|
+
require "minitest/reporters"
|
9
|
+
require "dotenv/load"
|
10
|
+
|
11
|
+
Minitest::Reporters.use!
|
12
|
+
|
13
|
+
# ensure the environment is available
|
14
|
+
class DefaultEnvironmentTest < MiniTest::Test
|
15
|
+
def test_default_environment
|
16
|
+
assert_equal "test", ENV["TEST_VALUE"]
|
17
|
+
end
|
18
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'dotenv/load'
|
1
2
|
require 'minitest'
|
2
3
|
require 'minitest/autorun'
|
3
4
|
require 'minitest/reporters'
|
@@ -5,8 +6,12 @@ require 'minitest/reporters'
|
|
5
6
|
Minitest::Reporters.use!
|
6
7
|
|
7
8
|
class <%= config[:name_as_class] %>Test < Minitest::Test
|
8
|
-
def
|
9
|
-
|
9
|
+
def test_name
|
10
|
+
assert_equal "Fred", <%= config[:name_as_class] %>.new(name: 'Fred').name
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_default_env_value
|
14
|
+
assert_equal "test", ENV["TEST_VALUE"]
|
10
15
|
end
|
11
16
|
end
|
12
17
|
|
data/lib/spiker/version.rb
CHANGED
data/lib/spiker.rb
CHANGED
@@ -2,10 +2,20 @@
|
|
2
2
|
|
3
3
|
require_relative "spiker/version"
|
4
4
|
|
5
|
+
# Spiker is a simple spike generator.
|
5
6
|
module Spiker
|
6
7
|
class Error < StandardError; end
|
7
8
|
|
8
9
|
def self.classify(str)
|
9
10
|
str.split(/[^A-Za-z0-0]/).map(&:capitalize).join
|
10
11
|
end
|
12
|
+
|
13
|
+
def self.snake_case(str)
|
14
|
+
# lifted from ActiveSupport inflectors
|
15
|
+
str.gsub(/::/, "/")
|
16
|
+
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
17
|
+
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
|
18
|
+
.tr("-", "_")
|
19
|
+
.downcase
|
20
|
+
end
|
11
21
|
end
|
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.5
|
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-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -47,19 +47,31 @@ files:
|
|
47
47
|
- exe/spiker
|
48
48
|
- lib/spiker.rb
|
49
49
|
- lib/spiker/cli.rb
|
50
|
-
- lib/spiker/generators/
|
50
|
+
- lib/spiker/generators/given.rb
|
51
|
+
- lib/spiker/generators/multi.rb
|
51
52
|
- lib/spiker/generators/simple.rb
|
52
|
-
- lib/spiker/generators/templates/
|
53
|
-
- lib/spiker/generators/templates/
|
54
|
-
- lib/spiker/generators/templates/
|
53
|
+
- lib/spiker/generators/templates/common/basic.env
|
54
|
+
- lib/spiker/generators/templates/given/app.rb.erb
|
55
|
+
- lib/spiker/generators/templates/given/gemfile.rb
|
56
|
+
- lib/spiker/generators/templates/given/guardfile.rb
|
57
|
+
- lib/spiker/generators/templates/multi/app.rb.erb
|
58
|
+
- lib/spiker/generators/templates/multi/app_test.rb.erb
|
59
|
+
- lib/spiker/generators/templates/multi/gemfile.rb
|
60
|
+
- lib/spiker/generators/templates/multi/guardfile.rb
|
61
|
+
- lib/spiker/generators/templates/multi/rakefile.rb
|
62
|
+
- lib/spiker/generators/templates/multi/readme.md.erb
|
63
|
+
- lib/spiker/generators/templates/multi/test_helper.rb
|
64
|
+
- lib/spiker/generators/templates/simple/app.rb.erb
|
65
|
+
- lib/spiker/generators/templates/simple/gemfile.rb
|
66
|
+
- lib/spiker/generators/templates/simple/guardfile.rb
|
55
67
|
- lib/spiker/version.rb
|
56
68
|
- spiker.gemspec
|
57
|
-
homepage: http://github.com/
|
69
|
+
homepage: http://github.com/norlinga/spiker
|
58
70
|
licenses:
|
59
71
|
- MIT
|
60
72
|
metadata:
|
61
73
|
allowed_push_host: https://rubygems.org
|
62
|
-
homepage_uri: http://github.com/
|
74
|
+
homepage_uri: http://github.com/norlinga/spiker
|
63
75
|
source_code_uri: https://github.com/norlinga/spiker
|
64
76
|
changelog_uri: https://github.com/norlinga/spiker
|
65
77
|
post_install_message:
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "thor/group"
|
4
|
-
module Spiker
|
5
|
-
module Generators
|
6
|
-
# Generates multiple spike files, seperating tests from the
|
7
|
-
# tested code. For when the spike gets too hairy for a single
|
8
|
-
# file.
|
9
|
-
class Multiple < Thor::Group
|
10
|
-
include Thor::Actions
|
11
|
-
|
12
|
-
argument :name, type: :string
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|