hypothesis-specs 0.0.6 → 0.0.7
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/CHANGELOG.md +4 -0
- data/README.markdown +2 -2
- data/Rakefile +25 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 218afa57bed2c0f87c5f15b8c96d3b9e9a261fa7
|
4
|
+
data.tar.gz: 4c2a257a18c6e222ae3baf1a18b251e3e483face
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 230e743d8e1f9ed62f9dde587b69159233c1658c97af7706e221d3a3a51364131f3bfb0f1640b656592ea3ac67297466df7ca104b4d17fed1908896c501adda2
|
7
|
+
data.tar.gz: b4ee0d523c664642814c958ef0af227eeb336757e8651aa6f463c2e70eb43eec3e96778c2e487252663d3f53a673d97476ed601125b25f7e7375bc37bc3773e6
|
data/CHANGELOG.md
CHANGED
data/README.markdown
CHANGED
@@ -59,7 +59,7 @@ and should work with anything else you care to use.
|
|
59
59
|
|
60
60
|
## Getting Started
|
61
61
|
|
62
|
-
Hypothesis is
|
62
|
+
Hypothesis is available on rubygems.org as a developer preview.
|
63
63
|
If you want to try it today you can use the current development branch by adding the following to your Gemfile:
|
64
64
|
|
65
65
|
```ruby
|
@@ -68,7 +68,7 @@ gem 'hypothesis-specs'
|
|
68
68
|
|
69
69
|
The API is still in flux, so be warned that you should expect it to break on upgrades!
|
70
70
|
Right now this is really more to allow you to try it out and provide feedback than something you should expect to rely on.
|
71
|
-
The more feedback we get, the sooner it will get
|
71
|
+
The more feedback we get, the sooner it will get there!
|
72
72
|
|
73
73
|
Note that in order to use Hypothesis for Ruby, you will need a rust toolchain installed.
|
74
74
|
Please go to [https://www.rustup.rs](https://www.rustup.rs) and follow the instructions if you do not already have one.
|
data/Rakefile
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'helix_runtime/build_task'
|
5
5
|
require 'date'
|
6
|
+
require 'open3'
|
6
7
|
|
7
8
|
begin
|
8
9
|
require 'rspec/core/rake_task'
|
@@ -88,6 +89,12 @@ GEMSPEC = 'hypothesis-specs.gemspec'
|
|
88
89
|
RELEASE_FILE = 'RELEASE.md'
|
89
90
|
CHANGELOG = 'CHANGELOG.md'
|
90
91
|
|
92
|
+
def run_for_output(*args)
|
93
|
+
out, result = Open3.capture2(*args)
|
94
|
+
abort if result.exitstatus != 0
|
95
|
+
out.strip
|
96
|
+
end
|
97
|
+
|
91
98
|
task :gem do
|
92
99
|
uncommitted = `git ls-files lib/ --others --exclude-standard`.split
|
93
100
|
uncommitted_ruby = uncommitted.grep(/\.rb$/)
|
@@ -96,13 +103,25 @@ task :gem do
|
|
96
103
|
abort 'Cannot build gem with uncomitted Ruby '\
|
97
104
|
"files #{uncommitted_ruby.join(', ')}"
|
98
105
|
end
|
106
|
+
|
99
107
|
spec = Gem::Specification.load(GEMSPEC)
|
100
108
|
|
101
|
-
unless system 'git', 'diff', '--exit-code', *spec.files
|
109
|
+
unless system 'git', 'diff', '--exit-code', *(spec.files - ['Rakefile'])
|
102
110
|
abort 'Cannot build gem from uncommited files'
|
103
111
|
end
|
104
112
|
|
105
|
-
|
113
|
+
previous_version = spec.version.to_s
|
114
|
+
|
115
|
+
if run_for_output('git', 'tag', '-l', previous_version).empty?
|
116
|
+
sh 'git', 'fetch', '--tags'
|
117
|
+
end
|
118
|
+
|
119
|
+
point_of_divergence = run_for_output(
|
120
|
+
'git', 'merge-base', 'HEAD', previous_version
|
121
|
+
)
|
122
|
+
|
123
|
+
has_changes = !system("git diff --exit-code #{point_of_divergence} "\
|
124
|
+
'-- src/ lib/')
|
106
125
|
if File.exist?(RELEASE_FILE)
|
107
126
|
release_contents = IO.read(RELEASE_FILE).strip
|
108
127
|
release_type, release_contents = release_contents.split("\n", 2)
|
@@ -158,9 +177,10 @@ task :gem do
|
|
158
177
|
git 'reset'
|
159
178
|
git 'add', CHANGELOG, GEMSPEC
|
160
179
|
git 'rm', RELEASE_FILE
|
161
|
-
git 'commit', '-m', "Bump version to #{new_version} and
|
180
|
+
git 'commit', '-m', "Bump version to #{new_version} and "\
|
181
|
+
"update changelog\n\n[skip ci]"
|
162
182
|
elsif has_changes
|
163
|
-
abort
|
183
|
+
abort 'Source changes found but no release file exists'
|
164
184
|
end
|
165
185
|
|
166
186
|
sh 'rm -rf hypothesis-specs*.gem'
|
@@ -179,6 +199,7 @@ file 'secrets.tar.enc' => 'secrets' do
|
|
179
199
|
end
|
180
200
|
|
181
201
|
task deploy: :gem do
|
202
|
+
Gem::Specification._clear_load_cache
|
182
203
|
spec = Gem::Specification.load('hypothesis-specs.gemspec')
|
183
204
|
|
184
205
|
succeeded = system('git', 'tag', spec.version.to_s)
|