text2048 0.10.0 → 0.10.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: 30b141b8b2c0dc4ac46adadb4c29b3bb9eb242a0
4
- data.tar.gz: e975eab497eeb64b7d2cba4f5630f964b0291c15
3
+ metadata.gz: 89758e865b37478a09bec28723b658c852c8fee3
4
+ data.tar.gz: 6460c24d0f3db36f73322bfe299471fa9804033c
5
5
  SHA512:
6
- metadata.gz: 6983d688faca6be66191813f72fa171e3746cad2ebe211db7106c0b21a72987a5b285cc69c2b16e7dd8e57e95ea9f816594dc86eea2b39d357c0f25d3d0f1142
7
- data.tar.gz: 29b156dd1b9c2aee69a85ca739c9fc4bdb81eb389daf116133645739a79544cad080cf48c96e90100dbfdd62187db4031b4f01aece4c4a3cc217282a2899edd7
6
+ metadata.gz: f478dfd038ee7a57c25d596095fcb7f78acf6547bf0f45e0be3bce25a58cf22d23949a23e5080d21b35c6ecdc99e2db3ec88db121ebf14365aa6dfd612ede422
7
+ data.tar.gz: ff27433c3808da48425a4b6b2eb6b950a0a71d8fedf25da4103c0a90c4e0db36e142b7f19d1ff1f34b72ac864c3dea57e949a51adf0f41d1a71e1ff9190b8eee
data/Rakefile CHANGED
@@ -1,105 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'bundler/gem_tasks'
4
- require 'coveralls/rake/task'
5
-
6
3
  task default: [:test, :reek, :flog, :flay, :rubocop]
7
4
  task test: [:spec, :cucumber, 'coveralls:push']
8
5
  task travis: :default
9
6
 
10
- Coveralls::RakeTask.new
11
-
12
- begin
13
- require 'rspec/core/rake_task'
14
- RSpec::Core::RakeTask.new
15
- rescue LoadError
16
- task :spec do
17
- $stderr.puts 'RSpec is disabled'
18
- end
19
- end
20
-
21
- begin
22
- require 'cucumber/rake/task'
23
- Cucumber::Rake::Task.new
24
- rescue LoadError
25
- task :cucumber do
26
- $stderr.puts 'Cucumber is disabled'
27
- end
28
- end
29
-
30
- begin
31
- require 'rubocop/rake_task'
32
- Rubocop::RakeTask.new
33
- rescue LoadError
34
- task :rubocop do
35
- $stderr.puts 'Rubocop is disabled'
36
- end
37
- end
38
-
39
- begin
40
- require 'reek/rake/task'
41
- Reek::Rake::Task.new do |t|
42
- t.fail_on_error = true
43
- t.verbose = false
44
- t.reek_opts = '--quiet'
45
- t.source_files = FileList['lib/**/*.rb']
46
- end
47
- rescue LoadError
48
- task :reek do
49
- $stderr.puts 'Reek is disabled'
50
- end
51
- end
52
-
53
- begin
54
- require 'flog'
55
- desc 'Analyze for code complexity'
56
- task :flog do
57
- flog = Flog.new(continue: true)
58
- flog.flog(*FileList['lib/**/*.rb'])
59
- threshold = 19
60
-
61
- bad_methods = flog.totals.select do |name, score|
62
- !(/##{flog.no_method}$/ =~ name) && score > threshold
63
- end
64
- bad_methods.sort { |a, b| a[1] <=> b[1] }.reverse.each do |name, score|
65
- printf "%8.1f: %s\n", score, name
66
- end
67
- unless bad_methods.empty?
68
- fail "#{bad_methods.size} methods have a complexity > #{threshold}"
69
- end
70
- end
71
- rescue LoadError
72
- task :flog do
73
- $stderr.puts 'Flog is disabled'
74
- end
75
- end
76
-
77
- begin
78
- require 'rake/tasklib'
79
- require 'flay'
80
- require 'flay_task'
81
-
82
- FlayTask.new do |t|
83
- t.dirs = FileList['lib/**/*.rb'].map do |each|
84
- each[/[^\/]+/]
85
- end.uniq
86
- t.threshold = 0
87
- t.verbose = true
88
- end
89
- rescue LoadError
90
- task :flay do
91
- $stderr.puts 'Flay is disabled'
92
- end
93
- end
94
-
95
- begin
96
- require 'yard'
97
- YARD::Rake::YardocTask.new do |t|
98
- t.options = ['--no-private']
99
- t.options << '--debug' << '--verbose' if verbose == true
100
- end
101
- rescue LoadError
102
- task :yard do
103
- $stderr.puts 'YARD is disabled'
104
- end
105
- end
7
+ Dir.glob('tasks/*.rake').each { |each| import each }
@@ -6,7 +6,7 @@ Given(/^a board:$/) do |string|
6
6
  layout = string.split("\n").reduce([]) do |memo, row|
7
7
  memo << row.split(' ').map { |each| each.to_i }
8
8
  end
9
- @view = Text2048::TextView.new(output)
9
+ @view = Text2048::TextView.new(dummy_output)
10
10
  @board = Text2048::Board.new(layout)
11
11
  end
12
12
 
@@ -28,7 +28,7 @@ end
28
28
 
29
29
  Then(/^the board is:$/) do |string|
30
30
  @view.update(@board)
31
- output.messages.should eq(string)
31
+ dummy_output.messages.should eq(string)
32
32
  end
33
33
 
34
34
  Then(/^the score is (\d+)$/) do |score|
@@ -36,5 +36,5 @@ Then(/^the score is (\d+)$/) do |score|
36
36
  end
37
37
 
38
38
  Then(/^it is game over$/) do
39
- @board.lose?.should be_true
39
+ expect(@board.lose?).to be_truthy
40
40
  end
@@ -14,6 +14,6 @@ class Output
14
14
  end
15
15
  end
16
16
 
17
- def output
17
+ def dummy_output
18
18
  @output ||= Output.new
19
19
  end
@@ -3,5 +3,5 @@
3
3
  # This module smells of :reek:UncommunicativeModuleName
4
4
  module Text2048
5
5
  # gem version.
6
- VERSION = '0.10.0'.freeze
6
+ VERSION = '0.10.1'.freeze
7
7
  end
@@ -34,5 +34,6 @@ Gem::Specification.new do |gem|
34
34
  gem.test_files += Dir.glob('features/**/*')
35
35
 
36
36
  gem.required_ruby_version = '>= 1.9.3'
37
+ gem.add_dependency 'curses', '~> 1.0.1'
37
38
  gem.add_development_dependency 'bundler', '~> 1.6.2'
38
39
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: text2048
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasuhito Takamiya
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-21 00:00:00.000000000 Z
11
+ date: 2014-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: curses
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 1.0.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.1
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement