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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01f16e12ae07fafe4611531e4166a24e8dca6081
4
- data.tar.gz: b28bb86247c3e29aab501bb883dbdac35e42289e
3
+ metadata.gz: bbfc9d2b5fef6cac51aaa1376d0c6cf84b0bbb01
4
+ data.tar.gz: 118c3bec4f54adffaf63f373eb3ad8fe19ae0eb8
5
5
  SHA512:
6
- metadata.gz: 1794edc9d59561e48ae34c832d7e93df6365af2598efeecc186177769ed723e449ffad810c4ffc927e8aedd429b6332825dc13955daa3250619caeebfe6eeb03
7
- data.tar.gz: a66f1a5586cb20889d153f9c725de915c01236ed91b4006e131b5889210d47cceb2abc732e73bd92bac52fdc9e92e3990b742d115e14afcb29916313d11d873e
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
- puts ""
16
- puts "running tests"
21
+ # TODO run bundle update and commit any changes
22
+
23
+ announce "running tests"
24
+
17
25
  shell "bundle exec rake"
18
26
 
19
- puts ""
20
- puts "bumping version number"
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
- puts ""
39
- puts "running bundle update"
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
- puts ""
50
- puts "pushing to github"
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 project == "hq-dev"
77
+ if offline
60
78
  puts ""
61
- puts "installing gem"
62
- shell "gem install hq-dev -v #{ver}"
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
@@ -2,8 +2,9 @@ aws-sdk 1.9.5
2
2
  bson_ext 1.8.5
3
3
  capybara 2.0.2
4
4
  cucumber 1.3.1
5
- hq-dev 0.0.15
5
+ hq-dev 0.0.17
6
6
  hq-engine 0.0.3
7
+ hq-logger 0.0.1
7
8
  hq-tools 0.8.0
8
9
  hq-web 0.0.2
9
10
  json 1.7.7
@@ -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 the file is created correctly
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 the file is created correctly
36
+ Then there should be a file "abc.def":
37
+ \"\"\"
38
+ Hello world
39
+ \"\"\"
37
40
  """
38
41
 
39
42
  When I run "cucumber"
@@ -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.15
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-14 00:00:00.000000000 Z
11
+ date: 2013-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber