drg 0.15.5 → 0.15.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63f814a01fc0fbe0162746f51d58f4fd4f761b74
4
- data.tar.gz: 51c609488f4b8f9fc82f8e71898da822f71c0f36
3
+ metadata.gz: 7d07718561b63d248e436961dca545007b488753
4
+ data.tar.gz: f418bac5e2c6bb10e45d7193d11dc24d4c7d4d65
5
5
  SHA512:
6
- metadata.gz: 4f95bdc5018996bcec997689a04b9d42e550007512858b5c895ee0078fe2c92a0bd21af92dcb21a22423eb83cf93f88ad7a8778a0a9427ca20ada802f4634cb4
7
- data.tar.gz: 7790f3fc153247b4e3426452ff2d180d8651fdaef949fd1764aa34e5370c0db97a2e592e315380bc069d62d125637d2f9cc25a9976fdd9d8767b97455e6d9cde
6
+ metadata.gz: 8aeb1467b533b35c6507d18aebbd4163002e5728ad7d90e4945c6ac393428c7a5903b24a85cfdf29e55a88f0796c693b6a4ccf3afd0f84d51d45a2c4402bf622
7
+ data.tar.gz: c5412c09381ca920633349490e1bde537a825e0e94711fda7563ae054441e6b1209cceee17b42949f68d8c432e004d6ddefcdd3ffd0fa8916ddce458f0400309
data/README.md CHANGED
@@ -1,5 +1,4 @@
1
1
  # DRG
2
- [![Code Climate](https://codeclimate.com/github/ridiculous/drg/badges/gpa.svg)](https://codeclimate.com/github/ridiculous/drg)
3
2
  [![Gem Version](https://badge.fury.io/rb/drg.svg)](http://badge.fury.io/rb/drg)
4
3
 
5
4
  A suite of rake tasks to help you test and manage your project.
@@ -8,7 +7,7 @@ The `drg:pin` suite provides enhanced dependency management with Bundler. You ca
8
7
  available minor, major or patch level version.
9
8
 
10
9
  The `drg:spec` task generates RSpec scaffolding for existing code. This helps bootstrap your tests and guide you in what
11
- [I think] you should be testing.
10
+ you should be testing.
12
11
 
13
12
  ## Requirements
14
13
 
@@ -16,8 +15,6 @@ The `drg:spec` task generates RSpec scaffolding for existing code. This helps bo
16
15
 
17
16
  ## Installation
18
17
 
19
- Add this line to your application's Gemfile:
20
-
21
18
  ```ruby
22
19
  gem 'drg'
23
20
  ```
@@ -141,7 +138,7 @@ gem 'rails', '~> 4.2'
141
138
  Want to pin gems at their __patch__ version?
142
139
 
143
140
  ```bash
144
- rake drg:pin:minor
141
+ rake drg:pin:patch
145
142
  ```
146
143
 
147
144
  This task will update your Gemfile with the approximate gem's patch version. It'll change:
data/drg.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Ryan Buckley"]
10
10
  spec.email = ["arebuckley@gmail.com"]
11
11
  spec.summary = %q{A suite of rake tasks to help you test and manage your project}
12
- spec.description = %q{A suite of rake tasks that provide enhanced dependency management and automatic spec generation}
12
+ spec.description = %q{A suite of rake tasks that provide enhanced dependency management and rspec scaffolding}
13
13
  spec.homepage = "https://github.com/ridiculous/drg"
14
14
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
15
15
  spec.executables = []
@@ -63,12 +63,12 @@ class DRG::Ruby::Condition
63
63
 
64
64
  def edit(txt)
65
65
  txt = txt.to_s
66
- txt.sub! /^return\s*/, 'returns '
66
+ txt.sub! /^return\b/, 'returns'
67
67
  txt.sub! /^returns\s*$/, 'returns nil'
68
- if txt.split(/\s/).length == 1
69
- txt = "returns #{txt}"
70
- elsif txt.include?(' = ')
68
+ if txt.include?(' = ')
71
69
  txt = "assigns #{txt}"
70
+ elsif !txt.empty? and txt !~ /^return/
71
+ txt = "returns #{txt.strip}"
72
72
  end
73
73
  txt.strip
74
74
  end
data/lib/drg/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DRG
2
- VERSION = '0.15.5'.freeze
2
+ VERSION = '0.15.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.5
4
+ version: 0.15.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Buckley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-27 00:00:00.000000000 Z
11
+ date: 2015-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby_parser
@@ -127,7 +127,7 @@ dependencies:
127
127
  - !ruby/object:Gem::Version
128
128
  version: '4'
129
129
  description: A suite of rake tasks that provide enhanced dependency management and
130
- automatic spec generation
130
+ rspec scaffolding
131
131
  email:
132
132
  - arebuckley@gmail.com
133
133
  executables: []