goku 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.byebug_history +6 -0
- data/goku.gemspec +2 -0
- data/lib/goku.rb +4 -0
- data/lib/goku/cli.rb +4 -2
- data/lib/goku/factories/class.rb +28 -0
- data/lib/goku/factories/method.rb +17 -0
- data/lib/goku/version.rb +1 -1
- metadata +32 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6773a6a9e8bc3bedd824167c30782d260b62a6e
|
4
|
+
data.tar.gz: c224b152e6a39aa6653568b2817eab495bb4c878
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c2df543e34ee5e5bbd1ebe152cd958f2e2b4aa33d633e64122f4c981996949f881c014ec66962cc5efec8b79d94803a46e80dfb88cd01c5d7cf845d4c71e47a
|
7
|
+
data.tar.gz: 867c93e6db5d15fd98a72c07fb17e733b060840c63b2428559b5159636b5425a89393f5c10ea7c5738c9213a0624d56264aa7023f8f37d7a9a7512599608b038
|
data/.byebug_history
ADDED
data/goku.gemspec
CHANGED
@@ -19,8 +19,10 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency "thor", "~> 0.19"
|
22
|
+
spec.add_dependency "activesupport", "~> 4.2"
|
22
23
|
|
23
24
|
spec.add_development_dependency "bundler", "~> 1.11"
|
24
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
25
26
|
spec.add_development_dependency "rspec", "~> 3.0"
|
27
|
+
spec.add_development_dependency "byebug", "~> 5.0"
|
26
28
|
end
|
data/lib/goku.rb
CHANGED
data/lib/goku/cli.rb
CHANGED
@@ -5,8 +5,10 @@ module Goku
|
|
5
5
|
def c(raw_path)
|
6
6
|
path = Goku::Path.new(raw_path)
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
klass = Goku::Factories::Class.new(path.filename)
|
9
|
+
klass.add_method(Goku::Factories::Method.new("initialize"))
|
10
|
+
|
11
|
+
puts klass
|
10
12
|
end
|
11
13
|
|
12
14
|
desc "m PATH", "Create a module"
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Goku
|
2
|
+
module Factories
|
3
|
+
class Class
|
4
|
+
|
5
|
+
attr_reader :name
|
6
|
+
attr_reader :methods
|
7
|
+
|
8
|
+
def initialize(name)
|
9
|
+
@name = name
|
10
|
+
@methods = []
|
11
|
+
end
|
12
|
+
|
13
|
+
def add_method(method)
|
14
|
+
@methods << method
|
15
|
+
end
|
16
|
+
|
17
|
+
def to_s
|
18
|
+
strigified_methods = methods
|
19
|
+
.map(&:to_s)
|
20
|
+
.map { |method| method.indent(2) }
|
21
|
+
.join("\n\n")
|
22
|
+
|
23
|
+
"class #{name.camelcase}\n\n#{strigified_methods}\n\nend"
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/goku/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Šarčević
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.19'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4.2'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '4.2'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +80,20 @@ dependencies:
|
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: byebug
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '5.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '5.0'
|
69
97
|
description:
|
70
98
|
email:
|
71
99
|
- igor@renderedtext.com
|
@@ -74,6 +102,7 @@ executables:
|
|
74
102
|
extensions: []
|
75
103
|
extra_rdoc_files: []
|
76
104
|
files:
|
105
|
+
- ".byebug_history"
|
77
106
|
- ".gitignore"
|
78
107
|
- ".rspec"
|
79
108
|
- CODE_OF_CONDUCT.md
|
@@ -87,6 +116,8 @@ files:
|
|
87
116
|
- goku.gemspec
|
88
117
|
- lib/goku.rb
|
89
118
|
- lib/goku/cli.rb
|
119
|
+
- lib/goku/factories/class.rb
|
120
|
+
- lib/goku/factories/method.rb
|
90
121
|
- lib/goku/path.rb
|
91
122
|
- lib/goku/version.rb
|
92
123
|
homepage: https://github.com/shiroyasha/goku
|