hypothesis-specs 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/README.markdown +2 -2
  4. data/Rakefile +25 -4
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48a94bed357b19120318e9ebef88f9600045c8c6
4
- data.tar.gz: 244148b5b8b3e39829715ef8b45fa73f279608b8
3
+ metadata.gz: 218afa57bed2c0f87c5f15b8c96d3b9e9a261fa7
4
+ data.tar.gz: 4c2a257a18c6e222ae3baf1a18b251e3e483face
5
5
  SHA512:
6
- metadata.gz: d1681b60aa71a7539eb27507db475ca0006596654134f46c619025a05ab5f42d983ec60d2eda8e21e8fc995edd8fe8d09690150254d430a1aa570e7e7745c411
7
- data.tar.gz: e589a93e47c2c23da7df0be396e0a9146fc3ed09b3e617a16f9b56325720dfdbac5211eba94d27b6880addbfff8f5619895b166a67956c9ca3a0da87da9ff1b7
6
+ metadata.gz: 230e743d8e1f9ed62f9dde587b69159233c1658c97af7706e221d3a3a51364131f3bfb0f1640b656592ea3ac67297466df7ca104b4d17fed1908896c501adda2
7
+ data.tar.gz: b4ee0d523c664642814c958ef0af227eeb336757e8651aa6f463c2e70eb43eec3e96778c2e487252663d3f53a673d97476ed601125b25f7e7375bc37bc3773e6
@@ -1,3 +1,7 @@
1
+ ## Hypothesis for Ruby 0.0.7 (2018-02-19)
2
+
3
+ This release updates an error in the README.
4
+
1
5
  ## Hypothesis for Ruby 0.0.6 (2018-02-19)
2
6
 
3
7
  This release just updates the gem description.
@@ -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 not available on rubygems.org as a developer preview.
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 here!
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
- has_changes = system 'git diff --exit-code origin/master -- src/ lib/'
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 update changelog"
180
+ git 'commit', '-m', "Bump version to #{new_version} and "\
181
+ "update changelog\n\n[skip ci]"
162
182
  elsif has_changes
163
- abort! 'Source changes found but no release file exists'
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hypothesis-specs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - David R. Maciver