hq-dev 0.0.15 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/hq-dev-release +36 -18
- data/data/gem-versions +2 -1
- data/features/temp-dir.feature +8 -5
- data/lib/hq/cucumber/temp-dir.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbfc9d2b5fef6cac51aaa1376d0c6cf84b0bbb01
|
4
|
+
data.tar.gz: 118c3bec4f54adffaf63f373eb3ad8fe19ae0eb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 748e8a996b4d5d3f134d8245db49deb4b799ab5f3b6605110a3b8d78b442ce8585c58639c90e38cee0294f507e5fa49404d29c7fd4ada82f8865d67d4395f9c8
|
7
|
+
data.tar.gz: a40a565dfa2025cbac474715858231070a8b45c5de4b2526214c7094d003cd351e91c6552b5f71cc8dd2ebb7a0074aef31bd4d46686b2f4e6ec11c3d5cbee1cf
|
data/bin/hq-dev-release
CHANGED
@@ -4,6 +4,12 @@ require "fileutils"
|
|
4
4
|
|
5
5
|
project = File.basename(Dir.pwd)
|
6
6
|
ver = ARGV[0]
|
7
|
+
offline = ARGV[1] == "--offline"
|
8
|
+
|
9
|
+
def announce message
|
10
|
+
puts ""
|
11
|
+
puts message
|
12
|
+
end
|
7
13
|
|
8
14
|
def shell cmd
|
9
15
|
success = system cmd
|
@@ -12,13 +18,16 @@ end
|
|
12
18
|
|
13
19
|
# TODO check the workspace is clean
|
14
20
|
|
15
|
-
|
16
|
-
|
21
|
+
# TODO run bundle update and commit any changes
|
22
|
+
|
23
|
+
announce "running tests"
|
24
|
+
|
17
25
|
shell "bundle exec rake"
|
18
26
|
|
19
|
-
|
20
|
-
|
27
|
+
announce "bumping version number"
|
28
|
+
|
21
29
|
shell "echo #{ver} > etc/hq-dev/version"
|
30
|
+
|
22
31
|
if File.exist? "data/gem-versions"
|
23
32
|
File.open "data/gem-versions.new", "w" do
|
24
33
|
|file_io|
|
@@ -35,31 +44,40 @@ if File.exist? "data/gem-versions"
|
|
35
44
|
FileUtils.mv "data/gem-versions.new", "data/gem-versions"
|
36
45
|
end
|
37
46
|
|
38
|
-
|
39
|
-
|
40
|
-
shell "bundle update"
|
47
|
+
announce "running bundle update"
|
48
|
+
|
49
|
+
shell "bundle update" unless offline
|
50
|
+
shell "bundle update --local" if offline
|
51
|
+
|
52
|
+
announce "committing changes"
|
41
53
|
|
42
|
-
puts ""
|
43
|
-
puts "committing changes"
|
44
54
|
shell "git add -A"
|
45
55
|
shell "git diff --cached"
|
56
|
+
|
46
57
|
sleep 2
|
58
|
+
|
47
59
|
shell "git commit -m 'bump version number to #{ver}'"
|
48
60
|
|
49
|
-
|
50
|
-
|
61
|
+
announce "pushing to github" unless offline
|
62
|
+
announce "commit to local git" if offline
|
63
|
+
|
51
64
|
shell "git tag #{ver}"
|
52
|
-
shell "git push origin master #{ver}"
|
65
|
+
shell "git push origin master #{ver}" unless offline
|
66
|
+
|
67
|
+
announce "pushing to rubygems" unless offline
|
68
|
+
announce "building gem" if offline
|
53
69
|
|
54
|
-
puts ""
|
55
|
-
puts "pushing to rubygems"
|
56
70
|
shell "gem build #{project}.gemspec"
|
57
|
-
shell "gem push #{project}-#{ver}.gem"
|
71
|
+
shell "gem push #{project}-#{ver}.gem" unless offline
|
72
|
+
|
73
|
+
announce "installing gem"
|
74
|
+
|
75
|
+
shell "gem install #{project}-#{ver}.gem"
|
58
76
|
|
59
|
-
if
|
77
|
+
if offline
|
60
78
|
puts ""
|
61
|
-
puts "
|
62
|
-
|
79
|
+
puts "recording offline release"
|
80
|
+
system "echo offline release #{project} #{ver} | mail james@phsys.co.uk"
|
63
81
|
end
|
64
82
|
|
65
83
|
puts ""
|
data/data/gem-versions
CHANGED
data/features/temp-dir.feature
CHANGED
@@ -14,9 +14,6 @@ Feature: Temporary directory and files
|
|
14
14
|
Before do
|
15
15
|
$placeholders["${name}"] = "world"
|
16
16
|
end
|
17
|
-
Then /^the file is created correctly$/ do
|
18
|
-
File.read("abc.def").should == "Hello world"
|
19
|
-
end
|
20
17
|
"""
|
21
18
|
|
22
19
|
And a file "features/test.feature":
|
@@ -27,13 +24,19 @@ Feature: Temporary directory and files
|
|
27
24
|
\"\"\"
|
28
25
|
Hello world
|
29
26
|
\"\"\"
|
30
|
-
Then
|
27
|
+
Then there should be a file "abc.def":
|
28
|
+
\"\"\"
|
29
|
+
Hello world
|
30
|
+
\"\"\"
|
31
31
|
Scenario: Placeholders
|
32
32
|
Given a file "abc.def":
|
33
33
|
\"\"\"
|
34
34
|
Hello ${name}
|
35
35
|
\"\"\"
|
36
|
-
Then
|
36
|
+
Then there should be a file "abc.def":
|
37
|
+
\"\"\"
|
38
|
+
Hello world
|
39
|
+
\"\"\"
|
37
40
|
"""
|
38
41
|
|
39
42
|
When I run "cucumber"
|
data/lib/hq/cucumber/temp-dir.rb
CHANGED
@@ -56,3 +56,14 @@ Given /^a directory "(.+)"$/ do
|
|
56
56
|
Dir.mkdir dir_name
|
57
57
|
|
58
58
|
end
|
59
|
+
|
60
|
+
Then /^there should be a file "(.+)":$/ do
|
61
|
+
|file_name, file_contents_expect|
|
62
|
+
|
63
|
+
file_contents_actual =
|
64
|
+
File.read file_name
|
65
|
+
|
66
|
+
file_contents_actual.strip.should ==
|
67
|
+
file_contents_expect.strip
|
68
|
+
|
69
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hq-dev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Pharaoh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|