pluginizer 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/.gitignore +15 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +31 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/pluginizer +18 -0
- data/bin/setup +7 -0
- data/lib/pluginizer.rb +6 -0
- data/lib/pluginizer/generators/plugin_generator.rb +21 -0
- data/lib/pluginizer/plugin_builder.rb +24 -0
- data/lib/pluginizer/version.rb +3 -0
- data/pluginizer.gemspec +27 -0
- data/templates/%name%.gemspec +24 -0
- data/templates/.ruby-version.tt +1 -0
- data/templates/README.md.tt +3 -0
- metadata +110 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5f6ddd17d521d94684479971541ad441c07d49f0
|
4
|
+
data.tar.gz: 6fc89ccadb3cf9909bac939277e80499d525ad9f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a4bfb61a93cac8594faa9dda2162a7978769cb95c9e38fa706ac57278f894db5d3ff65289ad35aabe6962073e11f34e41c53e13a583e2d8146cf8e3f36a92a65
|
7
|
+
data.tar.gz: 665cbc6152577654d131793b224ad72c7088e930229bd696f6a34f988adafc68ee324e0d4b78858ea257ed8a3339789e6f1bf32dbc221f00a18eca8444635ebe
|
data/.gitignore
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.1
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Patrice Lebel
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Pluginizer
|
2
|
+
|
3
|
+
Personal rails plugin generator with preferred settings/files (it sets my github noreply email, name, etc.).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Install the gem:
|
8
|
+
|
9
|
+
$ gem install pluginizer
|
10
|
+
|
11
|
+
To output the current gem version:
|
12
|
+
|
13
|
+
$ pluginizer -v
|
14
|
+
|
15
|
+
## Usage
|
16
|
+
|
17
|
+
$ pluginizer my-new-plugin-name
|
18
|
+
|
19
|
+
## Development
|
20
|
+
|
21
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
22
|
+
|
23
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
|
27
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/patleb/pluginizer.
|
28
|
+
|
29
|
+
## License
|
30
|
+
|
31
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "pluginizer"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/pluginizer
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
source_path = (Pathname.new(__FILE__).dirname + '../lib').expand_path
|
5
|
+
$LOAD_PATH << source_path
|
6
|
+
|
7
|
+
require 'pluginizer'
|
8
|
+
|
9
|
+
if ['-v', '--version'].include? ARGV[0]
|
10
|
+
puts Pluginizer::VERSION
|
11
|
+
exit 0
|
12
|
+
end
|
13
|
+
|
14
|
+
templates_root = File.expand_path(File.join("..", "templates"), File.dirname(__FILE__))
|
15
|
+
Pluginizer::PluginGenerator.source_root templates_root
|
16
|
+
Pluginizer::PluginGenerator.source_paths << templates_root << Rails::Generators::PluginGenerator.source_root
|
17
|
+
|
18
|
+
Pluginizer::PluginGenerator.start
|
data/bin/setup
ADDED
data/lib/pluginizer.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
require 'rails/generators/rails/plugin/plugin_generator'
|
3
|
+
|
4
|
+
module Pluginizer
|
5
|
+
class PluginGenerator < Rails::Generators::PluginGenerator
|
6
|
+
class_option :dummy_path, type: :string, default: "spec/dummy",
|
7
|
+
desc: "Create dummy application at given path"
|
8
|
+
|
9
|
+
class_option :full, type: :boolean, default: true,
|
10
|
+
desc: "Generate a rails engine with bundled Rails application for testing"
|
11
|
+
|
12
|
+
class_option :ruby_version, type: :string, default: '2.3.1',
|
13
|
+
desc: 'Set Ruby version used'
|
14
|
+
|
15
|
+
protected
|
16
|
+
|
17
|
+
def get_builder_class
|
18
|
+
Pluginizer::PluginBuilder
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Pluginizer
|
2
|
+
class PluginBuilder < Rails::PluginBuilder
|
3
|
+
def readme
|
4
|
+
template 'README.md'
|
5
|
+
end
|
6
|
+
|
7
|
+
def gemspec
|
8
|
+
template "%name%.gemspec"
|
9
|
+
end
|
10
|
+
|
11
|
+
def test
|
12
|
+
end
|
13
|
+
|
14
|
+
def leftovers
|
15
|
+
template '.ruby-version'
|
16
|
+
|
17
|
+
after_bundle do
|
18
|
+
git :init
|
19
|
+
git add: '.'
|
20
|
+
git commit: "-m 'first commit'"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/pluginizer.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
|
+
require 'pluginizer/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "pluginizer"
|
8
|
+
spec.version = Pluginizer::VERSION
|
9
|
+
spec.authors = ["Patrice Lebel"]
|
10
|
+
spec.email = ["patleb@users.noreply.github.com"]
|
11
|
+
|
12
|
+
spec.summary = "Plugin Boilerplate Builder"
|
13
|
+
spec.description = "Plugin Boilerplate Builder"
|
14
|
+
spec.homepage = "https://github.com/patleb/pluginizer"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "bin"
|
19
|
+
spec.executables = ["pluginizer"]
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_dependency 'rails', ">= 4.2", "< 6"
|
23
|
+
|
24
|
+
spec.add_runtime_dependency 'bundler', '~> 1.3'
|
25
|
+
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
|
3
|
+
# Maintain your gem's version:
|
4
|
+
require "<%= namespaced_name %>/version"
|
5
|
+
|
6
|
+
# Describe your gem and declare its dependencies:
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "<%= name %>"
|
9
|
+
s.version = <%= camelized_modules %>::VERSION
|
10
|
+
s.authors = ["Patrice Lebel"]
|
11
|
+
s.email = ["patleb@users.noreply.github.com"]
|
12
|
+
s.homepage = "https://github.com/patleb/<%= name %>"
|
13
|
+
s.summary = "<%= camelized_modules %>"
|
14
|
+
s.description = "<%= camelized_modules %>"
|
15
|
+
s.license = "MIT"
|
16
|
+
|
17
|
+
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]
|
18
|
+
|
19
|
+
<%= '# ' if options.dev? || options.edge? -%>s.add_dependency "rails", "<%= Array(rails_version_specifier).join('", "') %>"
|
20
|
+
<% unless options[:skip_active_record] -%>
|
21
|
+
|
22
|
+
s.add_development_dependency "<%= gem_for_database[0] %>"
|
23
|
+
<% end -%>
|
24
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= options.ruby_version %>
|
metadata
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pluginizer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Patrice Lebel
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-08-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.2'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '6'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '4.2'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '6'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: bundler
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.3'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.3'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rake
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '10.0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '10.0'
|
61
|
+
description: Plugin Boilerplate Builder
|
62
|
+
email:
|
63
|
+
- patleb@users.noreply.github.com
|
64
|
+
executables:
|
65
|
+
- pluginizer
|
66
|
+
extensions: []
|
67
|
+
extra_rdoc_files: []
|
68
|
+
files:
|
69
|
+
- ".gitignore"
|
70
|
+
- ".ruby-version"
|
71
|
+
- Gemfile
|
72
|
+
- LICENSE.txt
|
73
|
+
- README.md
|
74
|
+
- Rakefile
|
75
|
+
- bin/console
|
76
|
+
- bin/pluginizer
|
77
|
+
- bin/setup
|
78
|
+
- lib/pluginizer.rb
|
79
|
+
- lib/pluginizer/generators/plugin_generator.rb
|
80
|
+
- lib/pluginizer/plugin_builder.rb
|
81
|
+
- lib/pluginizer/version.rb
|
82
|
+
- pluginizer.gemspec
|
83
|
+
- templates/%name%.gemspec
|
84
|
+
- templates/.ruby-version.tt
|
85
|
+
- templates/README.md.tt
|
86
|
+
homepage: https://github.com/patleb/pluginizer
|
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: '0'
|
104
|
+
requirements: []
|
105
|
+
rubyforge_project:
|
106
|
+
rubygems_version: 2.5.1
|
107
|
+
signing_key:
|
108
|
+
specification_version: 4
|
109
|
+
summary: Plugin Boilerplate Builder
|
110
|
+
test_files: []
|