potassium 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6bd955fe45f9f7ea2929aa14fce95eba22a2d589
4
- data.tar.gz: d4190dd0cef9d11f659c82cdd18fff3b94248cbe
3
+ metadata.gz: 1bf9de3b5b4c8ea4ae586b8ae920b4ed048c9e95
4
+ data.tar.gz: b412419918408d64783639d1358750649f6e4817
5
5
  SHA512:
6
- metadata.gz: 1897969429841a49c86d009cf9a3b391fb1a33c2166cb5a2ef5605fccdbc4768b79b838d5ee03fafd2f57981be738b96b4d6bc1990aa7f28b7761c40b58be1ae
7
- data.tar.gz: ebcb9f52ad8f8cc7bcbebcae08df89c8efd66b8032a9b232ac712ffb0004f696998df3d866db33c60a95ff296dff9ea4ddeb3296179da9f31a6607f18df97b4f
6
+ metadata.gz: 2e9bd1706d30902aba3383e10bd66e3ac845cb8e0f0954286d1aaf7d395cc7500a1a764eada0037fa1e2506582b55a5a397fa969091b1b21186c5d6cfa07149e
7
+ data.tar.gz: d7774fae9a5548a833c8d577610e5de95af178f5ab5b8f69962c2b8d7c44986ada511114314adb13cf61607cdd4309e3f2975009336878c05e2f5d5c7c50dc22
data/CHANGELOG.md CHANGED
@@ -24,3 +24,8 @@ Features:
24
24
 
25
25
  Chore:
26
26
  - Removed several questions for ActiveAdmin support.
27
+
28
+ ## 1.2.1
29
+
30
+ Refactor:
31
+ - Speed up `help` and `version` commands by lazily requiring rails dependencies.
data/lib/potassium/cli.rb CHANGED
@@ -1,5 +1,5 @@
1
- require 'potassium'
2
- require 'gli'
1
+ require "potassium/version"
2
+ require "gli"
3
3
 
4
4
  module Potassium::CLI
5
5
  extend GLI::App
@@ -7,7 +7,7 @@ module Potassium::CLI
7
7
  version Potassium::VERSION
8
8
  hide_commands_without_desc true
9
9
 
10
- commands_from 'potassium/cli/commands'
10
+ commands_from "potassium/cli/commands"
11
11
 
12
12
  exit Potassium::CLI.run(ARGV)
13
13
  end
@@ -1,6 +1,9 @@
1
1
  module Potassium::CLI
2
2
  command :create do |c|
3
3
  c.action do |global_options, options, args|
4
+ require "potassium/templates/application/generator"
5
+ require "potassium/template_finder"
6
+
4
7
  template_finder = Potassium::TemplateFinder.new
5
8
  template = template_finder.default_template
6
9
  template.source_paths << Rails::Generators::AppGenerator.source_root
@@ -1,11 +1,11 @@
1
- require 'rails/generators'
2
- require 'rails/generators/rails/app/app_generator'
3
- require 'inquirer'
1
+ require "rails/generators"
2
+ require "rails/generators/rails/app/app_generator"
3
+ require "inquirer"
4
4
 
5
5
  module Potassium
6
6
  class ApplicationGenerator < Rails::Generators::AppGenerator
7
7
  def finish_template
8
- require_relative './helpers/template-dsl'
8
+ require_relative "./helpers/template-dsl"
9
9
  TemplateDSL.extend_dsl(self, source_path: __FILE__)
10
10
  template_location = File.expand_path('./template.rb', File.dirname(__FILE__))
11
11
  instance_eval File.read(template_location), template_location
@@ -0,0 +1,5 @@
1
+ gather_gem 'unicorn-rails'
2
+
3
+ gather_gems(:production) do
4
+ gather_gem 'unicorn'
5
+ end
@@ -22,6 +22,7 @@ run_action(:asking) do
22
22
  end
23
23
 
24
24
  run_action(:recipe_loading) do
25
+ eval_file "recipes/unicorn.rb"
25
26
  eval_file "recipes/database.rb"
26
27
  eval_file "recipes/readme.rb"
27
28
  eval_file "recipes/rbenv.rb"
@@ -1,3 +1,3 @@
1
1
  module Potassium
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: potassium
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - juliogarciag
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-29 00:00:00.000000000 Z
11
+ date: 2015-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -96,7 +96,6 @@ files:
96
96
  - Rakefile
97
97
  - bin/potassium
98
98
  - docs/dsl.md
99
- - lib/potassium.rb
100
99
  - lib/potassium/cli.rb
101
100
  - lib/potassium/cli/commands/create.rb
102
101
  - lib/potassium/template_finder.rb
@@ -140,6 +139,7 @@ files:
140
139
  - lib/potassium/templates/application/recipes/rbenv.rb
141
140
  - lib/potassium/templates/application/recipes/readme.rb
142
141
  - lib/potassium/templates/application/recipes/testing.rb
142
+ - lib/potassium/templates/application/recipes/unicorn.rb
143
143
  - lib/potassium/templates/application/template.rb
144
144
  - lib/potassium/version.rb
145
145
  - potassium.gemspec
data/lib/potassium.rb DELETED
@@ -1,7 +0,0 @@
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