marigold 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/marigold.rb +24 -1
  3. metadata +5 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e55819edfb1ad97ad6727b4f8133d43bdcdfd488
4
- data.tar.gz: a17c50570ec5613cd646ce74cc2849e42792005b
3
+ metadata.gz: 292e20fb7deb81a968c9d2721ab9265f1102b96a
4
+ data.tar.gz: 30829384068a576444f09140b4e7ecb4e5df93da
5
5
  SHA512:
6
- metadata.gz: faf0847b0933bac4c416568e5810c3a783f0861937c686807e2223f908b701776c9bdf8df4f512d9a9bb28b078717aae7f19dab0c7c84377c5358043e178a0c6
7
- data.tar.gz: f7f7414c376cb7a1795371e838a8b8ddc1641aa84b4d17d98f8c6783df4aa55c9c1093a37f9a82007ea5f2fb65e11d0163805d2171a8d71436b1edd6c67f3b60
6
+ metadata.gz: 945a2f8cfd043cde5dd128b07152de4e4c984e9c4ca1c4221c6812c0a6d122bc3ae90bd9df2a613f7d4eb3dbc8e00b0b6eeb6956a1d7883b13e7b9ac542963d5
7
+ data.tar.gz: d34a681b0fa286396bf638a1c1969798d17defa849107e9a9042a47b07d97bfba84f900d4aeb2399c918a4782d2da6b8700eb4ca3f8c4267611974ce6b76f828
data/lib/marigold.rb CHANGED
@@ -1,3 +1,26 @@
1
1
  Dir.glob("./*.go") do |file|
2
- puts "working on: #{file}..."
2
+ base = File.basename(file, File.extname(file))
3
+ File.open(base + "_test.go", "w") { |f|
4
+ # model name config
5
+ upcase_name = base.slice(0,1).capitalize + base.slice(1..-1)
6
+
7
+ f.write('package main_test')
8
+ f.puts @string
9
+
10
+ f.write('import (')
11
+ f.puts @string
12
+ f.write('. "github.com/onsi/ginkgo"')
13
+ f.puts @string
14
+ f.write('. "github.com/onsi/gomega"')
15
+ f.puts @string
16
+ f.write(')')
17
+ f.puts @string
18
+
19
+ f.write('var _ = Describe("'+upcase_name+'", func() {')
20
+ f.puts @string
21
+ f.puts @string
22
+ f.write('})')
23
+ }
24
+
25
+ system "go fmt"
3
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marigold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Rucci
@@ -10,8 +10,10 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2016-05-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Marigold is a script built for Go that generates basic CRUD test for
14
- each file in the current directory within an application
13
+ description: "Marigold is a script built for generating basic CRUD test for an API.
14
+ Focus is on \n generating endpoint tests for Go. The test will
15
+ be built out to support Ginkgo and \n Gomega. Marigold will support
16
+ Javascript, Elixir, and Ruby in the future."
15
17
  email: nick@rucci.io
16
18
  executables:
17
19
  - marigold