chemistrykit 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +12 -0
- data/README.md +11 -0
- data/Rakefile +94 -0
- data/chemistrykit.gemspec +2 -4
- data/features/brew.feature +21 -0
- data/features/support/env.rb +1 -4
- data/lib/chemistrykit/cli/cli.rb +14 -3
- data/lib/chemistrykit/formula/base.rb +0 -4
- metadata +9 -7
- data/ext/mkrf_conf.rb +0 -22
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
chemistrykit
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-1.9.3-p429
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,19 @@
|
|
1
|
+
#2.1.0 (2013-06-28)
|
2
|
+
- Updated documentation for #62 release process.
|
3
|
+
- Bumped version to 2.1.0 to prepare for release.
|
4
|
+
- Changed the oder of branch updates in rakefile #62
|
5
|
+
- #62 fixed another small issue with rakefile
|
6
|
+
- fixed small typo in Rakefile per #62
|
7
|
+
- updated a note to the change log and built out the rake tasks to close #62
|
8
|
+
- updated gemspec to remove the ext, cleaned up the base class.
|
9
|
+
- updated rvm version files and removed the ext directory
|
10
|
+
- moved the build dir deletion to the before so that post test inspection could be carried out, also added a rough implementation to close #63
|
11
|
+
|
1
12
|
#2.0.0 (2013-06-27)
|
2
13
|
- Updated to Selenium-Connect version to 2.0.0
|
3
14
|
- Improved performance with driver hooks
|
4
15
|
- Added the ability to specify config files on brew.
|
16
|
+
- NOTE: Updated default config file from `_config.yaml` to `config.yaml`
|
5
17
|
- Added the "catalyst" concept for injecting data into formulas.
|
6
18
|
|
7
19
|
#1.3.0 (2013-06-22)
|
data/README.md
CHANGED
@@ -56,3 +56,14 @@ All issues and questions related to this project should be logged using the [git
|
|
56
56
|
### Run the local version of the executable:
|
57
57
|
|
58
58
|
ckit
|
59
|
+
|
60
|
+
##Releaseing
|
61
|
+
The release process is rather automated, just use one rake task with the new version number:
|
62
|
+
|
63
|
+
rake release_start['2.1.0']
|
64
|
+
|
65
|
+
And another to finish the release:
|
66
|
+
|
67
|
+
rake release_finish['A helpful tag message that will be included in the gemspec.']
|
68
|
+
|
69
|
+
This handles updating the change log, committing, and tagging the release.
|
data/Rakefile
CHANGED
@@ -23,3 +23,97 @@ end
|
|
23
23
|
RSpec::Core::RakeTask.new(:spec)
|
24
24
|
|
25
25
|
Cucumber::Rake::Task.new(:cucumber)
|
26
|
+
|
27
|
+
|
28
|
+
#TODO This could probablly be more cleanly automated
|
29
|
+
desc 'Start a release (Requires Git Flow)'
|
30
|
+
task :release_start, :version do |t, args|
|
31
|
+
version = args['version']
|
32
|
+
|
33
|
+
#make sure we have the latest stuff
|
34
|
+
system "git fetch --all"
|
35
|
+
|
36
|
+
#first make sure master is checked out and up to date
|
37
|
+
system "git checkout master"
|
38
|
+
system "git pull --no-edit origin master"
|
39
|
+
|
40
|
+
#then make sure develop is up to date
|
41
|
+
system "git checkout develop"
|
42
|
+
system "git pull --no-edit origin develop"
|
43
|
+
|
44
|
+
#next assure all the tests run
|
45
|
+
task(:build).invoke
|
46
|
+
|
47
|
+
#start the release process
|
48
|
+
system "git flow release start #{version}"
|
49
|
+
|
50
|
+
#update the version number in the .gemspec file
|
51
|
+
gemspec = File.join(Dir.getwd, 'chemistrykit.gemspec')
|
52
|
+
updated = File.read(gemspec).gsub(/s.version(\s+)=(\s?["|']).+(["|'])/){
|
53
|
+
"s.version#{$1}=#{$2}#{version}#{$3}"
|
54
|
+
}
|
55
|
+
File.open(gemspec, 'w'){ |f| f.write(updated) }
|
56
|
+
|
57
|
+
#commit the version bump
|
58
|
+
system "git add chemistrykit.gemspec"
|
59
|
+
system "git commit -m 'Bumped version to #{version} to prepare for release.'"
|
60
|
+
|
61
|
+
puts "You've started release #{version}, make any last minute updates now.\n"
|
62
|
+
end
|
63
|
+
|
64
|
+
#TODO This could probablly be more cleanly automated
|
65
|
+
desc 'Finish a release (Requires Git Flow and Gem Deploy Permissions'
|
66
|
+
task :release_finish, :update_message do |t, args|
|
67
|
+
message = args['update_message']
|
68
|
+
gemspec = File.join(Dir.getwd, 'chemistrykit.gemspec')
|
69
|
+
changelog = File.join(Dir.getwd, 'CHANGELOG.md')
|
70
|
+
version = File.read(gemspec).match(/s.version\s+=\s?["|'](.+)["|']/)[1]
|
71
|
+
|
72
|
+
###Changelog
|
73
|
+
#get the latest tag
|
74
|
+
last_tag = `git describe --abbrev=0`
|
75
|
+
#get the commit hash since the last that version was merged to develop
|
76
|
+
hash = `git log --grep="Merge branch 'release/#{last_tag.chomp}' into develop" --format="%H"`
|
77
|
+
#get all the commits since them less merges
|
78
|
+
log = `git log --format="- %s" --no-merges #{hash.chomp}..HEAD`
|
79
|
+
|
80
|
+
changelog_contents = File.read(changelog)
|
81
|
+
date = Time.new.strftime("%Y-%m-%d")
|
82
|
+
#create the new heading
|
83
|
+
updated_changelog = "##{version} (#{date})\n" + log + "\n" + changelog_contents
|
84
|
+
#update the contents
|
85
|
+
File.open(changelog, 'w'){ |f| f.write(updated_changelog) }
|
86
|
+
puts "Updated change log for version #{version}\n"
|
87
|
+
|
88
|
+
###Update the gemspec with the message
|
89
|
+
updated_gemspec = File.read(gemspec).gsub(/s.description(\s+)=(\s?["|']).+(["|'])/){
|
90
|
+
"s.description#{$1}=#{$2}#{message}#{$3}"
|
91
|
+
}
|
92
|
+
File.open(gemspec, 'w'){ |f| f.write(updated_gemspec) }
|
93
|
+
|
94
|
+
#Commit the updated change log and gemspec
|
95
|
+
system "git commit -am 'Updated CHANGELOG.md and gemspec for #{version} release.'"
|
96
|
+
|
97
|
+
#build the gem
|
98
|
+
system "gem build chemistrykit.gemspec"
|
99
|
+
|
100
|
+
#push the gem
|
101
|
+
system "gem push chemistrykit-#{version}.gem"
|
102
|
+
|
103
|
+
#remove the gem file
|
104
|
+
system "rm chemistrykit-#{version}.gem"
|
105
|
+
|
106
|
+
#finish the release
|
107
|
+
system "git flow release finish -m '#{message}' #{version}"
|
108
|
+
|
109
|
+
#push develop
|
110
|
+
system "git push origin develop"
|
111
|
+
|
112
|
+
#push master
|
113
|
+
system "git push origin master"
|
114
|
+
|
115
|
+
#push tags
|
116
|
+
system "git push --tags"
|
117
|
+
|
118
|
+
puts "Rock and roll, you just released ChemistryKit #{version}!\n"
|
119
|
+
end
|
data/chemistrykit.gemspec
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "chemistrykit"
|
3
|
-
s.version = "2.
|
3
|
+
s.version = "2.1.0"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.authors = ["Dave Haeffner", "Jason Fox"]
|
6
6
|
s.email = ["dave@arrgyle.com", "jason@arrgyle.com"]
|
7
7
|
s.homepage = "https://github.com/arrgyle/chemistrykit"
|
8
8
|
s.summary = "A simple and opinionated web testing framework for Selenium that follows convention over configuration."
|
9
|
-
s.description = "
|
9
|
+
s.description = "Automated build process"
|
10
10
|
s.license = 'MIT'
|
11
11
|
|
12
12
|
s.files = `git ls-files`.split($/)
|
@@ -28,6 +28,4 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.add_development_dependency "aruba", "~> 0.5.1"
|
29
29
|
s.add_development_dependency "cucumber", "~> 1.2.1"
|
30
30
|
s.add_development_dependency "rake", "~> 10.0.3"
|
31
|
-
|
32
|
-
s.extensions = 'ext/mkrf_conf.rb'
|
33
31
|
end
|
data/features/brew.feature
CHANGED
@@ -58,3 +58,24 @@ Feature: Brewing a ChemistryKit project
|
|
58
58
|
"""
|
59
59
|
When I run `ckit brew`
|
60
60
|
Then the stdout should contain "1 example, 0 failures"
|
61
|
+
|
62
|
+
Scenario: Brew a single beaker
|
63
|
+
Given a file named "config.yaml" with:
|
64
|
+
"""
|
65
|
+
jar: '../../../vendor/selenium-server-standalone-2.33.0.jar'
|
66
|
+
log: 'evidence'
|
67
|
+
host: 'localhost'
|
68
|
+
"""
|
69
|
+
And a file named "beaker/other_beaker.rb" with:
|
70
|
+
"""
|
71
|
+
describe "Other", :depth => 'shallow' do
|
72
|
+
let(:book) { Formulas::Bookie.new(@driver) }
|
73
|
+
|
74
|
+
it "loads an external web page" do
|
75
|
+
book.open "http://www.google.com"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
"""
|
79
|
+
When I run `ckit brew --beaker=beaker/other_beaker.rb`
|
80
|
+
Then the stdout should contain "1 example, 0 failures"
|
81
|
+
|
data/features/support/env.rb
CHANGED
data/lib/chemistrykit/cli/cli.rb
CHANGED
@@ -29,6 +29,9 @@ module ChemistryKit
|
|
29
29
|
method_option :params, :type => :hash
|
30
30
|
method_option :tag, :default => ['depth:shallow'], :type => :array
|
31
31
|
method_option :config, :default => 'config.yaml', :aliases => "-c", :desc => "Supply alternative config file."
|
32
|
+
#TODO there should be a facility to simply pass a path to this command
|
33
|
+
method_option :beaker, :type => :string
|
34
|
+
|
32
35
|
def brew
|
33
36
|
load_config
|
34
37
|
require 'chemistrykit/shared_context'
|
@@ -38,7 +41,12 @@ module ChemistryKit
|
|
38
41
|
load_page_objects
|
39
42
|
setup_tags
|
40
43
|
rspec_config
|
41
|
-
|
44
|
+
|
45
|
+
if options['beaker']
|
46
|
+
run_rspec([options['beaker']])
|
47
|
+
else
|
48
|
+
run_rspec(Dir.glob(File.join(Dir.getwd)))
|
49
|
+
end
|
42
50
|
end
|
43
51
|
|
44
52
|
protected
|
@@ -95,8 +103,11 @@ module ChemistryKit
|
|
95
103
|
end
|
96
104
|
end
|
97
105
|
|
98
|
-
def run_rspec
|
99
|
-
|
106
|
+
def run_rspec(beakers)
|
107
|
+
|
108
|
+
#puts single_beaker.inspect
|
109
|
+
|
110
|
+
RSpec::Core::Runner.run(beakers)
|
100
111
|
end
|
101
112
|
|
102
113
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chemistrykit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-06-
|
13
|
+
date: 2013-06-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thor
|
@@ -172,19 +172,19 @@ dependencies:
|
|
172
172
|
- - ~>
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: 10.0.3
|
175
|
-
description:
|
176
|
-
perfomrance.
|
175
|
+
description: Automated build process
|
177
176
|
email:
|
178
177
|
- dave@arrgyle.com
|
179
178
|
- jason@arrgyle.com
|
180
179
|
executables:
|
181
180
|
- ckit
|
182
|
-
extensions:
|
183
|
-
- ext/mkrf_conf.rb
|
181
|
+
extensions: []
|
184
182
|
extra_rdoc_files: []
|
185
183
|
files:
|
186
184
|
- .gitignore
|
187
185
|
- .rspec
|
186
|
+
- .ruby-gemset
|
187
|
+
- .ruby-version
|
188
188
|
- .travis.yml
|
189
189
|
- CHANGELOG.md
|
190
190
|
- CONTRIBUTORS.md
|
@@ -195,7 +195,6 @@ files:
|
|
195
195
|
- TODO.md
|
196
196
|
- bin/ckit
|
197
197
|
- chemistrykit.gemspec
|
198
|
-
- ext/mkrf_conf.rb
|
199
198
|
- features/brew.feature
|
200
199
|
- features/catalyst.feature
|
201
200
|
- features/exit_status.feature
|
@@ -246,6 +245,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
245
|
- - ! '>='
|
247
246
|
- !ruby/object:Gem::Version
|
248
247
|
version: '0'
|
248
|
+
segments:
|
249
|
+
- 0
|
250
|
+
hash: 3509311149288293585
|
249
251
|
requirements: []
|
250
252
|
rubyforge_project:
|
251
253
|
rubygems_version: 1.8.25
|
data/ext/mkrf_conf.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rubygems/command.rb'
|
3
|
-
require 'rubygems/dependency_installer.rb'
|
4
|
-
require 'rbconfig'
|
5
|
-
|
6
|
-
begin
|
7
|
-
Gem::Command.build_args = ARGV
|
8
|
-
rescue NoMethodError
|
9
|
-
end
|
10
|
-
|
11
|
-
inst = Gem::DependencyInstaller.new
|
12
|
-
begin
|
13
|
-
if RbConfig::CONFIG['host_os'] =~ /mswin|win|mingw/
|
14
|
-
inst.install "win32-dir", "~> 0.4.1"
|
15
|
-
end
|
16
|
-
rescue
|
17
|
-
exit(1)
|
18
|
-
end
|
19
|
-
|
20
|
-
f = File.open(File.join(File.dirname(__FILE__), "Rakefile"), "w") # create dummy rakefile to indicate success
|
21
|
-
f.write("task :default\n")
|
22
|
-
f.close
|