dextery 0.0.b3

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.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NjJkNTA2NGJjYmQwMGI0NjhmOGE3M2E5ODgwYTE1MDIzOGMxZmNjOQ==
5
+ data.tar.gz: !binary |-
6
+ ZTFhYjhiOGVhODFjMTNkYWY4YWZkMDNhMDAxYzUxODU1OTg1ZTlmMg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ YWY5NmQ2OWM0YmVkZGMxOTIyMTg1NWNkNTQzYzdiYjVjNDVjYTJhOGY1MzNi
10
+ NzViNTZlMjlkMDlkYWE1NDRkODQ1MmI0N2E4NTgxOGFiZTcyYTRjOTcxOTRi
11
+ YWVmZjc1MGZmNDM4NDQyNGIxOGQ1YjdiYWM1ZDIyYWQ5MjdhMzA=
12
+ data.tar.gz: !binary |-
13
+ Njk3MTZlYWQ2YjE2MTg5YTM1NjQ4OWQyZWI0ODQwNDU3YTQ0OWQyYWQ2ZWM4
14
+ OTg0YWI4NTUxOWI3NmQ4ZWEwMzMxMzBjMTkwNGE3ZmY5NTYwZWM5ZjdjMTZk
15
+ ODIxOWMyMzNhMDI3NGQ0YWRkZGZiMTQ2ODFhMjE5OTY0MjFkNTE=
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Marshall Shen
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # Dextery
2
+ Started as Gemified wrapper of [Jekyll Boostrap](http://jekyllbootstrap.com/)
3
+
4
+ ## Installation
5
+
6
+ Make sure you have *dextery* install:
7
+
8
+ $ gem install dextery
9
+
10
+ ### Released Version
11
+
12
+ 0.0.3
13
+
14
+ ### Dependencies
15
+
16
+ * Jekyll (~> 1.0.3)
17
+ * Ruby (~> 1.9.3), Ruby 2.0 is preferred
18
+
19
+ ## Usage
20
+
21
+ * Make sure *dextery* are *jekyll* installed
22
+ * run `dextery new [dir]`
23
+ * navigate to the blog directory [dir]
24
+ * run `jekyll serve` (default port is 4000)
25
+ * Go to `localhost:4000`, there is your new blog!
26
+
27
+ ## Contributing
28
+
29
+ 1. Fork it
30
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
31
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
32
+ 4. Push to the branch (`git push origin my-new-feature`)
33
+ 5. Create new Pull Request
34
+
35
+ ## Wish list
36
+
37
+ * Improve Jekyll Bootstrap, please check out [Jekyll Bootstrap](https://github.com/plusjade/jekyll-bootstrap) if you like the tool!
38
+ * Add more command level support for the gem. (Be compatible with [Jekyll](http://jekyllrb.com/) and [Jekyll Bootstrap](http://jekyllbootstrap.com/))
39
+ * Got feature request? Sumbit issues!
40
+
41
+ ## License
42
+
43
+ [MIT](http://opensource.org/licenses/MIT)
44
+ Essentially, do whatever you want.
45
+
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/bin/dextery ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'dextery'
4
+ require 'commander/import'
5
+
6
+ program :name, 'dextery'
7
+ program :version, '0.0.b3'
8
+ program :description, 'Blog engine based on Jekyll Bootstrap'
9
+
10
+ default_command :help
11
+
12
+ command :new do |c|
13
+ c.syntax = 'dextery new [DIR]'
14
+ c.description = 'Creates a new Dextery site under the project name'
15
+
16
+ c.option '--force', 'Force creation even if PATH already exists'
17
+
18
+ c.action do |args, options|
19
+ Dextery::Generator.manifest(args, options.__hash__)
20
+ end
21
+ end
data/dextery.gemspec ADDED
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ require 'dextery'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "dextery"
9
+ spec.version = "0.0.b3"
10
+ spec.authors = ["Marshall Shen"]
11
+ spec.email = ["mshen@groupon.com"]
12
+ spec.description = "Blog engine based on Jekyll Bootstrap"
13
+ spec.summary = "Blog engine based on Jekyll Bootstrap"
14
+ spec.homepage = "https://github.com/marshallshen/dextery"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files`.split($/)
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_runtime_dependency('commander', "~> 4.1.3")
23
+ spec.add_runtime_dependency('jekyll', "~>1.0.3")
24
+
25
+ spec.add_development_dependency "bundler", "~> 1.3"
26
+ spec.add_development_dependency "rake"
27
+ end
data/lib/dextery.rb ADDED
@@ -0,0 +1,8 @@
1
+ require 'dextery/generator'
2
+ require 'logger'
3
+
4
+ module Dextery
5
+ def self.logger
6
+ Logger.new(STDOUT)
7
+ end
8
+ end
@@ -0,0 +1,41 @@
1
+ module Dextery
2
+ module Generator
3
+ def self.manifest(args, options = {})
4
+ raise ArgumentError.new("You must specify a path") if args.empty?
5
+
6
+ new_blog_path = File.expand_path(args.join(" "), Dir.pwd)
7
+ if preserve_source_location?(new_blog_path, options)
8
+ Dextery.logger.error "Conflict:", "#{new_blog_path} exists and is not empty."
9
+ else
10
+ clean_directory(new_blog_path) if options[:force]
11
+ copy_bootstrap(new_blog_path)
12
+ notify_success
13
+ end
14
+ end
15
+
16
+ private
17
+ def self.preserve_source_location?(path, options)
18
+ options[:force] && !Dir["#{path}/**/*"].empty?
19
+ end
20
+
21
+ def self.clean_directory(path)
22
+ Dextery.logger.info "Cleanup directory #{path}.. Start"
23
+ system("rm -rf #{path}")
24
+ Dextery.logger.info "Cleanup directory #{path}.. Complete"
25
+ end
26
+
27
+ def self.copy_bootstrap(path)
28
+ template_path = File.join(File.expand_path('..', __FILE__), 'template', '/')
29
+ Dextery.logger.info "Setup blog using bootstrap.. Start"
30
+ system( "cp -r #{template_path} #{path}")
31
+ Dextery.logger.info "Setup blog using bootstrap.. Complete"
32
+ end
33
+
34
+ def self.notify_success
35
+ # We can do something really cool here,
36
+ # something like ASCII art, for now let's just
37
+ # log it.
38
+ Dextery.logger.info "I am a very neat monster"
39
+ end
40
+ end
41
+ end
metadata ADDED
@@ -0,0 +1,110 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dextery
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.b3
5
+ platform: ruby
6
+ authors:
7
+ - Marshall Shen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-07-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: commander
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 4.1.3
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.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: jekyll
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.3
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 1.0.3
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '1.3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '1.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: Blog engine based on Jekyll Bootstrap
70
+ email:
71
+ - mshen@groupon.com
72
+ executables:
73
+ - dextery
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - .gitignore
78
+ - Gemfile
79
+ - LICENSE.txt
80
+ - README.md
81
+ - Rakefile
82
+ - bin/dextery
83
+ - dextery.gemspec
84
+ - lib/dextery.rb
85
+ - lib/dextery/generator.rb
86
+ homepage: https://github.com/marshallshen/dextery
87
+ licenses:
88
+ - MIT
89
+ metadata: {}
90
+ post_install_message:
91
+ rdoc_options: []
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ! '>'
102
+ - !ruby/object:Gem::Version
103
+ version: 1.3.1
104
+ requirements: []
105
+ rubyforge_project:
106
+ rubygems_version: 2.0.5
107
+ signing_key:
108
+ specification_version: 4
109
+ summary: Blog engine based on Jekyll Bootstrap
110
+ test_files: []