hobby-devtools 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d446b32b20e4d3b1980fa79cd68c1292a5601654
4
+ data.tar.gz: 949da85909cce2ae34c5a53adb6db6a58d24ab8f
5
+ SHA512:
6
+ metadata.gz: 5f9901928c3e7ad209c1d602dc1c40c4e44c5b2573f1e198ccb74ac74dc75ad93ae2a2102443ce9fe874f4018ca44c0c44d898a3c8f162689e01406858f0177f
7
+ data.tar.gz: 979174bec5be56c1f41a25ded5f7231ad7812dc4cba874b41a3854b13cf8b9defe5262ff314e749ac107b8ce6b83e5f4d5f8db1897e36de4b1be3932c44478be
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ Gemfile.lock
@@ -0,0 +1,18 @@
1
+ Gem::Specification.new do |g|
2
+ g.name = 'hobby-devtools'
3
+ g.files = `git ls-files`.split($/)
4
+ g.version = '0.0.0'
5
+ g.summary = 'My setup for development of Hobby-related projects.'
6
+ g.authors = ['Anatoly Chernow']
7
+
8
+ g.add_dependency 'hobby'
9
+ g.add_dependency 'hobby-test'
10
+ g.add_dependency 'mutant'
11
+ g.add_dependency 'mutant-rspec'
12
+ g.add_dependency 'rspec'
13
+ g.add_dependency 'minitest'
14
+ g.add_dependency 'minitest-power_assert'
15
+ g.add_dependency 'pry'
16
+ g.add_dependency 'awesome_print'
17
+ g.add_dependency 'puma'
18
+ end
@@ -0,0 +1,9 @@
1
+ if defined? Mutant::CLI
2
+ module Mutant
3
+ class Selector::Expression
4
+ def call _subject
5
+ integration.all_tests
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,19 @@
1
+ require 'minitest'
2
+ require 'minitest-power_assert'
3
+
4
+ assert = if ENV['PRY']
5
+ require 'pry'
6
+ require 'awesome_print'
7
+
8
+ Module.new do
9
+ def assert &block
10
+ PowerAssert.start Proc.new, assertion_method: __method__ do |pa|
11
+ block.binding.pry unless pa.yield
12
+ end
13
+ end
14
+ end
15
+ else
16
+ Minitest::PowerAssert::Assertions
17
+ end
18
+
19
+ Minitest::Assertions.prepend assert
@@ -0,0 +1,47 @@
1
+ module Hobby
2
+ module Devtools
3
+ class RSpec
4
+ def self.describe &block
5
+ new &block
6
+ end
7
+
8
+ def initialize &block
9
+ instance_exec &block
10
+ @specs.each do |file|
11
+ test = Hobby::Test.new file
12
+ ::RSpec.describe [test, @app] do
13
+ before :each do |example|
14
+ test, app = described_class
15
+
16
+ socket = "app.for.#{example}.socket"
17
+ @pid = fork do
18
+ server = Puma::Server.new app.call
19
+ server.add_unix_listener socket
20
+ server.run
21
+ sleep
22
+ end
23
+
24
+ sleep 0.01 until File.exist? socket
25
+
26
+ @report = test[socket]
27
+ end
28
+
29
+ after(:each) { `kill -9 #{@pid}` }
30
+
31
+ it 'works' do
32
+ assert { @report.ok? }
33
+ end
34
+ end
35
+ end
36
+ end
37
+
38
+ def app &block
39
+ @app = block
40
+ end
41
+
42
+ def path string
43
+ @specs = Dir[string]
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,19 @@
1
+ require 'hobby/test'
2
+ require 'puma'
3
+
4
+ require 'hobby/devtools/power_assert'
5
+ require 'hobby/devtools/mutant'
6
+ require 'hobby/devtools/rspec'
7
+
8
+ RSpec.configure do |config|
9
+ config.expect_with :rspec, :minitest
10
+
11
+ require 'timeout'
12
+ config.around :each do |example|
13
+ Timeout.timeout 3, &example
14
+ end
15
+
16
+ config.after :suite do
17
+ `rm *.socket` unless Dir['*.socket'].empty?
18
+ end
19
+ end
metadata ADDED
@@ -0,0 +1,188 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hobby-devtools
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Anatoly Chernow
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-12-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: hobby
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: hobby-test
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: mutant
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: mutant-rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: minitest-power_assert
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: awesome_print
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: puma
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description:
154
+ email:
155
+ executables: []
156
+ extensions: []
157
+ extra_rdoc_files: []
158
+ files:
159
+ - ".gitignore"
160
+ - hobby-devtools.gemspec
161
+ - lib/hobby/devtools/mutant.rb
162
+ - lib/hobby/devtools/power_assert.rb
163
+ - lib/hobby/devtools/rspec.rb
164
+ - lib/hobby/devtools/rspec_helper.rb
165
+ homepage:
166
+ licenses: []
167
+ metadata: {}
168
+ post_install_message:
169
+ rdoc_options: []
170
+ require_paths:
171
+ - lib
172
+ required_ruby_version: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ version: '0'
177
+ required_rubygems_version: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ requirements: []
183
+ rubyforge_project:
184
+ rubygems_version: 2.5.2
185
+ signing_key:
186
+ specification_version: 4
187
+ summary: My setup for development of Hobby-related projects.
188
+ test_files: []