wren 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/bin/wren +8 -0
- data/lib/templates/Gemfile.tt +7 -0
- data/lib/templates/README.tt +11 -0
- data/lib/templates/Rakefile.tt +7 -0
- data/lib/templates/bin.tt +8 -0
- data/lib/templates/lib.tt +5 -0
- data/lib/templates/test.tt +8 -0
- data/lib/wren.rb +1 -4
- data/lib/wren/cli.rb +17 -0
- data/lib/wren/generator.rb +38 -0
- data/lib/wren/version.rb +1 -1
- data/wren.gemspec +7 -3
- metadata +49 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1278dc30341ffc9c70057312ca30c05b1170eb9
|
4
|
+
data.tar.gz: 632b5ba117a410450b4bfda0c009fb35a4dc5459
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f8cec0f1ecf7dbc538bafa798b5720d538288740819b14e44b62007ccad937a4b378afb92e98e228cade24c991ec1ba5147de0de79d31c9230c0c3cd7d8fa2c
|
7
|
+
data.tar.gz: 2a9b17694bc2165cdd9463c03cb2636eaffb422356def6706ecb2b4c5488ecc805e171e20a27941a6b1ee9d77061780c1c4e69f332f37706d93132fc65ea45e5
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Wren
|
2
2
|
|
3
|
-
|
3
|
+
Creates very simple Ruby projects not intended to be gems, but just
|
4
|
+
to be well-designed programs.
|
4
5
|
|
5
6
|
## Installation
|
6
7
|
|
@@ -18,7 +19,8 @@ Or install it yourself as:
|
|
18
19
|
|
19
20
|
## Usage
|
20
21
|
|
21
|
-
|
22
|
+
Use `wren <project_name>` on the command line to create a new simple
|
23
|
+
Ruby project.
|
22
24
|
|
23
25
|
## Contributing
|
24
26
|
|
data/bin/wren
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# <%= name.camelize %>
|
2
|
+
|
3
|
+
TODO: Describe the purpose of this program.
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
TODO: Describe how to start this program.
|
8
|
+
|
9
|
+
To run the tests, run `rake` on the command line. `rake` is a Ruby program that
|
10
|
+
executes tasks from a file called a `Rakefile`. It is often used by Ruby
|
11
|
+
libraries to run tests and other tasks.
|
data/lib/wren.rb
CHANGED
data/lib/wren/cli.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'wren/generator'
|
2
|
+
|
3
|
+
module Wren
|
4
|
+
class CLI < Thor
|
5
|
+
|
6
|
+
desc "new PROJECT", "Generates a new Ruby project."
|
7
|
+
method_option :exec,
|
8
|
+
:type => :boolean,
|
9
|
+
:default => true,
|
10
|
+
:aliases => "-x",
|
11
|
+
:desc => "Generates an executable file for your project."
|
12
|
+
|
13
|
+
def new(project)
|
14
|
+
invoke(Generator, [project], options)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require "thor"
|
2
|
+
require "active_support/core_ext/string"
|
3
|
+
require "pathname"
|
4
|
+
|
5
|
+
module Wren
|
6
|
+
class Generator < Thor::Group
|
7
|
+
include Thor::Actions
|
8
|
+
|
9
|
+
argument :name
|
10
|
+
class_option :exec => true, :aliases => "-x"
|
11
|
+
|
12
|
+
def self.source_root
|
13
|
+
Pathname.new(File.dirname(__FILE__)) + ".."
|
14
|
+
end
|
15
|
+
|
16
|
+
def create_rakefile
|
17
|
+
template "templates/Rakefile.tt", "#{name}/Rakefile"
|
18
|
+
end
|
19
|
+
|
20
|
+
def create_gemfile
|
21
|
+
template "templates/Gemfile.tt", "#{name}/Gemfile"
|
22
|
+
end
|
23
|
+
|
24
|
+
def create_lib_file
|
25
|
+
template "templates/lib.tt", "#{name}/lib/#{name}.rb"
|
26
|
+
end
|
27
|
+
|
28
|
+
def create_test_file
|
29
|
+
template "templates/test.tt", "#{name}/test/#{name}_test.rb"
|
30
|
+
end
|
31
|
+
|
32
|
+
def create_bin_file
|
33
|
+
return unless options[:exec]
|
34
|
+
template "templates/bin.tt", "#{name}/bin/#{name}"
|
35
|
+
chmod "#{name}/bin/#{name}", 0755
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/wren/version.rb
CHANGED
data/wren.gemspec
CHANGED
@@ -9,8 +9,9 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Clinton N. Dreisbach"]
|
10
10
|
spec.email = ["clinton@dreisbach.us"]
|
11
11
|
spec.summary = %q{A tool to automate Ruby projects.}
|
12
|
-
|
13
|
-
|
12
|
+
spec.description = %q{Creates very simple Ruby projects not intended to be gems, but just
|
13
|
+
to be well-designed programs.}
|
14
|
+
spec.homepage = "https://github.com/cndreisbach/wren"
|
14
15
|
spec.license = "MIT"
|
15
16
|
|
16
17
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -18,6 +19,9 @@ Gem::Specification.new do |spec|
|
|
18
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
20
|
spec.require_paths = ["lib"]
|
20
21
|
|
22
|
+
spec.add_runtime_dependency "activesupport", '~> 4.1'
|
23
|
+
spec.add_runtime_dependency 'thor', '~> 0.19'
|
24
|
+
|
21
25
|
spec.add_development_dependency "bundler", "~> 1.6"
|
22
|
-
spec.add_development_dependency "rake"
|
26
|
+
spec.add_development_dependency "rake", "~> 10"
|
23
27
|
end
|
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wren
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clinton N. Dreisbach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: thor
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.19'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.19'
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: bundler
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -28,20 +56,23 @@ dependencies:
|
|
28
56
|
name: rake
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
30
58
|
requirements:
|
31
|
-
- - "
|
59
|
+
- - "~>"
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
61
|
+
version: '10'
|
34
62
|
type: :development
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
|
-
- - "
|
66
|
+
- - "~>"
|
39
67
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
-
description:
|
68
|
+
version: '10'
|
69
|
+
description: |-
|
70
|
+
Creates very simple Ruby projects not intended to be gems, but just
|
71
|
+
to be well-designed programs.
|
42
72
|
email:
|
43
73
|
- clinton@dreisbach.us
|
44
|
-
executables:
|
74
|
+
executables:
|
75
|
+
- wren
|
45
76
|
extensions: []
|
46
77
|
extra_rdoc_files: []
|
47
78
|
files:
|
@@ -50,10 +81,19 @@ files:
|
|
50
81
|
- LICENSE.txt
|
51
82
|
- README.md
|
52
83
|
- Rakefile
|
84
|
+
- bin/wren
|
85
|
+
- lib/templates/Gemfile.tt
|
86
|
+
- lib/templates/README.tt
|
87
|
+
- lib/templates/Rakefile.tt
|
88
|
+
- lib/templates/bin.tt
|
89
|
+
- lib/templates/lib.tt
|
90
|
+
- lib/templates/test.tt
|
53
91
|
- lib/wren.rb
|
92
|
+
- lib/wren/cli.rb
|
93
|
+
- lib/wren/generator.rb
|
54
94
|
- lib/wren/version.rb
|
55
95
|
- wren.gemspec
|
56
|
-
homepage:
|
96
|
+
homepage: https://github.com/cndreisbach/wren
|
57
97
|
licenses:
|
58
98
|
- MIT
|
59
99
|
metadata: {}
|