potassium 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +31 -0
  6. data/Rakefile +2 -0
  7. data/bin/potassium +3 -0
  8. data/lib/potassium.rb +7 -0
  9. data/lib/potassium/cli.rb +15 -0
  10. data/lib/potassium/cli/commands/create.rb +10 -0
  11. data/lib/potassium/template_finder.rb +15 -0
  12. data/lib/potassium/templates/application/README.md +216 -0
  13. data/lib/potassium/templates/application/assets/.bowerrc +3 -0
  14. data/lib/potassium/templates/application/assets/.editorconfig +24 -0
  15. data/lib/potassium/templates/application/assets/.pryrc +12 -0
  16. data/lib/potassium/templates/application/assets/.rbenv-vars.example +5 -0
  17. data/lib/potassium/templates/application/assets/active_admin/pundit_page_policy.rb +5 -0
  18. data/lib/potassium/templates/application/assets/bower.json +4 -0
  19. data/lib/potassium/templates/application/assets/config/database_mysql.yml +40 -0
  20. data/lib/potassium/templates/application/assets/config/database_postgresql.yml +26 -0
  21. data/lib/potassium/templates/application/assets/es.yml +2 -0
  22. data/lib/potassium/templates/application/assets/testing/.rspec +5 -0
  23. data/lib/potassium/templates/application/assets/testing/rails_helper.rb +53 -0
  24. data/lib/potassium/templates/application/generator.rb +15 -0
  25. data/lib/potassium/templates/application/helpers/callback-helpers.rb +43 -0
  26. data/lib/potassium/templates/application/helpers/environment-helpers.rb +18 -0
  27. data/lib/potassium/templates/application/helpers/gem-helpers.rb +75 -0
  28. data/lib/potassium/templates/application/helpers/template-dsl.rb +17 -0
  29. data/lib/potassium/templates/application/helpers/template-helpers.rb +22 -0
  30. data/lib/potassium/templates/application/helpers/variable-helpers.rb +21 -0
  31. data/lib/potassium/templates/application/recipes/admin.rb +26 -0
  32. data/lib/potassium/templates/application/recipes/asks/admin.rb +11 -0
  33. data/lib/potassium/templates/application/recipes/asks/database.rb +9 -0
  34. data/lib/potassium/templates/application/recipes/asks/devise.rb +10 -0
  35. data/lib/potassium/templates/application/recipes/asks/pundit.rb +4 -0
  36. data/lib/potassium/templates/application/recipes/bower.rb +3 -0
  37. data/lib/potassium/templates/application/recipes/database.rb +18 -0
  38. data/lib/potassium/templates/application/recipes/devise.rb +27 -0
  39. data/lib/potassium/templates/application/recipes/editorconfig.rb +1 -0
  40. data/lib/potassium/templates/application/recipes/git.rb +9 -0
  41. data/lib/potassium/templates/application/recipes/i18n.rb +2 -0
  42. data/lib/potassium/templates/application/recipes/production.rb +3 -0
  43. data/lib/potassium/templates/application/recipes/pry.rb +6 -0
  44. data/lib/potassium/templates/application/recipes/pundit.rb +28 -0
  45. data/lib/potassium/templates/application/recipes/rbenv.rb +4 -0
  46. data/lib/potassium/templates/application/recipes/readme.rb +2 -0
  47. data/lib/potassium/templates/application/recipes/testing.rb +27 -0
  48. data/lib/potassium/templates/application/template.rb +49 -0
  49. data/lib/potassium/version.rb +3 -0
  50. data/potassium.gemspec +26 -0
  51. metadata +164 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bd782f1354793989cfaf9ee632caeeec257b26fc
4
+ data.tar.gz: d26ed0b7bb9b6a7d8283a0e174cffd5758079d0b
5
+ SHA512:
6
+ metadata.gz: 4a548bc74ca74368a90d165c2aa56f87d054f0de071b4fad939702658b815ee13e375e7418ef45cc29da7e72b9c515e8f58644f89b887321d6360c623ba2dd7e
7
+ data.tar.gz: 2239c068a29d5e4ae00325ba104f4e94c265cbe58b19143dfda6d3222ecb19eddabe23b07dcfe96960045167048b048776e0dd4911079f56eeb37a1e84876dc2
data/.gitignore ADDED
@@ -0,0 +1,15 @@
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
15
+ .DS_Store
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in potassium.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 juliogarciag
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,31 @@
1
+ # Potassium
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 'potassium'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install potassium
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( https://github.com/[my-github-username]/potassium/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
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/bin/potassium ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'potassium/cli'
data/lib/potassium.rb ADDED
@@ -0,0 +1,7 @@
1
+ require "potassium/version"
2
+ require "potassium/templates/application/generator"
3
+ require "potassium/template_finder"
4
+
5
+ module Potassium
6
+ # Your code goes here...
7
+ end
@@ -0,0 +1,15 @@
1
+ require 'potassium'
2
+ require 'gli'
3
+
4
+ module Potassium::CLI
5
+ extend GLI::App
6
+
7
+ version Potassium::VERSION
8
+ hide_commands_without_desc true
9
+
10
+ commands_from 'potassium/cli/commands'
11
+
12
+ default_command :create
13
+
14
+ exit Potassium::CLI.run(ARGV)
15
+ end
@@ -0,0 +1,10 @@
1
+ module Potassium::CLI
2
+ command :create do |c|
3
+ c.action do |global_options, options, args|
4
+ template_finder = Potassium::TemplateFinder.new
5
+ template = template_finder.default_template
6
+ template.source_paths << Rails::Generators::AppGenerator.source_root
7
+ template.start
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,15 @@
1
+ module Potassium
2
+ class TemplateFinder
3
+ TEMPLATES = {
4
+ default: Potassium::ApplicationGenerator
5
+ }
6
+
7
+ def default_template
8
+ find(:default)
9
+ end
10
+
11
+ def find(name)
12
+ TEMPLATES.fetch(name)
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,216 @@
1
+ # Rails Template
2
+
3
+ On this template, we base our Rails applications.
4
+
5
+ ## Usage
6
+
7
+ Clone the template.
8
+
9
+ ```bash
10
+ $ git clone git@github.com:platanus/rails_template.git
11
+ ```
12
+
13
+ Create your new application based on template
14
+
15
+ ```bash
16
+ $ rails new my_new_app -m /path_to_template_root/app_template.rb
17
+ ```
18
+
19
+ ## The DSL
20
+
21
+ The DSL to extend and add recipes defines methods divided in mixins called helpers.
22
+
23
+ ### Template Helpers
24
+
25
+ #### eval_file(file)
26
+
27
+ Just evals a file from the source path of this folder. Example:
28
+
29
+ ```ruby
30
+ eval_file('recipes/database.rb')
31
+ ```
32
+
33
+ You can use any variable name you want in the body of the recipe because all the code loaded in each recipe is wrapped inside a method that is executed thereafter.
34
+
35
+ #### erase_comments(file)
36
+
37
+ Erase the comments from a file in the rails application created. Example:
38
+
39
+ ```ruby
40
+ erase_comments('Gemfile')
41
+ ```
42
+
43
+ ### Variable Helpers
44
+
45
+ #### set(key, value)
46
+
47
+ Defines a variable to use in different parts of the template. It's important to note that this was preferred over using standard instance variables because the rails template context is not fully controlled by us and to use arbitrary standard instance variables can lead to name clashing. Example:
48
+
49
+ ```ruby
50
+ set('fruit', 'platanus')
51
+ ```
52
+
53
+ #### get(key)
54
+
55
+ Retrieves a variable that was defined with `set`. Example:
56
+
57
+ ```ruby
58
+ get('fruit') == 'platanus'
59
+ ```
60
+
61
+ #### equals?(key, value)
62
+
63
+ Wrapps the pattern `get(key) == value`. Example:
64
+
65
+ ```ruby
66
+ set('fruit', 'platanus')
67
+ equals?('fruit', 'banana') # false
68
+ equals?('fruit', 'platanus') # true
69
+ ```
70
+
71
+ ### Environment Helpers
72
+
73
+ #### set_env(key, value)
74
+
75
+ Stores a future environment helper in the key `default_env` to be used in some way (the `.rbenv-vars` file is the only use right now). To help ensure that the execution of some rake commands in the end of the installation is correct, this sets the value as a real environment variable too. In this way, running `rake db:create` within the template will use the same environment variables that will use later, while running. Example:
76
+
77
+ ```ruby
78
+ set_env('DB_USER', 'root')
79
+ ```
80
+
81
+ #### get_env(key)
82
+
83
+ Get the previously stored variable stored with `set_env` with the name of the key. Example:
84
+
85
+ ```ruby
86
+ get_env('DB_USER')
87
+ ```
88
+
89
+ #### default_env(hash = {})
90
+
91
+ This stores all the pairs of a hash as environment variables. Example:
92
+
93
+ ```ruby
94
+ default_env({
95
+ 'DB_NAME' => "#{get(:underscorized_app_name)}",
96
+ 'DB_USER' => "root",
97
+ 'DB_PASSWORD' => ''
98
+ })
99
+ ```
100
+
101
+ ### Callback Helpers
102
+
103
+ This helpers helps to organize the flow inside the template between multiple recipes. They ensure that the template runs in order and help injecting callbacks before and after important actions. For example, a recipe may want to register something to happen after the gem installation and something to happen after the database creation.
104
+
105
+ #### run_action(action_name, &block)
106
+
107
+ Runs a block with the registered callbacks for the action named as the action_name parameter. Example:
108
+
109
+ ```ruby
110
+ run_action(:gem_install) do
111
+ build_gemfile
112
+ run "bundle install"
113
+ end
114
+ ```
115
+
116
+ #### after(action_name, wrap_in_action: false, &callback)
117
+
118
+ This registers a callback to happen after an action happened. The `wrap_in_action` parameter can be used to wrap the callback in a `run_action` call. Example:
119
+
120
+ ```ruby
121
+ # in the template file
122
+ run_action(:gem_install) do
123
+ build_gemfile
124
+ run "bundle install"
125
+ end
126
+
127
+ # in another recipe
128
+ after(:gem_install) do
129
+ generate "active_admin:install"
130
+ end
131
+
132
+ # or
133
+ after(:gem_install, :wrap_in_action => :admin_install) do
134
+ generate "active_admin:install"
135
+ end
136
+
137
+ # that is the same as:
138
+ after(:gem_install) do
139
+ run_action(:admin_install) do
140
+ generate "active_admin:install"
141
+ end
142
+ end
143
+ ```
144
+
145
+ #### before(action_name, wrap_in_action: false, &callback)
146
+
147
+ This registers a callback to happen after an action happened. The `wrap_in_action` parameter can be used to wrap the callback in a `run_action` call. Example:
148
+
149
+ ```ruby
150
+ # in the template file
151
+ run_action(:gem_install) do
152
+ build_gemfile
153
+ run "bundle install"
154
+ end
155
+
156
+ before(:gem_install) do
157
+ say "We are going to run gem install now", :green
158
+ end
159
+ ```
160
+
161
+ ### Gem Helpers
162
+
163
+ The process with the gems installation is different from the standard Rails one. Instead of using the `gem` method to append the gem information into the Gemfile, we are following a process like this:
164
+
165
+ 1. Replace the Gemfile's content with the only the source.
166
+ 2. Add the gems required by Rails to a hash in memory with the gems information.
167
+ 3. Through the loading of the recipes, add gems to the same hash.
168
+ 4. Using `build_gemfile` we build the gemfile from that information in a way that makes the Gemfile to be clean.
169
+
170
+ #### gather_gem(name, *attributes)
171
+
172
+ The attributes are the same as the attributes of the `gem` method of the Rails Templates. This adds a gem to the gem information but doesn't add it to the Gemfile yet. Example:
173
+
174
+ ```ruby
175
+ gather_gem 'activeadmin', github: 'activeadmin'
176
+ ```
177
+
178
+ #### gather_gems(*environments, &block)
179
+
180
+ Calls the block inside a block with the specified environments. It adds those gems as gems of those environments, so they are added in the correct place in the Gemfile. Again, everything is in memory and it's just stored in a final step, so we don't repeat groups in the final Gemfile. Example:
181
+
182
+ ```ruby
183
+ gather_gems(:development, :test) do
184
+ gather_gem('pry-rails')
185
+ end
186
+ ```
187
+
188
+ #### discard_gem(name)
189
+
190
+ This discard a previously added gem from everywhere. Example:
191
+
192
+ ```ruby
193
+ discard_gem('sqlite3')
194
+ ```
195
+
196
+ #### clean_gemfile
197
+
198
+ This removes everything from the Gemfile, adds the `source 'https://rubygems.org'` line in the top, reads from the `gemfile_entries` array, which holds the original gems that rails created, and add them to the hash of gems. Example:
199
+
200
+ ```ruby
201
+ run_action(:cleaning) do
202
+ clean_gemfile
203
+ # After that, the Gemfile is empty
204
+ end
205
+ ```
206
+
207
+ #### build_gemfile
208
+
209
+ It inserts the gems stored in memory inside the Gemfile, filling it cleanly. Example:
210
+
211
+ ```ruby
212
+ run_action(:gem_install) do
213
+ build_gemfile
214
+ run "bundle install"
215
+ end
216
+ ```
@@ -0,0 +1,3 @@
1
+ {
2
+ "directory": "vendor/assets/bower_components"
3
+ }
@@ -0,0 +1,24 @@
1
+ # EditorConfig helps developers define and maintain consistent
2
+ # coding styles between different editors and IDEs
3
+ # editorconfig.org
4
+
5
+ root = true
6
+
7
+ [*]
8
+
9
+ # Change these settings to your own preference
10
+ indent_style = space
11
+ indent_size = 2
12
+
13
+ # We recommend you to keep these unchanged
14
+ end_of_line = lf
15
+ charset = utf-8
16
+ trim_trailing_whitespace = true
17
+ insert_final_newline = true
18
+
19
+ [*.js]
20
+ indent_style = space
21
+ indent_size = 2
22
+
23
+ [*.md]
24
+ trim_trailing_whitespace = false
@@ -0,0 +1,12 @@
1
+ if defined?(PryByebug)
2
+ Pry.commands.alias_command 'c', 'continue'
3
+ Pry.commands.alias_command 's', 'step'
4
+ Pry.commands.alias_command 'n', 'next'
5
+ Pry.commands.alias_command 'f', 'finish'
6
+ end
7
+
8
+ if defined?(Rails)
9
+ require 'rails/console/app'
10
+ require 'rails/console/helpers'
11
+ include Rails::ConsoleMethods
12
+ end
@@ -0,0 +1,5 @@
1
+ DB_NAME=<%= @app_name.downcase %>
2
+ DB_USER=root
3
+ DB_PASSWORD=
4
+ DEFAULT_EMAIL_ADDRESS=
5
+ SECRET_KEY_BASE=
@@ -0,0 +1,5 @@
1
+ class ActiveAdmin::PagePolicy < ApplicationPolicy
2
+ def show?
3
+ true
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "<%= @app_name.camelcase %>",
3
+ "version": "1.0.0"
4
+ }
@@ -0,0 +1,40 @@
1
+ <%
2
+ socket = [
3
+ ENV["BOXEN_MYSQL_SOCKET"],
4
+ "/var/run/mysql5/mysqld.sock",
5
+ "/tmp/mysql.sock"
6
+ ].detect { |f| f && File.exist?(f) }
7
+
8
+ port = ENV["BOXEN_MYSQL_PORT"] || "3306"
9
+ %>
10
+
11
+ production:
12
+ adapter: mysql2
13
+ encoding: utf8
14
+ database: <%= ENV['DB_NAME'] %>
15
+ pool: 5
16
+ username: <%= ENV['DB_USER'] %>
17
+ password: <%= ENV['DB_PASSWORD'] %>
18
+ host: <%= ENV['DB_HOST'] %>
19
+
20
+ development: &development
21
+ adapter: mysql2
22
+ encoding: utf8
23
+ database: <%= ENV['DB_NAME'] %>_development
24
+ username: <%= ENV['DB_USER'] %>
25
+ password: <%= ENV['DB_PASSWORD'] %>
26
+ <% if socket %>
27
+ host: localhost
28
+ socket: <%= socket %>
29
+ <% else %>
30
+ host: 127.0.0.1
31
+ port: <%= port %>
32
+ <% end %>
33
+
34
+ # Warning: The database defined as "test" will be erased and
35
+ # re-generated from your development database when you run "rake".
36
+ # Do not set this db to the same as development or production.
37
+ test:
38
+ <<: *development
39
+ database: <%= ENV['DB_NAME'] %>_test
40
+ pool: 5
@@ -0,0 +1,26 @@
1
+ production:
2
+ adapter: postgresql
3
+ encoding: utf8
4
+ database: <%= ENV['DB_NAME'] %>
5
+ pool: 5
6
+ username: <%= ENV['DB_USER'] %>
7
+ password: <%= ENV['DB_PASSWORD'] %>
8
+ host: <%= ENV['DB_HOST'] %>
9
+ port: <%= ENV['DB_PORT'] %>
10
+
11
+ development: &development
12
+ adapter: postgresql
13
+ encoding: utf8
14
+ database: <%= ENV['DB_NAME'] %>_development
15
+ username: <%= ENV['DB_USER'] %>
16
+ password: <%= ENV['DB_PASSWORD'] %>
17
+ host: <%= ENV["BOXEN_POSTGRESQL_HOST"] || "127.0.0.1" %>
18
+ port: <%= ENV["BOXEN_POSTGRESQL_PORT"] || 5432 %>
19
+
20
+ # Warning: The database defined as "test" will be erased and
21
+ # re-generated from your development database when you run "rake".
22
+ # Do not set this db to the same as development or production.
23
+ test:
24
+ <<: *development
25
+ database: <%= ENV['DB_NAME'] %>_test
26
+ pool: 5
@@ -0,0 +1,2 @@
1
+ es:
2
+ hello: "Hola mundo"
@@ -0,0 +1,5 @@
1
+ --color
2
+ --require spec_helper
3
+ --warnings
4
+ --format=doc
5
+ --format=Nc
@@ -0,0 +1,53 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ ENV['RAILS_ENV'] ||= 'test'
3
+ require 'spec_helper'
4
+ require File.expand_path('../../config/environment', __FILE__)
5
+ require 'rspec/rails'
6
+ require 'shoulda/matchers'
7
+ # Add additional requires below this line. Rails is not loaded until this point!
8
+
9
+ # Requires supporting ruby files with custom matchers and macros, etc, in
10
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
11
+ # run as spec files by default. This means that files in spec/support that end
12
+ # in _spec.rb will both be required and run as specs, causing the specs to be
13
+ # run twice. It is recommended that you do not name files matching this glob to
14
+ # end with _spec.rb. You can configure this pattern with the --pattern
15
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
16
+ #
17
+ # The following line is provided for convenience purposes. It has the downside
18
+ # of increasing the boot-up time by auto-requiring all files in the support
19
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
20
+ # require only the support files necessary.
21
+ #
22
+ Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
23
+
24
+ # Checks for pending migrations before tests are run.
25
+ # If you are not using ActiveRecord, you can remove this line.
26
+ ActiveRecord::Migration.maintain_test_schema!
27
+
28
+ RSpec.configure do |config|
29
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
30
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
31
+
32
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
33
+ # examples within a transaction, remove the following line or assign false
34
+ # instead of true.
35
+ config.use_transactional_fixtures = true
36
+
37
+ # RSpec Rails can automatically mix in different behaviours to your tests
38
+ # based on their file location, for example enabling you to call `get` and
39
+ # `post` in specs under `spec/controllers`.
40
+ #
41
+ # You can disable this behaviour by removing the line below, and instead
42
+ # explicitly tag your specs with their type, e.g.:
43
+ #
44
+ # RSpec.describe UsersController, :type => :controller do
45
+ # # ...
46
+ # end
47
+ #
48
+ # The different available types are documented in the features, such as in
49
+ # https://relishapp.com/rspec/rspec-rails/docs
50
+ config.infer_spec_type_from_file_location!
51
+
52
+ config.include FactoryGirl::Syntax::Methods
53
+ end
@@ -0,0 +1,15 @@
1
+ require 'rails/generators'
2
+ require 'rails/generators/rails/app/app_generator'
3
+ require 'inquirer'
4
+
5
+ module Potassium
6
+ class ApplicationGenerator < Rails::Generators::AppGenerator
7
+ def finish_template
8
+ require_relative './helpers/template-dsl'
9
+ TemplateDSL.extend_dsl(self, source_path: __FILE__)
10
+ template_location = File.expand_path('./template.rb', File.dirname(__FILE__))
11
+ instance_eval File.read(template_location), template_location
12
+ super
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,43 @@
1
+ module CallbackHelpers
2
+ def after(action_name, wrap_in_action: false, &action)
3
+ ensure_callbacks_variables_for_action(action_name)
4
+
5
+ if get(:executed_actions).include?(action_name)
6
+ instance_exec(&wrap_action(action, wrap_in_action))
7
+ else
8
+ add_callback(action_name, :after, wrap_action(action, wrap_in_action))
9
+ end
10
+ end
11
+
12
+ def before(action_name, wrap_in_action: false, &action)
13
+ ensure_callbacks_variables_for_action(action_name)
14
+ add_callback(action_name, :before, action)
15
+ end
16
+
17
+ def run_action(action_name, &action)
18
+ ensure_callbacks_variables_for_action(action_name)
19
+ callbacks = get(:callbacks)[action_name]
20
+
21
+ callbacks[:before].each { |callback| instance_exec(&callback) }
22
+ instance_exec(&action)
23
+ get(:executed_actions) << action_name
24
+ callbacks[:after].each { |callback| instance_exec(&callback) }
25
+ end
26
+
27
+ private
28
+
29
+ def add_callback(action_name, type, action)
30
+ get(:callbacks)[action_name][type] << action
31
+ end
32
+
33
+ def wrap_action(action, wrap_in_action)
34
+ return action unless wrap_in_action
35
+ ->{ run_action(wrap_in_action, &action) }
36
+ end
37
+
38
+ def ensure_callbacks_variables_for_action(action_name)
39
+ ensure_variable(:callbacks, {})
40
+ ensure_variable(:executed_actions, [])
41
+ get(:callbacks)[action_name] ||= { before: [], after: [] }
42
+ end
43
+ end
@@ -0,0 +1,18 @@
1
+ module EnvironmentHelpers
2
+ def set_env(key, value)
3
+ ensure_variable(:default_env, {})
4
+ get(:default_env)[key] = value
5
+ ENV[key] = value
6
+ end
7
+
8
+ def get_env(key)
9
+ ensure_variable(:default_env, {})
10
+ get(:default_env)[key]
11
+ end
12
+
13
+ def default_env(hash = {})
14
+ hash.each do |key, value|
15
+ set_env(key, value)
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,75 @@
1
+ module GemHelpers
2
+ def gather_gem(name, *attributes)
3
+ ensure_variable(:gems, {})
4
+ current_gem_groups = get(:current_gem_groups) || [:base]
5
+
6
+ get(:gems)[current_gem_groups] ||= []
7
+ get(:gems)[current_gem_groups] << { name: name, attributes: attributes }
8
+ end
9
+
10
+ def discard_gem(name)
11
+ get(:gems).each do |environments, gems|
12
+ gems.delete_if do |gem_entry|
13
+ gem_entry[:name] == name
14
+ end
15
+ end
16
+ end
17
+
18
+ def gather_gems(*environments, &block)
19
+ ensure_variable(:gems, {})
20
+ set(:current_gem_groups, environments)
21
+ instance_exec(&block)
22
+ set(:current_gem_groups, [:base])
23
+ end
24
+
25
+ def clean_gemfile
26
+ remove_everything_but_source
27
+ add_original_rails_gems
28
+ end
29
+
30
+ def build_gemfile
31
+ call_gem_for_gathered_gems
32
+ fix_withespace_issues
33
+ end
34
+
35
+ private
36
+
37
+ def call_gem_for_gathered_gems
38
+ ensure_variable(:gems, {})
39
+ gems = get(:gems)
40
+
41
+ base_gems = gems.delete([:base]) || []
42
+
43
+ call_gem_for_gems(base_gems)
44
+
45
+ gems.each do |environments, env_gems|
46
+ gem_group *environments do
47
+ call_gem_for_gems(env_gems)
48
+ end
49
+ end
50
+ end
51
+
52
+ def call_gem_for_gems(gems)
53
+ gems.each(&method(:call_gem_for_gem))
54
+ end
55
+
56
+ def call_gem_for_gem(gem_data)
57
+ gem gem_data[:name], *gem_data[:attributes]
58
+ end
59
+
60
+ def add_original_rails_gems
61
+ gemfile_entries.each do |entry|
62
+ unless entry.commented_out
63
+ gather_gem(entry.name, entry.version)
64
+ end
65
+ end
66
+ end
67
+
68
+ def remove_everything_but_source
69
+ gsub_file("Gemfile", /[\w\W]+/, "source 'https://rubygems.org'\n")
70
+ end
71
+
72
+ def fix_withespace_issues
73
+ gsub_file("Gemfile", /^group/, "\ngroup")
74
+ end
75
+ end
@@ -0,0 +1,17 @@
1
+ module TemplateDSL
2
+ def self.extend_dsl(object, source_path: __FILE__)
3
+ require_relative './template-helpers'
4
+ require_relative './variable-helpers'
5
+ require_relative './environment-helpers'
6
+ require_relative './gem-helpers'
7
+ require_relative './callback-helpers'
8
+
9
+ object.send :extend, TemplateHelpers
10
+ object.send :extend, VariableHelpers
11
+ object.send :extend, EnvironmentHelpers
12
+ object.send :extend, GemHelpers
13
+ object.send :extend, CallbackHelpers
14
+
15
+ object.send :source_path, source_path
16
+ end
17
+ end
@@ -0,0 +1,22 @@
1
+ module TemplateHelpers
2
+ def eval_file(source)
3
+ location = File.expand_path(find_in_source_paths(source))
4
+ unique_name = SecureRandom.hex
5
+
6
+ define_singleton_method unique_name do
7
+ instance_eval File.read(location)
8
+ end
9
+
10
+ public_send unique_name
11
+ end
12
+
13
+ def source_path(path)
14
+ define_singleton_method :source_paths do
15
+ [File.expand_path(File.dirname(path))]
16
+ end
17
+ end
18
+
19
+ def erase_comments(file)
20
+ gsub_file file, /^\s*#[^\n]*\n/, ''
21
+ end
22
+ end
@@ -0,0 +1,21 @@
1
+ module VariableHelpers
2
+ def set(key, value)
3
+ @_data ||= {}
4
+ @_data[key] = value
5
+ end
6
+
7
+ def get(key)
8
+ @_data ||= {}
9
+ @_data[key]
10
+ end
11
+
12
+ def equals?(key, value)
13
+ get(key) == value
14
+ end
15
+
16
+ private
17
+
18
+ def ensure_variable(key, default_value)
19
+ set(key, get(key) || default_value)
20
+ end
21
+ end
@@ -0,0 +1,26 @@
1
+ if get(:admin_mode)
2
+ if equals?(:authentication, :devise)
3
+ gather_gem 'activeadmin', github: 'activeadmin'
4
+
5
+ after(:gem_install, :wrap_in_action => :admin_install) do
6
+ generate "active_admin:install"
7
+
8
+ line = "ActiveAdmin.setup do |config|"
9
+ initializer = "config/initializers/active_admin.rb"
10
+ gsub_file initializer, /(#{Regexp.escape(line)})/mi do |match|
11
+ <<-HERE.gsub(/^ {11}/, '')
12
+ class CustomFooter < ActiveAdmin::Component
13
+ def build
14
+ super(id: "footer")
15
+ para "Powered by Platanus"
16
+ end
17
+ end\n
18
+ ActiveAdmin.setup do |config|
19
+ config.view_factory.footer = CustomFooter
20
+ HERE
21
+ end
22
+ end
23
+ else
24
+ say "ActiveAdmin can't be installed because Devise isn't enabled.", :red
25
+ end
26
+ end
@@ -0,0 +1,11 @@
1
+ if equals?(:authentication, :devise)
2
+ admin_mode = Ask.confirm "Do you want to use ActiveAdmin?"
3
+ if admin_mode
4
+ admin_mode = Ask.confirm "Do you really want to use ActiveAdmin?"
5
+ if admin_mode
6
+ admin_mode = Ask.confirm "Do you really, really want to use ActiveAdmin?"
7
+ end
8
+ end
9
+
10
+ set(:admin_mode, admin_mode)
11
+ end
@@ -0,0 +1,9 @@
1
+ databases = {
2
+ "MySQL" => "mysql",
3
+ "PostgreSQL" => "postgresql",
4
+ "None, thanks" => "none"
5
+ }
6
+
7
+ database = databases.values[Ask.list("Which database are you using?", databases.keys)]
8
+
9
+ set :database, database
@@ -0,0 +1,10 @@
1
+ use_devise = Ask.confirm "Do you want to use Devise for authentication? (required for ActiveAdmin)"
2
+
3
+ if use_devise
4
+ set(:authentication, :devise)
5
+
6
+ create_user_model = Ask.confirm "Do you want to create a user model for Devise?"
7
+ if create_user_model
8
+ set(:authentication_model, :user)
9
+ end
10
+ end
@@ -0,0 +1,4 @@
1
+ if get(:authentication).present?
2
+ use_pundit = Ask.confirm("Do you want to use Pundit for authorization?")
3
+ set(:authorization, :pundit) if use_pundit
4
+ end
@@ -0,0 +1,3 @@
1
+ copy_file 'assets/.bowerrc', '.bowerrc'
2
+ template 'assets/bower.json', 'bower.json'
3
+ application "config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components')"
@@ -0,0 +1,18 @@
1
+ def activate_for_active_record(db)
2
+ remove_file 'config/database.yml'
3
+ copy_file "assets/config/database_#{db[:name]}.yml", 'config/database.yml'
4
+
5
+ discard_gem 'sqlite3'
6
+ gather_gem db[:gem_name]
7
+ end
8
+
9
+ databases = {
10
+ mysql: { name: 'mysql', gem_name: 'mysql2', relational: true },
11
+ postgresql: { name: 'postgresql', gem_name: 'pg', relational: true }
12
+ }
13
+
14
+ if db = databases[get(:database).to_sym]
15
+ if db[:relational]
16
+ activate_for_active_record(db)
17
+ end
18
+ end
@@ -0,0 +1,27 @@
1
+ authentication_framework = {
2
+ devise: ->{
3
+ gather_gem 'devise'
4
+
5
+ after(:gem_install) do
6
+ generate "devise:install"
7
+
8
+ if auth_model = get(:authentication_model)
9
+ generate "devise #{auth_model.to_s}"
10
+ end
11
+
12
+ gsub_file "config/initializers/devise.rb", /(\# config.secret_key.+)/i do |match|
13
+ match = "config.secret_key = ENV['DEVISE_SECRET_KEY']"
14
+ end
15
+
16
+ gsub_file "config/initializers/devise.rb", /(config.mailer_sender.+)/i do |match|
17
+ match = "config.mailer_sender = ENV['DEFAULT_EMAIL_ADDRESS']"
18
+ end
19
+
20
+ append_to_file '.rbenv-vars.example', 'DEVISE_SECRET_KEY='
21
+ end
22
+ }
23
+ }
24
+
25
+ if get(:authentication)
26
+ instance_exec(&(authentication_framework[get(:authentication)] || ->{ }))
27
+ end
@@ -0,0 +1 @@
1
+ copy_file 'assets/.editorconfig', '.editorconfig'
@@ -0,0 +1,9 @@
1
+ after(:database_creation) do
2
+ append_to_file '.gitignore', ".rbenv-vars\n"
3
+ append_to_file '.gitignore', ".powder\n"
4
+ append_to_file '.gitignore', "vendor/assets/bower_components\n"
5
+
6
+ git :init
7
+ git add: "."
8
+ git commit: %Q{ -m 'Initial commit' }
9
+ end
@@ -0,0 +1,2 @@
1
+ gather_gem('rails-i18n')
2
+ template 'assets/es.yml', 'config/locales/es.yml'
@@ -0,0 +1,3 @@
1
+ gsub_file "config/environments/production.rb", /(\# config.action_mailer.+)/i do |match|
2
+ match = "#{match}\n config.action_mailer.default_options = {from: ENV['DEFAULT_EMAIL_ADDRESS']}\n"
3
+ end
@@ -0,0 +1,6 @@
1
+ gather_gems(:development, :test) do
2
+ gather_gem('pry-rails')
3
+ gather_gem('pry-byebug')
4
+ end
5
+
6
+ template 'assets/.pryrc', '.pryrc'
@@ -0,0 +1,28 @@
1
+ authorization_framework = {
2
+ pundit: ->{
3
+ gather_gem 'pundit'
4
+
5
+ after(:gem_install) do
6
+ application_controller = "app/controllers/application_controller.rb"
7
+ gsub_file application_controller, "protect_from_forgery" do
8
+ "include Pundit\n protect_from_forgery"
9
+ end
10
+ generate "pundit:install"
11
+ end
12
+
13
+ if get(:admin_mode)
14
+ after(:admin_install) do
15
+ initializer = "config/initializers/active_admin.rb"
16
+ gsub_file initializer, /# config\.authorization_adapter =[^\n]+\n/ do
17
+ "config.authorization_adapter = ActiveAdmin::PunditAdapter\n"
18
+ end
19
+
20
+ template "assets/active_admin/pundit_page_policy.rb", "app/policies/active_admin/page_policy.rb"
21
+ end
22
+ end
23
+ }
24
+ }
25
+
26
+ if get(:authorization)
27
+ instance_exec(&(authorization_framework[get(:authorization)] || ->{ }))
28
+ end
@@ -0,0 +1,4 @@
1
+ create_file '.rbenv-vars'
2
+ template 'assets/.rbenv-vars.example', '.rbenv-vars.example'
3
+ run "cp .rbenv-vars.example .rbenv-vars"
4
+ create_file '.ruby-version', '2.0.0'
@@ -0,0 +1,2 @@
1
+ remove_file "README.rdoc"
2
+ create_file "README.md", "TODO: write an awesome README file"
@@ -0,0 +1,27 @@
1
+ gather_gems(:development, :test) do
2
+ gather_gem('rspec-rails')
3
+ gather_gem('factory_girl_rails')
4
+ gather_gem('guard-rspec', require: false)
5
+ gather_gem('rspec-nc', require: false)
6
+ end
7
+
8
+ gather_gems(:test) do
9
+ gather_gem('shoulda-matchers', require: false)
10
+ end
11
+
12
+ after(:gem_install) do
13
+ remove_dir 'test'
14
+
15
+ generate "rspec:install"
16
+
17
+ remove_file 'spec/rails_helper.rb'
18
+ copy_file 'assets/testing/rails_helper.rb', 'spec/rails_helper.rb'
19
+
20
+ remove_file '.rspec'
21
+ copy_file 'assets/testing/.rspec', '.rspec'
22
+
23
+ empty_directory 'spec/support'
24
+ create_file 'spec/support/.keep'
25
+
26
+ run "guard init"
27
+ end
@@ -0,0 +1,49 @@
1
+ set :app_name, @app_name
2
+ set :titleized_app_name, get(:app_name).titleize
3
+ set :underscorized_app_name, get(:app_name).underscore
4
+
5
+ default_env({
6
+ 'DB_NAME' => "#{get(:underscorized_app_name)}",
7
+ 'DB_USER' => "root",
8
+ 'DB_PASSWORD' => ''
9
+ })
10
+
11
+ run_action(:cleaning) do
12
+ clean_gemfile
13
+ gather_gem('spring')
14
+ end
15
+
16
+ run_action(:asking) do
17
+ eval_file "recipes/asks/database.rb"
18
+ eval_file "recipes/asks/devise.rb"
19
+ eval_file "recipes/asks/admin.rb"
20
+ eval_file "recipes/asks/pundit.rb"
21
+ end
22
+
23
+ run_action(:recipe_loading) do
24
+ eval_file "recipes/database.rb"
25
+ eval_file "recipes/readme.rb"
26
+ eval_file "recipes/rbenv.rb"
27
+ eval_file "recipes/bower.rb"
28
+ eval_file "recipes/editorconfig.rb"
29
+ eval_file "recipes/i18n.rb"
30
+ eval_file "recipes/pry.rb"
31
+ eval_file "recipes/devise.rb"
32
+ eval_file "recipes/admin.rb"
33
+ eval_file "recipes/pundit.rb"
34
+ eval_file "recipes/testing.rb"
35
+ eval_file "recipes/production.rb"
36
+ eval_file "recipes/git.rb"
37
+ end
38
+
39
+ say "Gathered enough information. Applying the template. Wait a minute.", :green
40
+
41
+ run_action(:gem_install) do
42
+ build_gemfile
43
+ run "bundle install"
44
+ end
45
+
46
+ run_action(:database_creation) do
47
+ run "rake db:create db:migrate"
48
+ run "RAILS_ENV=test rake db:create db:migrate"
49
+ end
@@ -0,0 +1,3 @@
1
+ module Potassium
2
+ VERSION = "1.0.0"
3
+ end
data/potassium.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'potassium/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "potassium"
8
+ spec.version = Potassium::VERSION
9
+ spec.authors = ["juliogarciag"]
10
+ spec.email = ["julioggonz@gmail.com"]
11
+ spec.summary = %q{An application generator from Platanus}
12
+ spec.description = %q{An application generator from Platanus}
13
+ spec.homepage = "https://github.com/platanus/potassium"
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.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "gli", "~> 2.12.2"
24
+ spec.add_development_dependency "rails", "~> 4.2"
25
+ spec.add_development_dependency "inquirer", "~> 0.2"
26
+ end
metadata ADDED
@@ -0,0 +1,164 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: potassium
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - juliogarciag
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-05-08 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.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
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: gli
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 2.12.2
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 2.12.2
55
+ - !ruby/object:Gem::Dependency
56
+ name: rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '4.2'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '4.2'
69
+ - !ruby/object:Gem::Dependency
70
+ name: inquirer
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '0.2'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '0.2'
83
+ description: An application generator from Platanus
84
+ email:
85
+ - julioggonz@gmail.com
86
+ executables:
87
+ - potassium
88
+ extensions: []
89
+ extra_rdoc_files: []
90
+ files:
91
+ - .gitignore
92
+ - Gemfile
93
+ - LICENSE.txt
94
+ - README.md
95
+ - Rakefile
96
+ - bin/potassium
97
+ - lib/potassium.rb
98
+ - lib/potassium/cli.rb
99
+ - lib/potassium/cli/commands/create.rb
100
+ - lib/potassium/template_finder.rb
101
+ - lib/potassium/templates/application/README.md
102
+ - lib/potassium/templates/application/assets/.bowerrc
103
+ - lib/potassium/templates/application/assets/.editorconfig
104
+ - lib/potassium/templates/application/assets/.pryrc
105
+ - lib/potassium/templates/application/assets/.rbenv-vars.example
106
+ - lib/potassium/templates/application/assets/active_admin/pundit_page_policy.rb
107
+ - lib/potassium/templates/application/assets/bower.json
108
+ - lib/potassium/templates/application/assets/config/database_mysql.yml
109
+ - lib/potassium/templates/application/assets/config/database_postgresql.yml
110
+ - lib/potassium/templates/application/assets/es.yml
111
+ - lib/potassium/templates/application/assets/testing/.rspec
112
+ - lib/potassium/templates/application/assets/testing/rails_helper.rb
113
+ - lib/potassium/templates/application/generator.rb
114
+ - lib/potassium/templates/application/helpers/callback-helpers.rb
115
+ - lib/potassium/templates/application/helpers/environment-helpers.rb
116
+ - lib/potassium/templates/application/helpers/gem-helpers.rb
117
+ - lib/potassium/templates/application/helpers/template-dsl.rb
118
+ - lib/potassium/templates/application/helpers/template-helpers.rb
119
+ - lib/potassium/templates/application/helpers/variable-helpers.rb
120
+ - lib/potassium/templates/application/recipes/admin.rb
121
+ - lib/potassium/templates/application/recipes/asks/admin.rb
122
+ - lib/potassium/templates/application/recipes/asks/database.rb
123
+ - lib/potassium/templates/application/recipes/asks/devise.rb
124
+ - lib/potassium/templates/application/recipes/asks/pundit.rb
125
+ - lib/potassium/templates/application/recipes/bower.rb
126
+ - lib/potassium/templates/application/recipes/database.rb
127
+ - lib/potassium/templates/application/recipes/devise.rb
128
+ - lib/potassium/templates/application/recipes/editorconfig.rb
129
+ - lib/potassium/templates/application/recipes/git.rb
130
+ - lib/potassium/templates/application/recipes/i18n.rb
131
+ - lib/potassium/templates/application/recipes/production.rb
132
+ - lib/potassium/templates/application/recipes/pry.rb
133
+ - lib/potassium/templates/application/recipes/pundit.rb
134
+ - lib/potassium/templates/application/recipes/rbenv.rb
135
+ - lib/potassium/templates/application/recipes/readme.rb
136
+ - lib/potassium/templates/application/recipes/testing.rb
137
+ - lib/potassium/templates/application/template.rb
138
+ - lib/potassium/version.rb
139
+ - potassium.gemspec
140
+ homepage: https://github.com/platanus/potassium
141
+ licenses:
142
+ - MIT
143
+ metadata: {}
144
+ post_install_message:
145
+ rdoc_options: []
146
+ require_paths:
147
+ - lib
148
+ required_ruby_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ required_rubygems_version: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ requirements: []
159
+ rubyforge_project:
160
+ rubygems_version: 2.0.14
161
+ signing_key:
162
+ specification_version: 4
163
+ summary: An application generator from Platanus
164
+ test_files: []