wp-stump 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8847ef0bef324c24d0f036c893ef01a0144d95e2
4
+ data.tar.gz: 8562efa11c569b0748b52d334db815d01b0560b4
5
+ SHA512:
6
+ metadata.gz: 55bcd159d0d09d3503d73b9d2a3d717c779b1eb8920eb64f684346d73f87eb33151202553411f4c883de841b8251c132ce44379e40e7923955e96ce344a3940e
7
+ data.tar.gz: e756b5697912935f966671c1e5f9214b8d89216640d9788a96d0e00aa75f22b16f256ae7cc1db1be0e80eeacf2e878e9751d206f1a44bf7abf82fb65819f0072
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in stump.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Andy Richardson
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.
@@ -0,0 +1,31 @@
1
+ # Stump
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'stump'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install stump
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( https://github.com/[my-github-username]/stump/fork )
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create a new Pull Request
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env ruby
2
+ # require "stump/cli"
3
+
4
+ require "thor"
5
+ require "wordmove/generators/movefile"
6
+ require "wordmove/deployer/base"
7
+
8
+ class Stump < Thor
9
+
10
+ desc "init NAME", "Create new project NAME"
11
+ def init(name)
12
+
13
+ puts "Creating project..."
14
+ wp_core = File.expand_path("../../lib/wp", __FILE__)
15
+ new_project_dir = "#{Dir.pwd}/#{name}"
16
+ new_project_theme = "#{new_project_dir}/wp-content/themes/#{name}"
17
+
18
+ # copy wp core with stump theme to current dir
19
+ FileUtils.cp_r wp_core, new_project_dir
20
+
21
+ # change theme dir to project NAME
22
+ puts "Changing theme name..."
23
+ FileUtils.mv "#{new_project_dir}/wp-content/themes/stump", new_project_theme
24
+
25
+ # cd into new theme dir
26
+ FileUtils.cd new_project_dir
27
+
28
+ # update style.css with project NAME
29
+ File.write( "#{new_project_theme}/style.css", theme_style(name) )
30
+
31
+ # initialize Wordmove
32
+ puts "Initializing Wordmove..."
33
+ Wordmove::Generators::Movefile.start
34
+
35
+ puts "Complete!"
36
+ puts Dir.pwd
37
+ end
38
+
39
+ no_tasks do
40
+ def theme_style(name)
41
+ <<-END.gsub(/^ {6}/, '')
42
+ /*
43
+ Theme Name: #{name}
44
+ Theme URI:
45
+ Description:
46
+ Version: 0.0.1
47
+ Author:
48
+ Author URI:
49
+
50
+ License: MIT License
51
+ License URI: http://opensource.org/licenses/MIT
52
+ */
53
+ END
54
+ end
55
+ end
56
+
57
+ end
58
+
59
+ Stump.start()
@@ -0,0 +1,5 @@
1
+ require "stump/version"
2
+
3
+ module Stump
4
+
5
+ end
@@ -0,0 +1,10 @@
1
+ require "thor"
2
+
3
+ class Stump < Thor
4
+
5
+ desc "init NAME", "Create new project NAME"
6
+ def init(name)
7
+ puts "create new project #{name} in #{Dir.pwd}"
8
+ end
9
+
10
+ end
@@ -0,0 +1,3 @@
1
+ module Stump
2
+ VERSION = "0.1.0"
3
+ end
Binary file
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'stump/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "wp-stump"
8
+ spec.version = Stump::VERSION
9
+ spec.authors = ["Andy Richardson"]
10
+ spec.email = ["andy@kohactive.com"]
11
+ spec.summary = "Initialize a WordPress project based on the Stump theme"
12
+ spec.description = ""
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.6"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+
24
+ spec.add_dependency "wordmove", "~> 1.2.0", '>= 1.2.0'
25
+ end
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wp-stump
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Andy Richardson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-10-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: wordmove
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.2.0
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 1.2.0
51
+ type: :runtime
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: 1.2.0
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 1.2.0
61
+ description: ''
62
+ email:
63
+ - andy@kohactive.com
64
+ executables:
65
+ - stump
66
+ extensions: []
67
+ extra_rdoc_files: []
68
+ files:
69
+ - ".gitignore"
70
+ - Gemfile
71
+ - LICENSE.txt
72
+ - README.md
73
+ - Rakefile
74
+ - bin/stump
75
+ - lib/stump.rb
76
+ - lib/stump/cli.rb
77
+ - lib/stump/version.rb
78
+ - stump-0.0.1.gem
79
+ - stump.gemspec
80
+ homepage: ''
81
+ licenses:
82
+ - MIT
83
+ metadata: {}
84
+ post_install_message:
85
+ rdoc_options: []
86
+ require_paths:
87
+ - lib
88
+ required_ruby_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ requirements: []
99
+ rubyforge_project:
100
+ rubygems_version: 2.2.0.rc.1
101
+ signing_key:
102
+ specification_version: 4
103
+ summary: Initialize a WordPress project based on the Stump theme
104
+ test_files: []
105
+ has_rdoc: