crystallize 0.0.1

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.
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ .DS_Store
2
+ Gemfile.lock
3
+ *.gem
4
+ log/*.log
5
+ .bundle/
6
+ pkg/
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2014 Tom Benner
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,8 @@
1
+ Crystallize
2
+ =====
3
+ Create gems!
4
+
5
+ License
6
+ -------
7
+
8
+ Crystallize is released under the MIT License. Please see the MIT-LICENSE file for details.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+ require "rake/testtask"
4
+
5
+ task :default => :test
6
+
7
+ Rake::TestTask.new do |t|
8
+ t.libs << "lib"
9
+ t.libs << "test"
10
+ t.test_files = FileList["test/**/*_test.rb"]
11
+ t.verbose = true
12
+ end
data/bin/crystallize ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/crystallize'
4
+
5
+ begin
6
+ creator = Crystallize::Creator.new
7
+ creator.run
8
+ rescue => e
9
+ STDERR.puts e.message
10
+ STDERR.puts e.backtrace.join("\n")
11
+ exit 1
12
+ end
@@ -0,0 +1,17 @@
1
+ require File.expand_path('../lib/crystallize/version', __FILE__)
2
+
3
+ Gem::Specification.new do |s|
4
+ s.authors = ['Tom Benner']
5
+ s.email = ['tombenner@gmail.com']
6
+ s.description = s.summary = %q{Create gems!}
7
+ s.homepage = 'https://github.com/tombenner/crystallize'
8
+
9
+ s.files = `git ls-files`.split($\)
10
+ s.name = 'crystallize'
11
+ s.executables = ['crystallize']
12
+ s.require_paths = ['lib']
13
+ s.version = Crystallize::VERSION
14
+ s.license = 'MIT'
15
+
16
+ s.add_development_dependency 'rspec'
17
+ end
@@ -0,0 +1,36 @@
1
+ require 'fileutils'
2
+
3
+ module Crystallize
4
+ class Creator
5
+ def initialize
6
+ args = ARGV
7
+ @gem_name = args.shift
8
+ if @gem_name.blank?
9
+ puts "Please specify a gem name:\ncrystallize my_gem" and return
10
+ end
11
+ end
12
+
13
+ def run
14
+ gem_dir = "#{Dir.pwd}/#{@gem_name}"
15
+ FileUtils.rm_rf(gem_dir)
16
+ FileUtils.cp_r("#{Crystallize.dir}/gem_name", gem_dir)
17
+ Dir.chdir(gem_dir) do
18
+ rename_files
19
+ Dir.glob('**/*').each do |name|
20
+ next unless File.file?(name)
21
+ content = File.read(name)
22
+ content.gsub!('gem_name', @gem_name)
23
+ content.gsub!('GemName', @gem_name.camelize)
24
+ File.write(name, content)
25
+ end
26
+ end
27
+ Dir.chdir("#{gem_dir}/lib") do
28
+ rename_files
29
+ end
30
+ end
31
+
32
+ def rename_files
33
+ %x[for f in *gem_name*; do mv "$f" "`echo $f | sed s/gem_name/#{@gem_name}/`"; done]
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,6 @@
1
+ .DS_Store
2
+ Gemfile.lock
3
+ *.gem
4
+ log/*.log
5
+ .bundle/
6
+ pkg/
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,20 @@
1
+ Copyright 2014 Tom Benner
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,10 @@
1
+ GemName
2
+ =====
3
+
4
+ Overview
5
+ --------
6
+
7
+ License
8
+ -------
9
+
10
+ GemName is released under the MIT License. Please see the MIT-LICENSE file for details.
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+ require "rake/testtask"
4
+
5
+ task :default => :test
6
+
7
+ Rake::TestTask.new do |t|
8
+ t.libs << "lib"
9
+ t.libs << "test"
10
+ t.test_files = FileList["test/**/*_test.rb"]
11
+ t.verbose = true
12
+ end
@@ -0,0 +1,16 @@
1
+ require File.expand_path('../lib/gem_name/version', __FILE__)
2
+
3
+ Gem::Specification.new do |s|
4
+ s.authors = ['Tom Benner']
5
+ s.email = ['tombenner@gmail.com']
6
+ s.description = s.summary = %q{TODO}
7
+ s.homepage = 'https://github.com/tombenner/gem_name'
8
+
9
+ s.files = `git ls-files`.split($\)
10
+ s.name = 'gem_name'
11
+ s.require_paths = ['lib']
12
+ s.version = GemName::VERSION
13
+ s.license = 'MIT'
14
+
15
+ s.add_development_dependency 'rspec'
16
+ end
@@ -0,0 +1,3 @@
1
+ module GemName
2
+ VERSION = '0.0.1'
3
+ end
@@ -0,0 +1,7 @@
1
+ require 'active_support/all'
2
+
3
+ directory = File.dirname(File.absolute_path(__FILE__))
4
+ Dir.glob("#{directory}/gem_name/*.rb") { |file| require file }
5
+
6
+ module GemName
7
+ end
@@ -0,0 +1,17 @@
1
+ require 'gem_name'
2
+
3
+ RSpec.configure do |config|
4
+ # ## Mock Framework
5
+ #
6
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
7
+ #
8
+ # config.mock_with :mocha
9
+ # config.mock_with :flexmock
10
+ # config.mock_with :rr
11
+
12
+ # Run specs in random order to surface order dependencies. If you find an
13
+ # order dependency and want to debug it, you can fix the order by providing
14
+ # the seed, which is printed after each run.
15
+ # --seed 1234
16
+ config.order = "random"
17
+ end
@@ -0,0 +1,3 @@
1
+ module Crystallize
2
+ VERSION = '0.0.1'
3
+ end
@@ -0,0 +1,9 @@
1
+ require 'active_support/all'
2
+
3
+ module Crystallize
4
+ def self.dir
5
+ "#{File.dirname(File.absolute_path(__FILE__))}/crystallize"
6
+ end
7
+ end
8
+
9
+ Dir.glob("#{Crystallize.dir}/*.rb") { |file| require file }
@@ -0,0 +1,20 @@
1
+ require 'crystallize'
2
+
3
+ require 'support/fixtures_helper'
4
+ require 'support/process_helper'
5
+
6
+ RSpec.configure do |config|
7
+ # ## Mock Framework
8
+ #
9
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
10
+ #
11
+ # config.mock_with :mocha
12
+ # config.mock_with :flexmock
13
+ # config.mock_with :rr
14
+
15
+ # Run specs in random order to surface order dependencies. If you find an
16
+ # order dependency and want to debug it, you can fix the order by providing
17
+ # the seed, which is printed after each run.
18
+ # --seed 1234
19
+ config.order = "random"
20
+ end
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: crystallize
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Tom Benner
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-12-06 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: Create gems!
31
+ email:
32
+ - tombenner@gmail.com
33
+ executables:
34
+ - crystallize
35
+ extensions: []
36
+ extra_rdoc_files: []
37
+ files:
38
+ - .gitignore
39
+ - Gemfile
40
+ - MIT-LICENSE
41
+ - README.md
42
+ - Rakefile
43
+ - bin/crystallize
44
+ - crystallize.gemspec
45
+ - lib/crystallize.rb
46
+ - lib/crystallize/creator.rb
47
+ - lib/crystallize/gem_name/.gitignore
48
+ - lib/crystallize/gem_name/Gemfile
49
+ - lib/crystallize/gem_name/MIT-LICENSE
50
+ - lib/crystallize/gem_name/README.md
51
+ - lib/crystallize/gem_name/Rakefile
52
+ - lib/crystallize/gem_name/gem_name.gemspec
53
+ - lib/crystallize/gem_name/lib/gem_name.rb
54
+ - lib/crystallize/gem_name/lib/gem_name/version.rb
55
+ - lib/crystallize/gem_name/spec/spec_helper.rb
56
+ - lib/crystallize/version.rb
57
+ - spec/spec_helper.rb
58
+ homepage: https://github.com/tombenner/crystallize
59
+ licenses:
60
+ - MIT
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubyforge_project:
79
+ rubygems_version: 1.8.25
80
+ signing_key:
81
+ specification_version: 3
82
+ summary: Create gems!
83
+ test_files: []