transpec 3.0.7 → 3.0.8

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: ab43ae133bb5cf23b8635f3aef7a1b4a1692f7bf
4
- data.tar.gz: 1a0f50c908280f6656a26b6a02a5a8c8d381fe9a
3
+ metadata.gz: f416a719f5696f5ffad34dd279c44a4f752b0fcf
4
+ data.tar.gz: 4d15ecafd7523918f531fed5e882d3e25e4fe257
5
5
  SHA512:
6
- metadata.gz: d0eb1d3a5dd8bb961e58f3cd020f24f8378c4a19362683d9baa4c1e34772a71cbb8500c78c19686911a534d071e24eda51367fdb6b6e2a3a059bbdd5d84bddc1
7
- data.tar.gz: 8296b384eec20dcc4b1a0ee9fe45229cde2646bfde7d14f3af0930076dcdc8c9e89e9cf8a8e0e5adacdc841f6d602ed5921ef80337f4bce94d587d68ff12fa41
6
+ metadata.gz: 83211303a773c69cb26043e1ccd0d82d6580743f6760a419a95abc769e101bf78a1c4bdf1bbaca8964d74064fef55a4b56364c36c4336ccd46ed7ebc9bf64190
7
+ data.tar.gz: 8f50ef060d0aef67d2ab6244f23af2821dc14e4253accd190076c2520a53f6b2ac4b663dd0b31017287145362f726cda47ca9b08e21407024f892bf78d544aee
data/.rubocop.yml CHANGED
@@ -7,6 +7,7 @@ AllCops:
7
7
  Exclude:
8
8
  - 'tmp/**/*'
9
9
  - 'vendor/**/*'
10
+ - '.cache/**/*'
10
11
 
11
12
  LineLength:
12
13
  Max: 100
data/.travis.yml CHANGED
@@ -5,12 +5,13 @@ rvm:
5
5
  - 2.1
6
6
  - 2.2
7
7
  - ruby-head
8
- - jruby
8
+ - jruby-19mode
9
9
  env:
10
10
  - RSPEC_VERSION=2.14
11
11
  - RSPEC_VERSION=2.99
12
12
  - RSPEC_VERSION=3.0
13
13
  - RSPEC_VERSION=3.1
14
+ - RSPEC_VERSION=3.2
14
15
  - RSPEC_VERSION=head
15
16
  before_install: gem update --remote bundler
16
17
  script: bundle exec rake ci
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Development
4
4
 
5
+ ## v3.0.8
6
+
7
+ * Fix error on converting spec with AWS.stub! without dynamic analysis. ([#100](https://github.com/yujinakayama/transpec/issues/100))
8
+
5
9
  ## v3.0.7
6
10
 
7
11
  * Include problematic file path in error message of failure on project copy. ([#96](https://github.com/yujinakayama/transpec/issues/96))
data/README.md CHANGED
@@ -1434,10 +1434,10 @@ end
1434
1434
 
1435
1435
  ## Compatibility
1436
1436
 
1437
- Tested on MRI 1.9, 2.0, 2.1 and JRuby in 1.9 mode.
1437
+ Tested on MRI 1.9, 2.0, 2.1, 2.2 and JRuby in 1.9 mode.
1438
1438
 
1439
1439
  ## License
1440
1440
 
1441
- Copyright (c) 2013–2014 Yuji Nakayama
1441
+ Copyright (c) 2013–2015 Yuji Nakayama
1442
1442
 
1443
1443
  See the [LICENSE.txt](LICENSE.txt) for details.
data/README.md.erb CHANGED
@@ -1455,7 +1455,7 @@ Will be converted to:
1455
1455
 
1456
1456
  ## Compatibility
1457
1457
 
1458
- Tested on MRI 1.9, 2.0, 2.1 and JRuby in 1.9 mode.
1458
+ Tested on MRI 1.9, 2.0, 2.1, 2.2 and JRuby in 1.9 mode.
1459
1459
 
1460
1460
  ## License
1461
1461
 
data/Rakefile CHANGED
@@ -10,11 +10,3 @@ Dir['tasks/**/*.rake'].each do |path|
10
10
  end
11
11
 
12
12
  task default: %w(spec style readme)
13
-
14
- ci_tasks = %w(spec)
15
-
16
- if RUBY_ENGINE != 'jruby' && RSpec::Core::Version::STRING.start_with?('2.14')
17
- ci_tasks.concat(%w(style readme:check travis:validate_matrix test:all))
18
- end
19
-
20
- task ci: ci_tasks
data/lib/transpec/cli.rb CHANGED
@@ -28,7 +28,7 @@ module Transpec
28
28
  def run(args)
29
29
  begin
30
30
  paths = OptionParser.new(config).parse(args)
31
- validate!
31
+ validate_project!
32
32
  rescue => error
33
33
  warn error.message
34
34
  return false
@@ -95,7 +95,7 @@ module Transpec
95
95
 
96
96
  private
97
97
 
98
- def validate!
98
+ def validate_project!
99
99
  unless config.forced?
100
100
  if Git.command_available? && Git.inside_of_repository? && !Git.clean?
101
101
  fail 'The current Git repository is not clean. Aborting. ' \
@@ -127,14 +127,14 @@ module Transpec
127
127
  return unless Git.command_available? && Git.inside_of_repository?
128
128
 
129
129
  commit_message = CommitMessage.new(report, project.rspec_version, ARGV)
130
- commit_message_path = Git.write_commit_message(commit_message.to_s)
130
+ commit_message_path = Git.write_commit_message(commit_message)
131
131
  commit_message_path = Pathname.new(commit_message_path).relative_path_from(Pathname.pwd)
132
132
 
133
133
  puts
134
134
  puts 'A commit message that describes the conversion summary was generated to'.color(:cyan)
135
135
  puts "#{commit_message_path}. To use the message, type the following command for".color(:cyan)
136
136
  puts 'the next commit:'.color(:cyan)
137
- puts ' git commit -aeF .git/COMMIT_EDITMSG'
137
+ puts " git commit -aeF #{commit_message_path}"
138
138
  end
139
139
 
140
140
  def display_final_guide
data/lib/transpec/git.rb CHANGED
@@ -15,7 +15,7 @@ module Transpec
15
15
  end
16
16
 
17
17
  def inside_of_repository?
18
- fail '`git` command is not available' unless command_available?
18
+ fail "`#{GIT}` command is not available" unless command_available?
19
19
  system("#{GIT} rev-parse --is-inside-work-tree > /dev/null 2> /dev/null")
20
20
  end
21
21
 
@@ -32,7 +32,7 @@ module Transpec
32
32
  def write_commit_message(message)
33
33
  fail_unless_inside_of_repository
34
34
  file_path = File.expand_path(File.join(git_dir_path, COMMIT_MESSAGE_FILENAME))
35
- File.write(file_path, message)
35
+ File.write(file_path, message.to_s)
36
36
  file_path
37
37
  end
38
38
 
@@ -28,7 +28,8 @@ module Transpec
28
28
  def dynamic_analysis_target?
29
29
  super &&
30
30
  receiver_node &&
31
- [:stub, :stub!, :stub_chain, :unstub, :unstub!].include?(method_name)
31
+ [:stub, :stub!, :stub_chain, :unstub, :unstub!].include?(method_name) &&
32
+ arg_node
32
33
  end
33
34
 
34
35
  def conversion_target?
@@ -5,7 +5,7 @@ module Transpec
5
5
  module Version
6
6
  MAJOR = 3
7
7
  MINOR = 0
8
- PATCH = 7
8
+ PATCH = 8
9
9
 
10
10
  def self.to_s
11
11
  [MAJOR, MINOR, PATCH].join('.')
data/tasks/ci.rake ADDED
@@ -0,0 +1,9 @@
1
+ # coding: utf-8
2
+
3
+ tasks = %w(spec)
4
+
5
+ if RSpec::Core::Version::STRING.start_with?('2.14') && RUBY_ENGINE != 'jruby'
6
+ tasks.concat(%w(style readme:check travis:validate_matrix test:all))
7
+ end
8
+
9
+ task ci: tasks
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transpec
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.7
4
+ version: 3.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuji Nakayama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-27 00:00:00.000000000 Z
11
+ date: 2015-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser
@@ -203,6 +203,7 @@ files:
203
203
  - lib/transpec/syntax/should_receive.rb
204
204
  - lib/transpec/util.rb
205
205
  - lib/transpec/version.rb
206
+ - tasks/ci.rake
206
207
  - tasks/demo.rake
207
208
  - tasks/fixtures/mail/2.99.0/COMMIT_EDITMSG
208
209
  - tasks/fixtures/mail/3.0.0/COMMIT_EDITMSG