gemsmith 5.4.0 → 5.5.0

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: 1805ddbb3db7c0fefc5439520bc56b19d025d5fe
4
- data.tar.gz: 0edc5d98121b4acc88d85dd1ae6c7d50dbb9be72
3
+ metadata.gz: 46f785c516971e71adbeb85ed2f8e71a3e7536db
4
+ data.tar.gz: 0fea0e8db0142967159df3166f4f573d99b2b575
5
5
  SHA512:
6
- metadata.gz: 0fdd84fddfda3796bd2864437f7178f37b2f735f07770b801933a654319a5ce39df457fd56e261c5b0b737b7512488920b1b3aa3879bf022060f9a43f32abd81
7
- data.tar.gz: d039120a68cc02dc413ca0a66d57f30730e65c230876114791d7ddc77882cabe0483310172e382bd5862144856c4ef39d1d0e27653019bbaa2029b070b977835
6
+ metadata.gz: 7bb76e0b8e17098e5d5e989328ebde25b63aeec24ffe218ac4d53aa616c7fd8dca560ecd70577f0920848552b07fd2046c40d073ee95445dddc21b4aac12c4b0
7
+ data.tar.gz: 5ffb90f966efbc280a8fa1d910adc595c381b796bf1abca11d6d6eca838bdecce409a120a6367822d7312f1543e265574db30b65fcf2039ab958bfbbf55cce09
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![Gemnasium Status](https://gemnasium.com/bkuhlmann/gemsmith.svg)](https://gemnasium.com/bkuhlmann/gemsmith)
7
7
  [![Travis CI Status](https://secure.travis-ci.org/bkuhlmann/gemsmith.svg)](http://travis-ci.org/bkuhlmann/gemsmith)
8
8
 
9
- Gemsmith allows you to easily craft new gems via the command line with custom settings (if desired).
9
+ A command line interface for smithing new Ruby gems.
10
10
 
11
11
  <!-- START doctoc generated TOC please keep comment here to allow auto update -->
12
12
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
@@ -107,11 +107,11 @@ If no options are configured, then the defaults are as follows:
107
107
  From the command line, type: gemsmith help
108
108
 
109
109
  gemsmith -c, [create=CREATE] # Create new gem.
110
- gemsmith -e, [edit] # Edit gem in default editor (assumes $EDITOR environment variable).
110
+ gemsmith -e, [--edit] # Edit Gemsmith settings in default editor.
111
111
  gemsmith -h, [--help=HELP] # Show this message or get help for a command.
112
- gemsmith -o, [open=OPEN] # Open gem in default editor (assumes $EDITOR environment variable).
113
- gemsmith -r, [read=READ] # Open gem in default browser.
114
- gemsmith -v, [--version] # Show version.
112
+ gemsmith -o, [open=OPEN] # Open a gem in default editor.
113
+ gemsmith -r, [read=READ] # Open a gem in default browser.
114
+ gemsmith -v, [--version] # Show Gemsmith version.
115
115
 
116
116
  For more gem creation options, type: gemsmith help create
117
117
 
@@ -4,5 +4,5 @@ require "gemsmith"
4
4
  require "gemsmith/cli"
5
5
  require "gemsmith/identity"
6
6
 
7
- Process.setproctitle Gemsmith::Identity.label_version
7
+ Process.setproctitle Gemsmith::Identity.version_label
8
8
  Gemsmith::CLI.start
@@ -26,7 +26,7 @@ module Gemsmith
26
26
  include CLIOptions
27
27
  include CLIHelpers
28
28
 
29
- package_name Gemsmith::Identity.label
29
+ package_name Gemsmith::Identity.version_label
30
30
 
31
31
  # Overwrites the Thor template source root.
32
32
  def self.source_root
@@ -81,28 +81,28 @@ module Gemsmith
81
81
  say
82
82
  end
83
83
 
84
- desc "-o, [open=OPEN]", "Open gem in default editor (assumes $EDITOR environment variable)."
84
+ desc "-o, [open=OPEN]", "Open a gem in default editor."
85
85
  map %w(-o --open) => :open
86
86
  def open name
87
87
  process_gem name, "open"
88
88
  end
89
89
 
90
- desc "-r, [read=READ]", "Open gem in default browser."
90
+ desc "-r, [read=READ]", "Open a gem in default browser."
91
91
  map %w(-r --read) => :read
92
92
  def read name
93
93
  process_gem name, "read"
94
94
  end
95
95
 
96
- desc "-e, [edit]", "Edit gem in default editor (assumes $EDITOR environment variable)."
96
+ desc "-e, [--edit]", "Edit #{Gemsmith::Identity.label} settings in default editor."
97
97
  map %w(-e --edit) => :edit
98
98
  def edit
99
99
  `#{editor} #{@settings_file}`
100
100
  end
101
101
 
102
- desc "-v, [--version]", "Show version."
102
+ desc "-v, [--version]", "Show #{Gemsmith::Identity.label} version."
103
103
  map %w(-v --version) => :version
104
104
  def version
105
- say Gemsmith::Identity.label_version
105
+ say Gemsmith::Identity.version_label
106
106
  end
107
107
 
108
108
  desc "-h, [--help=HELP]", "Show this message or get help for a command."
@@ -10,11 +10,15 @@ module Gemsmith
10
10
  end
11
11
 
12
12
  def self.version
13
- "5.4.0"
13
+ "5.5.0"
14
14
  end
15
15
 
16
- def self.label_version
16
+ def self.version_label
17
17
  [label, version].join " "
18
18
  end
19
+
20
+ def self.file_name
21
+ ".#{name}rc"
22
+ end
19
23
  end
20
24
  end
@@ -6,6 +6,10 @@ module Gemsmith
6
6
  cli.template_options.key?(:rails) && cli.template_options[:rails]
7
7
  end
8
8
 
9
+ def rails?
10
+ system "command -v rails"
11
+ end
12
+
9
13
  def create_engine
10
14
  cli.template "#{lib_root}/%gem_name%/engine.rb.tt", cli.template_options
11
15
 
@@ -32,7 +36,7 @@ module Gemsmith
32
36
  end
33
37
 
34
38
  def create
35
- return unless enabled?
39
+ return unless enabled? && rails?
36
40
 
37
41
  create_engine
38
42
  create_generator_files
@@ -11,7 +11,7 @@ module Gemsmith
11
11
 
12
12
  cli.template "%gem_name%/lib/%gem_name%/tasks/rspec.rake.tt", cli.template_options
13
13
  cli.template "#{rspec_root}/spec_helper.rb.tt", cli.template_options
14
- cli.template "#{rspec_root}/%gem_name%_spec.rb.tt", cli.template_options
14
+ cli.template "#{rspec_root}/lib/%gem_name%/%gem_name%_spec.rb.tt", cli.template_options
15
15
  cli.template "#{rspec_root}/support/kit/default_config.rb.tt", cli.template_options
16
16
  cli.template "#{rspec_root}/support/kit/stderr.rb.tt", cli.template_options
17
17
  cli.template "#{rspec_root}/support/kit/stdout.rb.tt", cli.template_options
@@ -45,9 +45,6 @@ Gem::Specification.new do |spec|
45
45
  <%- rspec_gem = config[:rails] ? "rspec-rails" : "rspec" -%>
46
46
  spec.add_development_dependency "<%= rspec_gem %>"
47
47
  <%- end -%>
48
- <%- if config[:bin] -%>
49
- spec.add_development_dependency "aruba"
50
- <%- end -%>
51
48
  <%- if config[:guard] -%>
52
49
  spec.add_development_dependency "rb-fsevent" # Guard file events for OSX.
53
50
  spec.add_development_dependency "guard-rspec"
@@ -1,13 +1,20 @@
1
1
  <%- if config[:rails] -%>
2
2
  AllCops:
3
+ RunRailsCops: true
3
4
  Exclude:
4
5
  - "spec/dummy/**/*"
5
6
  - "bin/rails"
7
+ - "vendor/**/*"
6
8
  <%- end -%>
7
9
  Style/CaseIndentation:
8
10
  IndentOneStep: true
9
11
  Style/MethodDefParentheses:
10
12
  EnforcedStyle: require_no_parentheses
13
+ Style/NumericLiterals:
14
+ Enabled: false
15
+ Style/PercentLiteralDelimiters:
16
+ PreferredDelimiters:
17
+ "%r": "()"
11
18
  Style/SingleLineBlockParams:
12
19
  Enabled: false
13
20
  Style/SpaceInsideHashLiteralBraces:
@@ -7,3 +7,5 @@ gemfile:
7
7
  - gemfiles/rails-4.1.x.gemfile
8
8
  <%- end -%>
9
9
  script: bundle exec rake
10
+ notifications:
11
+ email: false
@@ -1,21 +1,21 @@
1
1
  guard :rspec, cmd: "bundle exec rspec" do
2
- watch(%r{^spec/.+_spec\.rb$})
3
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
2
+ watch(%r(^spec/.+_spec\.rb$))
3
+ watch(%r(^lib/(.+)\.rb$)) { |m| "spec/lib/#{m[1]}_spec.rb" }
4
4
  watch("spec/spec_helper.rb") { "spec" }
5
5
  <%- if config[:rails] -%>
6
6
 
7
7
  # Rails
8
- watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
9
- watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
10
- watch(%r{^app/controllers/(.+)_(controller)\.rb$}) do |m|
8
+ watch(%r(^app/(.+)\.rb$)) { |m| "spec/#{m[1]}_spec.rb" }
9
+ watch(%r(^app/(.*)(\.erb|\.haml|\.slim)$)) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
10
+ watch(%r(^app/controllers/(.+)_(controller)\.rb$)) do |m|
11
11
  ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb"]
12
12
  end
13
- watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
13
+ watch(%r(^spec/support/(.+)\.rb$)) { "spec" }
14
14
  watch("config/routes.rb") { "spec/routing" }
15
15
  watch("app/controllers/application_controller.rb") { "spec/controllers" }
16
16
  watch("spec/rails_helper.rb") { "spec" }
17
17
 
18
18
  # Capybara
19
- watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
19
+ watch(%r(^app/views/(.+)/.*\.(erb|haml|slim)$)) { |m| "spec/features/#{m[1]}_spec.rb" }
20
20
  <%- end -%>
21
21
  end
@@ -4,5 +4,5 @@ require "<%= config[:gem_name] %>"
4
4
  require "<%= config[:gem_name] %>/cli"
5
5
  require "<%= config[:gem_name] %>/identity"
6
6
 
7
- Process.setproctitle <%= config[:gem_class] %>::Identity.label_version
7
+ Process.setproctitle <%= config[:gem_class] %>::Identity.version_label
8
8
  <%= config[:gem_class] %>::CLI.start
@@ -9,17 +9,24 @@ module <%= config[:gem_class] %>
9
9
  include Thor::Actions
10
10
  include ThorPlus::Actions
11
11
 
12
- package_name <%= config[:gem_class] %>::Identity.label
12
+ package_name <%= config[:gem_class] %>::Identity.version_label
13
13
 
14
- # Initialize.
15
14
  def initialize args = [], options = {}, config = {}
16
15
  super args, options, config
17
16
  end
17
+ <%- if config[:bin] -%>
18
18
 
19
- desc "-v, [--version]", "Show version."
19
+ desc "-e, [--edit]", "Edit #{<%= config[:gem_class] %>::Identity.label} settings in default editor."
20
+ map %w(-e --edit) => :edit
21
+ def edit
22
+ `#{editor} $HOME/#{<%= config[:gem_class] %>::Identity.file_name}`
23
+ end
24
+ <%- end -%>
25
+
26
+ desc "-v, [--version]", "Show #{<%= config[:gem_class] %>::Identity.label} version."
20
27
  map %w(-v --version) => :version
21
28
  def version
22
- say <%= config[:gem_class] %>::Identity.label_version
29
+ say <%= config[:gem_class] %>::Identity.version_label
23
30
  end
24
31
 
25
32
  desc "-h, [--help=HELP]", "Show this message or get help for a command."
@@ -13,8 +13,14 @@ module <%= config[:gem_class] %>
13
13
  "0.1.0"
14
14
  end
15
15
 
16
- def self.label_version
16
+ def self.version_label
17
17
  [label, version].join " "
18
18
  end
19
+ <%- if config[:bin] -%>
20
+
21
+ def self.file_name
22
+ ".#{name}rc"
23
+ end
24
+ <%- end -%>
19
25
  end
20
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemsmith
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -30,7 +30,7 @@ cert_chain:
30
30
  aSif+qBc6oHD7EQWPF5cZkzkIURuwNwPBngZGxIKaMAgRhjGFXzUMAaq++r59cS9
31
31
  xTfQ4k6fglKEgpnLAXiKdo2c8Ym+X4rIKFfedQ==
32
32
  -----END CERTIFICATE-----
33
- date: 2015-08-31 00:00:00.000000000 Z
33
+ date: 2015-09-17 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: thor
@@ -60,20 +60,6 @@ dependencies:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '2.1'
63
- - !ruby/object:Gem::Dependency
64
- name: rails
65
- requirement: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - "~>"
68
- - !ruby/object:Gem::Version
69
- version: '4.1'
70
- type: :runtime
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - "~>"
75
- - !ruby/object:Gem::Version
76
- version: '4.1'
77
63
  - !ruby/object:Gem::Dependency
78
64
  name: rake
79
65
  requirement: !ruby/object:Gem::Requirement
@@ -270,7 +256,7 @@ dependencies:
270
256
  - - ">="
271
257
  - !ruby/object:Gem::Version
272
258
  version: '0'
273
- description: Ruby gem skeleton generation for the professional gemsmith.
259
+ description: A command line interface for smithing new Ruby gems.
274
260
  email:
275
261
  - brooke@alchemists.io
276
262
  executables:
@@ -333,7 +319,7 @@ files:
333
319
  - lib/gemsmith/templates/%gem_name%/lib/generators/%gem_name%/install/install_generator.rb.tt
334
320
  - lib/gemsmith/templates/%gem_name%/lib/generators/%gem_name%/upgrade/USAGE.tt
335
321
  - lib/gemsmith/templates/%gem_name%/lib/generators/%gem_name%/upgrade/upgrade_generator.rb.tt
336
- - lib/gemsmith/templates/%gem_name%/spec/%gem_name%_spec.rb.tt
322
+ - lib/gemsmith/templates/%gem_name%/spec/lib/%gem_name%/%gem_name%_spec.rb.tt
337
323
  - lib/gemsmith/templates/%gem_name%/spec/spec_helper.rb.tt
338
324
  - lib/gemsmith/templates/%gem_name%/spec/support/kit/default_config.rb.tt
339
325
  - lib/gemsmith/templates/%gem_name%/spec/support/kit/stderr.rb.tt
@@ -362,5 +348,5 @@ rubyforge_project:
362
348
  rubygems_version: 2.4.8
363
349
  signing_key:
364
350
  specification_version: 4
365
- summary: Ruby gem skeleton generation for the professional gemsmith.
351
+ summary: A command line interface for smithing new Ruby gems.
366
352
  test_files: []
metadata.gz.sig CHANGED
Binary file