transpec 3.0.7 → 3.0.8
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 +4 -4
- data/.rubocop.yml +1 -0
- data/.travis.yml +2 -1
- data/CHANGELOG.md +4 -0
- data/README.md +2 -2
- data/README.md.erb +1 -1
- data/Rakefile +0 -8
- data/lib/transpec/cli.rb +4 -4
- data/lib/transpec/git.rb +2 -2
- data/lib/transpec/syntax/method_stub.rb +2 -1
- data/lib/transpec/version.rb +1 -1
- data/tasks/ci.rake +9 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f416a719f5696f5ffad34dd279c44a4f752b0fcf
|
4
|
+
data.tar.gz: 4d15ecafd7523918f531fed5e882d3e25e4fe257
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83211303a773c69cb26043e1ccd0d82d6580743f6760a419a95abc769e101bf78a1c4bdf1bbaca8964d74064fef55a4b56364c36c4336ccd46ed7ebc9bf64190
|
7
|
+
data.tar.gz: 8f50ef060d0aef67d2ab6244f23af2821dc14e4253accd190076c2520a53f6b2ac4b663dd0b31017287145362f726cda47ca9b08e21407024f892bf78d544aee
|
data/.rubocop.yml
CHANGED
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–
|
1441
|
+
Copyright (c) 2013–2015 Yuji Nakayama
|
1442
1442
|
|
1443
1443
|
See the [LICENSE.txt](LICENSE.txt) for details.
|
data/README.md.erb
CHANGED
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
|
-
|
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
|
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
|
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
|
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
|
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?
|
data/lib/transpec/version.rb
CHANGED
data/tasks/ci.rake
ADDED
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.
|
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:
|
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
|