crystallize 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 +7 -0
- data/README.md +21 -1
- data/Rakefile +0 -10
- data/crystallize.gemspec +1 -1
- data/lib/crystallize/creator.rb +7 -2
- data/lib/crystallize/gem_name/Rakefile +0 -10
- data/lib/crystallize/gem_name/lib/gem_name.rb +0 -2
- data/lib/crystallize/version.rb +1 -1
- data/lib/crystallize.rb +0 -2
- data/spec/spec_helper.rb +0 -3
- metadata +12 -16
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 968f4a1b4b1c51abcfe5e1019cd430e19efaf11d
|
4
|
+
data.tar.gz: f427b933ea4b729cee407989ae366f1cec312e30
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4281c5061a0f25d914287933f10d56150f32b6fd3e87610fab4f535b46715333e58902914d6a10de547fd1b8d24d1209b37a3f0a3c43893eea6f185a45d1e3ad
|
7
|
+
data.tar.gz: 5b4688ab05d5e28c9b6264095799f4d19fbe2d17585fc4941faab44985370e85363da8fdd91eccebd48175a017b9321b05d1b265627ef4ce5528f1f2f661e2b4
|
data/README.md
CHANGED
@@ -1,6 +1,26 @@
|
|
1
1
|
Crystallize
|
2
2
|
=====
|
3
|
-
|
3
|
+
Generate gems!
|
4
|
+
|
5
|
+
Overview
|
6
|
+
--------
|
7
|
+
|
8
|
+
Crystallize lets you quickly create gems. Run `crystallize my_gem` to generate the codebase for a gem named `my_gem` that has all of the best things: a pleasant directory structure, rspec, an MIT-LICENSE, a formatted README, a git repo, and more.
|
9
|
+
|
10
|
+
Installation
|
11
|
+
------------
|
12
|
+
|
13
|
+
```bash
|
14
|
+
gem install crystallize
|
15
|
+
```
|
16
|
+
|
17
|
+
Usage
|
18
|
+
-----
|
19
|
+
|
20
|
+
```bash
|
21
|
+
$ crystallize my_gem
|
22
|
+
Created gem in ./my_gem
|
23
|
+
```
|
4
24
|
|
5
25
|
License
|
6
26
|
-------
|
data/Rakefile
CHANGED
data/crystallize.gemspec
CHANGED
@@ -3,7 +3,7 @@ require File.expand_path('../lib/crystallize/version', __FILE__)
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.authors = ['Tom Benner']
|
5
5
|
s.email = ['tombenner@gmail.com']
|
6
|
-
s.description = s.summary = %q{
|
6
|
+
s.description = s.summary = %q{Generate gems!}
|
7
7
|
s.homepage = 'https://github.com/tombenner/crystallize'
|
8
8
|
|
9
9
|
s.files = `git ls-files`.split($\)
|
data/lib/crystallize/creator.rb
CHANGED
@@ -5,7 +5,7 @@ module Crystallize
|
|
5
5
|
def initialize
|
6
6
|
args = ARGV
|
7
7
|
@gem_name = args.shift
|
8
|
-
if @gem_name.
|
8
|
+
if @gem_name.nil?
|
9
9
|
puts "Please specify a gem name:\ncrystallize my_gem" and return
|
10
10
|
end
|
11
11
|
end
|
@@ -14,19 +14,24 @@ module Crystallize
|
|
14
14
|
gem_dir = "#{Dir.pwd}/#{@gem_name}"
|
15
15
|
FileUtils.rm_rf(gem_dir)
|
16
16
|
FileUtils.cp_r("#{Crystallize.dir}/gem_name", gem_dir)
|
17
|
+
gem_name_camelized = @gem_name.split('_').map { |word| word.capitalize }.join
|
17
18
|
Dir.chdir(gem_dir) do
|
18
19
|
rename_files
|
19
20
|
Dir.glob('**/*').each do |name|
|
20
21
|
next unless File.file?(name)
|
21
22
|
content = File.read(name)
|
22
23
|
content.gsub!('gem_name', @gem_name)
|
23
|
-
content.gsub!('GemName',
|
24
|
+
content.gsub!('GemName', gem_name_camelized)
|
24
25
|
File.write(name, content)
|
25
26
|
end
|
26
27
|
end
|
27
28
|
Dir.chdir("#{gem_dir}/lib") do
|
28
29
|
rename_files
|
29
30
|
end
|
31
|
+
Dir.chdir(gem_dir) do
|
32
|
+
`git init && git add . && git commit -m 'Initial commit'`
|
33
|
+
end
|
34
|
+
puts "Created gem in ./#{@gem_name}"
|
30
35
|
end
|
31
36
|
|
32
37
|
def rename_files
|
data/lib/crystallize/version.rb
CHANGED
data/lib/crystallize.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,33 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crystallize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Tom Benner
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-11 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rspec
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
|
-
description:
|
27
|
+
description: Generate gems!
|
31
28
|
email:
|
32
29
|
- tombenner@gmail.com
|
33
30
|
executables:
|
@@ -35,7 +32,7 @@ executables:
|
|
35
32
|
extensions: []
|
36
33
|
extra_rdoc_files: []
|
37
34
|
files:
|
38
|
-
- .gitignore
|
35
|
+
- ".gitignore"
|
39
36
|
- Gemfile
|
40
37
|
- MIT-LICENSE
|
41
38
|
- README.md
|
@@ -58,26 +55,25 @@ files:
|
|
58
55
|
homepage: https://github.com/tombenner/crystallize
|
59
56
|
licenses:
|
60
57
|
- MIT
|
58
|
+
metadata: {}
|
61
59
|
post_install_message:
|
62
60
|
rdoc_options: []
|
63
61
|
require_paths:
|
64
62
|
- lib
|
65
63
|
required_ruby_version: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
64
|
requirements:
|
68
|
-
- -
|
65
|
+
- - ">="
|
69
66
|
- !ruby/object:Gem::Version
|
70
67
|
version: '0'
|
71
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
-
none: false
|
73
69
|
requirements:
|
74
|
-
- -
|
70
|
+
- - ">="
|
75
71
|
- !ruby/object:Gem::Version
|
76
72
|
version: '0'
|
77
73
|
requirements: []
|
78
74
|
rubyforge_project:
|
79
|
-
rubygems_version:
|
75
|
+
rubygems_version: 2.4.4
|
80
76
|
signing_key:
|
81
|
-
specification_version:
|
82
|
-
summary:
|
77
|
+
specification_version: 4
|
78
|
+
summary: Generate gems!
|
83
79
|
test_files: []
|